Page 1 of 1

Mod Suggestion: Removing/Changing spoilage on an item-by-item Basis

Posted: Wed Oct 30, 2024 9:38 am
by Hijaker
Currently the settings in the Map-Gen changes spoilage for all items, and from what I can tell the spoilage-modifying mods currently on the portal all remove it entirely.
Having dealt with Gleba one thing I realised frustrated me the most, was that the science pack itself would spoil.
Having a mod that would let me set that to never spoil would be a nice addition.

Re: Mod Suggestion: Removing/Changing spoilage on an item-by-item Basis

Posted: Wed Oct 30, 2024 10:51 pm
by Silari
If you just want the one item to not spoil, it should be as simple as a single line in data.lua:

Code: Select all

data.raw.tool["agricultural-science-pack"].spoil_ticks = nil
Can't test it myself as I don't own SA, and the prototype docs are completely lacking any kind of info for spoil_ticks, but that's how it appears to work.

Re: Mod Suggestion: Removing/Changing spoilage on an item-by-item Basis

Posted: Mon Nov 11, 2024 9:29 pm
by Silari
kiaolsl wrote: Mon Nov 11, 2024 8:12 am Can you check it? I tried but it didn't work.
Nope. As I said, I don't own SA. You can try putting it in data-final-fixes.lua instead, with a dependency set for the Space Age mod. That'd make sure SA isn't overwriting it. Beyond that, :shrug: