Event schedule
When events spawn, how many, and when they get cleaned up. The same settings in every event mod.
The idea
All the spawning events use one shared schedule. Each mod's settings file has the same 8 settings, so once you know them you know them for every event.
The 8 schedule settings
| Setting | Default | What it does |
|---|---|---|
firstSpawnSeconds | 2700 | How many seconds after the server starts the first spawn happens. |
repeatEverySeconds | 2700 | After that, a new spawn every this many seconds until the restart. 0 means it only happens once. |
minEventsPerSpawn | 1 | Minimum number of events each time. |
maxEventsPerSpawn | 1 | Maximum number of events each time. It picks a random number between minimum and maximum. |
maxActive | 0 | Maximum number of this event up at the same time. 0 means no limit. |
maxPerRestart | 4 | Maximum number of this event in total per restart. 0 means no limit. |
randomDelaySeconds | 0 | Makes each spawn come a bit late, up to this many seconds, at random. 0 means always on time. |
minPlayers | 1 | Minimum players online. With fewer players, that spawn is skipped. |
So out of the box: one event every 45 minutes, up to 4 per restart, as long as someone is online. If a setting is missing from your file, the default is used.
What happens at each spawn time
- 1Fewer players online than
minPlayers? Then this spawn is skipped and it waits for the next one. - 2It picks how many events to spawn: a random number between
minEventsPerSpawnandmaxEventsPerSpawn. - 3That number gets cut down if it would go over
maxActive(too many up right now) ormaxPerRestart(too many this restart). - 4It looks at the spots: a spot is skipped if an event of this mod is already there, if its own minimum players isn't met, or if its chance is 0.
- 5It picks that many spots from the ones left, using their chance (see below), and spawns the events there.
The spawn times are counted from the server start (first spawn, then every repeatEverySeconds), so they don't slowly drift later and later. randomDelaySeconds is added on top of each one.
Some events send a warning first. In those mods, delayBetweenEarlyNotificationAndSpawn is how many seconds between the warning and the event really showing up.
Spots and their chance
Each event has a list of spots (zones, positions). Every spot has a chance. The chance isn't a %: it's how often the spot gets picked compared with the other spots.
- A spot with 2 gets picked twice as often as a spot with 1.
- A spot with 1.0 gets picked 10 times as often as a spot with 0.1.
- A spot with 0 is never used. Handy to turn a spot off without deleting it.
Some spots also have their own minimum players: that spot is only used when at least that many players are online.
The setting names are a bit different per mod, but they work the same:
| Spot setting | Name in the mods |
|---|---|
| Chance | chanceToSpawn, spawnChance or zoneSpawnChance |
| Minimum players | minimumPlayers or minimumPlayersToSpawn |
A spot stays busy while its event is up. When the event ends (looted, timed out, deleted by an admin) the spot is free again. If an event fails to spawn (for example a typo in a classname), the spot is freed and it doesn't count towards maxPerRestart.
Cleanup: waiting for players nearby
Every event has a delete timer (deleteTimer, or a similar name like deleteCrateTimer). When it runs out, the event is removed with its zombies, AI, marker and PvE zone. But if players are still right there, it waits a bit:
| Setting | Default | What it does |
|---|---|---|
delayDeleteIfPlayersWithin | 100 | If living players are this close (in meters) when the timer runs out, the event waits. 0 means never wait: it's removed on time. |
delayDeleteMaxSeconds | 600 | Maximum extra seconds it waits. It can't be less than 60. |
- 1The timer runs out and someone is within
delayDeleteIfPlayersWithinmeters. - 2Those players get a message right away telling them how long they have left, then a new one every 60 seconds.
- 3The event goes as soon as nobody is near any more, or when
delayDeleteMaxSecondsis over, whichever comes first.
Loot Containers use the same two settings (default 30 meters there), but they wait quietly, without messages, so a town full of containers doesn't spam players.
Examples
2 ambulances every 20 minutes, until the restart:
"firstSpawnSeconds": 1200,
"repeatEverySeconds": 1200,
"minEventsPerSpawn": 2,
"maxEventsPerSpawn": 2,
"maxActive": 0,
"maxPerRestart": 0,
"randomDelaySeconds": 0,
"minPlayers": 1Just one air drop, 10 minutes after the server starts:
"firstSpawnSeconds": 600,
"repeatEverySeconds": 0,
"minEventsPerSpawn": 1,
"maxEventsPerSpawn": 11 to 3 toxic zones every hour, never more than 3 at once, only with 10 or more players, and not always on the hour:
"firstSpawnSeconds": 3600,
"repeatEverySeconds": 3600,
"minEventsPerSpawn": 1,
"maxEventsPerSpawn": 3,
"maxActive": 3,
"maxPerRestart": 0,
"randomDelaySeconds": 600,
"minPlayers": 10