At present: freshness mechanically only really offers the ability to control the freshness of output. While there are some ways you can cleverly use this simple behavior to generate some more unique interactions; it feels like there is a surprising lack of ways to actually utilize the feature directly without cobbling together something janky to get what you want.
What?
The main ask/suggestion is to have a way to allow the "freshness" rating of ingredients be used to determine output quantity.
For example: say you have a recipe that takes a single spoilable item (Item A) and outputs a non-spoilable item (Item Z). For that output, you could set a range between 0 and 10. If A is 90% fresh it would produce 9 of item Z. A is 50% fresh, it would produce 5 of Z. Etc etc. This could (and should) also be applicable to fluids.
To keep things simple, I imagine the range would work like so:
- Use the existing amount_min and amount_max with a boolean flag for "amount_determined_by_freshness" in order to avoid any weird or complex interactions with the existing probability based amount_min/amount_max.
- Edgecase behavior for if all of the input doesn't spoil could just be to default to the max; or simply fall back to probability. (I would consider this improper api usage though).
- Rounding to the nearest whole number is fine, no need to add any sort of point values for productivity or RNG. The point is simply to have a linear scaling factor for output.
- If the output also includes spoilable results then these would still follow whatever freshness inheritance they had before in addition to the count mechanics getting applied. (Basically no behavioral changes).
A secondary ask (if the above is impossible or if this suggestion is convenient enough) is a way to use "freshness" as the fuel value. This would just be a boolean flag on the item prototype "freshness_determines_fuel_value" or something to that effect. This would then enable you to use anything that consumes fuel as a way to transform freshness into output. (Example: Coal at 50% freshness would produce half the expected fuel power. IE, 4MJ => 2MJ)
