Page 1 of 1

[2.0.13] percent_spoiled applies additively in recipes with spoilable ingredients

Posted: Sat Nov 02, 2024 2:26 am
by cakem
I'm trying to create a recipe that turns one fish into two fish that are 50% spoiled. The problem is that the spoiled amount is subtracted from the ingredients rather than multiplying the spoilage of the ingredients.

Expected results: 60% -> 30% -> 15% -> etc..

Actual result: 60% -> 10% -> spoilage

The reason that I believe this is a bug is because I can't really see in what scenario this would be the desired behavior for a mod maker. It's not intuitive and leads to this weird behavior that when the input ingredients spoilage level is <= percent_spoiled, the result is always spoilage.

Re: [2.0.13] percent_spoiled applies additively in recipes with spoilable ingredients

Posted: Sat Nov 02, 2024 10:33 pm
by Rseding91
Thanks for the report. This is currently working as intended. The percent_spoiled feature was added specifically for producing what would otherwise be fresh products already some percent spoiled. It was never built with crafting from spoilable items. This isn't a bad modding interface request to be able to control this behavior differently but for now this is how it was designed to work.

Re: [2.0.13] percent_spoiled applies additively in recipes with spoilable ingredients

Posted: Sat Nov 02, 2024 10:49 pm
by kiwidrew
What happens if you set 'result_is_always_fresh' on the recipe while there is a non-zero 'percent_spoiled' on the result item?