Items getting stuck in station inserters.
Moderator: Optera
-
- Fast Inserter
- Posts: 183
- Joined: Sun Feb 21, 2016 6:33 pm
- Contact:
Items getting stuck in station inserters.
Good day,
I'm playing a game with LTN and Bob-mods and have set my LTN stations to 1 locked slot per wagon to prevent items getting stuck in the inserters. This worked well for the vanilla train, but now that I've switched to MK2 locomotives and wagons, it no longer seems to work.
I have messed with the Encoded Positions of trains, trying to tell the combinator I've got a MK2 locomotive at position 1, and MK2 wagons at positions 2 and 3, but that didn't work. I seems this needs binary encoding? If I manage to get that done, would it solve my problem?
Thank you.
I'm playing a game with LTN and Bob-mods and have set my LTN stations to 1 locked slot per wagon to prevent items getting stuck in the inserters. This worked well for the vanilla train, but now that I've switched to MK2 locomotives and wagons, it no longer seems to work.
I have messed with the Encoded Positions of trains, trying to tell the combinator I've got a MK2 locomotive at position 1, and MK2 wagons at positions 2 and 3, but that didn't work. I seems this needs binary encoding? If I manage to get that done, would it solve my problem?
Thank you.
Re: Items getting stuck in station inserters.
My designs work by using the virtual signals encoded position of vanilla locomotive/wagons.
To get them to work with modded carriages simply use an arithmetic combinator to convert signals. e.g. for bobs you can do Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
To get them to work with modded carriages simply use an arithmetic combinator to convert signals. e.g. for bobs you can do Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
My Mods: mods.factorio.com
-
- Fast Inserter
- Posts: 183
- Joined: Sun Feb 21, 2016 6:33 pm
- Contact:
Re: Items getting stuck in station inserters.
Thank you for your reply. I think I understand what you explained, but my problem is that I have no idea how to do that with arithmetic combinators. Is there a page you can refer me to?Optera wrote:My designs work by using the virtual signals encoded position of vanilla locomotive/wagons.
To get them to work with modded carriages simply use an arithmetic combinator to convert signals. e.g. for bobs you can do Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
Also, those encoded positions you mention, are those in binary? Because reading the help-topic on that was like trying to read Aramaic.
Thank you.
Re: Items getting stuck in station inserters.
Converting signals can be done like this:
Attaching the combinator like that will feed the converted signal right back into circuit the decoder combinator is attached to in my blueprints. (the one doing each * encoded positon = each).My Mods: mods.factorio.com
-
- Fast Inserter
- Posts: 183
- Joined: Sun Feb 21, 2016 6:33 pm
- Contact:
Re: Items getting stuck in station inserters.
Thank you for posting that image.
I have connected the Arithmetic combinator as shown, but obviously I'm still missing something.
Did I understand you correctly in that there's another part to this solution that is not shown in your image?
Being the part where you mention the setting 'each * encoded position = each' ?
Do I have to add an encoder with that setting for each type of wagon?
I really wish this stuff wouldn't be so complicated for the average gamer.
Some kind of blueprint book with ready-to-go solutions would be great.
I have connected the Arithmetic combinator as shown, but obviously I'm still missing something.
Did I understand you correctly in that there's another part to this solution that is not shown in your image?
Being the part where you mention the setting 'each * encoded position = each' ?
Do I have to add an encoder with that setting for each type of wagon?
I really wish this stuff wouldn't be so complicated for the average gamer.
Some kind of blueprint book with ready-to-go solutions would be great.
Re: Items getting stuck in station inserters.
The combinator above is all you need to add to the stations blueprints i posted in the design thread.
My Mods: mods.factorio.com
Re: Items getting stuck in station inserters.
I guess I'm confused as well. Can you go into more detail about what this is actually doing? Is it a bitwise AND operation on encoded position wagon? And it's wired up to itself and the output on the LTN station?Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
I've got it set up and working on my stations, but I have no idea why.
Re: Items getting stuck in station inserters.
wagon mk1 + 0 = wagon stores the input wagon mk1 in a different variable wagon.
Since all we care for where any kind of cargo wagon is positioned that'd be wagon + wagon mk 1 + wagon mk2 + ...
Insert above and you get what this combinator does for 2 signals at once wagon + (wagon mk1 + wagon mk2) + .... = wagon
Since all we care for where any kind of cargo wagon is positioned that'd be wagon + wagon mk 1 + wagon mk2 + ...
Insert above and you get what this combinator does for 2 signals at once wagon + (wagon mk1 + wagon mk2) + .... = wagon
My Mods: mods.factorio.com
Re: Items getting stuck in station inserters.
Ok, that makes more sense. Thanks!
Re: Items getting stuck in station inserters.
I believe you can't mix wagon types in trains and expect the reserved slots to work. Here is why:
Say you have a train with a locomotive, a wagon mk1 and wagon mk2. The station has 1 reserved slot. So the first wagon can fit 1950 coal and the second wagon can fit 4950 coal for a total of 5900 coal. So the train arrives and the inserters will input 2000 coal into both wagons for a total of 4000 before the first inserters get stuck with items in hand. The inserters for the second wagon then cotinue till 5900 coal are loaded and don't get stuck.
You would have to change the number or speed of inserters or the stack size override so they load the wagons in the same ratio as their sizes are. You could even do that dynamically depending on the train composition signal but that would be huge job.
Note: Train composition is an output only. You can't tell LTN that the station can only cope with wagon mk1. Something I miss too.
Say you have a train with a locomotive, a wagon mk1 and wagon mk2. The station has 1 reserved slot. So the first wagon can fit 1950 coal and the second wagon can fit 4950 coal for a total of 5900 coal. So the train arrives and the inserters will input 2000 coal into both wagons for a total of 4000 before the first inserters get stuck with items in hand. The inserters for the second wagon then cotinue till 5900 coal are loaded and don't get stuck.
You would have to change the number or speed of inserters or the stack size override so they load the wagons in the same ratio as their sizes are. You could even do that dynamically depending on the train composition signal but that would be huge job.
Note: Train composition is an output only. You can't tell LTN that the station can only cope with wagon mk1. Something I miss too.
Re: Items getting stuck in station inserters.
Note hat since there can only one wagon at any one position the "+" is the same a "logical or". It simply combines the bitmasks of all wagons to a bitmask showing where any kind of wagon is.Optera wrote: ↑Wed Sep 19, 2018 6:58 pm wagon mk1 + 0 = wagon stores the input wagon mk1 in a different variable wagon.
Since all we care for where any kind of cargo wagon is positioned that'd be wagon + wagon mk 1 + wagon mk2 + ...
Insert above and you get what this combinator does for 2 signals at once wagon + (wagon mk1 + wagon mk2) + .... = wagon
-
- Fast Inserter
- Posts: 183
- Joined: Sun Feb 21, 2016 6:33 pm
- Contact:
Re: Items getting stuck in station inserters.
Optera,
A short while ago I finally figured out why your help and examples did not work for me!
The problem, as it turned out, was that my inserters were upgraded to a point where they dumped so much in one move,
that the single locked slot in the wagon no longer did the trick. As soon as I switched to locking 2 slots, everything worked as it should.
(Which was a pretty huge moment actually, considering I was playing that map for weeks at that point)
So, again I'd like to thank you for explaining this, and basically just wanted to let you know that it worked out after all.
A short while ago I finally figured out why your help and examples did not work for me!
The problem, as it turned out, was that my inserters were upgraded to a point where they dumped so much in one move,
that the single locked slot in the wagon no longer did the trick. As soon as I switched to locking 2 slots, everything worked as it should.
(Which was a pretty huge moment actually, considering I was playing that map for weeks at that point)
So, again I'd like to thank you for explaining this, and basically just wanted to let you know that it worked out after all.