← Back

Engine Limit: Extended Engine and Transmission Parameters

Version: v1.21.1 Author: nfs4.com Category: n4patch 2026-12-02
Engine Limit: Extended Engine and Transmission Parameters

Engine Limit: Extended Engine and Transmission Parameters

engine_limit.n4p is a module for n4patch that extends vehicle physics tuning capabilities in Need for Speed: High Stakes.

The module introduces support for the new CARP.N4E format, providing greater flexibility in engine and transmission configuration while overcoming several limitations of the original CARP.TXT format.

Key Features

  • Independent vehicle top speed cap adjustment.
  • Configurable torque curve sampling interval.
  • Variable number of torque curve samples.
  • Configurable engine fuel cutoff RPM.
  • Configurable drive acceleration cap.
  • Support for up to 253 forward gears.
  • Independent manual and automatic transmission configurations.
  • Individual gear ratio and efficiency settings for each gear.
  • Configurable RPM corrections during gear changes and braking.
  • Parameter inheritance from the original CARP.TXT.
  • Support for separate configurations for each vehicle upgrade level in Career mode.
  • Preservation of vehicle compatibility with the original game.

The n4tune utility can be used to create, edit, analyze, and virtually test CARP.N4E configurations.

Installation

  1. Install the n4patch loader.
  2. Place engine_limit.n4p in the n4patch directory.
  3. Add carp.n4e to the car.viv archive alongside a complete carp.txt file.

To use extended vehicle characteristics in Career mode, the CARP.N4E filename must match the base name of the corresponding CARP.TXT file.

For example:

Original configuration Extended configuration
carp.txt carp.n4e
carp1.txt carp1.n4e
carp2.txt carp2.n4e
carp3.txt carp3.n4e

The carp2.n4e file extends the parameters of carp2.txt, not the base carp.txt.

The original game without the module installed uses only CARP.TXT files. This allows a vehicle to contain both standard and extended configurations.

For correct multiplayer operation and replay playback, identical vehicle archives must be used across all participating game installations.

CARP.TXT Top Speed Cap

In the original game, the value of parameter (14) is copied into parameter (15) during vehicle initialization. As a result, the aerodynamic drag calibration speed and the top speed cap cannot be configured independently.

The module corrects this behavior, allowing both parameters to be used independently.

To control this feature, create an engine_limit.ini file alongside nfs4.exe:

[engine_limit]
preserve_top_speed_cap=1
Value Behavior
0 Original game behavior: the value of parameter (14) is copied into (15).
1 Parameter (15) is used as an independent top speed cap.

The default value is 1, including when the configuration file is missing.

When a valid CARP.N4E file is present, its own parameter (15) is used regardless of this setting.

Extended CARP.N4E Format

CARP.N4E is a text-based vehicle configuration format based on the structure of the original CARP.TXT.

Each record begins with a parameter label followed by its numeric identifier in parentheses. The label is informational only. The numeric identifier determines which parameter the record represents.

Numeric values are separated by commas. A decimal point is used as the decimal separator.

Scientific notation, trailing commas, blank lines, and both LF and CRLF line endings are supported.

The first record must specify the format version:

Format version (1000)
1

Current format version: 1.

Required Parameters

ID Parameter Description
1000 Format version Format version.
12 Idle RPM Engine idle speed.
13 Redline RPM Engine redline used to calculate damage caused by over-revving.
14 Drag calibration speed Aerodynamic drag calibration speed, m/s.
15 Speed cap Vehicle top speed cap, m/s.
1001 Torque sample interval Interval between torque curve samples, RPM.
1002 Fuel cutoff Engine fuel cutoff RPM.
1003 Drive acceleration cap Acceleration cap for engine-generated driving force, m/s².
10 Torque samples Engine torque values, N·m.
1010 Manual gearbox Manual transmission configuration.
1011 Automatic gearbox Automatic transmission configuration.

Parameter Limits

  • Idle RPM: an integer of at least 100 and below the redline.
  • Redline RPM: an integer.
  • Drag calibration speed: from 1 to 250 m/s.
  • Top speed cap: from 1 to 250 m/s.
  • Torque sample interval: from 1 to 65,535 RPM.
  • Fuel cutoff RPM: an integer above idle RPM, or 0 to disable fuel cutoff.
  • Drive acceleration cap: from 0 to 100 m/s². A value of 0 preserves the native game engine limit.
  • Torque: from 0 to 50,000 N·m.

