[MOD 0.16] Bulk Rail Loaders

Topics and discussion about specific mods
mrvn
Smart Inserter
Smart Inserter
Posts: 5696
Joined: Mon Sep 05, 2016 9:10 am
Contact:

More blueprinting problems and error in collision mask

Post by mrvn »

I think I figured out why placing unloaders through ghost fails.

1) The unloader requires 2 rail tiles below it to be present to be placed. I think with blueprints that will fail quite a lot because the order of placement of ghosts is somewhat random. With construction bots this goes wrong and leaves a bad unloader behind.
Bad unloader left behind after failure to place
Bad unloader left behind after failure to place
bad-unloader.png (6.86 MiB) Viewed 6202 times
I blueprinted an array of unloaders. As you can see the failure rate to place the unloader after the rails is quite high. I don't really get the requirement that rails have to already be present. The unloader is build using 3 rails. So they should be built-in already. Maybe the unloader should replace rails if already present so the player gets them back and not require rails below it. Deconstruction would remove the hidden rails below it so there isn't a gain of rails when deconstructing a loader. The unloader should then also be replacable with rails.

Note: The unloader requires 3 rails to build but it actually only covers 2 rails. Is that intentional?

2) I think the collision mask is wrong leaving trees behind that should be deconstructed when placing a blueprint with shift.
Bad collision mask
Bad collision mask
bad-mask.png (492.66 KiB) Viewed 6202 times
I created a mask for the unloader and placed some obstacles (wooden chests) in the way. Then I checked if the unloader can be placed by hovering over the mask with an unloader. The empty mask is on the left and the hovering on the right. As you can see the 4 middle chest at the bottom prevent placement. The top 4 middle chests do not (rotating 180° switches it). Removing the marked chests and trying to place says "Side of rail blocked". When blueprinting only trees at the bottom will get deconstructed but not at the top leading to placement failures later on.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Therax »

As for it being a precision metering device... The metering could be rough, like with stack granularity. So if you signal 536 you get 600 items. Or it could be randomized as 536 + rand(50). You can close the door before the loader storage is empty but it's not a precise count. At the moment the doors close at exactly 4000 iron plates. That seems inconsistent with your explanation.
I've done some more thinking about it, and one possibility could be to expose a lamp-like connection with simple enable-disable configuration. Inserter stack size bonus would make the metering imprecise. Having looked at videos of actual hopper-based rail loaders in operation, the flow can be readily shut off once the cargo wagon is full, which diminishes the rate of material flow as there is no longer empty space to be filled. So it's easy to stop the loader once the wagon is full, but difficult to do so with a partial load (unless the loader itself empties), and even harder to do so precisely.
Have you checked lo-res and hi-res sprites? I'm using Bobs+Angels+AAI so I have wooden and cement rails. They look a lot different and I don't think they replaced the vanilla rail images, just added the wooden ones.

I haven't checked how you made the unloader graphics but it sounds like you just made one image. Take a look in data/base/graphics/entity/straight-rail/. The games rails are made out of several layers of images. If you do the same and use the original images for the actual rails then they will match perfectly and you don't even have to draw them. Hope that helps.
The original rail graphics are (naturally enough) 2x2, so I stitched them together to make 6x2 images for use with the unloader. I'll have a look again and see if I can figure out what's going on with the "metals" layer, which appears to be the one with the most apparently visual difference when layered on top of the grate image. I might be able to do something more complicated at runtime with blending mod graphics provided by BioIndustries and other mods that potentially add other straight-rail variants, when I get some time.
The thing is that at the start/middle of the game the loaders/unloaders are faster than using inserters. But towards the end of the game they will be slower. That is a bit unrealistic. Letting things just fall in/out of a train car should be much faster than picking up each item (even considering stack bonus). On the other hand having a loader that is 10000 times faster than a inserter when you haven't researched even stack inserters is unrealistic game wise. That's why I suggested tho have loaders with different speed.
I'll look into doubling the overall speed. Since speed scales with stack inserter research I'm not too concerned about the loaders being too fast in the early game. But I'm also not particularly concerned that they are presently slower than 12 express stack inserters. That's a big investment both in materials and space, and I feel the player should see some benefit from that.
What you say about the 100+ ton wagon makes sense. But I bet wooden rails aren't what you think. The rails are not made out of wood. Instead the rails are fastened on wooden beam. The more advanced rails use concrete beams instead of wood. In the unloader those beams are replaced by the grate. Both rail types use steel for the rail itself. So wooden rails or cement rails makes no difference to the design of the unloader. The part that differs is what you throw away during construction.

