Recipe Finished Trigger or Event

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Moterius
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Jun 07, 2023 7:39 am
Contact:

Recipe Finished Trigger or Event

Post 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.
curiosity
Filter Inserter
Filter Inserter
Posts: 635
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Recipe Finished Trigger or Event

Post by curiosity »

Have you considered using search? Duplicate of viewtopic.php?t=47728 (among others).

Also, one-part rocket silos are an option.
Moterius
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Jun 07, 2023 7:39 am
Contact:

Re: Recipe Finished Trigger or Event

Post 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.
Post Reply

Return to “Modding interface requests”