Bulk Rail Loader

by therax

Bulk train loader/unloader with buffer.

Content
2 years ago
0.16 - 1.1
58.5K
Logistics

b Very buggy when built with blueprints

5 years ago

When built by bots using blueprints, the bhulk rail laoder has a very high chance of not comingout right. Either it is invisible (but still there), or it is rotated 90° compared to the blueprint, or it builds correctly, but circuit wires are missing.

5 years ago

Could you post a save? It sounds like there is a mod conflict with another mod.

4 years ago
(updated 4 years ago)

I've got this issue happening. I set up simple LTN loader and unloader stations and made blueprints. When I place those blueprints in the same orientation they were in originally, everything comes out right, but when I rotate the blueprint before placement, the loader and unloaders are not rotated and the rails they place are also in the wrong orientation.

Screenshot of the issue: https://imgur.com/a/waHTclH
Save file: https://www.dropbox.com/s/48vp6vixho03qk3/Test%20World.zip?dl=0

Note: I have a custom mod that overrides the sprites and replaces the rail prototype in data-final-fixes to use those from Naked Rails. I have changed no code in your mod or control.lua however.

Custom mod files: https://www.dropbox.com/sh/fkr3otjiqojdq7h/AABvPpRMMYavtVWIfHbvCx2ja?dl=0

Relevant code is:

-- Replace unloader graphic to remove rail gravel (for naked rails)
if mods["railloader"] and mods["naked-rails_se"] then
    -- replace unloader graphics with transparent ones to get rid of the dark concrete
    data.raw["simple-entity"]["railunloader-structure-horizontal"].picture.layers[1].filename = "__SideliasFixes__/graphics/railunloader/structure-horizontal.png"
    data.raw["simple-entity"]["railunloader-structure-vertical"].picture.layers[1].filename = "__SideliasFixes__/graphics/railunloader/structure-vertical.png"

    -- replace the loader rail with a naked rail
    local loader_rail = util.table.deepcopy(data.raw["straight-rail"]["naked-straight-rail"])
    loader_rail.name = "railloader-rail"
    loader_rail.flags = {"player-creation"}
    data.raw["straight-rail"]["railloader-rail"] = loader_rail
end
4 years ago
(updated 4 years ago)

I loaded up your save with your mod, and everything appears to be working properly. I tried the blueprint in your inventory, and also tried creating a new blueprint:

https://gfycat.com/slipperycelebratedhyrax

4 years ago

What's really weird is that if I make a blueprint from what's on the ground and immediately place it again, the rotation works (same as in your gif). When I try to place it from the blueprint, the ghost in my cursor (before placement) doesn't show the entity (like the building part of the loader) and that's when the rotation breaks.

Dunno how to do a gif, but here's screenshots of what I mean:
https://i.imgur.com/HD6sQCx.jpg (the one on the top left was placed immediately by making a blueprint and placing it without saving it in a book. The one in my cursor on the bottom is from my blueprint book and has not yet been placed, the entity is missing details here though you can see the circuit wires leading to where it is)
https://i.imgur.com/5rqwoJd.jpg (immediately after placement, the entity appears now, but rotation wrong)

4 years ago

Even more so, the blueprints loose in my inventory work, yet the one in the blueprint book in my inventory (or blueprint library) do not.

Here's a import string for that book for clarity sake: https://pastebin.com/mn0BsiWF

4 years ago
(updated 4 years ago)

Okay that helped me find this. It looks like originally the blueprint is ok, however when updating the blueprint using Blueprint Extensions something about your entity isn't put into the new(updated) blueprint correctly. The reason it's broken in my blueprint book is because that blueprint has been updated by the other mod. I will report the error there and link this thread.

Ok, issue posted on github: https://github.com/dewiniaid/BlueprintExtensions/issues/33

4 years ago

Okay, I didn't realize you had multiple copies of the same blueprint. The one in the BP book is completely broken. There's special scripting in BRL to fix up blueprints when they're created, and somehow that scripting failed when you created the BP originally. If you can figure out how to recreate the broken blueprint, I'd love to know so I can fix the scripting.

If you're curious, the scripting is necessary because the railloader is a chest, so it can be inspected and connected to the circuit network, but chests don't have direction. The script looks at the rails on the ground to figure out the correct direction and stores it in the blueprint.

4 years ago

Comments may have been crossed, see my comment right above yours :D

4 years ago

Good detective work! I posted a suggested fix on the Github issue.

New response