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

b Crash when using deconstruction planner on 1.1.70

2 years ago

Using factorio 1.1.70, and version 1.3.2 of this mod. The game crashes when using the deconstruction planner.
Try to use the deconstruction planner on anything, even a tree, and it crashes the game.

The mod Construction Planner Continued (1.3.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ConstructionPlannerContinued::on_player_deconstructed_area (ID 71)
Deconstruction force and player force must match.
stack traceback:
[C]: in function 'deconstruct_area'
ConstructionPlannerContinued/control.lua:1229: in function <ConstructionPlannerContinued/control.lua:1209>

2 years ago

Hello Skofisk,

Well... Turns out they fixed a bug I reported which in turn broke this particular mod :)

So... This is going to be a bit of a problem that I am not 100% sure how to solve - as part of making improvements I tried to tackle the original mod's handling of the undo history by using deconstruct tool from a player that would target the unapproved ghost force (the reason why your bots don't touch
unapproved ghosts is because they belong to different force).

I am not 100% sure when I will be able to try to tackle this problem - dropping the mod code that caused the crash you reported would kind kill off large part of functionality related to undo history :/

In the interim, I'd suggest switching back to version 1.1.69 of Factorio if possible, or approving all ghosts in current game and disabling the construction planner continued mod. Maybe short-term I could try to see if I can detect Factorio version to disable most of the code related to deconstruction planner - although that would suck when it comes down to undo history.

Best regards,
Branko

P.S.
For more details on what was fixed, you can see this thread (if you're into nitty-gritty details):

2 years ago

Hm... Maybe I could switch player's force just prior and after deconstruction planner is called, but I'll have to try it out and see if it could have some bad side-effects (since current code assumes the player is always on the main force).

2 years ago

Ok, I think I may have found a solution for both fixing the crash, and having the undo queue behave as expected. I just need to work on a couple more edge cases to make it fully usable - basically approving the entities prior to doing cut/deconstruct etc.

2 years ago

Hello Skofisk,

I have just release a new version of the mod that should address the crashes in version 1.1.70, so if you could give it a spin and let me know if everything behaves as expected, that would be much appreciated :)

Internally I've had to make some changes that unfortunately also change how deconstruction planners from library behave - they no longer deconstruct unapproved ghosts. Hopefully I will be able to ask Factorio devs to maybe make those accessible in some form to the mods so I could have the mod behave more sanely with them as well, but we'll see.

Best regards,
Branko

New response