Page 1 of 1
defines.event.on_entity_crafting_complete
Posted: Tue May 16, 2017 1:50 pm
by Mylon
event = {entity = "assembler", recipe = "recipe" }
I want this for assemblers, but I might be able to see some use for players too.
Re: defines.event.on_entity_crafting_complete
Posted: Tue May 16, 2017 4:38 pm
by Rseding91
We specifically don't have such an event because it would be a massive drain on game performance.
Re: defines.event.on_entity_crafting_complete
Posted: Tue May 16, 2017 7:00 pm
by Supercheese
Mylon wrote:event = {entity = "assembler", recipe = "recipe" }
I want this for assemblers, but I might be able to see some use for players too.
Don't we already have this for players?
Re: defines.event.on_entity_crafting_complete
Posted: Tue May 16, 2017 7:39 pm
by Rseding91
Supercheese wrote:Mylon wrote:event = {entity = "assembler", recipe = "recipe" }
I want this for assemblers, but I might be able to see some use for players too.
Don't we already have this for players?
Yes, because the player count is not in the 10s of thousands and has a fixed crafting speed.
Re: defines.event.on_entity_crafting_complete
Posted: Tue May 16, 2017 8:10 pm
by Supercheese
Rseding91 wrote:Yes, because the player count is not in the 10s of thousands and has a fixed crafting speed.
Indeed, I was just pointing that event out because it seemed the OP wasn't aware of it.
Re: defines.event.on_entity_crafting_complete
Posted: Wed Dec 25, 2024 5:47 am
by IsaacOscar
Sorry for necroing an old thread, but would it be possible to have the recipe and/or crafting machine's prototype opt in to an event? So any performance problems can be minimised?
Re: defines.event.on_entity_crafting_complete
Posted: Wed Dec 10, 2025 5:08 pm
by SWeini
+1
Mods that want to do that will find a way and it will cost more performance that such an event (and might have restrictions with mod compatibility). For example using rocket silos or on-tick events with products_finished and/or crafting_progress.
This can be very restrictive, such that is has to be enabled per-prototype or even per-entity (similar to register_on_object_destroyed)
Having this built-in is also the only way to make this work with ultra-fast recipes that do complete more than once per tick (performance-wise this should still be fine if there aren't many of those entities).
Re: defines.event.on_entity_crafting_complete
Posted: Thu Dec 11, 2025 2:06 am
by protocol_1903
I'm working on a script handler for such an event but it's not cheap to run. I'll be adding it to the following mod when it's done.
https://mods.factorio.com/mod/perel