673fa6d159d45

673fa6d15aec0
7 Guests are here.
 

Topic: Add/modify objects in replicators Read 3795 times  

673fa6d15b632mireazma

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

673fa6d15bab1voodoo47

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

673fa6d15bc67mireazma

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

673fa6d15bd9dvoodoo47

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

673fa6d15bf1dmireazma

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

673fa6d15c31dvoodoo47

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

673fa6d15c412mireazma

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

673fa6d15c5acmireazma

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

673fa6d15c71bvoodoo47

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

673fa6d15c8acmireazma

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

673fa6d15c9d6voodoo47

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

673fa6d15cc69voodoo47

673fa6d15ccab
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.
673fa6d15cea4
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! »

673fa6d15cf5bvoodoo47

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

673fa6d15d46dZylonBane

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

673fa6d15db06unn_atropos

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

673fa6d15dca2voodoo47

673fa6d15dd00
and remember, tuesdays are double rep days!

673fa6d15de37mireazma

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

673fa6d15df7dvoodoo47

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

673fa6d15e072mireazma

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

673fa6d15e19eZylonBane

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

673fa6d15e328voodoo47

673fa6d15e388
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.
7 Guests are here.
Sim-Salamander Sim-Salabim. Ich kann wieder zaubern!
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
673fa6d161e61