Add support for train stations (groups of train stops)
Posted: Sun Dec 11, 2016 12:34 pm
Add an entity that can be placed anywhere called a "train station". This could be something as simple as a sign (kind of like a power pole). Also allow setting a name on the "train station".
Then allow linking any number of train stops via red or green wire to the "train station". What this will do is hide all the train stops from being visible in any gui (eg train schedule editing) and simplify the interface greatly.
Now, stay with me, I will get to how this will be extremely useful. For now though, I need to explain another feature that we need.
We also need the ability to create "labels" and assign 0 to many labels to each train. Labels could include things like "player access", "loading", "unloading", etc. Now these labels, should match the names of the train stops linked to the "train station" mentioned above.
Now you tell a train to go to a "train station" and if it's labeled with a "label" that matches a train stop in that station, it will go to that stop.
Imagine this setup:
You have the following "train station" outposts:
"Oil 1", "Oil 2", "Iron 1", "Copper 1"
Each of these outposts has the following train stops and they are all liked via red wire to the "train station":
"Loading", "Player Access", "Supply"
The loading is where the resource is loaded onto the resource train. The player access is for the player taking their personal train to that outpost whenever they want. The supply is for the supply train that brings walls, turrets, power poles etc to the outpost. ie. whatever you need at the outpost.
Now at you main base (where your unloading area and supply loading area is), you have all the train stops below, all linked to a "train station" with the name "main base":
"Iron Unloading", "Oil Unloading", "Copper Unloading", "Supply Loading"
Now you have your supply train with the following labels:
"Supply Loading", "Supply"
It's set, in it's schedule to go to "main base", "Oil 1", "Oil 2", "Iron 1", and "Copper 1"
You have your iron train with the following labels:
"Iron Unloading", "Loading"
It is going to "train station" "Iron 1"
Now what happens is that your trains know what "train stations" to go to and pick their train stops in that station by the labels they have assigned to them and match them up to the train stops at that station.
I hope I explained that well.
The benefits of this approach:
1) It drastically reduces the clutter in the number of train stops that show up in every train GUI. The number of train stops quickly gets out of hand in the current game. Imagine having a loading, supply, and player access station at every outpost. If you have 3 outposts for iron, oil and copper each then that's already 27 train stops that you have to scroll through in every train GUI. This is also a very simple example. If you add more stops at each outpost, like 2 player access stations (if you are playing in multiplayer), another 1 or 2 supply trains, then you add more outposts for other resources like coal, and stone, you are easily over 100 train stops in every GUI.
2) It allows for easy blueprinting of outposts (even easier if the feature to store train stop names in blueprints is added). This is achieved by making each train stop at an outpost match the name exactly of all other outposts. Eg. every outpost will have a train stop called "loading", "player access", "supply" etc. You don't have to remember every time, which outpost you are at, eg "iron 1" and name each stop "iron 1 loading", "iron 1 player access", "iron 1 supply" etc.
3) It allows for a logical grouping of train stops that you want grouped anyway. This will allow more intelligence in train navigation. You say I want to go to "iron 1" and because of the train labels and outpost train stop names, the train knows exactly where to go.
4) Allows for reuse of trains and outposts. Once you assign labels to trains as I explained above, unless you re-purpose the train, you will never have to change its' labels when adding new outposts and you just add the train station as a target and the train will just work. Outposts will also not require custom train stop names (especially good when the train stop names are stored in blueprints). You plop down a blueprint of an outpost and you change the train station name, and you are done. It's fully functional outpost. Whereas now, you plop down the blueprint and have to change like 5 train stop names, each and every one of them custom (of course this depends on how many stops you have at the outpost).
Then allow linking any number of train stops via red or green wire to the "train station". What this will do is hide all the train stops from being visible in any gui (eg train schedule editing) and simplify the interface greatly.
Now, stay with me, I will get to how this will be extremely useful. For now though, I need to explain another feature that we need.
We also need the ability to create "labels" and assign 0 to many labels to each train. Labels could include things like "player access", "loading", "unloading", etc. Now these labels, should match the names of the train stops linked to the "train station" mentioned above.
Now you tell a train to go to a "train station" and if it's labeled with a "label" that matches a train stop in that station, it will go to that stop.
Imagine this setup:
You have the following "train station" outposts:
"Oil 1", "Oil 2", "Iron 1", "Copper 1"
Each of these outposts has the following train stops and they are all liked via red wire to the "train station":
"Loading", "Player Access", "Supply"
The loading is where the resource is loaded onto the resource train. The player access is for the player taking their personal train to that outpost whenever they want. The supply is for the supply train that brings walls, turrets, power poles etc to the outpost. ie. whatever you need at the outpost.
Now at you main base (where your unloading area and supply loading area is), you have all the train stops below, all linked to a "train station" with the name "main base":
"Iron Unloading", "Oil Unloading", "Copper Unloading", "Supply Loading"
Now you have your supply train with the following labels:
"Supply Loading", "Supply"
It's set, in it's schedule to go to "main base", "Oil 1", "Oil 2", "Iron 1", and "Copper 1"
You have your iron train with the following labels:
"Iron Unloading", "Loading"
It is going to "train station" "Iron 1"
Now what happens is that your trains know what "train stations" to go to and pick their train stops in that station by the labels they have assigned to them and match them up to the train stops at that station.
I hope I explained that well.
The benefits of this approach:
1) It drastically reduces the clutter in the number of train stops that show up in every train GUI. The number of train stops quickly gets out of hand in the current game. Imagine having a loading, supply, and player access station at every outpost. If you have 3 outposts for iron, oil and copper each then that's already 27 train stops that you have to scroll through in every train GUI. This is also a very simple example. If you add more stops at each outpost, like 2 player access stations (if you are playing in multiplayer), another 1 or 2 supply trains, then you add more outposts for other resources like coal, and stone, you are easily over 100 train stops in every GUI.
2) It allows for easy blueprinting of outposts (even easier if the feature to store train stop names in blueprints is added). This is achieved by making each train stop at an outpost match the name exactly of all other outposts. Eg. every outpost will have a train stop called "loading", "player access", "supply" etc. You don't have to remember every time, which outpost you are at, eg "iron 1" and name each stop "iron 1 loading", "iron 1 player access", "iron 1 supply" etc.
3) It allows for a logical grouping of train stops that you want grouped anyway. This will allow more intelligence in train navigation. You say I want to go to "iron 1" and because of the train labels and outpost train stop names, the train knows exactly where to go.
4) Allows for reuse of trains and outposts. Once you assign labels to trains as I explained above, unless you re-purpose the train, you will never have to change its' labels when adding new outposts and you just add the train station as a target and the train will just work. Outposts will also not require custom train stop names (especially good when the train stop names are stored in blueprints). You plop down a blueprint of an outpost and you change the train station name, and you are done. It's fully functional outpost. Whereas now, you plop down the blueprint and have to change like 5 train stop names, each and every one of them custom (of course this depends on how many stops you have at the outpost).