mspielberg / factorio-railloader

Rapidly load and unload trains of bulk materials.
GNU Lesser General Public License v3.0
9 stars 19 forks source link

Circuit connections #8

Closed Wuestengecko closed 6 years ago

Wuestengecko commented 6 years ago

When building blueprints, circuit connections aren't recreated properly - only those to already existing entities, which means you can never blueprint-connect multiple loaders/unloaders together. I gather that you already know about this, and it isn't immediately fixable due to missing API that the devs don't seem too interested in adding, unfortunately.

However, this issue can be worked around (kind of) by simply removing the placement proxy. It is already effectively non-functional for the unloader, as the proxy looks exactly the same as the placed entity, and of limited help for the loader. For help about placement, you could provide for example this image:

railloader-placement

... which can be recreated ingame with this blueprint string:

0eNqVlstupDAQRX9lVGscYfNqWM5mPmI0imi6klgCg2z3TFCLf4/pjhJaIcNlxct1rutxkS90bM88WG08VRfSTW8cVb8v5PSzqdv5nR8Hpoq0544iMnU3P9latzRFpM2JX6mS05+I2HjtNd/irw/jozl3R7ZhwUekD6FGON8PgTb0LoT0ZtYJGCHjiMZwVQF90pab28c8Iufr2z39sjy63vz4aflfQE/RFzF1t822r09sxdDWDXdhpRhs/zp+FX+Xlg/ZvXi6opDcKZwNqlHs0Eg/NNxcs+cXL65V/7Zq8T1TrTAzmHlAkTmMzFFkASNTFHmAkQpFligS7s7cRwwJb1JKFAmXUioUCTdcJigSHksJ2wd3j/y0T8cnfe4Et2G91Y0Y+pZXnfmQXemz49eI+V5isgFceoe5Fc0LO7825gtORMd6jl3jfRrnqXZeaOPY+vBlJdd3okJ+brKEuWoPV8UoN96FlfB293EV1i6wWypBt7mvqCmK3TUDKsOST8Hk93ppw0qqQLNOF1mvgWAP5Rsg2DTZ/0EJ7JLDBgj2RbEBAo1QYrOQJDtnYetHncAWKJeJhlPx9dxcLY7ZEf1l627n2kOhpEpzFZfT9Abp48ga

(Note that this string probably won't work anymore should you decide to remove the proxy entities.)

Additionally, for other entities, you can place down a blueprint on top of already built entites, and it will recreate all circuit connections both to other existing entities as well as ghosts. This behaviour is broken for the railloaders, as the blueprint contains a different entity from the actually placed one.

As I'm personally pretty much blueprinting down every train stop (they don't change all that much after all), and only adjusting the combinators for LTN, it makes this issue really annoying - even when everything seems to have worked, I have to manually inspect every circuit connection to make sure that nothing is broken.

Anyway, these are my two cents about this - if it weren't for this bug, I'd definitely like the idea.

mspielberg commented 6 years ago

The main reason for the proxy entities is that they have a different collision box that doesn't overlap the rails. On the other hand the actual (un)loaders have a 4x4 collision box to allow them to be attached to loaders or inserters on either side of the rails. You may be aware there's an ongoing discussion in the forum thread about changing this, such that loaders wouldn't be placed over existing rails, but would include the rail segments themselves. This has its own tradeoffs when deconstructing loaders, but makes for better behavior in blueprints.

Wuestengecko commented 6 years ago

I wasn't aware of that discussion, thanks for pointing that out. And I also didn't know about the rail collision issue, which adds a whole new layer of complexity to solving this. I'll think about this some more, and if I get to anything I'll come back to you.

mspielberg commented 6 years ago

This should be resolved in v0.3.7 now, by recording circuit connections from blueprints in a separate data structure whenever they are placed.