6649304f2599f

6649304f25f75
1 Guest is here.
 

Topic: Add/modify objects in replicators Read 2823 times  

6649304f267e2mireazma

6649304f26861
Hello, newbie here. I want to make a mod in which the player can buy additional objects at replicators.
The idea is to be able to buy cyber modules, if such a mod is not already done (I'd also like your opinion on how much would be 1 cyber module worth).
Is it possible? What do I need to get it done? Any pointing in the right direction or tips are appreciated.

6649304f26cd2voodoo47

6649304f26d35
you can make a (map) dml patch that would modify the items available for purchase in a replicator (you will need a repbase object number, 123 here):
ObjProp 123 "RepContents"        // type sRepContents              , flags 0x0000 , editor name: "GameSys: Rep. Contents"
{
   "Obj 1 Name" 1 EXP
   "Obj 1 Cost" 100
   "Obj 2 Name" 1 EXP
   "Obj 2 Cost" 100
   "Obj 3 Name" 10 EXP
   "Obj 3 Cost" 1000
   "Obj 4 Name" 10 EXP
   "Obj 4 Cost" 1000
}

ObjProp 123 "RepHacked"          // type sRepContents              , flags 0x0000 , editor name: "GameSys: Rep. Hack Contents"
{
   "Obj 1 Name" 1 EXP
   "Obj 1 Cost" 50
   "Obj 2 Name" 1 EXP
   "Obj 2 Cost" 50
   "Obj 3 Name" 10 EXP
   "Obj 3 Cost" 500
   "Obj 4 Name" 10 EXP
   "Obj 4 Cost" 500
}
this will change all the items into cybmodules, and make them cost half if hacked.

you will also need a gamesys.dml to add physics to the modules so they would drop out of the replicator properly;
+ObjProp "EXP Cookies" "PhysType"           // type cPhysTypeProp             , flags 0x0011 , editor name: "Physics: Model: Type"
{
   "Type" Sphere
   "# Submodels" 1
}

also, this mod will blow any sort of balance to kingdom come, obviously.
« Last Edit: 08. September 2017, 11:12:11 by voodoo47 »

6649304f26e59mireazma

6649304f26ead
Thank you  for pointing me in the right direction and also for the code.
I wish you get the help you need just as I got the needed help from you :)
EDIT:
I want to make it so I use as much of what SS2 has to offer in one run, without compromising the balance. Hence the question remains: in your opinion how much should 1 cyber module cost so the balance is preserved?

6649304f26f78voodoo47

6649304f26fc9
I'm guessing using the costs from the code wouldn't be too horrible, but it's still way too close to just typing the add modules cheat into the console.

6649304f270f5mireazma

6649304f27146
I see what you mean. I haven't played SS2 in years and now that a friend of mine finished it a week ago, I felt like "embarking" it anew. But I really want to be able to use as much of the encountered stuff as I can w/o replaying a different career, meaning a lot more cyber modules, still earned not added.
Initially I thought I would make a trainer-like app with Cheat Engine, which you'd use to trade nanites for cyber modules and I was that close to finishing it but then I felt I should look for a more... proper, natural way  -- a mod.
What other documentation should I go through, besides that link you provided?

6649304f27592voodoo47

6649304f275eb
pretty sure that you can get almost all the skills when playing on the normal difficulty.

you will need some basic Shocked knowledge, as you will have to find the object id of the repbase(s) you want to modify. if you want to modify just one, pick it and I can get that for you, allowing you to skip that part altogether (for example, the "hacked" one with the ghost on medsci1 is 300).


//my suggestion for your mod would be - slap it onto the medsci1 repbase 300, and replace only the last two fields, and only when hacked, so:
Quote by medsci1.mis.dml:
DML1

ObjProp 300 "RepHacked"
{
   "Obj 3 Name" 1 EXP
   "Obj 3 Cost" 100
   "Obj 4 Name" 10 EXP
   "Obj 4 Cost" 1000
}
that should allow for a relatively non-balance-blowing-up experience. note that you will still need the gamesys.dml so the modules will have proper physics.
Quote by gamesys.dml:
DML1

