665c0f2c248cf

665c0f2c25396
2 Guests are here.
 

Topic: Add/modify objects in replicators Read 2973 times  

665c0f2c259dbmireazma

665c0f2c25a53
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.

665c0f2c25e6evoodoo47

665c0f2c25ecc
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 »

665c0f2c25fe8mireazma

665c0f2c26036
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?

665c0f2c260e5voodoo47

665c0f2c2612e
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.

665c0f2c2623cmireazma

665c0f2c2628b
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?

665c0f2c265d3voodoo47

665c0f2c26629
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 »

665c0f2c266dfmireazma

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

665c0f2c26865mireazma

665c0f2c268b2
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 »

665c0f2c269d8voodoo47

665c0f2c26a27
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.

665c0f2c26af0mireazma

665c0f2c26b3b
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...

665c0f2c26c65voodoo47

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

665c0f2c26f04voodoo47

665c0f2c26f50
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.
665c0f2c27126
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! »

665c0f2c271ebvoodoo47

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

665c0f2c276d4ZylonBane

665c0f2c2772e
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.

665c0f2c27cc8unn_atropos

665c0f2c27d47
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

665c0f2c27e2bvoodoo47

665c0f2c27e88
and remember, tuesdays are double rep days!

665c0f2c27fa0mireazma

665c0f2c28000
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.

665c0f2c280devoodoo47

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

665c0f2c281f5mireazma

665c0f2c2824d
Alright then. Damn, I almost hate how fast you reply :D

665c0f2c28308ZylonBane

665c0f2c28354
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.

665c0f2c28467voodoo47

665c0f2c284bd
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.
2 Guests are here.
Did he come from the other side?
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
665c0f2c29388