Add a surface property for a spoilage time multiplier

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 151
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Add a surface property for a spoilage time multiplier

Post 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 :lol: )
coder? i hardly know her!
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4100
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Add a surface property for a spoilage time multiplier

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16049
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Add a surface property for a spoilage time multiplier

Post 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.
If you want to get ahold of me I'm almost always on Discord.
MrSmoothieHuman
Fast Inserter
Fast Inserter
Posts: 151
Joined: Sat Aug 05, 2023 1:20 am
Contact:

Re: Add a surface property for a spoilage time multiplier

Post 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.
coder? i hardly know her!
protocol_1903
Filter Inserter
Filter Inserter
Posts: 304
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Add a surface property for a spoilage time multiplier

Post 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
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Post Reply

Return to “Modding interface requests”