Project : Train Realism


alpha-stage mod! Many features are yet missing. Still I believe it is as good or better than many other similar mods, that I know about. This mod aims for trains to become realistic. warning ! settings from 0.0.2 will not work with 0.0.3 . Be sure to look at their descriptions and put them into their default values for playable results. Sorry for my incompetence, but I'm not yet keen to learn how to use migrations to change things like theese behind sceenes.

Content
2 years ago
1.1
187
Trains
Owner:
maxikaaz
Source:
N/A
Homepage:
https://mods.factorio.com/mod/train_realism
License:
MIT
Created:
2 years ago
Latest Version:
0.0.4 (2 years ago)
Factorio version:
1.1
Downloaded by:
187 users

Trains in vanilla game are not very realistic, I'm planning on overhauling in-game train physics, then maybe even I will touch more train-related topics.

Note : I do not (yet) care about in-game balance, I only want cool, slow starting trains, that are powerful and can move as many wagons as I only can think of - at cost of acceleration speed.

For now I wrote data-updates to make trains and wagons way heavier, I rewrote how trains are accelerating and breaking. I also re-wrote friction forces.
Still ahead of me are things like including other friction forces, variable train power consumption and simulation of diesel engine power curve.
In future I also plan on adding cargo weight, better handling of boat-"trains", and maybe I will completely rewrite whole train system, but it's very far fetched plan.

As for now there are few things worth of noting :
-because I don't have engine power curves, low speeds give huuuge amounts of torque.
-because factorio don't have concept of throttling, this + previous fact causes trains to sometimes slip wheels a bit. But I added particles for that occurance, so you will know when it's happening. Wheel slipping causes not all power going toward accelerating train and - as for now - can't be really dealt with.
-With this mod there's no such thing as train, that can't move with cargo. It's only about how quickly will it move under what load. Also junk train is working waaay better. It's no longer struggling to even move like with vanilla physics. It's still far from regular locomotive, but it is more viable as cheap version of locomotive.

As for other cool things, I'm planning to support electric trains and in fact, all work I do is with junk-trains and electric-trains mods installed and tested alongside.

This mod will be as compatible as possible with any other train mods, that are adding new trains, but it won't for sure be compatible with any other train-physics mods.

Below force produced by vanilla train with this mod : (x = m/s, y = kN, in future I will make it look better, but I also need to try keep formula small, so there's not a lot of calculations each frame. For next change I plan adjusting existing formula so it has smaller spike and tops-up force at about 10m/s and not at 0.7m/s))

actually after few months - I'm not proud of this formula. It feels arbitrary and (worst of all) for slow max_speed it crashes game. Hence mod don't even work with cargo ships. In 0.0.5 I will fix those issues and make cargo ships compatible. I'll work on something better once I get time (and courage) :)

Changelog :
0.0.4 - I made automatic trains viable - they didn't worked in previous version. They are not ideal yet, but ... They are now ... working. They were not working... It's some progress ;)
- I divided train masses and powers by 2 (real-size trains don't really fit game world... But IRL there also exist smaller locomotives, so it doesn't hurt realism (IMO) ). Maybe in future I will make streetcar-like config... If someone wants to have something more fitting for purposes needed in game, it would be tram-sized trains.. Way better than actual full sized trains for moving dozens of wagons.
- I completely re-wrote stats of JunkTrain. After all trains/wagons have applied default multipliers, it has mass divided by 2 and power by 5. It's no longer power-hungry beast and become much more pleasant to use for short, slow trains.
- I think it might be first "playable" version, tho I will keep looking for problems yet. There are planety problems I discover each day.
0.0.3 - Settings dramatically changed, because I fixed some formulas and removed some constants from code and applied them to settings. Old settings will give unplayable results (and I don't yet know well how to apply migrations folder :c ).
- I made data-updates.lua, so now trains weight 200tons and not 2 tons. They also have greater power and now they finally accelerate, like you would expect them to. They are quite slow to start, but can pull 30, or 40 wagons without much wheel-slipping.
- I fixed a lot of bugs and formulas, as it turns out I had many errors in previous version. Now all coefficients are looking exactly how I think they should and I think results are really realistic - looking.
0.0.2 - hotfix, 0.0.1 had crash on game loading screen.
0.0.1 - first release