Train Auto Switch Fix


Prevents trains from switching to automatic mode when a locomotive or wagon is added using ghosts. - Can be toggled on or off using the shortcut button or hotkey. - Automatically enables itself when a locomotive or wagon is destroyed (can be disabled in the mod settings).

Tweaks
a month ago
2.1
12
Trains

b Compatibility

7 days ago

Thanks for making this mod. I know the main reason is to prove a point, but I figured I'd give it a try in my main save file. So far compatibility is an issue:

When scripts assemble a train and try to set it to automatic, this mod sets the train back to manual and it gets stuck. This happened so far with:
- Trains exiting the Space Exploration mod's space elevator.
- Trains coupled by the Automatic Coupling System mod.

I'm guessing this might also be a problem with Multiple Unit Train Control when it swaps locomotive entities and sets the train back to automatic.

I might be able to look at it at some point, but can't say when. I'm happy to help testing anything if you get a chance to work on it.

6 days ago

Thank you very much for your feedback! When designing the mod, I didn't consider that other mods might interact with trains in ways that could conflict with it. So your feedback is really helpful. I will look into these issues and try to find a solution.

4 days ago
(updated 4 days ago)

Thanks for making this mod. I know the main reason is to prove a point, but I figured I'd give it a try in my main save file. So far compatibility is an issue:

When scripts assemble a train and try to set it to automatic, this mod sets the train back to manual and it gets stuck. This happened so far with:
- Trains exiting the Space Exploration mod's space elevator.
- Trains coupled by the Automatic Coupling System mod.

I'm guessing this might also be a problem with Multiple Unit Train Control when it swaps locomotive entities and sets the train back to automatic.

I might be able to look at it at some point, but can't say when. I'm happy to help testing anything if you get a chance to work on it.

I have found a solution to the problem that should fix all cases where trains are created directly by a mod. Whenever a player places a train ghost, its position is saved in a table. When the train switches to automatic mode, it first checks whether any of the wagons match an entry in the blueprint table.

For the mentioned mods this works just fine. I’m going to do some additional testing before releasing it.

New response