Thing is, when you research railraod all you get is wooden rails. The cement using rails need a lot more research and infrastructure to build. Not having a recipe to build loader/unloader using wooden rails makes them a lot more complicated to manufacture.

Note: Wooden rails are from "Bio Industries > Angels refining".
You are correct. I've played with Bob's+Angels quite a bit, but never used Bio Industries, so I'm unfamiliar with where wooden rails fit in the tech progression. I was thinking they were a lower-tech alternative, perhaps with limited top speed, for use in the very early game.
I have compact setups with warehouses that handle multiple goods. For example I have a crusher factory with 2 train stops. At one side all 6 ores come in by train and get dumped into a warehouse. From there filter inserter put them on belts to the proper ore crusher. From the ore crushers the results go into a single warehouse again for distribution. LTN then sends a train to pick up 3000 saphirite + 2000 stiratite in a train and those gets loaded.

With the loader I would have to pre-sort all the output from the ore crusher and make one station per ore + one for crushed stone. That's a 7 fold increase and simply doesn't fit in my base.
This sort of setup should work fine with Bulk Rail Loaders as long as each train contains at most 5 item types. If you have separate trains like your saphirite + stiratite, the unloader will handle those two item types, and then handle two (or up to 5) different item types when the next train arrives.
When I make a blueprint of a station with loaders or unloaders, place that blueprint and walk along it with the blueprint in my hand then bluebuild rewritten will place entities within my reach. When it places a loader or unloader the blueprint in my hand disappears and I suddenly hold a loader or unloader instead. It also fails to place the loader/unloader maybe half the time. Can't test yet if it happens with construction bots too.
Thank you for the report on Bluebuild. This is a case I can handle better so you don't lose your blueprint.
A loader/unloader also can't be replaced by the other like you would replace a wooden chest with a steel chest. The advantage of replacing one with the other would be that the contents would transfer.
I usually don't have space in my inventory for 50k iron ore or such.
Bulk Rail Loaders are quite tricky because they are placed directly over existing rails, and Factorio isn't really designed for that. Fast-replace in particular is not something I know how I can implement given how the mod API works.
EDIT: The problem with blueprints being destroyed is caused by the failure to place. And the failure to place seems to be that when blueprinting a loader/unloader any tree that is in the way does not get marked for deconstruction. Placement of the loader/unloader then fails because there is something in the way and the loader/unloader is returned to the players hand. This replaces the blueprint with a loader/unloader instead.
I'll see what I can do around automatically marking trees/rocks in the construction area for deconstruction. This is something that Factorio handles automatically for "normal" entities and blueprints, but Bulk Rail Loaders are far from normal. :)
Note: The unloader requires 3 rails to build but it actually only covers 2 rails. Is that intentional?
Rails are 2x2, but cargo wagons are positioned every 7 tiles (6 tiles for the wagon itself, plus 1 tile gap between them, which is where you normally place power poles for your stack inserters). This means that depending on the station and the particular wagon position, the loader overlaps either 2 or 3 rail segments.
2) I think the collision mask is wrong leaving trees behind that should be deconstructed when placing a blueprint with shift.
If the collision mask correctly reflected the final footprint of the (un)loader, it wouldn't be possible to place them over existing rails. I've also experimented with having the (un)loaders place their own rails, but past attempts made for a very confusing experience because of the way they don't align with the normal 2x2 rail grid. I may look at that alternative again, as the tradeoff is more predictable behavior when using blueprints.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

