Multiple Unit Train Control


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

Tweaks
4 days ago
0.17 - 2.0
4.06K
Trains

b [Fixed] Incompatibility with Krastorio 2

4 years ago
(updated 4 years ago)

Hi robot256,
some users of Krastorio 2(K2) reported me that Multiple Unit Train Control(MUTC) don't work with K2, pratically the pair locomotives have the same speed of one (so the swap in control script don't work or swap with not boosted locomotives).
After analizing the problem, I have this informations:

  • K2 modify the vanilla locomotive in data-updates if the option "kr-rebalance-vehicles&fuels" is enabled.
  • MUTC make the "-mu" version of vanilla locomotive in data-updates after K2 (due alphabetical loading order).

I don't know where is the problem so, can u help me to make our mods compatible? Also we have an nuclear locomotive that it isn't monitored by ur scripts. Thanks for ur attention.

4 years ago

Thanks for letting me know. I'll take a look when I get a chance.

If MUTC loads after K2, there should not be an error. My preferred solution would be a hidden dependency to force this load order anyways. If the Locomotive is an MU, it will say so in the name and the power level in the tooltip should be different.

4 years ago

If u want add the dependcy this is the string that u need:
"(?) Krastorio2 >= 0.9.0"
There's no trace of modification of K2 in MUTC locomotives, and no MUTC in the vanilla, so I don't know where look, from the entities I can't understand if exist a loading order bug. So u know ur mod better than me. Let me know if I can help.

4 years ago

When I tested it just now, with only K2, MUTC, and Vehicle Wagon installed, it behaves as expected. You do need to either change the mod setting or research the MU technology before any locomotives are swapped. I will make an update with the hidden dependency and support for your Nuclear loco.

4 years ago

Thank u. Have a nice modding.

4 years ago

Just posted the update! Let me know how it goes.

4 years ago

Hey Linver, I'm planning an update for MUTC that will auto-detect locomotives from othervmods in most cases, and thought about the dependency again. I don't have a dependency on Train & Fuel Overhaul because they change the base loco stats in data.lua. It's safe because the base mod always loads first, and would be even safer for a global mod like Krastorio, especially if you are writing a hard-coded value. I don't have a problem either way, but if you decide to move your base loco stat change to data.lua then I can remove my dependency and everything thing will be handled by the automatic train finder script.

New response