Page 1 of 1
Add a surface property for a spoilage time multiplier
Posted: Wed Aug 13, 2025 3:20 pm
by MrSmoothieHuman
I'd like to ask about adding a new surface property, which'd affect the amount of time any item on that surface would take to spoil. I imagine it to be implemented as a multiplier, so that if you put `spoilage_time_multiper = 1.5`, any item on the surface would have its timer lengthened by 1.5x.
I can see this being used most often by new planet mods, to add new challenges with the spoilage mechanic. (I'd specifically like to use it for planets like aquilo, where due to its sub-zero temperatures, spoilage is slowed considerably

)
Re: Add a surface property for a spoilage time multiplier
Posted: Wed Aug 13, 2025 5:18 pm
by boskid
Spoilage was not designed with features like this in mind and as such all optimizations that went into spoilage logic make it not possible to have spoilage time multiplier based on surface because spoilable items simply do not know on what surface they are and making them know would require adjusting spoil tick every every time spoilable item is moved between inventories. On top of that there are inventories that cannot be attributed to a specific surface (including script inventories or linked chests with containers placed on multiple surfaces) and in some cases items may not even be in an inventory (player's cursor stack, item on ground, inserter). It is unlikely for this to be ever implemented.
Re: Add a surface property for a spoilage time multiplier
Posted: Wed Aug 13, 2025 6:18 pm
by Rseding91
Something that *might* be possible is a value that modifies the spoil time on item creation. But it would be permanent for that item and I have no idea how it would interact when merging with other items made on different surfaces.
Re: Add a surface property for a spoilage time multiplier
Posted: Thu Aug 14, 2025 12:26 am
by MrSmoothieHuman
Rseding91 wrote: Wed Aug 13, 2025 6:18 pm
Something that *might* be possible is a value that modifies the spoil time on item creation. But it would be permanent for that item and I have no idea how it would interact when merging with other items made on different surfaces.
that sounds pretty good to me!
I imagine, if im reading correctly that it'd just merge the times, ignoring the fact one is longer then the other? similar to the concept of merging stacks of different quality spoilable items.
Re: Add a surface property for a spoilage time multiplier
Posted: Thu Aug 14, 2025 5:33 am
by protocol_1903
MrSmoothieHuman wrote: Thu Aug 14, 2025 12:26 am
Rseding91 wrote: Wed Aug 13, 2025 6:18 pm
Something that *might* be possible is a value that modifies the spoil time on item creation. But it would be permanent for that item and I have no idea how it would interact when merging with other items made on different surfaces.
that sounds pretty good to me! :)
I imagine, if im reading correctly that it'd just merge the times, ignoring the fact one is longer then the other? similar to the concept of merging stacks of different quality spoilable items.
That seems fun, i can think of a few interesting use cases where the current system fails. Stuff like preserved items, things that spoil "faster" etc