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
1 year, 6 months ago
1.1
1.58K

b [FIXED] Crash when undoing blueprint placement

1 year, 9 months ago
(updated 1 year, 9 months ago)

I created a train station for liquid trains and used it to create a blueprint. I've pasted this blueprint twice (unapproved), but then decided to move it a little, so I tried to undo with Ctrl + Z, and the game crashed:
https://i.imgur.com/VmlvrhP.png

Edit
It would seem I can undo when I'm still holding the blueprint (or if I am holding a deconstruction planner), but if my hand is empty, the game crashes:
https://i.imgur.com/d7jjNyA.mp4

1 year, 9 months ago

Hello and thank you for reporting the bug :)

This should be an easy fix, I just need to check on a slightly different property in that line (valid_for_read vs valid).

Current version (1.1.1) will most likely work so long as you hold any kind of item in your hand.

1 year, 9 months ago
(updated 1 year, 9 months ago)

No problem! Glad I could help. ;)

1 year, 9 months ago

Hm... That's actually kinda weird, I was not able to reproduce the issue, although I think valid_for_read vs valid is still a valid point (all puns intended).

Could you let me know what game version are you running, and perhaps give me a full list of mods? If possible, I would like to try to reproduce the issue locally to make sure the fix actually helps.

1 year, 9 months ago
(updated 1 year, 9 months ago)

I'm running Factorio 1.1.61.

Here's my mod list: https://pastebin.com/sMRJnD7k
Edit:
Seems like pastebin doesn't like my blueprint, so I'll paste it here:
0eNrNm1tu6zYQQLdyoW+7FV8m6Y+uoH/tXxEYis3ERGVJ1SNocKEFdB9dWVdSyva1/CDNGeJ+3CBIIts6M5wHyRkxX7PXcjBNa6s+W3/N7Lauumz9x9ess+9VUU6v9Z+NydaZ7c0hW2RVcZiu2sKW2bjIbLUzf2drMr4sMlP1trfmdP/x4nNTDYdX07oPXO7senfv+75fHhGLrKk7d1ddTaIciSq2yD7dDVKM4+KBQ8EcLZ9xGF4f6eNwvD5ejsDro32cFV4fL0deONuh/TC7IEWdKIq6YNjZ1mxP73IPU91Ez3K7L2y1PMeZj/yTOGvo/orTNdqCivhGTnK0CQMgfMwr5gXhgz4AYhgPsDz/5gHF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LfhZ2moTBbpRhhhQwHCQ8HGbWvSgoHhVRZJ0nRMe11SlqzaCxrkoJlOJtoiovsq40mMrJZMLIfJlQtA5GtGTjoGI/al6eEAxNIA4skKauo9ilJzuKxLHHxcLUvR8YDD8ZDcGLTKVsQniMdpsExxknMnCTPU9zPWRyctOhzijMGySm0W6QuVYuXM2fuUBVN09YT631fd/2yKYut2del24THaqyPorVFuMwgOb8tY4IPvIUMG8J7eCRHFkhzaPCQB1eJJrmHA8wi8WViQOmERlqANOeZ077fH0xvt+Bi7q425v7SbgZ/n+quMxNmMxd5Tm7dmPbbM/ufn5R3IXaejd+3gjvWNqP/yNc8Gx3Mzg6HpSmd0NYZvqlLb/Uh70KtMs7nr/XQTucoCSEvXjkEK4fy53LyBSHUL4tiZTESGZOTxfyyGFqWei6LOlncL4tjZXHxXFZgTPgzIlr6oyuhyRMgwZ+tCf2cpFKnbR2YthNOqmntPzeJP8oZIiX1+vWIOIV1nvow09pd7+u/f/4NHpHy7BCneS6wQXxouND7jgwNbSEJpSlPDX5sU7kCKmgqSh5sw4K2YSkPHH5s22j6xDaPccODtuEpzyp+cNvIJ7YJR4nAT86BaQv91Jjm/rPsmKOE8jlJYUd3JDk7Hvv366t/WHH7ctN2pwfxinCpqRQr983VOP4PDTegiA==

1 year, 9 months ago

Yeah, I was able to reproduce with all those mods installed. I wonder if it's some specific mod interaction, but... The above valid_for_read fixed it. Seeing that in another part of code I used that one, it's probably an oversight on my side :)

You can expect new release in 10-20 minutes, I just want to test the other issue a bit first :)

1 year, 9 months ago

Hm... It's good that you have provided me with the blueprint, though. I think I found what was technically the issue - for whatever reason the blueprint itself has a placeholder (which comes from Construction Planner or Construction Planner Continued) stored in it - which really should not happen. But that might be a completely separate problem.

1 year, 9 months ago

Ok, I know how to easily get the placeholder into a blueprint - via blueprint update ("Select new contents for the blueprint"). Unfortunately, that cannot be helped, since the modding API does not provide means to manipulate entities when blueprints are getting updated - so no way to replace the placeholder with the real entity.

Just as a warning, I suspect that blueprinting unapproved ghosts can result in some weird results in general, so keep an eye on that :)

1 year, 9 months ago

Alright, so the best way to avoid this issue would be to simply blueprint only already constructed objects and approved ghosts? I'll experiment a bit with blueprinting unapproved ones, maybe I'll find something interesting.

For now though, removing the placeholder out of the blueprint works fine enough. If there are any more issues with it, I'll post them here. ;)

1 year, 9 months ago

Well, blueprinting unapproved ghosts is meant to work, with the caveat that updates 100% do not work (and I can't do anything about it). But with the original version of mod I've seen some weirdness with wiring getting messed-up every now and then. It's a bit tricky since the mod basically prevents construction from happening by switching away entities to a different force/side.

I just uploaded the fixed version, let me know if it fixed everything, and I'll mark the topics off as fixed then :)

And thank you you once again for both reporting the issue, and for providing the mod list with blueprint (plus screenshots and video recording).

1 year, 9 months ago

Yeah, everything works fine in the updated version (other than the "select new contents" thing, that is). I can undo everything just fine, even that blueprint with placeholders. I'll keep an eye out for any weirdness with wiring. Thanks for a quick fix!

This thread has been locked.