Event for wire connected/disconnected to entity

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Event for wire connected/disconnected to entity

Post by Osmo »

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.
protocol_1903
Fast Inserter
Fast Inserter
Posts: 234
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Event for wire connected/disconnected to entity

Post by protocol_1903 »

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`?
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
sparr
Smart Inserter
Smart Inserter
Posts: 1475
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Event for wire connected/disconnected to entity

Post by sparr »

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.
protocol_1903
Fast Inserter
Fast Inserter
Posts: 234
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Event for wire connected/disconnected to entity

Post by protocol_1903 »

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.
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Post Reply

Return to “Modding interface requests”