Race Session

Race mode is a fixed-lap competitive session with finishing order and winner announcement.

Start

/racetracks session start race <instance_id>
/racetracks session start race <instance_id> <lap_count>

Defaults:

  • lap_count defaults to 3 if omitted.

Entry and Progression

  • A player is considered a race entrant when they begin a valid lap on track in a vehicle.

  • Progression uses checkpoint order and checkpoint direction validation.

  • If a non-finished driver leaves track bounds, lap progress resets.

  • Completed lap count increments on each valid finished lap.

Finish Logic

  • A driver finishes when completedLaps == totalLaps.

  • Finish position is assigned by finish order.

  • Race time is measured from race start to finishing moment.

  • Finisher announcement includes position and race time.

Session End

  • The race auto-ends when all entrants are finished.

  • Winner (P1) is announced globally.

Standings and HUD

  • Actionbar shows lap progress, position, gap, speed, and finish marker when finished.

  • Sidebar shows lap, position, gap, last lap, checkpoint progress, and results.

Sorting favors:

  1. Finished racers by finish position.

  2. Then active racers by completed laps, checkpoint progress, and checkpoint timing.

Restore Note

RUNNING race sessions are not currently restored on server startup.

Last updated