Therax wrote:
What you say about the 100+ ton wagon makes sense. But I bet wooden rails aren't what you think. The rails are not made out of wood. Instead the rails are fastened on wooden beam. The more advanced rails use concrete beams instead of wood. In the unloader those beams are replaced by the grate. Both rail types use steel for the rail itself. So wooden rails or cement rails makes no difference to the design of the unloader. The part that differs is what you throw away during construction.

Thing is, when you research railraod all you get is wooden rails. The cement using rails need a lot more research and infrastructure to build. Not having a recipe to build loader/unloader using wooden rails makes them a lot more complicated to manufacture.

Note: Wooden rails are from "Bio Industries > Angels refining".
You are correct. I've played with Bob's+Angels quite a bit, but never used Bio Industries, so I'm unfamiliar with where wooden rails fit in the tech progression. I was thinking they were a lower-tech alternative, perhaps with limited top speed, for use in the very early game.
Wooden rail aren't so much a low tech version of rails. They replace vanilla rails in the tech tree and then there is a more hight tech version (Railroad 2) where you get the concrete rails. Those are more durable and faster but it's more that they improve the vanilla rails which are now wooden. So using wooden rails for the loader/unloader would keep the tech level and cost as is I think.
Therax wrote:
I have compact setups with warehouses that handle multiple goods. For example I have a crusher factory with 2 train stops. At one side all 6 ores come in by train and get dumped into a warehouse. From there filter inserter put them on belts to the proper ore crusher. From the ore crushers the results go into a single warehouse again for distribution. LTN then sends a train to pick up 3000 saphirite + 2000 stiratite in a train and those gets loaded.

With the loader I would have to pre-sort all the output from the ore crusher and make one station per ore + one for crushed stone. That's a 7 fold increase and simply doesn't fit in my base.
This sort of setup should work fine with Bulk Rail Loaders as long as each train contains at most 5 item types. If you have separate trains like your saphirite + stiratite, the unloader will handle those two item types, and then handle two (or up to 5) different item types when the next train arrives.
The problem is that I don't know what combination and amounts of ores LTN orders. That depends on the station requesting the good. Both the amount and combination of ores differs pretty much on every train. I only know what and how much to load when the train is there. Which means I can't pre-load the loader. I would have to load it when the train is already there and that negates all the benefits of the loader pretty much.

But I've build a few new stations now that only provide single items. There the loaders work nicely and save the space for the warehouses I otherwise use for buffering. Makes for very compact stations.

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

When a loader/unloader is blueprinted and the construction bot tries to build it is there any way to make it wait for the rails like constructions bots do when there is a tree in the way? The bot should just hover in place waiting for the rails and then try to place again. No idea is the API allows this.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Therax »

mrvn wrote:The problem is that I don't know what combination and amounts of ores LTN orders. That depends on the station requesting the good. Both the amount and combination of ores differs pretty much on every train. I only know what and how much to load when the train is there. Which means I can't pre-load the loader. I would have to load it when the train is already there and that negates all the benefits of the loader pretty much.

But I've build a few new stations now that only provide single items. There the loaders work nicely and save the space for the warehouses I otherwise use for buffering. Makes for very compact stations.
If you have provider stations that could provide any number of ore types in any combination, then yes, you'll need to do some sorting at the provider side. It's in theory possible to reconfigure the filter inserters in the middle of loading a wagon to be able to handle more than 5 types (5 filters is a Factorio engine restriction), but I'm not willing to incur the UPS cost, especially when it's not especially hard to work around this limitation by constructing additional platforms. I really want Bulk Rail Loaders to be usable in megabases. :)
When a loader/unloader is blueprinted and the construction bot tries to build it is there any way to make it wait for the rails like constructions bots do when there is a tree in the way? The bot should just hover in place waiting for the rails and then try to place again. No idea is the API allows this.
There is effectively no control possible for mods over individual bot behavior. As I understand it construction bots hover over a ghost and delay placement only if the collision_box is blocked, and there is already another construction bot tasked to clear the obstruction.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

