Page 1 of 1

Recipe Finished Trigger or Event

Posted: Sat Apr 12, 2025 2:03 pm
by Moterius
I keep seeing people trying to have a way to trigger a script when a recipe finishes bound to a specific location. Most commonly, it's spoil_to_trigger, but the issue on that is that this requires SA.

As far as I'm aware the only other option is to check every machine that can craft the recipe every tick whilst the player or the camera is near or when a blueprint is placed and keep track of the machines that have said recipe set, then checking every tick if the recipe finished for all those tracked machines.

The request is thus to implement any of the following:

- Add an event on_recipe_finished, triggering whenever the recipe finished with the event data containing the machine. The event would be registered with a list of recipes to track so it wouldn't trigger on every craft ever.
- Making spoil_to_trigger and spoilage part of base, but forcing spoilage to happen instantly if the SA flag for spoilage isn't in the mod
- Adding on_rocket_part_finished (we already had this so why remove it? apparantly hallucinated this existing b4, not sure why)

Or something else that would allow to do the same.

Re: Recipe Finished Trigger or Event

Posted: Sun Apr 13, 2025 7:42 pm
by curiosity
Have you considered using search? Duplicate of viewtopic.php?t=47728 (among others).

Also, one-part rocket silos are an option.

Re: Recipe Finished Trigger or Event

Posted: Mon Apr 14, 2025 9:20 am
by Moterius
There are other posts with this, but I have not seen one yet addressing the fact that SA essentially adds this event, whilst not having it available in base thanks to spoilage triggers. I just dont want to have to flag mods for SA because the only other way of tracking recipes finished by location I'm aware of has a MASSIVE performance hit.