Constant Combinator for Locomotive

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Aladrius
Inserter
Inserter
Posts: 23
Joined: Thu Jun 09, 2016 12:04 pm
Contact:

Constant Combinator for Locomotive

Post by Aladrius »

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.
Roxor128
Fast Inserter
Fast Inserter
Posts: 168
Joined: Sun Oct 02, 2016 9:48 am
Contact:

Re: Constant Combinator for Locomotive

Post by Roxor128 »

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.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Constant Combinator for Locomotive

Post by Tekky »

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.
Last edited by Tekky on Fri May 12, 2017 11:26 am, edited 2 times in total.
Aladrius
Inserter
Inserter
Posts: 23
Joined: Thu Jun 09, 2016 12:04 pm
Contact:

Re: Constant Combinator for Locomotive

Post by Aladrius »

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.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Constant Combinator for Locomotive

Post by Tekky »

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.
Aladrius
Inserter
Inserter
Posts: 23
Joined: Thu Jun 09, 2016 12:04 pm
Contact:

Re: Constant Combinator for Locomotive

Post by Aladrius »

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.
This gets a big ole thumbs up for "close enough"!
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Constant Combinator for Locomotive

Post by Tekky »

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.
Actually, the more I think about it, the more I really like this suggestion of the original poster.

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.
Aladrius wrote:This gets a big ole thumbs up for "close enough"!
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". :)
Last edited by Tekky on Fri Jan 31, 2020 11:04 pm, edited 1 time in total.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Constant Combinator for Locomotive

Post by Tekky »

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.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Constant Combinator for Locomotive

Post by ssilk »

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...
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Constant Combinator for Locomotive

Post by Tekky »

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.
golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Re: Constant Combinator for Locomotive

Post by golfmiketango »

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.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Constant Combinator for Locomotive

Post by Tekky »

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.
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:

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.
golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Re: Constant Combinator for Locomotive

Post by golfmiketango »

Tekky wrote:
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.
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:

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.
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.

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...
Mucmep
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Aug 25, 2019 10:39 pm
Contact:

Type of train

Post by Mucmep »

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.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Type of train

Post by Tekky »

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.
Last edited by Tekky on Sun Sep 01, 2019 8:34 pm, edited 3 times in total.
Mucmep
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Aug 25, 2019 10:39 pm
Contact:

Re: Type of train

Post by Mucmep »

O, i didn't see this topic. Yes, it is better and more functional.
Koub
Global Moderator
Global Moderator
Posts: 7918
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Constant Combinator for Locomotive

Post by Koub »

[Koub] Then merging both topics
Koub - Please consider English is not my native language.
Post Reply

Return to “Ideas and Suggestions”