Concept: Mapping of Train(stop) properties as CN-signals

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1486
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Concept: Mapping of Train(stop) properties as CN-signals

Post by MeduSalem »

While reading through the thread over here I got the idea what if... we could map Train and Trainstop properties as circuit network signals that can be read from a Trainstop? ... analogous/similar to how Roboports map Robot counts to Circuit Network signals that can be read.


The mapping of these signals to circuit network channels would actually be an interesting feature because as ssilk pointed out over in that other thread having too many different conditions would turn out way too complex since AND/OR'ing them together inside the Train is really ugly if there's a lot of conditions that have to be met at the same time.

That's where the mapping of these signals would come in handy because then you can offload that condition mess to the Circuit Network, using combinators to do pretty much whatever you want with these properties and then lead the results back in and use "Wait on Circuit Network condition" instead.

That feature would also be a lot easier to expand upon without further convoluting the wait conditions menu inside the train.


Things that could be mapped to a circuit network signal by the trainstop are at least:
  • Train Inventory Full/Empty (Could be a 3-state signal with 0 = not empty, but also not full, 1 being full, 2 being empty) (maybe make it a percentage bar alltogether with values ranging from 0=empty to 100=full)
  • Train item contents/count obviously to their respective item channels like has been demanded in the past and probably is going to be added in 0.15 anyways
  • Amount of Locomotives/Wagons a train has and how many of them are empty/full
The only things that would be problematic currently are the Time Passed/Inactivity signals... but that could be solved maybe if TIMER Combinators would be finally a thing or otherwise handling that within the Circuit Network would be somewhat nasty since a lot of people really don't want to deal with "amount of ticks" and rather have something more substantial like "5 seconds" and so on.

Maybe people can come up with additional properties that could be extracted from trains and mapped to circuit network channels by the trainstop... like tagging trains with a unique number Id and so on, which would be nice for Smart Train stuff (I know mods can do it already).


TL;DR: The idea is basically more than just "Send train Item contents to circuit network"... it's about adding the foundation for sending any possible property a train/trainstop can have to the circuit network by mapping them to channels... and using the Circuit Network for doing all the condition stuff instead since it's way more flexible.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Concept: Mapping of Train(stop) properties as CN-signals

Post by ssilk »

This is the link to the mentioned thread: viewtopic.php?f=6&t=28483 Get train content as signal from train stop

Hm.
I think this mapping should work in a way, that a player has some kind of switch-board, that enables him to switch on only those signals, that are interesting for him:
Image
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: Concept: Mapping of Train(stop) properties as CN-signals

Post by zebediah49 »

Here's the thing -- providing the train content, and train-car (and engine) count, to the circuit network is the only thing that can't be handled by the circuit network.
  • Time passed -- start a timer when the train is detected in the station (from the existence of train cars/engines); trigger condition when timer exceeds threshold
  • Inventory Full -- goal content per car * number of cars - current content = 0
  • Inventory Empty -- current content = 0
  • Item Count -- current content = goal content
  • circuit condition -- .... it's a circuit network.
  • inactivity -- [ current content - (current content * 1) = 0 ] starts a timer running; trigger the condition when the timer exceeds the threshold
A roboport-like interface would work pretty well, although being able to provide both types of statistics at once would be very helpful.

Strictly speaking though, it is possible to determine train size without the help of the network. Strategically placed and networked rail signals can be used to measure the length of a train, although it won't tell you which cars are which, consistent train design will help with that.

Post Reply

Return to “Ideas and Suggestions”