# Race Rules (eventRules.json) (/docs/assetto-corsa-competizione/event-rules)



`eventRules.json` controls the sporting rules of your race — pitstops, refuelling and stint limits. This is where you turn a casual race into a proper endurance event.

```json
{
    "qualifyStandingType": 1,
    "pitWindowLengthSec": -1,
    "driverStintTimeSec": -1,
    "mandatoryPitstopCount": 0,
    "isRefuellingAllowedInRace": true,
    "isRefuellingTimeFixed": false,
    "isMandatoryPitstopRefuellingRequired": false,
    "isMandatoryPitstopTyreChangeRequired": false,
    "tyreSetCount": 50
}
```

Key fields [#key-fields]

| Field                                  | Meaning                                                  |
| -------------------------------------- | -------------------------------------------------------- |
| `mandatoryPitstopCount`                | How many pitstops are required (`0` = none)              |
| `pitWindowLengthSec`                   | Length of the pit window in seconds, `-1` = whole race   |
| `driverStintTimeSec`                   | Max time a driver can stay out before a stop, `-1` = off |
| `isRefuellingAllowedInRace`            | Allow refuelling during the race                         |
| `isMandatoryPitstopTyreChangeRequired` | Force a tyre change at the mandatory stop                |
| `qualifyStandingType`                  | `1` = fastest lap, `2` = average lap                     |
| `tyreSetCount`                         | Tyre sets available across the weekend                   |

Common setups [#common-setups]

**Sprint race (no stops):** `mandatoryPitstopCount: 0`.

**Sprint with a mandatory stop:** `mandatoryPitstopCount: 1`, set a `pitWindowLengthSec` (e.g. a window mid-race), and decide whether a tyre change/refuel is required.

**Endurance:** add `driverStintTimeSec` to force driver swaps, enable refuelling, and raise session length in [event.json](/docs/assetto-corsa-competizione/sessions-and-weather).

<Callout type="info">
  A mandatory pitstop only matters if your race is long enough to reach the window. Match `pitWindowLengthSec` to your race duration so the window actually opens.
</Callout>
