Page 1 of 1

[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
by raspberrypuppies
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:
  1. Load the mod
  2. Craft a wooden chest as a player, it should log "on_script_trigger_effect..." to the game console
  3. Have an assembling machine craft a wooden chest, it should not log "on_script_trigger_effect..." to the game console
  4. Change the bug-report-spoil-ticks to > 60 (the default is 1 tick to hopefully guarantee that the bug triggers on the first try)
  5. Repeat the process with different numbers

Re: [2.0.72] Item spoil_to_trigger_result does not consistently fire in assembling machines for fast spoiling items

Posted: Sat Dec 20, 2025 7:14 am
by Rseding91
Thanks for the report. This is intended; the trigger will not run if the item(s) spoil mid-craft and end up producing fully spoiled at the time the machine finishes crafting.