Electric Trains


[2.0 Compatible] The most advanced electric train mod out there! This mod adds balanced, UPS friendly and futuristic themed MAGLEV trains. These trains have a increased top speed, acceleration and capacity (mod configurable). There are more researches, items, sounds, recipes and logistical challenges and trade-offs to explore. Enjoy!

Content
14 days ago
1.1 - 2.0
9.93K
Transportation Logistics Trains

b [ON HOLD] K2 compatibility issue

3 months ago

The Tesla Coil / Energy Absorber equipment mechanics in Krastorio 2 don't work with electric locomotives in 0.2.9.

The mechanic requires that entities with equipment grids have is_military_target=true. It attempts to ensure this is the case in data-final-fixes by finding everything with an appropriate equipment grid and setting that flag.

However, Electric Trains only gain their equipment grids via the inheritance code in data-final-fixes, and as it lists K2 as an optional dependency it loads after K2's fixup attempt.

You could probably fix this with any one of these options:

  • doing grid inheritance in data-updates instead of data-final-fixes (I tried this, it works) (K2 edits the vanilla locomotive to have a grid during data-updates)
  • copying is_military_target from the source prototype in the grid inheritance code
  • setting is_military_target=true on all of the vehicle prototypes
  • removing the explicit optional dependency on K2 (because this mod would otherwise be earlier in the load order)
2 months ago

Hiya, thanks for the detailed post (very much appreciated)

Would you fancy making any of those changes? I'm happy to review a pull request and it sounds like you have the know-how to do it.

(Sorry I'm pulling a "no, you" - I'm super busy at the moment but wanna keep everything happy over here :))

a month ago

Postponing this one since its unlikely K2 will be compatible with 2.0 for some time

New response