How to adjust amount of fluid spawns

So, wanted to churn out a quick mod. Want to spawn some gasoline. Putting gasoline into an itemgroup is fine, but when the gas spawns it’s in a jerrycan with 10000 portions. This doesn’t really jive with the mod, because it’s intended to be fuel for chainsaws and I’d prefer it to be partially used.

Right, so, I want to spawn the gasoline in a smaller container (like a gallon jug), or adjust the volume of gasoline inside the jerrycan. Does anyone know how I can do this? I genuinely have no idea.

I’m not opposed to creating my own 1 gallon gas can but I’m not sure how to spawn it as having gas inside of it.

Ah, it took me longer than I’d like to admit, but I can add “container-item” to specify a container type.

IE:

{ "item": "gasoline", "prob": 25, "container-item": "jug_plastic"}

This allows me to alter the container, but does not allow me to change the capacity manually. In other words, using a gallon jug does spawn less gasoline than the jerrycan, but both containers spawn at 100% capacity.

I’ll leave the thread in case someone is looking for this in the future.

1 Like

I am no coder, but when I need do add or adjust things like that, I always look for similar patches of code somewhere else and then just reverse engineer it to get the idea how to write the things I need.
So, you do sometimes find fuel in jerrycans ingame, and they’re not full. There has to be some code responsible for that.
That’s just a quick suggestion.

(For instance, I remember finding plastic jerrycans of diesel inside the tanks from The Tank Mod. I suggest you try searching there)

Yeah, that’s basically how I do most things, trying to find an instance somewhere else. The problem is that I’m just not that familiar with the layout of the Cataclysm stuff. Not yet, anyway.

I couldn’t find any instance of anything in game that used partially filled fluid containers, but I’ll have another look. Thanks for the input.