Constant Combinator for Locomotive
Moderator: ickputzdirwech
Constant Combinator for Locomotive
Add the functionality of a Constant Combinator to a locomotive to let it output arbitrary values to the circuit network when a train station has "read train contents" enabled.
This does two useful things: lets you set an unambiguous signal that a train is at the station, and lets you identify which train it is.
This does two useful things: lets you set an unambiguous signal that a train is at the station, and lets you identify which train it is.
Re: Constant Combinator for Locomotive
Ooh! Now that has potential!
With a set of train identifiers, you could set the unloading machinery to behave differently depending on which train is dropping off cargo.
Or you could use it to send you your oil train back to the outpost and lock it down there once your main base's crude oil reserves are full so it's not cluttering up the station there.
With a set of train identifiers, you could set the unloading machinery to behave differently depending on which train is dropping off cargo.
Or you could use it to send you your oil train back to the outpost and lock it down there once your main base's crude oil reserves are full so it's not cluttering up the station there.
Re: Constant Combinator for Locomotive
A similar suggestion has already been made in the following threads:
viewtopic.php?f=6&t=26359 Trains numbers for circuit network in v0.13
viewtopic.php?f=6&t=39002 Train-IDs for the circuit network
Also, this bug report thread, in which one of the Factorio devs talks about outputting a signal, might be interesting.
By the way, all of this is already possible now, using a little workaround:
You can load train #1 with 1 fish of cargo, train #2 with 2 fish of cargo, etc. Just make sure to always use filter inserters when unloading the train, so you don't unload the fish by mistake.
Unfortunately, the "inventory full" and "inventory empty" waiting conditions of the train will not work with this setup.
viewtopic.php?f=6&t=26359 Trains numbers for circuit network in v0.13
viewtopic.php?f=6&t=39002 Train-IDs for the circuit network
Also, this bug report thread, in which one of the Factorio devs talks about outputting a signal, might be interesting.
By the way, all of this is already possible now, using a little workaround:
You can load train #1 with 1 fish of cargo, train #2 with 2 fish of cargo, etc. Just make sure to always use filter inserters when unloading the train, so you don't unload the fish by mistake.
Unfortunately, the "inventory full" and "inventory empty" waiting conditions of the train will not work with this setup.
Last edited by Tekky on Fri May 12, 2017 11:26 am, edited 2 times in total.
Re: Constant Combinator for Locomotive
I'm using the fish method at the moment, just feels like a kludge giving up inventory space for identification purposes, along with messing with the train full/empty conditions.
Reading the fuel in the locomotive as part of the signal would also be a potential way to differentiate trains -- using wooden boxes, telephone poles or some other odd burnable in the 3rd fuel slot to identify the train.
Reading the fuel in the locomotive as part of the signal would also be a potential way to differentiate trains -- using wooden boxes, telephone poles or some other odd burnable in the 3rd fuel slot to identify the train.
Re: Constant Combinator for Locomotive
I have good news. According to this post by a Factorio developer, the suggestion of the station outputting a unique train ID is going to be implemented.
However, as far as I can tell, this Train ID will not be user-defined, but rather an internal value. So it seems that, at least for the moment, the suggestion of the original poster will not be fully implemented.
However, as far as I can tell, this Train ID will not be user-defined, but rather an internal value. So it seems that, at least for the moment, the suggestion of the original poster will not be fully implemented.
Re: Constant Combinator for Locomotive
This gets a big ole thumbs up for "close enough"!Tekky wrote:I have good news. According to this post by a Factorio developer, the suggestion of the station outputting a unique train ID is going to be implemented.
However, as far as I can tell, this Train ID will not be user-defined, but rather an internal value. So it seems that, at least for the moment, the suggestion of the original poster will not be fully implemented.
Re: Constant Combinator for Locomotive
Actually, the more I think about it, the more I really like this suggestion of the original poster.Aladrius wrote:Add the functionality of a Constant Combinator to a locomotive to let it output arbitrary values to the circuit network when a train station has "read train contents" enabled.
This does two useful things: lets you set an unambiguous signal that a train is at the station, and lets you identify which train it is.
In my opinion, the best solution would be to allow the user to specify an ID value for the train to send in the train orders window. That way, it would also be also possible for several trains to share an ID value if, for example, you want them to be treated the same way by the circuit network. However, if you want all trains to have a unique ID, you can do that too.
This would also allow grouping and assigning properties to trains. For example, I could assign all my iron ore trains an ID between 1000 and 1999 and all my copper trains an ID between 2000 and 2999. In other words, the first digit would define the type of train. Also, I could, for example, assign the length of the train to the second digit. That way, a train with an ID of 2348 would be a copper train with a length of 3. All of this information could easily be extracted by the circuit network simply by reading the ID of the train. The possibilities would be endless.
EDIT: Having to encode several properties into a single signal would actually not be necessary, because a constant combinator is able to emit several signals.
If the player is too lazy to assign a Train-ID to every one of his trains, the value sent by the train could default to either the number 1 (just a simple signal) or the internal Train-ID of the game, which would be a unique value for the train.
In the bug report thread that I linked to in my previous post, I am trying to convince the Factorio developers that it should also be possible to specify a user-defined value. If we are lucky, in the end, it will be more than a "close enough", but rather a "fully implemented".Aladrius wrote:This gets a big ole thumbs up for "close enough"!
Last edited by Tekky on Fri Jan 31, 2020 11:04 pm, edited 1 time in total.
Re: Constant Combinator for Locomotive
Unfortunately, the Factorio devs decided to only implement the unique ID for version 0.15.11, but not the user-defined ID. However, I am sure that this will still give us a lot to play with, at least until version 0.16.
I really hope that the original poster's suggestion will make it into version 0.16.
I really hope that the original poster's suggestion will make it into version 0.16.
Re: Constant Combinator for Locomotive
I add this sub-suggestion (on demand of Tekky ) from here: viewtopic.php?f=6&t=39002#p271703
It would be super useful like so:
Any train has in it's interface a knob. If you press the knop the interface for a constant cominator opens and you can put in ANY signal-configuration you want.
When a train comes now to a train stop he emits that configured constant combinator as signal.
Now we can enhance that: Every train-schedule-entry has also that knob and depending on the train-stop it add the signal of the train's constant combinator to that of the current stop.
Now add also copy paste of "normal" constant combinator into that of the train and vice versa.
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: Constant Combinator for Locomotive
One other thing I like about the original poster's suggestion is that the constant combinator should be attached to the individual locomotive and not just the train. That way, if the train composition changes, for example due to manual coupling or automatic coupling using this mod, you will not have to reset any combinators due to the train ID having changed, as the sum of all locomotive constant combinator signals can still be a meaningful signal.
However, I also like ssilk's idea of attaching a constant combinator to individual train's orders, which is train specific and not locomotive specific.
However, I also like ssilk's idea of attaching a constant combinator to individual train's orders, which is train specific and not locomotive specific.
-
- Filter Inserter
- Posts: 549
- Joined: Fri Jan 29, 2016 2:48 am
- Contact:
Re: Constant Combinator for Locomotive
I have a dream about implementing logistic outpost proxies and I have the loading part all worked out so I can request arbitrary precise quantities of stuff to be loaded into a train. But without running a wire out there, I am kind of stuck. How does the train communicate the needs of the outpost back to the main-base? Here I am stuck trying to figure out how to "compress" the logistic needs of the outpost down to just a few bits of information I can afford to convey by loading superfluous cargo onto the train (this cargo can not potentially be trash from the outpost or else trash conveyance would be compromised). It's a very hard problem which a settable-from-circuit-network constant combinator would solve perfectly.
Re: Constant Combinator for Locomotive
I agree that it should not be necessary to lay circuit network wire around the whole world, in order for outposts to be able to communicate with the main base. However, I don't think that trains should be used for transmitting signals. In the following threads, is has been suggested that there should instead be a wireless circuit network:golfmiketango wrote:I have a dream about implementing logistic outpost proxies and I have the loading part all worked out so I can request arbitrary precise quantities of stuff to be loaded into a train. But without running a wire out there, I am kind of stuck. How does the train communicate the needs of the outpost back to the main-base? Here I am stuck trying to figure out how to "compress" the logistic needs of the outpost down to just a few bits of information I can afford to convey by loading superfluous cargo onto the train (this cargo can not potentially be trash from the outpost or else trash conveyance would be compromised). It's a very hard problem which a settable-from-circuit-network constant combinator would solve perfectly.
viewtopic.php?f=6&t=49317 Radio Links for signals transmission
viewtopic.php?f=6&t=47429 global circuit network
The first thread contains a link to a mod which implements this. This mod seems to have been updated for 0.16. I haven't tested it, though.
-
- Filter Inserter
- Posts: 549
- Joined: Fri Jan 29, 2016 2:48 am
- Contact:
Re: Constant Combinator for Locomotive
I've used that mod and it seems pretty nice. To me it feels a bit cheat-ey. Not sure why, as it's perfectly reasonable to imagine that the engineer is able to encode and address circuit-network signals as some kind of point-to-point digital radio-frequency protocol.Tekky wrote:I agree that it should not be necessary to lay circuit network wire around the whole world, in order for outposts to be able to communicate with the main base. However, I don't think that trains should be used for transmitting signals. In the following threads, is has been suggested that there should instead be a wireless circuit network:golfmiketango wrote:I have a dream about implementing logistic outpost proxies and I have the loading part all worked out so I can request arbitrary precise quantities of stuff to be loaded into a train. But without running a wire out there, I am kind of stuck. How does the train communicate the needs of the outpost back to the main-base? Here I am stuck trying to figure out how to "compress" the logistic needs of the outpost down to just a few bits of information I can afford to convey by loading superfluous cargo onto the train (this cargo can not potentially be trash from the outpost or else trash conveyance would be compromised). It's a very hard problem which a settable-from-circuit-network constant combinator would solve perfectly.
viewtopic.php?f=6&t=49317 Radio Links for signals transmission
viewtopic.php?f=6&t=47429 global circuit network
The first thread contains a link to a mod which implements this. This mod seems to have been updated for 0.16. I haven't tested it, though.
Here's a bit of bike-shedding: what I really would love to have for this are something like Hollerith tabulators, which could be used to encode a sequence of circuit network signals into an ordered deck of punched cards. But I'm not sure the modding interface exists to create custom stackable individual-snowflake items like that (I mean, items like blueprints or power-armor which start out generic, but once customized, persistently retain their custom configuration as individual items, not just as entities). I guess you could package them into boxes at the tabulator and make the boxes the individual snowflakes, using the damage-as-unique-ifier hacks...? If it could be done, one could do all sorts of interesting stuff by putting your punched cards on belts...
Type of train
Good day. I read it Train type sensor, but I have some different idea.
Player can specify the type of train in the locomotive menu.
This will allow don't use special ID items in the wagons and will make working with universal stations more convenient.
Player can specify the type of train in the locomotive menu.
This will allow don't use special ID items in the wagons and will make working with universal stations more convenient.
Re: Type of train
I think the following suggestion offers a more flexible solution:
viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
EDIT: The above link now points to the current thread, because the threads have been merged.
That way, the type of train and other properties (e.g. its length and number of locomtives) could be made a signal in the constant combinator.
viewtopic.php?f=6&t=46969 Constant Combinator for Locomotive
EDIT: The above link now points to the current thread, because the threads have been merged.
That way, the type of train and other properties (e.g. its length and number of locomtives) could be made a signal in the constant combinator.
Last edited by Tekky on Sun Sep 01, 2019 8:34 pm, edited 3 times in total.
Re: Type of train
O, i didn't see this topic. Yes, it is better and more functional.
Re: Constant Combinator for Locomotive
[Koub] Then merging both topics
Koub - Please consider English is not my native language.