Therax wrote:
mrvn wrote:The problem is that I don't know what combination and amounts of ores LTN orders. That depends on the station requesting the good. Both the amount and combination of ores differs pretty much on every train. I only know what and how much to load when the train is there. Which means I can't pre-load the loader. I would have to load it when the train is already there and that negates all the benefits of the loader pretty much.

But I've build a few new stations now that only provide single items. There the loaders work nicely and save the space for the warehouses I otherwise use for buffering. Makes for very compact stations.
If you have provider stations that could provide any number of ore types in any combination, then yes, you'll need to do some sorting at the provider side. It's in theory possible to reconfigure the filter inserters in the middle of loading a wagon to be able to handle more than 5 types (5 filters is a Factorio engine restriction), but I'm not willing to incur the UPS cost, especially when it's not especially hard to work around this limitation by constructing additional platforms. I really want Bulk Rail Loaders to be usable in megabases. :)
It is really rare for a train to want all 6 ores even if the request station wants all of them. That only happens if the buffered amount is low enough to require a refill of all 6 ore at the same time, the provider station has enough buffered of all 6 ores to exceed the provider limit and the sum of all 6 must still fit in a train. For normal stations I have the request and provider limit set to fill a train so that never happens. But I have one station that is a storage warehouse and has a provider limit of 1. If someone throws ores in their trash slot it lands in the storage warehouse and then gets carted off with highest priority. For that station it could happen that all 6 ores are needed by the train.

But it would be perfectly fine if the station first loads 5 ores in parallel. And then 10s later the periodic check of stations notices it has ores to load and switches to the 6th ore. I think that would just work as is, not concerned about that just yet.


The problem I have is that the station can have all 6 ores present but the train only wants one of them. That's the part that is problematic since you can't set a filter on the bulk loader as mentioned previously. That means I can't even have a LTN station with two items in the loader because both would always get loaded unconditionally.
Therax wrote:
When a loader/unloader is blueprinted and the construction bot tries to build it is there any way to make it wait for the rails like constructions bots do when there is a tree in the way? The bot should just hover in place waiting for the rails and then try to place again. No idea is the API allows this.
There is effectively no control possible for mods over individual bot behavior. As I understand it construction bots hover over a ghost and delay placement only if the collision_box is blocked, and there is already another construction bot tasked to clear the obstruction.
I guess then I need to play around with the source and make it so that it doesn't require rails but places them itself. And make the collision mask cover the whole area. Do you remember what the problem with that was so I can test that specifically if I make any changes?

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Therax »

mrvn wrote:I guess then I need to play around with the source and make it so that it doesn't require rails but places them itself. And make the collision mask cover the whole area. Do you remember what the problem with that was so I can test that specifically if I make any changes?
I've dusted off that approach and am experimenting with it again myself. There are minor annoyances because of the "2 rails or 3" question, which depends on exactly where the loader is placed, and because rail graphics look different when connected to neighboring rails: I have the choice of putting ends on the loader's built-in rail graphics, and having it render poorly in the blueprint view, or not putting ends on the graphics and having it render poorly in the cursor build preview.

Manual placement has its own share of problems: If I make the loader a rail, it can't take circuit connections in blueprints. If the loader isn't a rail, it doesn't restrict itself to the rail grid (every other tile) when placing it. However, when placing rail by script, they snap to the rail grid, which can lead to the loader and its own rails not being correctly aligned.

