Why does refreshing a blueprint get the bulk rail loaders wrong?

Place to get help with not working mods / modding interface.
Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5699
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Why does refreshing a blueprint get the bulk rail loaders wrong?

Post by mrvn »

I'm using the railloaders mod which does some fancy stuff with proxy entities when placing the bulk rail loaders and unloaders. The loaders and unloaders consist of multiple (hidden) entities that get placed by scrip when the proxy object gets placed. When taking a blueprint there is some code to handle the translation back to proxy objects.

All of that seems to work flawlessly when taking a blueprint.

But when I open a blueprint, click the button to refresh it and take a blueprint of the exact same structure again something goes wrong. The blueprint no longer shows the bulk rail loader or unloader but still lists it in the entity summary. The wire connections, if any, still show but end in empty space. Then when I place the blueprint the bulk rail loader or unloader gets placed but the rotation is wrong. Doesn't always happen but I think every time the entity is rotated.


So here is my question:

What is the difference between taking a new blueprint and refreshing an existing one that could cause this? Is there a different event for refreshing blueprints or something? Or does the game forget to call the same blueprints on refresh as it does when creating a new one?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Why does refreshing a blueprint get the bulk rail loaders wrong?

Post by DaveMcW »

It's definitely a bug / design flaw / missing feature in the base game.

The blueprint refresh is a rather obscure feature, and mods that alter blueprints are not common either. So not many people are testing that combination.

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Why does refreshing a blueprint get the bulk rail loaders wrong?

Post by GrumpyJoe »

I remember getting rid of bulk loaders in my long gone AB+LTN game, because it did not behave well with red/green wires.
Placing my station BP with all wires connected as I needed was kind of a lottery and I couldn't find the cause.
I might even have asked in the mod thread there, but I can't find it rn

mrvn
Smart Inserter
Smart Inserter
Posts: 5699
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Why does refreshing a blueprint get the bulk rail loaders wrong?

Post by mrvn »

I had that problem too but that seems to be fine now. It use to be that you had to place the bulk railloader first or the wires didn't get placed. And with personal construction bots that's rather random.

And you can't just place the blueprint over the build station to add the wires later because of that proxy entity thing.

I guess I have to add some logging to the module to see if the same functions get called in both cases. Maybe that will show a missing event.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Why does refreshing a blueprint get the bulk rail loaders wrong?

Post by DaveMcW »

mrvn wrote:
Tue Sep 07, 2021 5:27 pm
Is there a different event for refreshing blueprints or something? Or does the game forget to call the same blueprints on refresh as it does when creating a new one?
This is a known bug: 99323.

mrvn
Smart Inserter
Smart Inserter
Posts: 5699
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Why does refreshing a blueprint get the bulk rail loaders wrong?

Post by mrvn »

Thanks. Looks recent so there's still a chance it will get fixed.

Post Reply

Return to “Modding help”