Seperate train plans from trains
Moderator: ickputzdirwech
Seperate train plans from trains
Maybe i wasn't looking for the right keywords..
Re: Seperate train plans from trains
+1 I've said many times to my friends that this would be a really useful feature
You can already sort of do this with the copy paste tool, but that doesn't allow you to update all your trains at once, and requires you to find all the trains you want to update when you make a change, which is a bit annoying.
You can already sort of do this with the copy paste tool, but that doesn't allow you to update all your trains at once, and requires you to find all the trains you want to update when you make a change, which is a bit annoying.
Re: Seperate train plans from trains
Seems like a good idea for a mod.
(i dont need this, bc i just use LTN)
(i dont need this, bc i just use LTN)
Re: Seperate train plans from trains
nuhll wrote:Seems like a good idea for a mod.
(i dont need this, bc i just use LTN)
https://mods.factorio.com/mod/SmartTrains
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Seperate train plans from trains
Honestly, it would be a lot better if you set up train routes (list of stations) as a separate entity then assign trains to a route (or a route to a train, doesn't really matter which way around) instead of having to specify the route on a train per train basis.
-
- Filter Inserter
- Posts: 549
- Joined: Fri Jan 29, 2016 2:48 am
- Contact:
Re: Seperate train plans from trains
+1. This does not seem too terribly difficult (no doubt, the devil's in the details, but it's clearly not insurmountable as it could simply be layered on top of the existing implementation). It's also clearly something the engineer would want at his disposal after he went to all the trouble to design and craft self-driving-trains.
Since most data in factorio are in entities, perhaps the way to do it would be to store route "markers" in stations. The Stations hold a bag of route markers. The route markers are globally unique <route-name, stop#> tuples. The trains are optionally assigned to named routes, from which their individual route settings would be automatically set. Or something like that. It's easy to see how such an implementation could provide opportunities for "smart" route assignment and more granular circuit-controlled enable/disable of the route "markers" (i.e., rather than just "station enable/disable" as we have now).
The Cities Skylines route design user-interface is mostly good (it has a few awful quirks, but is sound conceptually). Something like that could be implemented in the map view (such a UI would also be an opportunity to provide signalling hints that could minimize the tendency to present the player with tedious "no-path" puzzles currently solvable only by running around with a microscope looking for subtly obscured rail signals). Anyhow maybe that's a big ask, just brain-storming here.
Since most data in factorio are in entities, perhaps the way to do it would be to store route "markers" in stations. The Stations hold a bag of route markers. The route markers are globally unique <route-name, stop#> tuples. The trains are optionally assigned to named routes, from which their individual route settings would be automatically set. Or something like that. It's easy to see how such an implementation could provide opportunities for "smart" route assignment and more granular circuit-controlled enable/disable of the route "markers" (i.e., rather than just "station enable/disable" as we have now).
The Cities Skylines route design user-interface is mostly good (it has a few awful quirks, but is sound conceptually). Something like that could be implemented in the map view (such a UI would also be an opportunity to provide signalling hints that could minimize the tendency to present the player with tedious "no-path" puzzles currently solvable only by running around with a microscope looking for subtly obscured rail signals). Anyhow maybe that's a big ask, just brain-storming here.
Re: Seperate train plans from trains
I think it could be implemented without too much change to the trains themselves by having a route gui like blueprints, then just paste them onto the train as needed - an extension of the copy/paste functionality, or take it further and have the train periodically update its route from the main list
edit: what if the train gui could be used with the usual copy/paste
edit: what if the train gui could be used with the usual copy/paste
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Seperate train plans from trains
I think you can just copy paste from one locomotive to another to copy a train schedule right now.
The problem is, what happens when you edit one of them? The other remains unedited.
This is why I suggested a schedule (list of routes, which are lists of stations with conditions) be a separate piece of data than the train itself, then when you load the train GUI, where the time table is now, at the top it would probably have some sort of drop down saying "Select Route" which would include a delete button, a create new button (so creating and editing them can be done as it is now, in the train itself) and then a list of all currently existing schedules, possible with extra information in there such as how many trains are currently assigned to each route.
The main difference between how things are now would be that if more than one train shares a route, then editing the route on one train will also edit the route on all the others.
The problem is, what happens when you edit one of them? The other remains unedited.
This is why I suggested a schedule (list of routes, which are lists of stations with conditions) be a separate piece of data than the train itself, then when you load the train GUI, where the time table is now, at the top it would probably have some sort of drop down saying "Select Route" which would include a delete button, a create new button (so creating and editing them can be done as it is now, in the train itself) and then a list of all currently existing schedules, possible with extra information in there such as how many trains are currently assigned to each route.
The main difference between how things are now would be that if more than one train shares a route, then editing the route on one train will also edit the route on all the others.
Re: Seperate train plans from trains
True, you can copy/paste between trains now(not in the gui), but that is of limited use currently due to the fact that they move around. Was not meant to detract from the topic suggestion, just 'thinking out loud'.
Re: Seperate train plans from trains
I agree with the OP's suggestion. The free open-source game OpenTTD also allows you to share orders of trains with other trains, so that if you edit one train's orders, it affects all trains with the same orders.
Re: Seperate train plans from trains
Bumping.
This would be extremely useful for any save with a heavy train network. It's not just the ability to quickly set up 5 or 10 trains with the same schedule, it's also the ability to change all their schedules in one go without having to track them down if you want to tweak or re-task them.
You could have a "line library" similar to the blueprint library, as others suggested, and on the train interface choose whether to have a unique schedule for this train (for one-offs or small bases for which this feature would just be unnecessary steps), or pick an existing line from your library. The lines could also come with train colors and ideally even cargo wagon slot limitations (although probably a bit harder to implement).
This would be extremely useful for any save with a heavy train network. It's not just the ability to quickly set up 5 or 10 trains with the same schedule, it's also the ability to change all their schedules in one go without having to track them down if you want to tweak or re-task them.
You could have a "line library" similar to the blueprint library, as others suggested, and on the train interface choose whether to have a unique schedule for this train (for one-offs or small bases for which this feature would just be unnecessary steps), or pick an existing line from your library. The lines could also come with train colors and ideally even cargo wagon slot limitations (although probably a bit harder to implement).