The biggest annoyance is what to do when a rail (un)loader is mined when there's a train in the station. In this case the Factorio core forbids removing the rails unless the locomotive or wagon are moved or removed first. Some alternatives to handle this situation:
  1. Automatically mine any locomotives or wagons in the way. This would be inconsistent with how vanilla works, and pretty annoying to a player since it would probably leave the rest of the train orphaned.
  2. Leave the rails in place, so they can be mined later. Should they be mineable after placing the loader, even without mining the loader itself? If the rails are always selectable, then they probably shouldn't appear in blueprints.
  3. Remove the loader immediately, and check back periodically via scripting to see if the train is gone, and magically make the rails disappear. This is a bit costly in UPS terms, and looks weird when the rails vanish. It can also be confusing if the user doesn't realize that those rails came "for free" with the (un)loader, and then the station breaks later when the free rails go away.
  4. Try to abort the entire operation, by creating a new loader in the same place, with the same circuit connections, and the same contents, and removing the just-mined loader from the player or robot's inventory, and display a message via the console or flying text. This is probably the closest to vanilla behavior, but complicated and a great way to introduce yet more buggy corner cases, especially when robots are involved. Once again the problem appears of the Factorio engine thinking an order is ready for a construction robot to perform, but really it can't yet. :)
This is what led me to having loaders built separately from the rails. This does lead to the slow blueprint building you've been experiencing. Robots should be able to eventually finish construction if there are enough rails, loaders, and unloaders available in storage, although it can take many attempts.
1) The unloader requires 2 rail tiles below it to be present to be placed. I think with blueprints that will fail quite a lot because the order of placement of ghosts is somewhat random. With construction bots this goes wrong and leaves a bad unloader behind.
Note that this isn't a bad unloader. It's a blueprint ghost, and if there are more unloaders in storage, bots will continue trying to the place an unloader in that location, and should succeed once there are rails present.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

Maybe this works:

- have a special loader-rails entity that are rails and 4-6 m longer (I guess you need two for odd and even placement)
- place loader-rail under the loader and have them minable
- have the loader unminable
- when the loader-rails are mined remove the loader

Then the game should only allow mining if no train is present.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Therax »

mrvn wrote:Maybe this works:

- have a special loader-rails entity that are rails and 4-6 m longer (I guess you need two for odd and even placement)
- place loader-rail under the loader and have them minable
- have the loader unminable
- when the loader-rails are mined remove the loader

Then the game should only allow mining if no train is present.
Rails need to be 2x2 to be connectable to other rails, so we still run into the issue when a train is parked partially on top of the loader, where the player mines a vacant rail but at least one of the other segments is occupied. It would work if loaders were 2x2, but that would only give room for 4 belts of throughput to a unified central inventory.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

der_funker
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Feb 25, 2018 12:06 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by der_funker »

Hey there. I really like the loaders to play with. They make loading and unloading so much easier and the stations look great and are really compact, of course they are not balanced in my setup.
Loading Station with an off number of wagons. Need to fix that soon.
Loading Station with an off number of wagons. Need to fix that soon.
sshot-24.png (1.07 MiB) Viewed 6160 times
I also use Deadlock's compact loaders and stacking as you can see in the screenshot. I created a little helper mod for it.
Here we have crushed crotinnium (top, unstacked) and crushed stone (bottom, stacked) from Angel's mods. This makes transporting ore really fast, because the stacks only stack up to 40, so only 40 units need to be loaded instead of 200. The combination is awesome.
Thanks for your great work.

jinsediaoying
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Feb 27, 2018 12:37 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by jinsediaoying »

https://mods.factorio.com/mod/Clowns-Extended-Minerals

Hi, will you support this mod? It adds many new ores to a bob-angal game.

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

All those new ores need to be supported in the rail loaders, in Deadlocks stacking and crating. Maybe some others.

Wouldn't it be good to come to a consensus how to mark items as mass item so the code could support it automatically? Even if it is a remote call like for stackers it would be better to have one call that all 3 modules receive than asking every mod author with ores to add 3 calls.

I think anything that is stackable with the first level of stackers should also be usable in the bulk rail loader. Later levels I think you didn't want, like circuit boards.

jooe
Inserter
Inserter
Posts: 24
Joined: Tue Apr 04, 2017 6:10 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by jooe »

I'd suggest to add geodes from Angel's Refining
That's:

