[2.0] Be able to read/write interrupts for trains/space platforms
- LuziferSenpai
- Filter Inserter
- Posts: 381
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
[2.0] Be able to read/write interrupts for trains/space platforms
Hey,
it would be nice if we could r/w interrupts.
Currently my mod Automatic Coupling System has a lot of problem, because of the new interrupt & group logic.
Specially because I cant read/write the interrupts.
Greetz,
Luzifer
it would be nice if we could r/w interrupts.
Currently my mod Automatic Coupling System has a lot of problem, because of the new interrupt & group logic.
Specially because I cant read/write the interrupts.
Greetz,
Luzifer
Last edited by LuziferSenpai on Fri Nov 08, 2024 1:38 pm, edited 1 time in total.
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Yes please. Reading and writing train schedule interrupt conditions and station stops is very much needed for many mods. Among them will be the Space Exploration space elevators. I hope it can be added before 2.1.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: [2.0] Be able to read/write interrupts for trains/space platforms
This will also be critical for Factorio Access, though getting this far is a while out for us. We'll need to be able to implement an alternative UI for it.
Re: [2.0] Be able to read/write interrupts for trains/space platforms
I also need in a Rail Logistics Dispatcher mod - the mod manages the train schedule, which erases interruptions.
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Hi friends,
I do support this request!
Thank you
I do support this request!
Thank you
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Related: viewtopic.php?p=634360#p634360
I wanted to implement something like this, but no way to manage interrupts in lua ATM
I wanted to implement something like this, but no way to manage interrupts in lua ATM
Re: [2.0] Be able to read/write interrupts for trains/space platforms
I found dirty hack to change schedule with interrupts:
https://github.com/dvilker/FactorioRail ... #L419-L551
https://github.com/dvilker/FactorioRail ... #L419-L551
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Looks like my mod exiguous-train-caller is deleting all Interupts too, need some way to modify the Schedule without wiping them.
I havent lost my mind, it's backed up on tape somewhere.
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Nice hack You might not need to generate a helper surface if you put the blueprint item in a Script Inventory and used it from there.Viidi wrote: ↑Sat Nov 09, 2024 10:56 am I found dirty hack to change schedule with interrupts:
https://github.com/dvilker/FactorioRail ... #L419-L551
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: [2.0] Be able to read/write interrupts for trains/space platforms
You can only copy the settings from a built locomotive. It doesn't work from a blueprint. That's why I build it on a hidden surface.
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Similarly seeing interrupts cleared when amending schedules via lua
Re: [2.0] Be able to read/write interrupts for trains/space platforms
I tried the hack, but it work only when the loco is in a group. Is this normal or I made a mistake?
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Yes, that's consistent. The train has to be in a group, and there has to be at least one other train in the group for it to copy from when you assign the group. You could script-create a hidden train to make sure that is always true.
It is currently impossible to modify the schedule via script, which includes modifying which entry the train is currently going to, if interrupts are desired to remain. You can restore the interrupts by reassigning the group, but that overwrites all your changes to the main schedule too and resets the train to the first entry in the schedule.
It is currently impossible to modify the schedule via script, which includes modifying which entry the train is currently going to, if interrupts are desired to remain. You can restore the interrupts by reassigning the group, but that overwrites all your changes to the main schedule too and resets the train to the first entry in the schedule.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
- LuziferSenpai
- Filter Inserter
- Posts: 381
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: [2.0] Be able to read/write interrupts for trains/space platforms
The first entry can be fixed with LuaTrain.go_to_station(index)robot256 wrote: ↑Thu Dec 05, 2024 8:34 pm Yes, that's consistent. The train has to be in a group, and there has to be at least one other train in the group for it to copy from when you assign the group. You could script-create a hidden train to make sure that is always true.
It is currently impossible to modify the schedule via script, which includes modifying which entry the train is currently going to, if interrupts are desired to remain. You can restore the interrupts by reassigning the group, but that overwrites all your changes to the main schedule too and resets the train to the first entry in the schedule.
But yes, I still cant wait until we FINALLY can edit interrupts via script
-
- Fast Inserter
- Posts: 134
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: [2.0] Be able to read/write interrupts for trains/space platforms
+1, scripting automation with this could be insanely powerful
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Re: [2.0] Be able to read/write interrupts for trains/space platforms
Thanks, that will actually help me a little!LuziferSenpai wrote: ↑Thu Dec 05, 2024 9:02 pm
The first entry can be fixed with LuaTrain.go_to_station(index)
But yes, I still cant wait until we FINALLY can edit interrupts via script
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk