673fabf93b787

673fabf93c545
1 Guest is here.
 

Topic: Add/modify objects in replicators Read 3798 times  

673fabf93cbf0mireazma

673fabf93cc5c
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.

673fabf93cfecvoodoo47

673fabf93d042
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 »

673fabf93d13amireazma

673fabf93d185
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?

673fabf93d236voodoo47

673fabf93d27f
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.

673fabf93d392mireazma

673fabf93d3df
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?

673fabf93d7a9voodoo47

673fabf93d7fa
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 »

673fabf93d8a0mireazma

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

673fabf93da52mireazma

673fabf93da9d
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 »

673fabf93dbbevoodoo47

673fabf93dc08
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.

673fabf93dcbbmireazma

673fabf93dd03
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...

673fabf93dd9fvoodoo47

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

673fabf93dffavoodoo47

673fabf93e043
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.
673fabf93e1f9
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! »

673fabf93e2a0voodoo47

673fabf93e2e8
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 »
673fabf93e3d1
Awesome. Btw I edited adding a request for value rep sound modification. Not sure if you saw that. It's probably SCP-worthy too.

673fabf93e70aZylonBane

673fabf93e75f
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.

673fabf93ebc7unn_atropos

673fabf93ec25
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

673fabf93ecbdvoodoo47

673fabf93ed0b
and remember, tuesdays are double rep days!

673fabf93ee02mireazma

673fabf93ee5e
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.

673fabf93ef13voodoo47

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

673fabf93effamireazma

673fabf93f05b
Alright then. Damn, I almost hate how fast you reply :D

673fabf93f10aZylonBane

673fabf93f153
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.

673fabf93f243voodoo47

673fabf93f28e
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.
Did he come from the other side?
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
673fabf93fdcc