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 [FIXED] Ghost entity duplication

5 months ago

Many ghosts get duplicated when you copy and past. Do this a few times and the whole game can crash.

5 months ago

Hello 123mind123,

Thank you for reporting the bug, although some more information would be useful for me to replicate the problem :)

  1. What game version are you running?

  2. What mod version are you running?

  3. Can you provide me with exact reproduction steps?

  4. Does the problem happen when using just the Construction Planner Continued mod (without any others enabled)?

  5. If problem happens only in conjunction with some other mod, it could be some bad interaction between the mods - in which case, could you try to figure out which exact combination is causing an issue? (or at least provide me with full listing of the mods you are running)

  6. What do you mean by "get duplicated"? Would you be able to provide me with some form of screenshots or even a short recording of the problem itself?

Best regards,
Branko

5 months ago

Hey Branko

  1. Version 1.1.107 Build 62234 win64
  2. Version 2.0.0
  3. In either sandbox or normal play, make a plan of some buildings. Belts, Fast inserters and at least 3 assembly machines of the same tier. Then copy and paste the plan. Some of the ticks should be a little brighter. Now cut and paste the plan again. The ticks should get brighter again. After doing this 6 or so times they will start to glow and create visual artefacts. This will also start slowing your computer. A few more times and things get too laggy until the inevitable crash.
    From testing I found this has the greatest effect on inserters. Belts seem unaffected. This don’t always happen on things like the assembly machine but it can, the third assembly machine placed semes the most likely to get this.
    I would guess some of the objects are being copied multiple times on top of each other. So with each copy and paste the objects double or triple each time.
  4. No other mods, just Construction Planner Continued. Tested on multiple computers.
  5. I am not sure how to upload a picture here but if you have somewhere I can send it I would be happy to send it to you.

Thanks for the fast response
Mind

4 months ago

Hello Mind,

Sorry for a bit late reply :)

Ok, that now gives me way better idea of what you were referring to - I'll try to reproduce locally and do some logging to figure out what is happening with the placeholder entities - that "ticks get brighter" was a very helpful bit of information. :)

Best regards,
Branko

4 months ago

Hm... I just remembered that I implemented a small helper command (but apparently never documented it) that tries to do some cleanup on the placeholders etc. Haven't tried it out in a long while, so just make sure to save the game prior to running it:

/cp_cleanup

It should do the following:

  • Drops deconstruction orders for unapproved ghost force.
  • Removes placeholders with no matching entities beneath them.
  • Creates placeholders for unapproved ghost entities that do not have any.

And it will also do some cleanup.

This is, of course, just a workaround, but might help at least on temporary basis. Don't forget to backup the savegame before trying it out! (just in case)

Best regards,
Branko

4 months ago

And... I finally got around to looking into this. Got busy trying to mod another game (so I could play it in somewhat sane manner), and boy... That one is not as easy to mod as Factorio, I can tell you that :) (also, XML for scripting language... shiver...)

Anyway, I was able to easily reproduce this locally, and I know at least at which line in the code this happens, but I still don't quite know why. However... Having a hunch that this was not the issue before, I tried out a couple of different versions of Factorio, so I think there was some breaking (or fixing...) change introduced in Factorio mod API at some point. But at least I can now go ahead and have a bit of a look at version history to see if anything stands out :)

Best regards,
Branko

4 months ago

And the winner is "It is now possible to blueprint entities of friendly forces." from 1.1.86. This might require quite a bit of refactoring, just off the top of my head. Most of the code assumes that the player cannot select friendly force's entities.

On the other hand... This might be a massive boon to usability since you'd be able to actually see what entities will get copied instead of just the "tick" placeholders.

Best regards,
Branko

4 months ago

Thanks for keeping this updated. I do make some mods my self so I get where you are coming from but I am not super familiar with making mods for Factorio, so some of this goes over my head.

4 months ago

And... I have just released the new version which should fix the duplication problem. So, if you can try it out and let me know if everything works as expected now, that would be great. :)

And as a consequence of some of those Factorio additions, I think the visuals for the selection tool will be way better now as well. The ticks are still there, but you should be getting actual info on entities which are getting approved/unapproved.

Best regards,
Branko

4 months ago

I tested the mod out and it looks to work great! Thank!

4 months ago

No worries, and thank you for reporting the bug, hopefully it keeps working fine for you. :)

I'll close off the topic just to keep things tidy, but if you happen to run into more bugs, please do report them. :)

Best regards,
Branko

This thread has been locked.