Settings
The values a server owner sets, and the matches a server plays: the engine’s own and the mod’s. A module makes one of its server state a setting by giving it set_by. That is the group who may change it with /set, or config for the server’s configuration alone: its file, the environment and --set. See settings for where values come from.
A mod starts the next match itself with start_match, the rotation’s or one it names, and tells players which comes next with announce_next_match, as a vote does once it ends. See matches for the rotation.
config
Section titled “config”config: ConfigAs a server_state's set_by: the server's configuration alone may set it, never a player's /set.
announce_next_match
Section titled “announce_next_match”announce_next_match(map, gametype)Tells every player the match that comes next, so their game downloads its files while this one plays; it starts nothing.
It is checked as start_match is. A later call replaces it, and a player who joins is told the last. start_match()
still starts the rotation’s next match, which the rotation announces itself as each match starts.
| Name | Type | What it is |
|---|---|---|
map | string | Needed. |
gametype | string | Needed. |
- Fails
- a value of the wrong type
To announce the map a vote chose
Section titled “To announce the map a vote chose”announce_next_match("yard", "tdm")start_match
Section titled “start_match”start_match(map?, gametype?)Ends this match and starts the next: with no arguments the rotation's, else that map and gametype.
It fails at the call for a map the server has not, a gametype the map does not list, or one the mod has not. The
next map loads while this match plays on; then this match’s ending handlers run, and the switch removes every
entity, timer and waiting handler and starts match_state and player_state from their defaults, while
server_state stays and match.number counts on. Without a rotation, start_match() plays this match again;
start_match(match.map, match.gametype) restarts it and leaves the rotation where it is.
| Name | Type | What it is |
|---|---|---|
map | string? | May be left out. |
gametype | string? | May be left out. |
- Fails
- a value of the wrong type
To play team deathmatch on yard once a team wins
Section titled “To play team deathmatch on yard once a team wins”event("team_won", t.record { team = t.int })
on("team_won", function() start_match("yard", "tdm")end)To go on to the rotation’s next match
Section titled “To go on to the rotation’s next match”start_match()snapshot_rate
Section titled “snapshot_rate”snapshot_rate(rate)Asks for rate snapshots a second: 10, 12, 15, 20, 30 or 60, which divide the server's 60 ticks a second; 20 without it.
One module declares it, at its top as it loads: a second module’s fails at load, naming both. Any other rate fails
at load, and on an edit is printed and the rate kept. The server sends at the most of those within it and its
max_snapshot_rate setting, 60 by default, and prints the rate it sends at. Each player’s game gets the most of the
rates dividing that one whose snapshots each have 500 bytes of its rate: at 60 a second, a player at 10000 bytes a
second gets 20, and one at 25000 gets 30. A player’s game draws the others two of its snapshots behind the newest,
100 ms at 20 and 33 ms at 60, easing into a new rate’s delay. on_tick runs 20 times a second at any rate.
| Name | Type | What it is |
|---|---|---|
rate | number | Needed. |
- Fails
- a value of the wrong type
To send fast moves at once, for a mod of duels
Section titled “To send fast moves at once, for a mod of duels”snapshot_rate(60)