6743555de1883

6743555de3345
2 Guests are here.
 

Topic: Stackable Snacks Read 1405 times  

6743555de383bYankee Clipper

6743555de38b2
As those who have played any of Christine's excellent fan missions will have noticed, she has changed the way that snacks get stored in the player's inventory. Stuff like soda, chips, vodka, etc, get stored in the same way as ammo or hypos. Instead of taking up one inventory square for each individual item - like taking 3 squares for 3 cans of soda - all of the items stack together in one square along with a count of the number of items.

I am trying to implement this as a mod for the game itself. I started out with just the soda. I have this so far as a dml:
Code: [Select]
DML1
+ObjProp -91 "CombineType" = Soda Can
+ObjProp -91 "StackCount" = 1

According to dbmod.log, the changes are loading without error. When I play the game, the soda does stack. After I got 2 cans of soda, I tried to use them. That didn't work right. Both cans disappeared with a single use and I only got +1 to my health.

In the vanilla game, the soda has a script associated with it called "Comestible". In Christine's mission, that part is changed to "NVComestible". I tried just changing it in my mod to the same name, but then nothing happens when I try to drink the soda. The soda doesn't disappear, no health - nothing. The part I add when I change the name of the script is:
Code: [Select]
+ObjProp -91 "Scripts"
{
"Script 0" NVComestible
}

I'm guessing this means her mod is loading some script that my mod doesn't know anything about. I gave it the name, but the script must not be there in the vanilla version of the game.

Am I diagnosing the problem correctly, and if so, how do I fix it? Where would the script be located?
« Last Edit: 12. July 2014, 01:31:42 by Yankee Clipper »
6743555de3b12
It might be that you need to load the NVScripts package, to run the NVComestible script, which prevents the whole stack of sodas from vaporizing in a single use. I don't know how it's done through dmls, but in Shocked you would load a map and select File -> Script -> Load Script.

BTW Infinite uses this system for food, see if it helps! Soda, juice and chips stack into "A snack." (+1 HP) while the 3 alcoholic beverages stack into "A drink." (+1 MP).

Engine features -> Combine type: snack
Engine features -> Stack count: 1
Scripts -> NVComestible
Script -> Objlist Arg: NVComestibleHeal=1

Engine features -> Combine type: drink
Engine features -> Stack count: 1
Scripts -> NVComestible
Script -> Objlist Arg: NVComestiblePsi=1; NVComestibleHeal=0

6743555de3c89Yankee Clipper

6743555de3cd8
It looks like the problem is I'm not running ADaOB, and NVScript does not get loaded by default in the vanilla maps. Voodoo47 had a mod where he was hacking that force field in MedSci so you could turn it on and off and in that one he said that if you wanted it to work with vanilla, you had to load each mission file into ShockEd, load NVScript, and then save the mission.

https://www.systemshock.org/index.php?topic=6608.0

I just finished up doing that, and it did the trick. Wish there was a way to do it with a dml.

When you combine all your snacks into one and all your alcohol into another, how does the game know what icon to use?
6743555de3dff
I had similar problems with food not working in the unstripped maps, because those didn't have the NVScripts. If I may suggest, make two versions of your mod: Adaob (dml) and Vanilla (+maps). When items with different icons stack into the same pile, they assume the icon of the first one collected.

6743555de3edaYankee Clipper

6743555de3f23
If I may suggest, make two versions of your mod

That's a good idea. I tried a variation on it, where I had the tweaked maps in one file and the dmls in another. The dml would be the same anyway in either case. But, the maps are over the site's upload file size limit. The come out to 15mb, while the limit is a little over 10mb.
6743555de40d2
I have added you to the "Contributor" group which raises your upload limit per post to 100MB. Although I would like you to rethink whether this mod justifies containing modified maps and how this affects compatibility between mods.

6743555de41e4Yankee Clipper

6743555de422d
I thought about that when I hit the limit. I hadn't initially realized just how big all the map files were. My thought was to have the maps as a separate download. That way everyone could just download the mod itself and then only those that would need it would download the separate maps file. But, I want to respect your opinion. If you think adding such a big file for this little mod is questionable, I won't do it.

I don't think I follow you regarding the compatibility between mods comment. Are you saying that modders in general should use ADaOB as a base?

Also, after thinking about this for a bit, it occurred to me that maybe this could be a job for future versions of your SS2Tool. If it were to replace the vanilla maps with maps that already had NVScript loaded, the installation would become more mod friendly in general.

6743555de45b9voodoo47

6743555de4615
maybe this could be a job for future versions of your SS2Tool. If it were to replace the vanilla maps with maps that already had NVScript loaded
this is actually planned, so my recommendation would be to leave the maps alone for now.
6743555de494f
I don't think I follow you regarding the compatibility between mods comment. Are you saying that modders in general should use ADaOB as a base?
That was aimed at future modding. More mods like yours may be developed in future and not each of them should contain a modified map set. It will be preferable to have a central way of distributing the maps and then adding various mods on top. SS2Tool will indeed provide a way to do this.

6743555de49efvoodoo47

6743555de4a3f
to make it short, just make dml mods whenever you can, and let us worry about the rest.
2 Guests are here.
Life grows within the womb of these walls, life that has never seen the surface of the Earth.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6743555de5b15