I'm making a mod that needs to know when power poles are connected/disconnected and this would be really helpful.
I don't even know how to approach this considering pasting blueprints can also create wires.
Event for wire connected/disconnected to entity
- protocol_1903
- Filter Inserter

- Posts: 566
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Event for wire connected/disconnected to entity
There's been a large number of these type of requests over the years (i count 10+) was there any resolution to this? Perhaps it could be called naturally after `on_built` events, and if mods add/modify circuit connections it could have an option to `raise_connected` just like how `surface.create_entity` has `raise_built`?
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Buy me a coffee
https://mods.factorio.com/user/protocol_1903
Buy me a coffee
Re: Event for wire connected/disconnected to entity
The devs have explicitly rejected this and related ideas a few times on the forums and on Discord.
We just have to keep hoping they eventually change their minds. Maybe posting more use cases will help, as folks think up mods that could be done with this and can't reasonably be done without it.
We just have to keep hoping they eventually change their minds. Maybe posting more use cases will help, as folks think up mods that could be done with this and can't reasonably be done without it.
- protocol_1903
- Filter Inserter

- Posts: 566
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Event for wire connected/disconnected to entity
In that case, I'm making a mod to apply a different set of default settings for machines, which can be either entity settings or circuit settings. The plan is to have circuit settings only apply when a wire is connected, but as of right now that's not possible. So it's either some hacky way to get that 'event' or apply the circuit settings when the entity is constructed, which just exaggerates the problem by having custom circuit settings on every entity (including common ones like belts, assemblers, inserters...) which I believe uses a lot more data than 'unmodified' entities. This not has been tested however, and I would love to be proven wrong here.
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Buy me a coffee
https://mods.factorio.com/user/protocol_1903
Buy me a coffee
Re: Event for wire connected/disconnected to entity
Would it be "bad" in any way that isn't already equally-or-more "bad" with on_built_entity being fired for every entity that gets placed?mrvn wrote: Sun Aug 30, 2020 11:01 pm Firing off events while things get constructed would be bad. Compound entities like LTN stops or mini loaders will create and connect entities from events so this would call the event multiple times for each stage of the construction. And who knows what other mods will do in those events, e.g. destroy then newly created entity and BOOM.
