Single Train Unit


Adds a single train unit that is the standard length, but include storage and can travel in both directions

Content
1 year, 11 months ago
1.0 - 1.1
1.45K
Trains

g Answered - Cross compatability with other train mods?

4 years ago

How does Single Train Unit interact with (for example):

  • Multiple Unit Train Control - makes all locomotives in a double-ended train work together (by swapping out locomotives with different more powerful ones); presumably that mod should ignore this mod.
  • Train Construction Site - automatic construction of new trains on demand.
  • The n different electric train mods - at least it shouldn't break, but the ideal would be to be able to have an electric single train unit.
  • Shuttle train - turns trains into a dedicated passenger train (adds a module grid; you need one module for each end of a double-ended train); this is possibly a good use of a single train unit.
4 years ago
(updated 4 years ago)

I haven't tested with any other train mod. I create new specifically named loco and wagon prototypes so as long as the other mods handle them I'd expect them to work. If the other mods change the train once placed like the dual headed one it's likely things will break as I have to maintain state of each train unit's parts.

4 years ago

If you find a specific issue with another mod I can look in to it and see if its fixable or just a fundamental incompatibility.

4 years ago
(updated 4 years ago)

Looks like Multiple Unit Train control has a list of locomotives it ignores, including a startup setting; presumably adding the prototype name of your locomotive to that list should be sufficient for compatibility.

It will create a <locomotive>-mu, and when a <locomotive> is placed (I assume it's watching for the entity created event, so if you don't raise the event it should probably be fine) it swaps <locomotive> with <locomotive>-mu, then watches all of the locomotives to rebalance fuel.

Edit: It appears to be correctly ignoring the single-unit locomotives.

4 years ago
(updated 4 years ago)

Looks like there's a hard incompatibility with Noxys Multidirectional Trains, as there's no provision for ignoring a locomotive, on the other hand, if it does work correctly, you could halve the power of the individual locomotives if that mod is enabled to keep balance the same. Possibly worth testing?

4 years ago
(updated 4 years ago)

I think for Shuttle Train Continued the biggest issue would be that it adds an equipment grid to all locomotives large enough to hold the shuttle train equipment, and at least one locomotive in each direction of a double-ended train needs the equipment. If your train is mined, I'm reasonably certain that the contents of the equipment grid will be lost, as there is one equipment grid in each actual locomotive (for a total of two), but only one stored equipment grid in the mined item.

Possibly the most compatible thing would be to ensure that if an equipment grid is present in the real locomotives, a double-size grid is present in the item-with-entity-data, and as the train is being mined, replace it with the dummy item, move the stuff in the equipment grid into the double-size grid, then mine the dummy entity so that the state of the equipment grid is stored.

The next most compatible thing would be to check if any equipment is present, and prevent mining if there is.

4 years ago

My mod Battery Pack creates a battery-powered version of any fuel-burning locomotive (burning batteries as fuel, and yielding a discharged battery as the burnt result).

I'll give it a test, but it should create a battery-powered version of the dummy locomotives, and a battery-powered version of the actual locomotives; if you only support those locomotives by explicit prototype name, then the new locomotives will not actually act as battery-powered single train units, merely as whatever the dummy train is configured to be, only running on batteries as fuel.

I wonder if it would be useful to supply a mapping of base prototype and modified prototype to make compatibility easier?

4 years ago

All the mods raised here are covered in some fashion in the next release. Event if its just tested and seem to just work/not break. Next versions mod description/readme expanded to cover them.

4 years ago

Cool. =)