Auto events
System-generated races — schedule, purse seeding, max grid size, class and type weights.
Auto events are system-hosted races (source = AUTO) created on a schedule. Players join like a normal lobby.
Enable
Config.AutoEvents = {
enabled = true,
announceNewRaces = true,
minParticipants = 1,
maxParticipants = { min = 6, max = 16 }, -- or false for unlimited / 12 for fixed
cancelIfUnderMinMs = 60000,
joinWindowMinutes = 10,
-- ...
}- Lobby opens
joinWindowMinutesbeforestarts_at - Each generated race rolls a max grid size from
maxParticipants(false/nil= unlimited) - If under
minParticipantsafter start time, waitcancelIfUnderMinMsthen cancel + refund announceNewRaces = falseskipsOnRacingAnnouncemententirely
Max grid size
Every auto race can get a max participants cap when it is created (max_participants in the database). Joins are rejected once the lobby is full.
-- Random inclusive range (default)
maxParticipants = { min = 6, max = 16 },
-- Fixed cap
-- maxParticipants = 12,
-- Unlimited (no cap)
-- maxParticipants = false,| Value | Behavior |
|---|---|
{ min, max } | Random integer in that inclusive range (raised to at least minParticipants) |
number | Fixed max for every generated race |
false / nil | Unlimited — no join cap |
The tablet, Stewards live view, and world join card show counts as current/max when a cap is set.
Purse seeding
Approximate seed:
seed ≈ (seedFlat + seedPerKm × raceKm) × typeMult × classMult × jitter
seedFlat = 4000,
seedPerKm = 800,
minSeedPot = 6000,
maxSeedPot = 65000,
seedJitter = 0.08,
typePotMult = { SPRINT = 1.00, CIRCUIT = 1.12, DRIFT = 1.22 },
classPotMult = { X = 1.55, S = 1.35, A = 1.18, B = 1.05, C = 0.92, D = 0.82, OPEN = 1.15 },Entry fees for auto events scale separately (entryFeeFlat, entryFeePerKm, class multipliers, min/max clamps).
Participation bonuses
Paid by the system (not taken from the pot):
participation = {
enabled = true,
finishBonus = 2500,
dnfBonus = 750,
},Picking tracks & classes
maxPerGeneration = 2,
maxActive = 4, -- live AUTO races cap; 0 = unlimited
minStartSeparationMeters = 150, -- keep starts apart; 0 = off
minLaps = 2,
maxLaps = 4,
targetLengthMinutes = 50,
classWeights = { X = 8, S = 22, A = 22, B = 16, C = 8, D = 8, ANY = 16 },
allowedTypes = { 'SPRINT', 'CIRCUIT', 'DRIFT' },
allowedKinds = { 'CAR', 'MOTORCYCLE', 'BOAT', 'AIRCRAFT' },
kindWeights = { CAR = 50, MOTORCYCLE = 25, BOAT = 15, AIRCRAFT = 10 },
typeWeights = { SPRINT = 40, CIRCUIT = 40, DRIFT = 20 },ANYclass weight = open class (no vehicle_class restriction)- Empty
allowedTypes/allowedKinds= all allowed kindWeights/typeWeights— omit or leave unset for uniform picks among allowed
Timing
firstStartOffsetMinutes = 20,
startJitterMinutes = 10,
schedule = nil, -- nil = every hour on the hour (internal default)Custom schedule example:
schedule = {
{ generationHour = 0, generationMinute = 0, startHour = 0 },
{ generationHour = 12, generationMinute = 0, startHour = 12 },
},Email / phone
When events are created, online players are notified through OnRacingAnnouncement in server/edit.lua (lb-phone mail + qb-phone client mail when those resources are running). Set announceNewRaces = false to disable. Meetups use announceMeetups with the same hook.
Tips
- Only verified tracks with enough length/checkpoints are good auto candidates — verify community tracks if you rely on auto events.
- Lower
maxActiveon busy servers to avoid overlapping street chaos. - Disable drift autos with
allowedTypes = { 'SPRINT', 'CIRCUIT' }.