Code: Select all

"^geode%-"
Thank you for the nice mod :)

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

I had some more ideas about the bulk loader and unloader. As mentioned I miss an option to filter. There is also a huge problem with building the things due to the collision mask and rail requirements. Blueprinting looses wire connections most of the time.

Maybe all that can be solved with one idea: Instead of having one loader/unloader that is 4m x 4m large and covers both sides of the rail have a 4m x 2m loader that sits on one side of the rail. It the can have a 4m x 1m collision mask and be independent of the rails. You can remove the loader with a train on the rails, remove the rails under the loader, place a loader with no rails present and so on.

This would also allow placing 2 loaders per wagon. One on the left side of the rails and one on the right. Or place a loader on the left and an unloader on the right. If the loaders/unloaders can be circuit controlled (enable/disable) this would allow building more interesting stations.

I've also been thinking about a fluid loader/unloader with a similar form factor as the bulk loader/unloader.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Therax »

mrvn wrote:I had some more ideas about the bulk loader and unloader. As mentioned I miss an option to filter. There is also a huge problem with building the things due to the collision mask and rail requirements. Blueprinting looses wire connections most of the time.
I've pretty much settled on adopting solution 3) above, and having the rails magically disappear later after an obstructing train is gone. I don't think it's that common for a railloader to be removed while a train is in the station, and I think I've come up with some ways to minimize any performance impact.
mrvn wrote:Maybe all that can be solved with one idea: Instead of having one loader/unloader that is 4m x 4m large and covers both sides of the rail have a 4m x 2m loader that sits on one side of the rail. It the can have a 4m x 1m collision mask and be independent of the rails. You can remove the loader with a train on the rails, remove the rails under the loader, place a loader with no rails present and so on.

This would also allow placing 2 loaders per wagon. One on the left side of the rails and one on the right. Or place a loader on the left and an unloader on the right. If the loaders/unloaders can be circuit controlled (enable/disable) this would allow building more interesting stations.
This would definitely work. One of the original designs I considered would have been a 1x6 entity alongside a cargo wagon. I have also considered having two 1x6 chests alongside the rails, with invisible inserters keeping them in balance. I admit I'm fairly wedded to my reality-based inspiration of a single inventory directly over the tracks.
mrvn wrote:I've also been thinking about a fluid loader/unloader with a similar form factor as the bulk loader/unloader.
Mostly I don't see real stations with massive bulk fluid storage directly adjacent to the tracks. But then, real stations don't suffer from Factorio's odd fluid flow behavior that makes it exponentially faster to (un)load liquids directly wagon<->pump<->tank, so I think it's probably a good idea.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

Therax wrote:
mrvn wrote:I had some more ideas about the bulk loader and unloader. As mentioned I miss an option to filter. There is also a huge problem with building the things due to the collision mask and rail requirements. Blueprinting looses wire connections most of the time.
I've pretty much settled on adopting solution 3) above, and having the rails magically disappear later after an obstructing train is gone. I don't think it's that common for a railloader to be removed while a train is in the station, and I think I've come up with some ways to minimize any performance impact.
So what if I want to turn a unloading station into a loading station while a train is there? I can deconstruct the unloaders and then place loaders. Will the rails magically disappear as the train leaves then?

What if I remove the unloader and then replace the wooden rails with cement rails? Do they later disappear? Do I then get wooden rails back or cement rails?

I fear making the loaders this complex will only add bugs.
Therax wrote:
mrvn wrote:Maybe all that can be solved with one idea: Instead of having one loader/unloader that is 4m x 4m large and covers both sides of the rail have a 4m x 2m loader that sits on one side of the rail. It the can have a 4m x 1m collision mask and be independent of the rails. You can remove the loader with a train on the rails, remove the rails under the loader, place a loader with no rails present and so on.

