TF3TF3 Mod PortalTransport Fever 3 · erweitert um Community-Checks
mod.io · Mod 6419746

Vehicle Power & Slope Stats

von Deadeye6053Version 1.0Aktualisiert 13.11.2026118 KiB
Bitte ModManager zuerst starten. Dadurch wird der Installations-Link unter Windows registriert.

Beschreibung

Vehicle Power & Slope Stats (Formerly Vehicle Power tooltip)

Restores the detailed vehicle performance tooltip from Transport Fever 2, which shows how vehicles perform on Flat, Medium and High slopes.

Transport Fever 3 still calculates this information but doesn't fully display it in the vehicle interface. This mod brings those details back and adds an optional sidebar with additional performance and weight statistics, along with a Route Simulation feature (v7).

The mod uses the vehicle's own values (power, tractive effort, weight and top speed). This mod does not modify vehicle physics, power, traction or performance. It only reads and displays numbers. The tooltip uses the game's own UI formula, while the sidebar and the route simulation use the formulas of the game engine (see Physics at the bottom). All 13 official Languages are supported, translated using chatgpt and Google-- let me know if there are any errors in the Translation.

1. Vehicle Stats Sidebar (Added in v5)

An optional sidebar for trains and trams, providing additional weight, speed and gradient statistics.

Controls

  • Stats ON / OFF: Shows or hides the sidebar.
  • Slope: Flat, Medium, High or Custom (slider, 0 to 20%). Sets the slope used for the weight and speed calculations.
  • Ref (Reference Speed): 25%, 50%, 75% or 100% of the vehicle's top speed. Sets the target speed used for the pulling-weight calculations.
  • Empty / Loaded: Sets which weight the figures use (see the note below).

Weight

  • Optimal: The maximum weight the train can pull while maintaining the selected reference speed on the selected slope.
  • Current: Your train's weight (empty by default, full load if you switch to Loaded).
  • Spare: Optimal minus Current. Green indicates the train is within the limit, yellow indicates up to 10% overweight, and red indicates more than 10% overweight.

Note: The game does calculate cargo weight, but doesn't use it in the vehicle simulation. So, even if a train has only one unit of cargo loaded, it performs similarly whether empty or fully loaded (tested with empty, quarter, half and full loads). So Empty is the default. Sad!

Speed

  • Selected Slope: The fastest speed the train can maintain on the selected slope, along with the time (also at 4x game speed) and distance required to reach it.
  • Flat (Vanilla): The game's own flat-track figures, provided for comparison. Hidden when Flat is selected.

Maximum Grade

  • Max Grade: The steepest gradient your current train can climb, at full top speed and at the Ref speed. This value decreases as the train gets heavier.

Accuracy: The sidebar is more accurate than the tooltip because it uses the formulas and parameters used by the game engine itself, including:

  • 2× Tractive Effort.
  • Power scaling after crossover speed.
  • Tractive-effort-dominant and power-dominant regimes.
  • Acceleration taper near top speed.
  • Gravity of 3.27 and rolling friction of 0.02 per tonne.

Optimal weight and Max Grade keep a 5% planning margin from the vanilla UI, so they are slightly conservative. It is still limited to a single constant slope. It assumes the track has a constant gradient throughout and calculates the vehicle's performance accordingly. 

2. Route Profile (Added in v7)

The new Route Profile window lets you select a route and simulate a train consist over it, providing an estimated speed profile along the route in 100 m samples, out and back.

The window also displays the slope of the track along different sections of the route.

The simulation considers the entire consist (locomotives and wagons) and calculates speed changes, momentum, curve limits, track speed limits, braking and other parameters throughout the route. The curve limits and track speed limits are read from the game for every piece of track.

It then generates a graph showing how the train is expected to perform at different points along the route. The result is calculated when you press Simulate. If you change the train, the Empty / Loaded button or the line, the old result is thrown away and you press Simulate again.

Accuracy: The physics core matches my real runs within about 0.3 to 0.4 km/h and about 1% on time. On a long line with curves it is close but not perfect (a few percent fast on my 23 km test line). Bridge and level crossing limits are not read yet, and the way back uses the same track data as the way out, mirrored.

