Rivens Realistic Train Acceleration (based on cargo)


This mod makes train acceleration more realistic and depend on the amount of Cargo. (youtube demo included)

Tweaks
11 months ago
1.1
3.29K
Trains

i [solved] Possible to make train length affect braking distance?

1 year, 1 month ago

Hi

I'm using the mod, really like it. However, it feels odd when an empty 1-1 train going at 50km/h takes the same distance to stop as a partially loaded 1-8 train moving at the same speed.

I saw in an earlier discussion that making the braking distance depend on cargo is not possible, but what about changing it depending on the number of train cars?

Or is there something wrong with my setup and the braking distance should already be different? I tried with and without the mod and they were the same. I have Bob's logistics mod but no other train-modifying mods.

Thanks

1 year, 25 days ago
(updated 1 year, 25 days ago)

The issue is that mods are not really able to directly affect braking distance. The easiest way to increase braking distance is to increase the weight of the vehicles. A side effect of this is that the trains consume more fuel, and are deadlier on impact with a player.

The core game logic calculates all the braking, based on the current speed, the train mass and the braking power (affected by research).

It's easy to detect acceleration, and reduce it, because you're simply reducing the speed-increase, and then it simply takes longer to arrive.

It's easy to detect deceleration, and reduce it, but that means you'll overshoot your destination. To work around this, it means that you have to calculate (almost every frame) what the stopping point is (either simply a station, or checking all rail-signals along the projected path), and how far it is, what your (calculated) braking distance is, and whether you should already be braking. It's quite tricky to get this right, and has a serious performance impact.

Long story short: it's hard, and slow - and I'm not sure it's worth it.

1 year, 23 days ago

Hey Filipi, I attempted to implement a new braking algorithm in the 0.1.23 release. It's both dependent on the mass of the train, and the number of locomotives/wagons. The mass of the train has the greatest effect, because I'm reasonably sure that in reality each carriage has its own brakes, which are controlled by the locomotive.

1 year, 10 days ago
(updated 1 year, 10 days ago)

Hi, sorry for not replying, I haven't visited this page in a while.

I downloaded the update but it seems to work in an odd way. A filled 1-4 train takes significantly less time to stop than a filled 1-1 train (same speed, fuel, locomotive). It's true that in reality each car has brakes, but longer trains take longer to stop.

Maybe there's a way to invert this behaviour?

Anyway I appreciate you trying to improve the mod, but I think I will stick to the previous version, I don't like this new braking system.

Thanks

[deleted message]
11 months ago
(updated 11 months ago)

Hey Filipi, thanks for your honest feedback. I released 0.1.24 where cargo/fluid-wagons have less braking force, and locomotives more.

In my testing I got these results:
- For empty wagons: number of wagons does not really matter for the braking distance (as the brakes per wagon can cope)
- For filled wagons: the more wagons, the longer the braking distance (as the brakes per wagon are not strong enough)
I think this matches your expectations, as a filled 1L4C train will now take longer to stop than a 1L1C train.

I also made the braking calculations substantially less of a performance hog.

New response