Train Station Unique ID's

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

DonkeyDragon
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Jul 07, 2017 10:18 am
Contact:

Train Station Unique ID's

Post by DonkeyDragon »

Hi everyone,

I've been messing around a lot with trains recently, and based on that, I've got a few suggestions.
- Implement a unique train station id (same as trains have)
- Allow trains to go to a station with specific id, even if it shares names with other stations.
- (Optionally) Allow the circuit network to choose the next station of a train by sending a signal with a unique train station id.

Now, I've already been messing a bit with it, and it's likely I'll try and make this a mod myself. What I've found from the LUA documentation is:

-----------------------------------

================
TrainScheduleRecord

Table with the following fields:
station :: string: Name of the station
wait_conditions :: array of WaitCondition
================

If this lua table could be modified to include a station_id field, which could be NIL (to keep trains as they are now), then the first two suggestions would already be basically implemented.

Secondly, wait conditions:

================
WaitCondition

Table with the following fields:
type :: string: One of "time", "inactivity", "full", "empty", "item_count", "circuit", "robots_inactive", "fluid_count".
compare_type :: string: Either "and", or "or". Tells how this condition is to be compared with the preceeding conditions in the corresponding wait_conditions array.
ticks :: uint (optional): Number of ticks to wait or of inactivity. Only present when type is "time" or "inactivity".
condition :: CircuitCondition (optional): Only present when type is "item_count" or "circuit".
=================

Here it could be nice to have a wait_for_train_station_id condition.


-----------------------------------

So, what's the use case?

Myself, I would want to have more control directly over the trains, and a way to influence them beyond using the same station name and enable/disable stations.

For example, lets say I make an outpost that requires mostly iron ore, but also a bit of copper ore (for whatever reason), using this, I would create a single train station and name it something like Iron Ore Dropoff, and then have the iron trains do their work there. Then I could select a copper ore train and have it sometimes visit that exact station aswell (something not possible right now, as it would just select any Iron Ore Dropoff station)

In a more complicated setting, it allows trains to do much more advanced stuff without affecting UPS (to my understanding). For example, I could have a single train that simply went to any station with stuff to pick up (iron ore, green circuits, coal, whatever), and then head off to whereever that is needed.

-----------------------------------

So why not just mod it in yourself you ask?

First of all, the obvious reason, my LUA isn't up to speed. I'm a programmer though, so I'd probably be able to make it anyways.

The real reason for asking this as a suggestion instead, is that the only way I can see of doing this within the current train framework, is to forcibly rename stations to include their id, which makes the train station list a TOTAL mess, and from what I think of it already, it'd be needed to sometimes dynamically rename stations, which would make it a dynamic mess... Which frankly isn't very user friendly.

However, if the two suggestions are implemented, then I could make the optional one easily as a mod. (as the primary problem is sending a train off to a specific station based on train station id)

-----------------------------------

So yeah, this concludes my first post (I'm usually more of a reddit person :P )

Hope you guys approve of it.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Train Station Unique ID's

Post by darkfrei »

Some mods

Dynamic Train Stops
Rename Train Stations based on Circuit Network Input
https://mods.factorio.com/mods/Aladrius ... train-stop

Rename Trains
This mod adds a small GUI that lets you easily rename trains and other buildings with backer names.
https://mods.factorio.com/mods/madmaste ... e%20Trains

Stringy Train Stops
Rename train stations and dispatch trains based on circuit signals
https://mods.factorio.com/mods/justaran ... train-stop

Smarter Trains
Train lines, automated refueling, 'dynamic' train schedules
https://mods.factorio.com/mods/Choumiko/SmartTrains
Post Reply

Return to “Ideas and Suggestions”