Slope Integration

You can import the slope of the route into the Sidebar to get more appropriate optimal-weight figures. Use max takes the steepest 200 m of the route, Use avg takes the average slope calculated from the simulation and follows your train when you change it.

3. Performance Tooltip

The vehicle window shows the vehicle's top speed on three test slopes:

  • Flat: 0.00%
  • Medium: 3.75%
  • High: 7.50%

Hover over the performance information to see the speed on each slope, along with the time and distance required to reach that speed from a standstill.

This restores the standard vanilla TpF2-style tooltip.

Accuracy: The tooltip uses a simplified, textbook-style physics calculation. It is less accurate, but gives you a general idea of how vehicles perform on different slopes.


Compatibility

The following mods were working correctly up to v6:

  • Enhanced Store Mod
  • Better Vehicle Stats
  • UK Units Mod
  • Realistic Train Physics Mod
  • Realistic Grade Mod(s)

Regarding v7: The v7 update significantly overhauls the physics calculations, while the core functionality remains the same. Compatibility with the above mods is expected, but may need further testing.

If you encounter any compatibility issues, please let me know. I'll investigate and update the mod where necessary.


Changelog

v1: Initial release. Performance tooltip for trains and trams. v2: Added tooltip support for all powered vehicles. Added a Performance bar below the Pollution bar in the vehicle purchase window. v3: Fixed compatibility with UK distance units. v4: Added colour coding for performance ratings and slope values, including Medium and High results. v5: Added the Stats Sidebar with vehicle weight, speed and slope calculations. v6: Updated the mod to support Enhanced Vehicle Store and Realistic Train Physics Mod. v7: Overhauled the physics calculations for improved accuracy. Formulas were taken from the decompiled game engine and checked against real game runs. Added the Custom slope, the Empty / Loaded button, Route Profile and train speed simulation.


Physics

How the game's UI script does the math (vehicle_util.tl, vehicle_store_util.tl: the vanilla tooltip and store numbers)

  • Tractive effort at 1× (the engine uses 2×).
  • Rolling friction is 0.02 added per vehicle, not multiplied by the weight.
  • "Cannot climb" if resistance is above 0.95 × TE.
  • Time and distance assume full pull right up to top speed (no taper).

How the game engine does it (function names from my decompile of the exe; the FUN_ addresses move with every game update, the names stay)

  • CalcPowerWeightTraction (train_move_util.cpp, FUN_140bb7230): adds up the train once per update. Power × 1, TE × 2, total mass, and resistance = mass × 3.27 × slope + mass × 0.02 for every carriage.
  • LandVehicleMoveSystem::Update2 (FUN_140ac53c0, lambda_4): every tick. Pull = TE if speed ≤ P/TE, else P/speed. Acceleration = (pull − resistance) × trainAccelerationFactor / mass.
  • Top speed taper (also in Update2): x = clamp((v / (limit + 0.136) − 0.95) × 20, 0, 1), acceleration × (1 − x²). That is why the last 5 km/h take forever.
  • LandVehicleMoveSystem::GetVehicleInfo (FUN_140aca690): reads the vehicle data for the two above.
  • No air drag, no curve resistance and no wheel slip. A curve is only a speed limit, a × (radius + b)^c per track type. Braking is a constant 2.5 m/s².

What the mod does with it

  • Sidebar: the engine formulas, added up over speed (the game's own Romberg script, Simpson as fallback). Time = ∫ m / ((F − R)(1 − x²)) dv.
  • Route: steps along the distance (10 m), v² = v₀² + 2·a·ds, braking worked out backwards from every stop and speed limit. The limits come from the track pieces (edge speedLimit and curveSpeedLimit).
  • Use avg: one constant slope for the sidebar that gives the same time as the simulated train.

I have attached testing and physics notes for the mod, located in the mod’s root folder under mod.io\10640\mods\6419746 — the actual path may vary depending on mod.io’s storage location.


Bilder