Torque Curve

Unlike the original CARP.TXT format, the extended format allows users to independently configure both the torque sampling interval and the number of samples.

For example, with a sampling interval of 500 RPM, torque values correspond to the following engine speeds:

Sample index Engine RPM
0 0
1 500
2 1000
3 1500
4 2000
5 2500
… …

The torque curve must contain at least two values and cover the engine speed range up to the redline, as well as the RPM required for the aerodynamic drag calibration lookup in the highest gear of both transmissions.

This allows more accurate representation of different engine characteristics, including both low-revving and high-revving engines.

Extended Transmission Configuration

Separate gearbox tables are used for manual and automatic transmissions.

Each row describes a single gear and contains four values:

rpm_per_mps,efficiency,shift_blip_rpm,brake_blip_rpm
Parameter Description
rpm_per_mps Ratio of engine RPM to vehicle speed in m/s.
efficiency Gear efficiency coefficient.
shift_blip_rpm RPM correction during gear changes.
brake_blip_rpm RPM correction during braking.

For example, a ratio of 120 corresponds to 3,600 RPM at a vehicle speed of 30 m/s (108 km/h).

Gears must be listed in the following order:

  1. Reverse gear with a negative ratio.
  2. Neutral with a zero ratio.
  3. Between 1 and 253 forward gears.

Forward gear ratios must be positive and strictly descending.

Valid gear efficiency coefficients range from 0.001 to 10. A value of zero is allowed for neutral.

RPM corrections are specified as signed integers ranging from −20,000 to 20,000 RPM.

CARP.TXT Parameter Inheritance

One of the key features of CARP.N4E is its ability to inherit parameters from the corresponding CARP.TXT file.

Apart from the required parameters of the extended format, all other parameters are optional. When a parameter is omitted, its value is inherited from the original file.

For example, to change the vehicle mass, simply add the following record:

Mass (2)
1420

In this case, the vehicle mass in the extended configuration is set to 1,420 kg, while all other optional parameters continue to be inherited from CARP.TXT.

If a parameter is present in CARP.N4E, it completely replaces the corresponding CARP.TXT record, including all array values.

To restore inheritance, simply remove the corresponding record from CARP.N4E.

Parameters with IDs 3, 5, 6, 7, 9, 75, 76, and 78 are part of the extended gearbox tables and cannot be specified as separate records.

Overridden parameters are used as input values during vehicle initialization. The game engine continues to apply its standard tuning mechanisms and value limits.

Configuration Validation and Error Handling

The module automatically validates the CARP.N4E file when loading a vehicle.

An extended configuration may be rejected for the following reasons:

  • Unsupported format version.
  • Unknown parameter IDs.
  • Duplicate records.
  • Missing required parameters.
  • Invalid parameter values.
  • Invalid transmission configuration.
  • Insufficient torque curve coverage.

If an error is detected, the module logs the reason and rejects the entire extended configuration. The vehicle continues to use the original CARP.TXT without applying any overrides.

The n4tune and nfs4net utilities also validate extended configurations and report any detected errors.

Editing CARP.N4E

The recommended tool for working with the extended format is n4tune, a car editor and virtual test bench for NFS4.

n4tune page

The utility allows users to edit CARP.N4E parameters, configure torque curves and transmissions, perform virtual tests, compare standard and extended vehicle configurations, and automatically calibrate vehicle characteristics against specified performance targets.

Engine Limit expands vehicle tuning capabilities while maintaining compatibility with the original CARP.TXT format and enabling more flexible engine and transmission configurations.

Changelog

v1.16.2

  • Fixed N4E physics calculations.
  • AI cars now have exactly the same engine characteristics as player cars.

v1.21.1

  • Expanded per-difficulty settings for AI launches and shifting errors. The RP4 Metadata module lets replays retain the settings used in the race.
  • With n4patch Options, you can change the CARP speed cap, force N4E physics, and adjust AI settings from the in-game menu.
  • With n4patch Options 1.4 or later, saving a changed setting shows a reminder to restart the game.

Comments

0 comments

No comments yet.

Log in to leave a comment and rate. Log in