> ## Documentation Index
> Fetch the complete documentation index at: https://coolcars.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance (performance.yml)

> Configuring physics, speed, steering, and fuel consumption.

The `performance.yml` file is the heart of your car. This is where you define whether it will be a heavy truck or a fast sports car.

## Suspension (`suspension`)

Suspension determines how the car behaves on uneven ground and how high it "sits" above the ground.

* **rest-length**: Suspension height at rest (usually `0.55`).
* **stiffness**: Spring stiffness. Higher values mean the car sags less.
* **damping**: Shock absorption. Higher values mean the car stops bouncing faster after a jump.
* **step-height**: Maximum block height the car can drive over without jumping (usually `1.0`).

***

## Drivetrain and Speed (`drivetrain`)

This is where acceleration dynamics and top speed are configured.

```yaml theme={null}
drivetrain:
  engine-force: 9700.0           # Engine power
  acceleration-forward: 1.0      # Acceleration multiplier
  max-forward-speed: 34.0        # Max speed (blocks per second)
  brake-force: 15000.0           # Braking force
```

* **acceleration-curve-exponent**: Defines the acceleration curve. `1.0` is linear, less than `1.0` is faster at the start, more than `1.0` is faster at the end.
* **max-reverse-speed**: Reverse speed (usually 3-4 times less than forward).

***

## Steering (`steering`)

Configuring how the car turns.

* **max-steer-deg**: Maximum wheel turn angle (usually `25-35` degrees).
* **steer-response**: Steering wheel turn speed. Higher values mean the car reacts more sharply to key presses.
* **body-roll-limit-deg**: Body tilt during turns. Adds realism.

<Info>
  **High-speed reduction**: CoolCars has a system to reduce the steering angle at high speeds to prevent the car from spinning out. Configured in `tuning`.
</Info>

***

## Physics and Mass (`physics`)

* **mass**: Car weight in kg. Affects inertia and collisions.
* **drag-coeff**: Air resistance. Higher values mean the car loses speed faster without throttle.
* **lateral-grip-ground**: Road grip. Low values will turn the car into a "drift car".

***

## Fuel System (`fuel`)

Configuring tank capacity and consumption.

```yaml theme={null}
fuel:
  tank-capacity: 60.0            # Tank capacity in liters
  initial-fuel: 35.0             # Fuel on first spawn
  consumption:
    base-per-tick: 0.0008        # Idle consumption
    speed-factor: 0.00020        # Extra consumption from speed
    throttle-factor: 0.00120     # Extra consumption with throttle pressed
```

<Frame caption="Fuel indicator in Action Bar">
  <img src="https://mintcdn.com/coolcars/kivPNKWcZCb5Cy-N/images/coolcars/fuel-bar.png?fit=max&auto=format&n=kivPNKWcZCb5Cy-N&q=85&s=833695d7762becc91378be50c43bd890" width="338" height="68" data-path="images/coolcars/fuel-bar.png" />
</Frame>

| Parameter       | Description                                                                 |
| :-------------- | :-------------------------------------------------------------------------- |
| `tank-capacity` | Maximum liters that can be refueled.                                        |
| `consumption`   | Total consumption = `base` + (`speed` \* speed) + (`throttle` \* throttle). |
