Skip to content

Maps and Gamemodes on a Server

Liam Robinson edited this page Nov 8, 2026 · 1 revision

Maps and Gamemodes on a Server

Besides the disc's drops, a server can run maps and gamemodes made by players (Making a Map, Making a Gamemode). Both come as packages and are run as server resources: the server sends them to every player who joins.

What the data folder needs

A map is ridden with the riders' own physics, so the server needs the riders' data from your disc. Set the data folder up with the verify class (and collision for layouts on a disc drop's terrain):

avalanche-server setup <your disc image> --out data --with verify,collision

A map

Put the map's package in the resources folder, start it, and name the map by its content id (<package>:map/<name>):

[server]
name = "Maps Test"

# a race on a map
[[instance]]
mode = "race"
map = "slope:map/course"
capacity = 8

# the same kind of map under a gamemode's rules
[[instance]]
mode = "race"
gamemode = "bots:gamemode/gully_race"
map = "bots:map/course"
capacity = 8

[resources]
start = ["slope", "bots", "admins"]

A rotation mixes drops and maps, and may give a map its own gamemode:

[game]
mode = "race"
rotation = ["exp_alps_grandgolliat_drop_1_race", "slope:map/course", { map = "bots:map/course", gamemode = "bots:gamemode/gully_race" }]

When a map's turn comes, the server loads it (once, until the resources change), simulates its start, and builds the checks its riders' runs are held to (speed, splits at its checkpoints, its finish, its time limit). The log of the first example:

map slope:map/course (Template slope) under race (EventType_RaceClock 5, 0 targets) loaded in 2979 ms: 96 collision clusters, 444 triangles, 2 volumes, 2 gates; …
instance 1 on map slope:map/course: its rules loaded in 2980 ms
map bots:map/course (Template slope) under bots:gamemode/gully_race "Gully Race" (EventType_RaceGhosts 6, a time limit of 90000 ms ending failed, 3 targets) loaded in 2802 ms: …
instance 2: race on map bots:map/course (bots:gamemode/gully_race), lobby round 0; 0 players

Rules

Rule Refused with
the map's modes must offer the instance's mode … offers the modes [...], not trick
every mode but freeride needs the map's finish … has no volume named `end`, which a … needs
a gamemode needs a map (map, or a rotation entry with map) gamemode = "…": the instance rides no map under it
a map whose intro is the helicopter (intro = "heli") … starts in the helicopter (intro = "heli"), which a server does not run: a server's map starts at its spawn
a layout on a disc drop needs that drop's terrain … whose terrain is not in the rules folder …: `avalanche-server setup --with collision` takes it from the disc

A map that does not load is skipped with its reason, and the rotation moves on.

What players need

Nothing beyond the game: the map and the gamemode download with the server's other resources. Players see the map's title in the browser's details. A gamemode's server scripts run on the server; its client scripts, if any, in the players' games.

Gamemodes

A gamemode sets the event type (race, trick, survive …), its time limit, what time-up means and the medal targets of each map it lists. On a server its rules decide the round: the standings, when a run fails, the results. Its server scripts run as any resource's and may use the whole Server Script API, with the permissions the operator grants.

Clone this wiki locally