Multiple Unit Train Control


Replaces bidirectional trains with ones twice as powerful, to simulate real locomotives driving backwards.

Tweaks
3 months ago
0.17 - 1.1
3.54K
Trains

g Nice mod, some feedback

5 years ago

Hello,

Great idea for a mod ! I use dual headed trains on my rail networks and kinda bother by this too. I tried Noxy's attempt but had too many issues of trains turing themselves in bad places and decoupling or getting stuck.

Your way of doing seems less prone to issues. I tested quickly and it seems the double buff only work when both locomotives are coupled together ? It seems a classic L W W W L won't get the bonus, is it possible ?

5 years ago

Thanks for the feedback! Yes, right now it only does locomotives directly coupled to each other (in real life there is a physical cable connecting them), I limited the features so I could get it working quickly (just four days of coding!).

LWWWL is a planned feature. It's more complicated, because the mod will have to search the entire train for a matching locomotive and sort them by distance. I was thinking of adding that as a second tier of research (radio controlled MU operation). I wanted to see how this version works before I expand it.

5 years ago

Making it work with either L-L or L-W-L is simple.
Look for matching entity.name between front_movers and back_movers in LuaTrain.locomotives.
For each pair replace both.

5 years ago

That's basically it, yes. It's tricky because I was trying to replace only one unit per tick, and have it correctly identify when a partial replacement is underway. That's easy to do when each unit only has a unique spot to look in. Now they can be paired with any spot in the train, they have to avoid other finished pairs in the same train.

5 years ago

Vortik, latest update added LWWWL support! Let me know how it works.

5 years ago

Great ! I'll give it a go and let you know !

5 years ago

Hello,

I managed to see it in action ! Locomotives get properly replaced by double power ones from 600kw to 1,2mw it's nice.

However I had to check out the mod option and set it to "advanced" mode for it to see and replace locomotive. I tried the "tech unlock" mode, which feels interesting, made the research but it didn't work.
Not sure if that's intended or not, would be nice that the tech unlock mode works for all types of tains.

Another remark, when trains got changed, they all switched to manual mode and I had to reset them to automatic mode, not game breaking and it may be a limitation not easly handleable but so to let you know.

Great mod again thanks for "fixing" dual headed trains !

5 years ago

Ok nevermind the tech unlock, I actually read your mod description and saw the Wireless tech ingame after my bad !

5 years ago

The trains switching to manual, and needing to manually change trains after tech research to cause the change, are all to keep things from being destroyed accidentally. Noxy had the same problem, replacing trains on junctions is buggy and best to do when stopped and with human confirmation.

I might add options to allow automatic upgrades, or a way to detect if there was incorrect placement.

5 years ago

ok it's not really a problem and better this way since you can do it remotly from the train interface or the map than having to manually go relink trains or worse replace them in a deadlock far away.

Also it's only really an issue when you add the mod in a game with already running trains.

Thanks again !

5 years ago
(updated 5 years ago)

Let me know if you think needing to manually upgrade existing trains (by coupling or replacing them) after tech research is okay. I might be able to make it upgrade when you set it to manual, then back to automatic. Then you could at least choose when each train is upgraded and it's less likely to happen while driving over a junction and have your nuclear locomotive blow up your factory. ^_^

New response