Engine Component

Engine inspector.

The engine acts as a source of power/torque and updates the components attached to it recursively with the generated torque.

When using the Electric engine, consider setting the output to the Transmission, bypassing the Clutch, as it is not needed.

Inertia

Higher engine inertia results in an engine that is harder to stall. The such engine will also take longer to spin up. Typical values:

Power Curve

The power curve represents engine power across its RPM range. X and Y values are normalized where X (0 to 1) represents RPM as a percentage of Rev Limiter RPM and Y (0 to 1) represents power as a percentage of Max Power.

Note that power and torque curves show the exact same data since the power is a function of torque and RPM, so knowing two of the three is enough. Since power curves are usually easier to find, NVP2 uses a power curve instead of a torque curve.

Similar power output, different power curves.
Idler Circuit

The Idler circuit tries to keep RPM at Idle RPM when there is no user input. This is done through throttle modulation so it is still possible to stall the engine if stallingEnabled = true.

Starter

Starter spins up the engine to try and reach the RPM at which the power generated by the engine is enough for it to spin by itself and overcome the losses. The amount of torque needed is automatically calculated based on the engine inertia, Power Curve, and the Start Duration value.
When Flying Start is enabled, the engine spins up instantly without running the starter. This is to give an illusion of the engine already having been started when the vehicle is woken up.

Rev Limiter

Cuts throttle to the engine when RPM reaches Rev Limiter RPM for a duration of Rev Limiter Cutoff Duration.

Forced Induction
Forced Induction inspector.
  • ForcedInduction is a part of EngineComponent. It can be used for both turbocharging and supercharging the vehicle.
  • Power Gain Multiplier adds power on top of the existing Max Power so the vehicle with 100kW and Power Gain Multiplier of 1.5 will actually produce 150kW.
  • Boost value affects sound components TurboWhistleComponent and TurboFlutterComponent. If forced induction is to be used just for the sound effects Power Gain Multiplier should be set to 1.
2023/05/14 16:35
Power Modifiers

Power modifiers can be used through scripting to modify the power of the engine. These are functions that return a float which denotes an engine power coefficient. Example:

public float AddBoost()
{
   if(boostIsActive)
   { 
       return 1.5f; // Increases power for 50%.
   }
}
...
myVehicleController.powertrain.engine.powerModifiers.Add(AddBoost);

This is a fictional example. A concrete example can be found inside the TCS module which uses this mechanic to limit power when there is wheel spin.