Construction Planner Continued

by azaghal

Ghosts require player's approval before construction bots are dispatched. This gives the player improved control over what parts of the factory get built, and when.

Utilities
7 hours ago
1.1 - 2.0
2.56K
Logistic network Blueprints

g Compatibility with Constructron-Continued mod

1 year, 8 months ago

I was hoping to use this mod nicely with Constructron-Continued, but what is happening right now is that once ghosts are approved manually, constructrons are not dispatched to the approved ghosts. Is there any way to make this mod work with Constructron?

1 year, 8 months ago

Hello OneWheelDude,

Maybe, but I would need to have a closer look at what Constructron does. The catch is that Construction Planner creates unapproved ghosts by changing the force of the entity, and no event is triggered for that by the game engine.

One way would be for me to try to raise script_raised_built event, although I am not sure how that would interact with some other mods - since the entity has not been built, it has merely had its force changed.

Another way forward would be to maybe allow the mod to somehow interact with Constructron via remote call or custom event - that would require some work on both sides I think.

Perhaps the best way to handle this would be to see if Wube would be interested in adding a new event to the game (on_entity_force_changed), although that could take some time even if deemed desirable/acceptable by Wube dev team.

Best regards,
Branko

1 year, 8 months ago

I've created a post in the Factorio forums so maybe we can get the ball rolling. Feel free to correct me or add anything
https://forums.factorio.com/viewtopic.php?f=28&t=105467

1 year, 8 months ago

'ello OneWheelDude,

That's quite a concise description, not much I could add to it :)

Although... This is probably one of the more esoteric uses of their API, so I don't know how much of a priority it would get.

The idea I mentioned about having a more direct integration between Construction Planner and Constructotron mod is definitively something that could be looked into, and can probably be done faster than waiting for update from Wube. I'll throw a message into that other discussion to see if ILLISIS would be interested in something like that. :)

Best regards,
Branko

5 months ago

azaghal, does this help? Some new commentary on the github issue. https://github.com/ILLISIS/Constructron-Continued/issues/174#issuecomment-2115838028

5 months ago

Hm... Just at a glance, looks to me like it should help solve the problem. I have been a bit away from Factorio, but if I get some time I'll have a look at it. Seems like it should be only a couple of lines of code, hopefully the crazy logic around how undo is done doesn't mess with it (too much). :)

4 months ago

I was really hoping I would be able to push out this integration feature today alongside an important bug-fix, but... Unfortunately that remote interface was not sufficient to make the mods coexist correctly.

I was able to get the approved entities to get registered correctly, but unfortunately there doesn't seem to be a way to signal Constructron to remove entities from the build queue when unapproved. Constructron would keep going back to the unapproved ghost entities.

I've started a bit of a discussion over at Github on that feature request ticket, we'll see where it gets. Poking around the Constructron-Continued source code, looks like it won't be such an easy fix due to the way entities are being tracked (kinda just shoveled into queues).

Best regards,
Branko

New response