percent_spoiled in ItemProductPrototype should allow values so that decay time left increases

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
protocol_1903
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

percent_spoiled in ItemProductPrototype should allow values so that decay time left increases

Post by protocol_1903 »

As stated in title. I would like to be able to create recipes that increase the decay time left on an item instead of just setting it to a specific percentage. It currently operates by setting it to some spoilage percent of the current value, if nonzero then meaning it is decayed more than it was. Specifically, I want an items decay_time to increase by 10% whenever the recipe is completed. There's currently no way to define a result with more time left. I propose that values < 0 increase the spoilage time above the items current value. If this change is introduced, it would open the possibility to items with spoilage time > 100%. If that's undesirable, then just clamp the output item to 100% when it's created. No need to force that onto the recipe.
Last edited by protocol_1903 on Tue Feb 04, 2025 9:30 pm, edited 2 times in total.
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.
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: percent_spoiled in ItemProductPrototype should allow values so that decay time left increases

Post by Muche »

I don't think inverting values makes sense (neither from backward compatibility view nor from the property meaning itself (10% spoiled is 90% fresh after all, and the property name is percent_spoiled)).
Extending accepted values to negatives with the meaning of (relatively) extending decay time does make sense though.
protocol_1903
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: percent_spoiled in ItemProductPrototype should allow values so that decay time left increases

Post by protocol_1903 »

Same difference, I generally think of things as x% fresh instead of x% spoiled. Its also how the spoilage bar is rendered. However it's resolved, my request is extending decay time through recipes, how it's done doesn't really matter.
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.
curiosity
Filter Inserter
Filter Inserter
Posts: 668
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: percent_spoiled in ItemProductPrototype should allow values so that decay time left increases

Post by curiosity »

protocol_1903 wrote: Tue Feb 04, 2025 7:46 pm However it's resolved, my request is extending decay time through recipes, how it's done doesn't really matter.
Then you should have worded it better, because right now it looks like it does.
protocol_1903
Filter Inserter
Filter Inserter
Posts: 278
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: percent_spoiled in ItemProductPrototype should allow values so that decay time left increases

Post by protocol_1903 »

curiosity wrote: Tue Feb 04, 2025 9:06 pm
protocol_1903 wrote: Tue Feb 04, 2025 7:46 pm However it's resolved, my request is extending decay time through recipes, how it's done doesn't really matter.
Then you should have worded it better, because right now it looks like it does.
That better?
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”