Page 1 of 3

[0.13] Get train content as signal from train stop

Posted: Thu Jul 07, 2016 6:52 pm
by provet
While holding over a train you can see its cargo content.

I assumed (wrongly) that the train station can output cargo content to the circuit network. I'd like this very much, so my inserters can decide if it's a good idea to empty my trains or not in my wip omni-ore offload station

Image

Re: Get train content as signal from train station

Posted: Fri Jul 08, 2016 6:12 am
by Jarin
Agreed. As it stands, it's still frustratingly difficult to properly load a maintenance-restocking train. A separate inserter for each item, and carefully-set slot filtering on the cargo car.

Re: Get train content as signal from train station

Posted: Fri Jul 08, 2016 3:04 pm
by BillH
MindChanger and XKnight (along with others in this thread have come up with a smart loader for trains. I'm using XKnight's design in my factory to load my engineering train (one on each side to provide 20 different items).

Re: Get train content as signal from train station

Posted: Fri Jul 08, 2016 10:24 pm
by ssilk
Moved from General to suggestions

Re: Get train content as signal from train station

Posted: Sat Jul 09, 2016 1:01 pm
by provet
alternatively filter inserters with filters as a variable. (If x = y then filter z) etc..

Re: Get train content as signal from train station

Posted: Sun Jul 10, 2016 8:28 am
by Optera
Having Stations report a trains inventory to circuit network would open a lot of possibilities for smarter train loading.

The inventory should include fuel slots as well. It's rather easy to subtract it from normal cargo in case of a train carrying fuel and would allow for on demand requester chests to fuel engines without having 1-3 stacks of coal sitting in the requester chest in case a train needs fuel.

Re: Get train content as signal from train station

Posted: Mon Jul 11, 2016 12:57 am
by MeduSalem
That's still not a thing with 0.13?

I admit I haven't touched my train system with circuit network yet since I updated from 0.12, but I thought that it was a thing now...

If not then it should be one of the top priorities for one of the next circuit network expansions.

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 10:17 am
by ssilk
MeduSalem wrote:If not then it should be one of the top priorities for one of the next circuit network expansions.
Same opinion. If I have to choose, which device should be added circuit network next, then the train stop/train-content etc.

Fixed title according to that. Hope Twinsen sees it. :)

Re: Get train content as signal from train station

Posted: Mon Jul 11, 2016 11:04 am
by MindChanger
Optera wrote:Having Stations report a trains inventory to circuit network would open a lot of possibilities for smarter train loading.

This one could be pretty hard to do anyway. I mean you would have problems with loading the train anyway (as you don't know how many free slots wagon have).
Also if it is connected to the train then all wagons would count in. It would be problematic to create system that works for any number of wagons properly for custom player's setups.

Re: Get train content as signal from train station

Posted: Mon Jul 11, 2016 1:22 pm
by DevilXD
MindChanger wrote:This one could be pretty hard to do anyway. I mean you would have problems with loading the train anyway (as you don't know how many free slots wagon have).
Also if it is connected to the train then all wagons would count in. It would be problematic to create system that works for any number of wagons properly for custom player's setups.
But it's already done - when you hover over the locomotive, you can see cargo wagon content pretty clearly. The devs only need to add this as an option to the train station.

Re: Get train content as signal from train station

Posted: Mon Jul 11, 2016 1:56 pm
by MindChanger
DevilXD wrote:
MindChanger wrote:This one could be pretty hard to do anyway. I mean you would have problems with loading the train anyway (as you don't know how many free slots wagon have).
Also if it is connected to the train then all wagons would count in. It would be problematic to create system that works for any number of wagons properly for custom player's setups.
But it's already done - when you hover over the locomotive, you can see cargo wagon content pretty clearly. The devs only need to add this as an option to the train station.
I talked about getting info into circuit network

Re: Get train content as signal from train station

Posted: Mon Jul 11, 2016 2:20 pm
by DevilXD
MindChanger wrote:I talked about getting info into circuit network
You said that getting the cargo wagon content into circuit network would be hard. I showed you that the cargo wagon content is already available, only the train stop can't read those values :)

Re: Get train content as signal from train station

Posted: Mon Jul 11, 2016 2:23 pm
by MindChanger
DevilXD wrote:
MindChanger wrote:I talked about getting info into circuit network
You said that getting the cargo wagon content into circuit network would be hard. I showed you that the cargo wagon content is already available, only the train stop can't read those values :)
But how can I get this data into circuit network fo example to let know inserter to stop inserting special item type? Maybe I don't know something

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 2:56 pm
by DevilXD
MindChanger wrote:But how can I get this data into circuit network fo example to let know inserter to stop inserting special item type? Maybe I don't know something
I said that earlier:
DevilXD wrote:The devs only need to add this as an option to the train station.
You connect the train station with a red or green wire and set it to 'Get train content' instead of 'Send to train' :)

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 3:23 pm
by MindChanger
DevilXD wrote: You connect the train station with a red or green wire and set it to 'Get train content' instead of 'Send to train' :)
But I was asking about single wagon. Your way will get contents from all wagons, which is not what I asked for :)

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 4:15 pm
by DevilXD
MindChanger wrote:But I was asking about single wagon. Your way will get contents from all wagons, which is not what I asked for :)
But, why do you want to read the content of a single wagon ? I would be really happy if I could read at least the content of the whole train itself :)

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 6:39 pm
by MindChanger
DevilXD wrote:[
But, why do you want to read the content of a single wagon ? I would be really happy if I could read at least the content of the whole train itself :)
For example to know how much items more to put into wagon without using filters in train where it is no needed (to allow wagon to have different kinds of items).

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 8:51 pm
by MeduSalem
MindChanger wrote:For example to know how much items more to put into wagon without using filters in train where it is no needed (to allow wagon to have different kinds of items).
And why couldn't this be achieved using the whole train contents?

If you for example want to load Coal into the 3 third wagon you will surely have inserters there that are able to grab coal anyways... so if there is no coal in that wagon you basically just check if Coal amount of train is smaller than 40*2400 or something like that. And the inserter only works then if it is smaller.

Re: [0.13] Get train content as signal from train stop

Posted: Mon Jul 11, 2016 9:35 pm
by MindChanger
MeduSalem wrote:
MindChanger wrote:For example to know how much items more to put into wagon without using filters in train where it is no needed (to allow wagon to have different kinds of items).
And why couldn't this be achieved using the whole train contents?

If you for example want to load Coal into the 3 third wagon you will surely have inserters there that are able to grab coal anyways... so if there is no coal in that wagon you basically just check if Coal amount of train is smaller than 40*2400 or something like that. And the inserter only works then if it is smaller.
What if I want to have balanced amount of specified materials across my all wagons? (It is not often situation to customize slots like that, but is possible).
Can't do that just using train content reader.

I had so more ideas, but don't remember them yet :D

But well, those are really rare situations, so I think reading content from whole train is enough.

Re: [0.13] Get train content as signal from train stop

Posted: Tue Jul 12, 2016 2:23 am
by Cabanur
Many people have already seen that the problem with this is that the holding cargo of the whole train isn't as useful as a single wagon's cargo.

This is why I think it shouldn't be a train-station thing but a rail block thing. I'd like to be able to connect a rail to the circuit network. The rail should be able to read the contents of the wagon directly above it (either wagon or locomotive). Maybe make it only able to read if train is at full stop.