This would also allow placing 2 loaders per wagon. One on the left side of the rails and one on the right. Or place a loader on the left and an unloader on the right. If the loaders/unloaders can be circuit controlled (enable/disable) this would allow building more interesting stations.
This would definitely work. One of the original designs I considered would have been a 1x6 entity alongside a cargo wagon. I have also considered having two 1x6 chests alongside the rails, with invisible inserters keeping them in balance. I admit I'm fairly wedded to my reality-based inspiration of a single inventory directly over the tracks.
mrvn wrote:I've also been thinking about a fluid loader/unloader with a similar form factor as the bulk loader/unloader.
Mostly I don't see real stations with massive bulk fluid storage directly adjacent to the tracks. But then, real stations don't suffer from Factorio's odd fluid flow behavior that makes it exponentially faster to (un)load liquids directly wagon<->pump<->tank, so I think it's probably a good idea.
I'm just comparing station sizes. A bulk goods station takes 4-6m space unloading on both sides. A fluid station on the other hand takes 8m space unloading to just one side.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Therax »

mrvn wrote:So what if I want to turn a unloading station into a loading station while a train is there? I can deconstruct the unloaders and then place loaders. Will the rails magically disappear as the train leaves then?

What if I remove the unloader and then replace the wooden rails with cement rails? Do they later disappear? Do I then get wooden rails back or cement rails?
These are good edge cases to think about and, so thank you for pointing them out. Placing a new (un)loader should unmark any rail segments under it that have been previously marked for removal. If you quick replace a rail segment with a different one (wooden->cement), the original rail should be removed without a trace. Since the new rail is a different entity, it should not disappear when the train leaves.
mrvn wrote:I fear making the loaders this complex will only add bugs.
Such is the nature of software development! We'll find the bugs and fix them, and in the end we'll have better blueprint behavior all around.
mrvn wrote:I'm just comparing station sizes. A bulk goods station takes 4-6m space unloading on both sides. A fluid station on the other hand takes 8m space unloading to just one side.
Definitely. I did say it's probably a good idea. :)
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

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

Re: [MOD 0.16] Bulk Rail Loaders

Post by mrvn »

Therax wrote:
mrvn wrote:I'm just comparing station sizes. A bulk goods station takes 4-6m space unloading on both sides. A fluid station on the other hand takes 8m space unloading to just one side.
Definitely. I did say it's probably a good idea. :)
Last night I tried out blender trying to make a very rough model of what a fluid loading station could look like. But blender has a way to steep learning curve to get anywhere in a night.

Anyway. The image I have in my mind for a fluid station that goes along with a bulk loader is like an old water tower for steam engines. Basically just a tank raised above the level of the train with a pipe arm to the side that can rotate to be over the train. To work with the bulk station I would make it so it fits between the bulk stations and the arm then turns 45°. Should connect to the fluid wagon like a pump on the outermost tiles of a wagon.

Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by Anson »

Therax wrote:I admit I'm fairly wedded to my reality-based inspiration of a single inventory directly over the tracks.
besides those "strictly top" loaders, i also have seen loading stations that have the storage containers on the side, and some even had several different containers to be able to merge different cargo onto a single wagon, eg having sand, gravel, cement, etc in the containers and producing specific mixtures in wagons :-)

too bad that i couldn't find some old pictures of such a station that we had taken decades ago, but a quick search gave me a video of a combined unloading/loading station where trains are unloaded through the bottom and "sideloaded" onto a ship. similar should also be possible in factorio to load wagons with one or more different types of cargo.

User avatar
KroshkaRoo
Inserter
Inserter
Posts: 20
Joined: Wed Dec 14, 2016 8:46 am
Contact:

Re: [MOD 0.16] Bulk Rail Loaders

Post by KroshkaRoo »

Crash on loading save game after game update
Error while running on_configuration_changed: LuaEntity API call when LuaEntity was invalid.
stack traceback:
railloader/configchange.lua:30: in function 'task'
railloader/configchange.lua:17: in function 'on_mod_version_changed'
railloader/control.lua:22: in function <railloader/control.lua:19>

Post Reply

Return to “Mods”