[MOD 0.12.35] Logistics Railway 1.0.8
Re: [MOD 0.12.26] Logistics Railway 1.0.4
I have found an odd behavior, and I'm not sure if it's a bug or a feature. I recently installed your mod and the newly-named 8L mod. I opened up my test map and started to play around with both together. Here's an image to go along with the description:
With the 8L mod, each wagon is exactly 8 blocks in length. The belt pieces show the borders of the wagons. That means each wagon should correspond to exactly 4 logistic rail pieces.
When I set different items for each of the 4 requester rails, only the item from the 2nd rail piece is fulfilled.
When I use the active provider, only then 2nd works (as shown in the image). Any other placement of a single active provider rail does not unload the wagon.
Is this intended, or an unintended interaction with the 8L mod?
Thanks!
With the 8L mod, each wagon is exactly 8 blocks in length. The belt pieces show the borders of the wagons. That means each wagon should correspond to exactly 4 logistic rail pieces.
When I set different items for each of the 4 requester rails, only the item from the 2nd rail piece is fulfilled.
When I use the active provider, only then 2nd works (as shown in the image). Any other placement of a single active provider rail does not unload the wagon.
Is this intended, or an unintended interaction with the 8L mod?
Thanks!
Re: [MOD 0.12.26] Logistics Railway 1.0.4
Isn't that the normal behaviour even without the 8L mod?
I mean when creating the entity for the logistic cargo, it has to choose one of the rails it has (or I think that's what it does).
Why would you even have different settings for the rail pieces if you want to configure the same wagon? Just put everything in one rail and just copy that setting to the other rails for the same wagon.
I mean when creating the entity for the logistic cargo, it has to choose one of the rails it has (or I think that's what it does).
Why would you even have different settings for the rail pieces if you want to configure the same wagon? Just put everything in one rail and just copy that setting to the other rails for the same wagon.
Re: [MOD 0.12.26] Logistics Railway 1.0.4
I don't know, that's why I'm asking. I guess I should disable the mod and see, but that requires re-configuring trains as well.Isn't that the normal behaviour even without the 8L mod?
As for why you'd want more than one requester -- when you want more distinct item types in the wagon than you can select from one requester rail. The requester rail allows for 10 items, but a wagon can hold 30. I regularly use 14-18 different items per wagon when setting up an outpost construction train, or for my FARL. With stack sizes being 50 for most items, there are quite a few items that don't need more than one stack.
------------------
EDIT:
I removed 8L and confirmed that only one rail piece works, no matter the wagon length. It's whatever piece is closest to the center, probably whichever rail piece intersects with the hitbox of the wagon. For the 8L mod, that always lines up with the second rail piece. For vanilla, it could vary between the second or third, depending on the wagon's order in the train (I didn't check thoroughly).
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.26] Logistics Railway 1.0.4
Yes, as you have discovered each wagon can only have 10 requests set, corresponding to the particular requester rail piece it finds directly beneath it. This is a limitation of all Requester Chests, it seems they are hard-coded to have exactly 10 request slots, and there doesn't seem to be any way to change this in a mod.Pacifyer wrote:As for why you'd want more than one requester -- when you want more distinct item types in the wagon than you can select from one requester rail. The requester rail allows for 10 items, but a wagon can hold 30. I regularly use 14-18 different items per wagon when setting up an outpost construction train, or for my FARL. With stack sizes being 50 for most items, there are quite a few items that don't need more than one stack.
I removed 8L and confirmed that only one rail piece works, no matter the wagon length. It's whatever piece is closest to the center, probably whichever rail piece intersects with the hitbox of the wagon. For the 8L mod, that always lines up with the second rail piece. For vanilla, it could vary between the second or third, depending on the wagon's order in the train (I didn't check thoroughly).
To work around this limitation, you can either use multiple wagons or have two separate loading stations, and set some of your request slots on one station, and the rest on the second station.
-
- Long Handed Inserter
- Posts: 56
- Joined: Sat Mar 05, 2016 5:44 am
- Contact:
Re: [MOD 0.12.26] Logistics Railway 1.0.4
May I suggest trying to make it compatible with smart trains? Smart trains automatically just stop and hecne the railway dosen't get activated.
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.26] Logistics Railway 1.0.4
EmperorZelos wrote:May I suggest trying to make it compatible with smart trains? Smart trains automatically just stop and hecne the railway dosen't get activated.
See below.
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Thanks to Choumiko, Logistics Railway 1.0.5 is now compatible with Smart Trains (v0.3.77 or greater)!
Re: [MOD 0.12.29] Logistics Railway 1.0.5
I've just realised an issue. Your proxy chests have inventory size 200 for modded wagon support i assume. This means that the wait until full rule from SmartTrains won't work for now. Thinking about ways to fix it
Edit: Ignore that, Logistics Railway actually set's the chests bar to the carg wagons inventory size. Mistake was me not returning true when checking for full inventory SmartTrains update #2 for today incoming..
Edit: Ignore that, Logistics Railway actually set's the chests bar to the carg wagons inventory size. Mistake was me not returning true when checking for full inventory SmartTrains update #2 for today incoming..
-
- Burner Inserter
- Posts: 5
- Joined: Fri Apr 01, 2016 2:13 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Thanks for the mod. Again something that should have been there in the first place.
But unfortunately there is an issue when using requester rail with multiple requests and cargo wagons that have filters set.
Simple example: RequesterRail has requests set like item X and item Y with quantities set to 1.5k(max) but the cargo wagon only accepts item Y. The bots will fetch both items (most of the times slot#1 request first) place them into the dummy and due to the filter on the cargo wagon only item y will be "accepted" when the train moves on or is stopped/set to manual mode. Because the dummy is deleted if the train moves on or is set to manual mode, you effectivly loose the amount of item x that was delivered to the dummy.
It would be nice if this rail type (the dummy) could "read" filters and thus possible max quantities or simply copy them from the cargo wagon (maybe overwriting/limiting its own requests) to prevent item loss.
Greetz
But unfortunately there is an issue when using requester rail with multiple requests and cargo wagons that have filters set.
Simple example: RequesterRail has requests set like item X and item Y with quantities set to 1.5k(max) but the cargo wagon only accepts item Y. The bots will fetch both items (most of the times slot#1 request first) place them into the dummy and due to the filter on the cargo wagon only item y will be "accepted" when the train moves on or is stopped/set to manual mode. Because the dummy is deleted if the train moves on or is set to manual mode, you effectivly loose the amount of item x that was delivered to the dummy.
It would be nice if this rail type (the dummy) could "read" filters and thus possible max quantities or simply copy them from the cargo wagon (maybe overwriting/limiting its own requests) to prevent item loss.
Greetz
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Yeah, if you have wagons with filters try and request the "wrong" items, things won't work out well. Maybe just be careful not to over-request something? Or just don't use filters and let the requester filters themselves handle things?operations wrote:Thanks for the mod. Again something that should have been there in the first place.
But unfortunately there is an issue when using requester rail with multiple requests and cargo wagons that have filters set.
Simple example: RequesterRail has requests set like item X and item Y with quantities set to 1.5k(max) but the cargo wagon only accepts item Y. The bots will fetch both items (most of the times slot#1 request first) place them into the dummy and due to the filter on the cargo wagon only item y will be "accepted" when the train moves on or is stopped/set to manual mode. Because the dummy is deleted if the train moves on or is set to manual mode, you effectivly loose the amount of item x that was delivered to the dummy.
It would be nice if this rail type (the dummy) could "read" filters and thus possible max quantities or simply copy them from the cargo wagon (maybe overwriting/limiting its own requests) to prevent item loss.
-
- Burner Inserter
- Posts: 5
- Joined: Fri Apr 01, 2016 2:13 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Code: Select all
if requester then
wagon.minable = false -- Don't want any changes to the wagon's inventory while it's been copied over to the proxy chest
wagon.operable = false
local chest = wagon.surface.create_entity({name = "requester-chest-from-wagon", position = wagon.position, force = wagon.force})
local wagon_inventory = wagon.get_inventory(defines.inventory.chest)
local wagon_filters = {}
for f = 1, #wagon_inventory do
local _slot_filter = wagon.get_filter(f)
if _slot_filter then
local _slot_filter_not_listed = true
for l = 1, #wagon_filters do
if wagon_filters[l] == _slot_filter then
_slot_filter_not_listed = false
end
end
if _slot_filter_not_listed then
table.insert(wagon_filters, _slot_filter)
end
end
end
wagon_inventory.setbar(0)
local chest_inventory = chest.get_inventory(defines.inventory.chest)
if #chest_inventory > #wagon_inventory then
chest_inventory.setbar(#wagon_inventory) -- Limit the chest inventory size to equal the wagon inventory size; proxy chest has a lot of slots to accommodate modded wagons
end
copyInventory(wagon, chest) -- Wagon to chest
wagon.clear_items_inside()
local dummy_requester = wagon.surface.find_entity("requester-rail-dummy-chest", wagon.position)
for s = 1, 10 do -- It seems all requester chests are limited to 10 request slots
local request = dummy_requester.get_request_slot(s)
if request then
for r = 1, #wagon_filters do
if request.name == wagon_filters[r] then
chest.set_request_slot(request, s)
end
end
end
end
created = chest
The problem still remains the same if your cargo wagon has more then one filter set exceeding the cargo wagons inventory. To implement that particular part it would be required to:
-fetch stack sizes of items
-count how many slots are actually set to filter x
-calculate maximum quantity of the item and set the request count accordingly
But thats something I leave to people who know lua and factorio lua. Feel free to implement, alter or not to care about it.
Greetz
PS: I didn't implement an if switch for the case that the cargo wagon has no filter set at all, resulting in no request being set for the dummy if the cargo wagon has no filter set.
-
- Burner Inserter
- Posts: 5
- Joined: Fri Apr 01, 2016 2:13 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Code
Ok. It seems I couldn't live with the fact leaving that loose end I left open. Altough this if far from perfect it does have its uses. If you replace the "if requester" part within the control.lua with this functionalty changes as follows:- if no filter is set on the cargo wagon everything is handled as before
- if you set one or multiple filters on the cargo wagon and the requester rail has a request set for that/those specific items, the bots will fetch the items in stack sizes (e.g. 50 iron ore if not altered by mods) no matter what the amount specified in the request actually is. For example if you have a cargo wagon that has filters set for lets say 12 slots iron ore 12 slots copper ore and 5 slots stone, these slots will be filled (of course only if enough supply and the requests are a given) the last slot not having a filter set will stay empty regardless of any settings the requester rail might have.
So what is this good for?
Example
A truly dynamic depot with railstations that all are able to handle every of the (up to) 10 possible requests regardless which train actually shows up. I don't know if people do use one train for lets say 2 stops for iron ore next 2 stops for copper so on and so forth... I don't. Enjoy ... or not!
Greetz
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Cool, looks good and I'll test it out. If no bugs are found, I'll add it for the next version -- that will mark 4 different contributors to this mod! It might not sound like much, but that makes it the most collaborative coding project I've ever worked on.
-
- Fast Inserter
- Posts: 192
- Joined: Sun Oct 05, 2014 6:12 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Awesome rails, but any chance on making them more expensive, at least some higher level circuitry or a logistics chest (although I guess the inventory disappears, meh)? And in turn having them drop themselves instead of dropping a normal rail or is this caused by a Factorio limitation?
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.5
I can make a config option to increase the cost of the rails. Currently I just have them give you back a regular rail because all it takes to craft them is a single regular rail, so this way you get more flexibility -- e.g. "ah crap I didn't mean to make all these active provider rails, just passive ones" -> promptly plops them all down and picks them back up, allowing to re-craft the passive rails. Naturally this would be changed if the recipe was altered to be more expensive.OvermindDL1 wrote:Awesome rails, but any chance on making them more expensive, at least some higher level circuitry or a logistics chest (although I guess the inventory disappears, meh)? And in turn having them drop themselves instead of dropping a normal rail or is this caused by a Factorio limitation?
Re: [MOD 0.12.29] Logistics Railway 1.0.5
Yeah plz only do that as an option.
I like it the way it currently is.
I like it the way it currently is.
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.29] Logistics Railway 1.0.6
The new functionality to handle cargo wagon filters -- thanks to operations -- and a config option to increase the recipe cost of Logistics Rails to include 1 Advanced Circuit have been added in version 1.0.6.
Re: [MOD 0.12.26] Logistics Railway 1.0.0
I have not had a problem losing things however i did find out that if you have a blueprint inside the wagon when it makes the switch it will clear the blueprint.CmdrKeen wrote:you might tryAny time a Cargo Wagon becomes a Logistics Wagon, its inventory is dumped into a separate invisible entity, and it is in fact that entity that interacts with the logistics network.
When its inventory has been given to the other entity, the wagon's regular inventory is emptied, and any changes to its regular inventory will not interact with the logistics network.
When the train begins moving again, the invisible entity's inventory is given back to the wagon. However, if the wagon's regular inventory has filled up during this time, any items from the invisible entity will be lost, as the wagon has run out of space.
Although you shouldn't be using any inserters on Logistics Wagons, if there are inserters present, they could accidentally insert items that could be destroyed.
As such, any inserters in the vicinity of Logistics Wagons are automatically disabled in order to prevent this. They are re-enabled when the train begins moving again.
Also, please refrain from manually placing any items into wagons that are on top of Logistics Rails, as this may cause you to lose items if the wagon becomes too full.when the cargo wagons are stationary, and set them back to true when the train starts moving today.Code: Select all
entity.minable = false enity.operable = false
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: [MOD 0.12.26] Logistics Railway 1.0.0
Yeah, blueprints are weird like that. I don't know how to copy blueprints from one inventory to another without losing their contents.Drac wrote:I have not had a problem losing things however i did find out that if you have a blueprint inside the wagon when it makes the switch it will clear the blueprint.
Re: [MOD 0.12.29] Logistics Railway 1.0.6
Who the hell transports filled out Blueprints in a train wagon???