train stop "read train contents" filter
Moderator: ickputzdirwech
train stop "read train contents" filter
Hi.
It would be nice if we have a filter with wagon numbers in train stop "read train contents" feature. With switch for "white list" and "black list" like in filter inserter. Thus we will be able to say to send only content of first wagon or all except first wagon.
It would be nice if we have a filter with wagon numbers in train stop "read train contents" feature. With switch for "white list" and "black list" like in filter inserter. Thus we will be able to say to send only content of first wagon or all except first wagon.
Re: train stop "read train contents" filter
Hi, I’m not sure how that should work.
I mean, wagons have already filters, now you seem you want to set those filters from outside. And what I really struggle to understood is how blacklisted wagons should function. They make no sense.
Perhaps it is better to explain: What do you want to do?
I mean, wagons have already filters, now you seem you want to set those filters from outside. And what I really struggle to understood is how blacklisted wagons should function. They make no sense.
Perhaps it is better to explain: What do you want to do?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train stop "read train contents" filter
I read it as he wants to filter the output of the read train contents by wagon. So he could say tell me the contents of the first wagon of the train.
Re: train stop "read train contents" filter
Ah! At first I thought to https://mods.factorio.com/mod/Inventory%20Sensor
But that works only for whole trains.
I think the gameplay value for this suggestion is quite low...
But that works only for whole trains.
I think the gameplay value for this suggestion is quite low...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train stop "read train contents" filter
Exactly!
In setups where we have 1 supply train for several stations or 1 supply train for 1 station(with complex set of items in wagons) it better to have a possibility to send from train stop to circuit net not a content of whole train, but just content of several wagons or all except these wagons. This is need for configure station logic with combinators for smart upload/download of a train.ssilk wrote: What do you want to do?
Re: train stop "read train contents" filter
For example, in this scheme - viewtopic.php?f=194&t=92539 - the content of a payload wagon is leaked in a circuit net. When we need only a content of a wagon with markers. This problem can be solved with train stop filter or/with filter combinator.
Re: train stop "read train contents" filter
Understood. But as said: very low chance of implementation, because low general gameplay value and high added complexity.
From my experience I found those setups a) oversimplified (sometimes you need just one item, but the train loads other items, too) b) slow (especially when it needs to supply some outposts).
This is in my eyes a typical use case for LTN mod, I would use that in this case just for the supply. It’s hard to change that in an existing map and learn how to use it, but I think when it suddenly works you will say, why didn’t we do that earlier.
From my experience I found those setups a) oversimplified (sometimes you need just one item, but the train loads other items, too) b) slow (especially when it needs to supply some outposts).
This is in my eyes a typical use case for LTN mod, I would use that in this case just for the supply. It’s hard to change that in an existing map and learn how to use it, but I think when it suddenly works you will say, why didn’t we do that earlier.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train stop "read train contents" filter
Oh, I meant with complex here not just complex in the sense of programming, but for the player.
Let’s play it through.
Assuming we add two extra signals:
- contents-of-wagon-number
- contents-of-wagons-except-number
So to get content of first wagon of an LLCCCC-train you need to send:
contents-of-wagon-number: 3
Because that is the third entity in the train.
Open question here: what if both signals are set? Not logical self-explained, which is difficult for players.
But except for that it looks simple, also for the blacklisted signals, but as developer I would think: that is really an effort, because it needs extra buffers, because otherwise it needs to sum all wagons each tick. And with very long trains this is a bit of performance issue.
And why not doing the blacklisting yourself, because that is the content of the whole train, minus the content of the wagon. So you need just to read train content, remember that and then read wagon content and subtract it. Takes two ticks.
I mean, that are legit thoughts, because the use-case of the blacklisted contents, they are really so rare and it would remove this illogical conflicting signal-state, if both is set, when it would not be implemented.
Oh, and what I forgot: this cries for implementation as mod. Really not so difficult I think.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train stop "read train contents" filter
This is as simple as filter inserter. I don't see any difficulties.
What are these both signals? I don't understand you. In my view this should be *the same* settings as in the filter inserter. A player choose two things:Open question here: what if both signals are set? Not logical self-explained, which is difficult for players.
- white or black list switch
- the content of chosen list
But content is wagon numbers, instead of items(like in filter inserter). That's it. What difficulties can be here for player?
The talk about an implementation is meaningless, because i didn't see the source. But. We already done sum of all items from all wagons. And white filter can make this process even faster. For examle:But except for that it looks simple, also for the blacklisted signals, but as developer I would think: that is really an effort, because it needs extra buffers, because otherwise it needs to sum all wagons each tick. And with very long trains this is a bit of performance issue.
Code: Select all
void
calc_sum(struct train *tr, uint64_t* tsfwmask)
{
uint64_t wagon_mask[MAX];
// set wagons mask from a train stop filter wagon mask
for(int i = 0; i < MAX; i++)
wagon_mask[i] = 0xffffffffffffffff & tsfwmask[i];
for(int i = 0; i < tr->wagon_cnt; i++)
if ((wagon_mask[i / 64] & (1 << (i%64)))
train_add_wagon_items_to_sum(tr, i);
}
Ok. But how should i know the content of the wagon ?And why not doing the blacklisting yourself, because that is the content of the whole train, minus the content of the wagon. So you need just to read train content, remember that and then read wagon content and subtract it. Takes two ticks.
I don't understand what is this "both" and how can you set it.I mean, that are legit thoughts, because the use-case of the blacklisted contents, they are really so rare and it would remove this illogical conflicting signal-state, if both is set, when it would not be implemented.
May be you are right.Oh, and what I forgot: this cries for implementation as mod. Really not so difficult I think.
Re: train stop "read train contents" filter
We seem to have a communication problem, because you haven’t written that till yet.oleg4f wrote: ↑Thu Dec 10, 2020 10:33 am What are these both signals? I don't understand you. In my view this should be *the same* settings as in the filter inserter. A player choose two things:
- white or black list switch
- the content of chosen list
But content is wagon numbers, instead of items(like in filter inserter). That's it. What difficulties can be here for player?
You:
- You need a special signal for the wagon number
- you set the mode of operation in the train stop (none, blacklist, whitelist)
- you get the contains of what you selected,
- you can’t automate changing that mode
- limited to a very special use-case only (yours)
- simple to blacklist things
Me:
- I need a new special signal for the wagon number
- when set it returns the contents of that loco/train only
- no need to set the mode in the stop
- can be automated: if signal present returns contains of that wagon, if not then returns the whole train as yet
- has multiple use cases (e.g. enough train fuel yet? No? Then wait)
- a little bit complex to calculate the blacklist (needs two measures, one for the whole train and one for the to be blacklisted
Ahh, you meant that as MASK. And the mask works like in LTN-mod. Changes everything, now I understand this, but, man, why didn’t you explain that not from beginning?The talk about an implementation is meaningless, because i didn't see the source. But. We already done sum of all items from all wagons. And white filter can make this process even faster. For examle:
Code: Select all
void calc_sum(struct train *tr, uint64_t* tsfwmask) { uint64_t wagon_mask[MAX]; // set wagons mask from a train stop filter wagon mask for(int i = 0; i < MAX; i++) wagon_mask[i] = 0xffffffffffffffff & tsfwmask[i]; for(int i = 0; i < tr->wagon_cnt; i++) if ((wagon_mask[i / 64] & (1 << (i%64))) train_add_wagon_items_to_sum(tr, i); }
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train stop "read train contents" filter
Indeed, you wrote it. But the step to imagine how the current filter inserter looks like and to convert that how the station GUI then might look was too far for me.
And with a mask you don’t need blacklist/whitelist.
And with a mask you don’t need blacklist/whitelist.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: train stop "read train contents" filter
No-no. A mask - is an internal representation. Blacklist/whitelist switch is for user interface. A mask is too complex and uncomfortable for use. User choose blacklist or whitelist and then write a wagon numbers(it can use negative numbers to represent wagons from a train tail). Then for performance reasons, "train stop" convert this to a mask.