+ObjProp "EXP Cookies" "PhysType"
{
   "Type" Sphere
   "# Submodels" 1
}
aand I have just completed the mod for you, daamit. sorry. feel free to put it together, test it and publish it (when zipping up, the dmls go directly into the archive, so no subfolders. 7zip's 7z format is preferred).
« Last Edit: 05. September 2017, 20:25:29 by voodoo47 »

6649304f276aemireazma

6649304f27700
Thank you again for the wealth of information. I'll get to work now :d

6649304f2788fmireazma

6649304f278e3
Before I'll try the code you wrote, I said I'd dig a little further into modding to get more familiarized with it. Please give me a hand once again.
I've read through DromED manual, the written tutorial and I've watched a couple of tutorials on YT. I re-read several times on how to do dml's (your link).
Yet I'm stuck at an early stage:
Where and how to get the original code for the objects? Like the original code for (300)?
I've found it by hilight_obj_type RepBase and I can see the properties but could I see it as code, like you wrote above? I'd guess I'd need a dump? The manual says nothing about how to do a dump. There's a thread where you mention dumping all props but I can't relate.
EDIT:
Can I add ShockED Toolkit 1.3.1 or is it too old?
« Last Edit: 01. September 2017, 12:54:39 by mireazma »

6649304f27a44voodoo47

6649304f27a96
SS2tool will install the latest version of Shocked and set it up for you (you can tweak the resolution in user.cfg, something slightly smaller than your desktop resolution is recommended).

you can dump all object properties via the editor by entering dump_props_full into the command window (lower right corner), that will create proplist.txt in your SS2 folder, you can view all the obj props that can be used in dmls there.

you can also export existing archetype props from the editor, pres F3 and type pistol and hit enter, click export/export as dml, and a txt file will be created with all the props of the pistol in dml format.

6649304f27bc0mireazma

6649304f27c13
Done. It works so... seamlessly. I put 1 cyber module = 115 nanites and 10 cyber modules = 1000.
I can now enjoy SS2 so much more.
Thanks again.
Next project: recipes - hypos and other consumables from chemicals, organs,... :P Just kidding...

6649304f27cc6voodoo47

6649304f27d16
I was kind of thinking that maybe you'd want to make the mod public or something.
6649304f27ebf
Yeah, would be a nice way to give back to the community, you know?

6649304f27fb2voodoo47

6649304f28004
well, I can do it (pack and make public) in 30 seconds (as this is literally the mod in its full completeness), but the mod was his idea, so I'll only do it if he has no interest.
6649304f2822c
I was going to bitch and moan, but I suppose those prices are good in that you'll only be able to buy up to something like 20-40 modules in any given playthrough, which isn't a huge amount and wont utterly destroy balance, and may even add some meaningful choice in the process (desire to buy nanites conflicting with desire to buy ammo, maint. tools, and whatever else).
Doesn't have to be a bad thing and I may even be interested in the dml myself. Currently I find myself just spamming ammo and maint tools from value reps, which also is a bit balance-destroying.

Edit: Also, request while we're on the subject of value reps: make the "THANK YOU FOR USING VALUE REP" sound effect play only when closing the shop GUI window. That shit is highly annoying when buying multiple items. And it just makes more sense this way.
« Last Edit: 05. September 2017, 19:47:50 by Join usss! »

6649304f282ffvoodoo47

6649304f2834f
very well, check the mods subforum in a minute.

//not sure whether the sounds are editable in that way, but we'll check.
« Last Edit: 06. September 2017, 18:36:49 by voodoo47 »
6649304f28456
Awesome. Btw I edited adding a request for value rep sound modification. Not sure if you saw that. It's probably SCP-worthy too.

6649304f28844ZylonBane

6649304f288a0
not sure whether the sounds are editable in that way, but we'll check.
The replicator script doesn't generate any messages. So no modifying when it makes sounds.

6649304f28dd1unn_atropos

6649304f28e2e
make the "THANK YOU FOR USING VALUE REP" sound effect play only when closing the shop GUI window.

You evil man are not going to take away my

Thank you
Thank you
Th
Th
Th
Th
Th
Th
Th
Th
Thank you
Thank you for using Value Rep

!  :lordy:
Acknowledged by: JML

6649304f28ee2voodoo47

6649304f28f36
and remember, tuesdays are double rep days!

6649304f29053mireazma

6649304f290a5
I couldn't take credit for the mod - voodoo47 made it entirely which is what I thank him for again. TBH I didn't even hope it would work out so discreet, as if it's the original game. Alright, I've noticed the shift of interest in saving nanites for another cyber module, instead of buying ammo or hypos, so I wonder again if 115/1000 are the right prices.
Please, voodoo47 make the mod yourself and decide the prices!

As for the TYFCVR (lol) it's kinda drilling into my brain in an almost satisfying way.

6649304f2917evoodoo47

6649304f291ce
it's already live in the mods subforum, 110/1000 as far as prices are concerned.

6649304f2928emireazma

6649304f292df
Alright then. Damn, I almost hate how fast you reply :D

6649304f2939dZylonBane

6649304f293ed
I'm not sure I see what the point is of having cybermods be cheaper if you buy ten of them at once. This isn't some free-to-play mobile game.

6649304f29519voodoo47

6649304f29566
to screw with the player - "am I going to buy 5 modules now, or wait some more, buy ten and save a few nanites?".

also, the only way the modules (and nanites, for that matter) would make sense is for the world object to be just a container for a "charge" (represented by the amount) that would allow the player to upgrade/pay. and the amount of charge and its price would be easy to modify as needed, I'd imagine.

blah blahs aside, I don't really care, made the mod for mireazma, JU! wanted it to be public, so it is, whoever thinks loading this is a good idea can go ahead and do so, it doesn't have to make sense, or have a point.
1 Guest is here.
My mom likes the cute animals while my dad can't get enough of auto racing.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6649304f2966f