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

i Blueprint fix

5 years ago
(updated 5 years ago)

You can swap out the MU locos in blueprints for the originals.
Add handlers for events.on_player_configured_blueprint (for blueprints) and events.on_player_setup_blueprint (for cut/copy) to get the ItemStack from cursor, then use get_blueprint_entities and set_blueprint_entities to change the entity names.

That way the MU items don't need recipes, and you should probably make the MU versions mine as the originals

5 years ago

Thanks! I will give this a try.

I did make MU entities mine as originals, though sometimes I think creative mod doesn't do it c correctly. Need to check if it has anything to do with bots or something.

2 years ago

Sorry for bumping ancient thread, but did this go anywhere? Not being able to blueprint trains is hurting me a bit

2 years ago
(updated 2 years ago)

This worked three years ago. Did it break again? I can look into it this weekend.

2 years ago
(updated 2 years ago)

Blueprinted trains place ghosts that are then not fulfilled by the logistic network. When I place the trains manually they do not have the desired identities and schedule, and they are not MU trains. Edit: The cargo wagons are placed by the bots, but the engine wagons are not.

Although this wasn't happening before I enabled this mod, it's possible that the problem is connected to one of the other train mods I'm using. I'll try to get an isolated reproduction for you soon to ensure I'm not wasting your time.

2 years ago
(updated 2 years ago)

If you have a blueprint that demands MU locomotives, that can cause the problem you are seeing. I'm not sure why you would have such a blueprint. Can you post your save? There might be another mod interfering. If you mouse over the ghost locomotives, are they called "MU Locomotive"?

Blueprinting MU locomotives works for me with no other mods installed. When you first drag the blueprint tool, it has the MU icon in the selection, but when the blueprint editor window opens, my mod replaces them with normal locomotives. Bots place normal locomotives, and they are converted to MU locomotives immediately after both are placed, and the train schedules are preserved.

2 years ago
(updated 2 years ago)

If you have a blueprint that demands MU locomotives, that can cause the problem you are seeing. I'm not sure why you would have such a blueprint.

This is interesting. I make train blueprints by placing trains, dialing up the schedules, and then copying them into blueprints once I'm satisfied. Since the placed trains are already MU trains, then MU trains are now in the blueprints. I'm not sure how else I could work actually.

If you mouse over the ghost locomotives, are they called "MU Locomotive"?

Yes.

When you first drag the blueprint tool, it has the MU icon in the selection, but when the blueprint editor window opens, my mod replaces them with normal locomotives. Bots place normal locomotives, and they are converted to MU locomotives immediately after both are placed, and the train schedules are preserved.

Ah, now I understand what you meant when you said I shouldn't have such a blueprint. What you describe here is not the behavior I'm seeing:

https://factoriobin.com/post/fNDUpXsa

Can you post your save? There might be another mod interfering.

Very possible. As I mentioned in my previous comment, I feel like the onus is on me to do the binary search with disabling my own mods. But since you asked, here it is: https://transfer.sh/L9Ijss/uu.zip

2 years ago

It seems my ISP is blocking transfer.sh. Let me know if you can test that it works in a game with only MUTC installed, and if you figure out which mod is changing the behavior. MUTC is definitely supposed to handle the blueprint-created and blueprint-edited events to make sure you never get one with an MU Locomotive in it.

When you press Q on an MU locomotive, does it pull a normal Locomotive from your inventory or give you a normal ghost?

2 years ago

There seem to be two cases here and one isn't handled

1.) When creating a new blueprint it works. You get normal locomotives

2.) When assigning new content to an existing blueprint I get MU locomotives

2 years ago

The "assign new content" button is weird, similar to the blueprint library, and doesn't fire all the same events for mods that normal blueprint selection does. I can check what happens, but it may be an API bug at the moment.

New response