[MOD 0.17 - 1.1.x] Shuttle Train Continued
- themadgunman
- Inserter
- Posts: 47
- Joined: Wed Jan 18, 2017 5:07 pm
- Contact:
[MOD 0.17 - 1.1.x] Shuttle Train Continued
Shuttle Train Continued
Description:
Adds a vehicle equipment item that turns a locomotive into a Passenger Shuttle Train allowing you to travel quickly and easily to any station (pre-existing or temporary) using either the quick selection GUI or the full train schedule UI.
Mod Portal Link:
https://mods.factorio.com/mod/Shuttle_Train_Continued
Compatibility:
The Shuttle Train module fits in a standard vehicle equipment grid and should be fully compatible with any mod that adds custom train entities such as Bob's Logistics and Electric Trains
Version History:
0.17.0 - Initial 0.17 Compatibility Release
0.17.1 - Added GUI selection setting, Shuttle Trains now go dormant when you exit them (no more being stranded)
0.17.2 - Fixed the non-recoverable error when exiting trains
0.17.3 - Added Depot functionality, new OnExit setting to choose action performed on shuttle exit and a new hotkey to send the last used shuttle to a depot
0.17.4 - Call function now respects the GUI filter, Depot name is now configurable in settings, New "Manual" OnExit mode
0.17.5 - Fixed a non-recoverable error that occured if you decoupled a shuttle train then tried to exit it
0.17.6 - Shuttle Train now remembers which train you last used between sessions, you can now configure the number of station buttons on the GUI (min:1 ,max:25)
0.18.1 - 0.18 Compatibility Release
1.1.0 - 1.1 Compatibility Release
FAQ:
Q: What are the available hotkeys for this mod ?
A: "Ctrl-J" Calls an available shuttle to the nearest (filtered if you have one set) or currently selected station, "Ctrl-Shift-J" sends the last used shuttle to a depot.
Q: Why does the mod report no available depots ?
A: The depot must be named exactly the same as configured in settings (case-sensitive) and belong to your force or it wont be recognised.
Q: Can you add "X" feature/functionality to the mod ?
A: Drop me a message in this thread or on the mod portal explaining your proposed feature and why you think its useful and I'll see what i can do
Q: What do the OnExit modes do ?
A: None - Does nothing, unsuprisingly
Hibernate - Clears the train schedule, Sets Manual Mode
Manual - Sets Manual Mode only
Depot - Returns the train to the stations specified in the mod settings
Credits:
Thanks to Simwir for the original concept and Folk for maintaining the mod to 0.16
If anyone has questions/suggestions about the mod please feel free to post here or in the discussions thread on the portal.
Description:
Adds a vehicle equipment item that turns a locomotive into a Passenger Shuttle Train allowing you to travel quickly and easily to any station (pre-existing or temporary) using either the quick selection GUI or the full train schedule UI.
Mod Portal Link:
https://mods.factorio.com/mod/Shuttle_Train_Continued
Compatibility:
The Shuttle Train module fits in a standard vehicle equipment grid and should be fully compatible with any mod that adds custom train entities such as Bob's Logistics and Electric Trains
Version History:
0.17.0 - Initial 0.17 Compatibility Release
0.17.1 - Added GUI selection setting, Shuttle Trains now go dormant when you exit them (no more being stranded)
0.17.2 - Fixed the non-recoverable error when exiting trains
0.17.3 - Added Depot functionality, new OnExit setting to choose action performed on shuttle exit and a new hotkey to send the last used shuttle to a depot
0.17.4 - Call function now respects the GUI filter, Depot name is now configurable in settings, New "Manual" OnExit mode
0.17.5 - Fixed a non-recoverable error that occured if you decoupled a shuttle train then tried to exit it
0.17.6 - Shuttle Train now remembers which train you last used between sessions, you can now configure the number of station buttons on the GUI (min:1 ,max:25)
0.18.1 - 0.18 Compatibility Release
1.1.0 - 1.1 Compatibility Release
FAQ:
Q: What are the available hotkeys for this mod ?
A: "Ctrl-J" Calls an available shuttle to the nearest (filtered if you have one set) or currently selected station, "Ctrl-Shift-J" sends the last used shuttle to a depot.
Q: Why does the mod report no available depots ?
A: The depot must be named exactly the same as configured in settings (case-sensitive) and belong to your force or it wont be recognised.
Q: Can you add "X" feature/functionality to the mod ?
A: Drop me a message in this thread or on the mod portal explaining your proposed feature and why you think its useful and I'll see what i can do
Q: What do the OnExit modes do ?
A: None - Does nothing, unsuprisingly
Hibernate - Clears the train schedule, Sets Manual Mode
Manual - Sets Manual Mode only
Depot - Returns the train to the stations specified in the mod settings
Credits:
Thanks to Simwir for the original concept and Folk for maintaining the mod to 0.16
If anyone has questions/suggestions about the mod please feel free to post here or in the discussions thread on the portal.
Last edited by themadgunman on Sun Jan 31, 2021 9:18 am, edited 16 times in total.
Re: [MOD 0.17] Shuttle Train Continued
Here's an API request Shuttle Trains could benefit greatly from as well: viewtopic.php?f=28&t=67199
My Mods: mods.factorio.com
- themadgunman
- Inserter
- Posts: 47
- Joined: Wed Jan 18, 2017 5:07 pm
- Contact:
Re: [MOD 0.17] Shuttle Train Continued
That would indeed be awesome, voiced my support for this in the threadOptera wrote: ↑Sat Mar 09, 2019 7:45 am Here's an API request Shuttle Trains could benefit greatly from as well: viewtopic.php?f=28&t=67199
Re: [MOD 0.17.x] Shuttle Train Continued
Thanks for adding the shuttle depot like we spoke about on the mod page.
It works great, exactly like my custom thing. You could also add an option to change the depot name. Great job thanks again for porting this to .17 !
It works great, exactly like my custom thing. You could also add an option to change the depot name. Great job thanks again for porting this to .17 !
- themadgunman
- Inserter
- Posts: 47
- Joined: Wed Jan 18, 2017 5:07 pm
- Contact:
Re: [MOD 0.17.x] Shuttle Train Continued
Hi Koopa, I'll probably add the ability to change the depot name in the next release once I'm sure its all working as intended, thanks again for your suggestions and support and if you have any more ideas don't hesitate to drop me a line here or on the mod portal
My next major idea is to re-add the dedicated double-header locomotive entity for shuttles that the mod used to have back in 0.14 so you can park them in a shorter space instead of needing 2 loco's but the custom graphics will require a bit more learning on my part i think.
My next major idea is to re-add the dedicated double-header locomotive entity for shuttles that the mod used to have back in 0.14 so you can park them in a shorter space instead of needing 2 loco's but the custom graphics will require a bit more learning on my part i think.
- themadgunman
- Inserter
- Posts: 47
- Joined: Wed Jan 18, 2017 5:07 pm
- Contact:
Re: [MOD 0.17.x] Shuttle Train Continued
New version available with configurable depot names, filtered call function and a new OnExit mode for even more flexibilty
-
- Filter Inserter
- Posts: 947
- Joined: Wed Nov 25, 2015 11:44 am
- Contact:
Re: [MOD 0.17.x] Shuttle Train Continued
Thanks for making / updating this mod!
Question: I want to do "positive filter", i.e. specify which stations I want to include rather than exclude. Quite simply, all my PAX stations start with A (so they're sorted to top), so I'd like to set the filter to exclude everything except stations starting with A.
Setting the filter to simply "A" works, but of course excludes my PAX stations.
I thought I could use a lua-style regex, but I tried a number of things and couldn't get it to work:
^[^A] # i.e., match everything that doesn't start with an A
^[^A].* # i.e., match everything that doesn't start with an A
[^A]
[B-Za-z]
But whenever I use something fancy it just seems to ignore it (or maybe it looks for literal brackets)
I also tried with quotes around it, escaping the square brackets, etc.
Can you give a hint?
Question: I want to do "positive filter", i.e. specify which stations I want to include rather than exclude. Quite simply, all my PAX stations start with A (so they're sorted to top), so I'd like to set the filter to exclude everything except stations starting with A.
Setting the filter to simply "A" works, but of course excludes my PAX stations.
I thought I could use a lua-style regex, but I tried a number of things and couldn't get it to work:
^[^A] # i.e., match everything that doesn't start with an A
^[^A].* # i.e., match everything that doesn't start with an A
[^A]
[B-Za-z]
But whenever I use something fancy it just seems to ignore it (or maybe it looks for literal brackets)
I also tried with quotes around it, escaping the square brackets, etc.
Can you give a hint?
Re: [MOD 0.17.x] Shuttle Train Continued
The setting tooltip seems to imply that patterns should work. But the find function is called with plain = true argument, i.e. it ignores any special characters and matches the literal string you enter. Otherwise this should work:
to
Since I would like to use the feature in the same way, let's make this a request: please change line 141 in your control lua fromvanatteveldt wrote: ↑Thu Apr 25, 2019 4:29 pm ^[^A] # i.e., match everything that doesn't start with an A
Code: Select all
for filter in patterns:gmatch("[^%,]+") do if station:find(filter, 1, true) then hide = true; break end end
Code: Select all
for filter in patterns:gmatch("[^%,]+") do if station:find(filter) then hide = true; break end end
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: [MOD 0.17.x] Shuttle Train Continued
I found some interactions with Train Network for Players a bit frustrating, so I figured I'd give this a try. So far, it seems great! You did really well with the user experience, which is honestly the most important part of this from a player perspective.
I did find myself surprised that when I summon the train (control-click the button), get in, and select a destination the menu doesn't close automatically. Not a big deal, just unexpected.
I also hit a behaviour I can't quite reproduce or explain, but I *think* I know what happened, so if this sounds plausible, cool. If not, I'll try and figure out what is really going on. Anyway, I think that if I summon the train, select one destination, and while it is still moving select a different destination, it'll reroute dynamically and only take me to that second location.
If the train comes to a stop, though, and I hit that second destination, it tells me no suitable train is available. I kind of expected "I'm sitting in one" to count there, so if it was possible to check for that situation, it'd help those of us who can't remember if the north east gate, or the north west gate, is the one that just got eaten.
Finally, TNfP had one nice feature: you could have it place a temporary train stop to pick you up from, and it would remove it once the train showed up. They used a planer, but I have no real idea what, if any, strategies would be best. If you, too, would find this useful then perhaps you would consider adding something similar.
Thanks!
I did find myself surprised that when I summon the train (control-click the button), get in, and select a destination the menu doesn't close automatically. Not a big deal, just unexpected.
I also hit a behaviour I can't quite reproduce or explain, but I *think* I know what happened, so if this sounds plausible, cool. If not, I'll try and figure out what is really going on. Anyway, I think that if I summon the train, select one destination, and while it is still moving select a different destination, it'll reroute dynamically and only take me to that second location.
If the train comes to a stop, though, and I hit that second destination, it tells me no suitable train is available. I kind of expected "I'm sitting in one" to count there, so if it was possible to check for that situation, it'd help those of us who can't remember if the north east gate, or the north west gate, is the one that just got eaten.
Finally, TNfP had one nice feature: you could have it place a temporary train stop to pick you up from, and it would remove it once the train showed up. They used a planer, but I have no real idea what, if any, strategies would be best. If you, too, would find this useful then perhaps you would consider adding something similar.
Thanks!
- themadgunman
- Inserter
- Posts: 47
- Joined: Wed Jan 18, 2017 5:07 pm
- Contact:
Re: [MOD 0.17.x] Shuttle Train Continued
0.18 release is now available on the mod portal
Re: [MOD 0.17 - 0.18] Shuttle Train Continued
I experienced a crash while using your mod in a game I was hosting. I was AFK when it occurred and I have not gotten in touch yet with anyone who was there when it happened, but I do have the log, and the save file too if that will help. Sorry I do not know what was being done when the game crashed.
UPDATE: I talked to the people who were on the server before the crash. I think the cause may have been a destroyed rail segment on the way out of a depot for shuttle trains.
UPDATE: I talked to the people who were on the server before the crash. I think the cause may have been a destroyed rail segment on the way out of a depot for shuttle trains.
- Attachments
-
- Screenshot_2.jpg (531.08 KiB) Viewed 5316 times
-
- unknown.png (39.73 KiB) Viewed 5344 times
-
- factorio-current.log
- (131.92 KiB) Downloaded 128 times
Check out my server.
Server thread at: viewtopic.php?f=53&t=35528
Server thread at: viewtopic.php?f=53&t=35528
- themadgunman
- Inserter
- Posts: 47
- Joined: Wed Jan 18, 2017 5:07 pm
- Contact:
Re: [MOD 0.17 - 1.1.x] Shuttle Train Continued
Updated for 1.1 and totally social distancing compliant - 1 player per train