[2.0.72] Item spoil_to_trigger_result does not consistently fire in assembling machines for fast spoiling items
Posted: Sat Dec 20, 2025 5:44 am
I found that item prototype's spoil_to_trigger_result does not consistently fire in assembling machines when spoil_ticks is < 60, but it always fires when the player crafts it. The really weird thing is that the spoil_ticks threshold varies seemingly at random. Through trial and error I found it stopped firing at 47 ticks in one mod, but it fired at 30 ticks in this bug report mod.
How to reproduce:
How to reproduce:
- Load the mod
- Craft a wooden chest as a player, it should log "on_script_trigger_effect..." to the game console
- Have an assembling machine craft a wooden chest, it should not log "on_script_trigger_effect..." to the game console
- Change the bug-report-spoil-ticks to > 60 (the default is 1 tick to hopefully guarantee that the bug triggers on the first try)
- Repeat the process with different numbers