66669a2c94a40

66669a2c952ef
2 Guests are here.
 

Topic: Add/modify objects in replicators Read 3028 times  

66669a2c95a89mireazma

66669a2c95b03
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.

66669a2c95e7bvoodoo47

66669a2c95ed3
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 »

66669a2c95ff6mireazma

66669a2c9607e
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?

66669a2c9613cvoodoo47

66669a2c9618c
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.

66669a2c9628amireazma

66669a2c962db
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?

66669a2c96651voodoo47

66669a2c966a2
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 »

66669a2c96793mireazma

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

66669a2c9693cmireazma

66669a2c96986
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 »

66669a2c96abbvoodoo47

66669a2c96b06
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.

66669a2c96bbfmireazma

66669a2c96c08
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...

66669a2c96ca9voodoo47

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

66669a2c96f1bvoodoo47

66669a2c96f8a
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.
66669a2c971e6
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! »

66669a2c972advoodoo47

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

66669a2c978c2ZylonBane

66669a2c9791f
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.

66669a2c97f0eunn_atropos

66669a2c97f7a
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

66669a2c98063voodoo47

66669a2c980b5
and remember, tuesdays are double rep days!

66669a2c981e6mireazma

66669a2c9823e
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.

66669a2c982fcvoodoo47

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

66669a2c983e0mireazma

66669a2c98455
Alright then. Damn, I almost hate how fast you reply :D

66669a2c98510ZylonBane

66669a2c9855f
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.

66669a2c98679voodoo47

66669a2c986c4
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.
voodoo47: I can LOL NO people 'til kingdom come.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
66669a2c99542