DocsHostingConfiguration

Custom playlists

A playlist is a rotation of games, each a map with a game type, optionally with its own rules, or a co-op mission. A server running a playlist of three or more games lets players vote on what to play next:

  • Before each game, the lobby shows three games drawn at random from the whole playlist and None of the above, with a countdown (20 seconds unless you set another). The order of the file plays no part.
  • Each game comes up in proportion to its weight: one with "weight": 2 comes up twice as often as one without. The game just played sits out the next ballot.
  • The game with the most votes is played. Ties go to the game offered first. With no votes, the first game offered starts, so a quiet server plays games in proportion to their weights.
  • If None of the above wins outright, a new ballot opens with games that haven't been turned down yet.
  • An empty server keeps its ballot closed and opens a fresh one when a player arrives, or once min_players players are in.
  • A playlist of one or two games isn't voted on: the next game is drawn by weight.

1. Build the playlist

Pick maps and game types from what you have installed. The editor checks every game and writes the file for you.

By hand

Playlists are short JSON text files. Write one in any text editor, or edit one the game saved.

On the server itself, dedicated playlist new writes one from the command line, checked against the server's content; see names and playlists from the command line.

In the game:

  1. Open the Playlists pageIn a lobby you host, open Playlists, then NEW PLAYLIST.
  2. Add gamesChoose ADD A GAME, pick a map and a game type, and add them. Repeat for at least three games. Installed mod maps are in the map list too. ADD THE LOBBY'S GAME adds whatever the lobby is set up to play, rules included. The map list offers every supported game's maps you have installed, mod maps included. To have a game come up more often, select it and raise its WEIGHT, 1 to 100. REMOVE GAME, or Delete, takes the selected game out.
  3. Change a game's rules (optional)Select the game. RULES & OPTIONS opens them in the lobby, and SAVE TO PLAYLIST brings them back. The game's own rows set SPRINT (see sprint in a playlist), TEAM VOICE ONLY (see team voice in a playlist), ANTI-CHEAT (see single games without it) and its VOTE IMAGE.
  4. Follow the lobby's size (optional)BY PLAYERS, on the playlist and on each game, sets which lobby sizes they're for, and draws the voting time and each numeric option as a graph over the player count, with 2 to 5 points; ADVANCED has the line's shape and a formula. See games by lobby size.
  5. Save itName the playlist and choose SAVE PLAYLIST, which names anything still missing. Games that aren't installed are marked MISSING, and a misspelled name shows the name you probably meant. The file is saved in the Playlists folder of your player folder; OPEN FOLDER shows it.

Custom vote images

Each playlist entry can show its own PNG or JPEG in the vote. Put the file in content/Images on a dedicated server, or the Images folder in your player folder for a game you host. Select an entry in the playlist editor and set VOTE IMAGE to the file, or in JSON add "preview_image": "arena.jpg" to the entry. Without one, ballots show the map's art.

Use files of at most 4 MiB, with file names rather than paths. A playlist can share up to 32 different images; players receive them from the server without a separate download. A file that isn't a picture is logged, and that game keeps the map's art.

By hand, a playlist looks like this:

playlists/community.playlist.json
{
  "version": 2,
  "name": "Community Rotation",
  "vote_seconds": 30,
  "games": [
    { "map": "Guardian", "game": "Slayer", "weight": 2 },
    { "map": "Valhalla", "game": "Capture the Flag" },
    { "map": "The Pit", "game": "Slayer", "name": "Slayer to 50", "rules": { "score_to_win": 50 } },
    { "map": "Valhalla", "game": "Slayer", "name": "BR Starts",
      "options": { "player.primary_weapon": "Battle rifle", "player.secondary_weapon": "Magnum" } },
    { "map": "Maps/my_arena.json", "game": "Game Modes/snipers.bin" }
  ]
}

Names and playlists from the command line

The server itself lists the names it accepts, and writes and checks playlists, with no game client needed. Run these in the server folder. dedicated content lists every name map, game and playlist games accept: the folder's maps and game types, and its map variants and game variants, then every campaign a campaign server can host, with its missions. Words narrow the list:

Shell
project-reclaimer dedicated content                 # every map and game type; variants are counted
project-reclaimer dedicated content snipers         # only names containing "snipers"
project-reclaimer dedicated content mlg guardian    # every word must match

Halo 3's own and matchmaking variants run into the hundreds, so without words they're counted rather than listed.

dedicated playlist new makes a playlist of every map with every game type, checks each game against the server's content and writes it to playlists/; dedicated playlist checks every playlist file and names the servers that play it; dedicated playlist show lists one playlist's games, how often each comes up, and their options:

Shell
project-reclaimer dedicated playlist new "Team Slayer" --maps "Guardian,Valhalla,The Pit" --games Slayer
project-reclaimer dedicated playlist                # every playlist, its servers, and whether it can be played
project-reclaimer dedicated playlist show slayer    # its games, how often each comes up, what is wrong
Output
Wrote playlists/team-slayer.playlist.json with 3 games:
  Slayer on Guardian
  Slayer on Valhalla
  Slayer on The Pit
In a [[server]] block: playlist = "playlists/team-slayer.playlist.json"
  • --maps and --games take names separated by commas, as dedicated content lists them. playlist new makes at least three games, so name enough maps or game types.
  • A name it doesn't know writes nothing and says what was probably meant. --replace overwrites a playlist file of the same name, and --vote-seconds sets the voting time (20 unless set).
  • Edit the file afterwards to set weights, names, rules and options; see the playlist file reference.
  • playlist show takes the file, or part of its name in playlists/.
  • In Docker, run them in a server's container: docker compose run --rm server-1 dedicated content snipers.

2. Put it on the server

Copy the playlist file into the server folder's playlists/ folder. If it uses your own saved maps or game types, copy those too: saved maps from your player folder's Maps into content/Maps, and game types from its Game Modes into content/Game Modes. Also make sure the server's game/ folder has every base map the playlist uses.

3. Point a server at it

In dedicated.toml, set playlist on a server (or under [defaults] for every server). Remove any map, game or variant from that server.

dedicated.toml
[[server]]
name = "Community Rotation"
port = 49176
playlist = "playlists/community.playlist.json"
max_players = 12

4. Check it

Shell
project-reclaimer dedicated check

check resolves every game in the playlist against the game and content folders and names anything missing, by game number, with the name you probably meant when one is close: game 2: no multiplayer map "Valhala" is installed; as a variant: Map 'Valhala' was not found. Did you mean 'Valhalla'? Running servers check and take up a saved playlist by themselves, from their next vote; see changing settings while servers run.

To add a Halo 3 map missing from a server folder made with --maps, run dedicated init . --from "your game's folder" --maps "the map" in that folder on a PC with the game: it adds the missing files and keeps your settings.

To try a playlist on one PC, use it in a lobby you host: USE IN THIS LOBBY on the Playlists page. In a lobby on this PC alone, it hosts the lobby at once so the vote can open.

Playlist file reference

name
The playlist's name, shown in the lobby.
vote_seconds
Voting time, 5 to 120 seconds. Optional; 20 by default. A curve makes it follow the lobby's size.
players, recommended_players
Optional. The lobby sizes the playlist is for, and the sizes it's best with, such as "8-24". See games by lobby size.
version
File format version. Optional; 2, the only one.
games
The rotation: 1 to 256 games, voted on from three up. Their order doesn't matter: ballots draw them at random by weight.

Each game in games is a multiplayer game, or a co-op entry:

map
A base map by its title, file name or ID ("Valhalla" or "riverworld"), a saved map in content/Maps ("Maps/my_arena.json"), the name stored inside a saved map, or a mod map: "workshop:item ID/map file name", or its name. Base maps win over saved maps with the same name.
base_map
Optional, only when map names a map variant file: the map it plays on, named as map names one, when a mod shares the map number stored in the file. See Forge variants on mod maps.
game
A game type by its name or key ("Slayer", "Capture the Flag", "ctf"), "Forge", Halo 3's own variants by the names the game shows ("Team Slayer", "Mosh Pit"; their older file names still work), a file in content/Game Modes, or the name stored inside a saved game type. Game types win over saved ones with the same name.
weight
Optional. How often ballots offer this game compared with the others, 1 to 100; 1 when left out. A game can't be listed twice: raise its weight instead.
players, recommended_players
Optional. The lobby sizes this game is offered at, and the sizes it's offered more often at. See games by lobby size.
name
Optional. The name players see for this game.
teams
Optional. true or false over the game type's own default.
rules
Optional. Slayer's scoring: score_to_win, kill_points, death_points, suicide_points, betrayal_points, such as { "score_to_win": 50 }. For other game types, use options.
options
Optional. Game options layered over the game type, keyed section.key. Values are a number, a switch or the option's label as the game shows it, ignoring case. A numeric option also takes a curve over the lobby's size. This includes each game type's rules, such as King of the Hill's moving hill: { "mode.hill_movement": 4, "mode.hill_order": 1 } moves the hill every minute, in the map's order.
world
Optional. World settings for this game: sprint (see sprint in a playlist), player_scale_percent (25 to 300), exposure (0.1 to 4.0), atmospheric_fog, and riders_carried (true: players on or in a moving vehicle stay where they are on it, for everyone; Experimental, enhanced networking only).
anti_cheat
Optional. false plays this game without the anti-cheat, for a map or game type whose physics or scripts behave unusually enough to risk a wrong kick. Left out, the server's own setting applies; an entry can only turn the anti-cheat off, never on.
auto_teams
Optional. false makes no automatic team shuffle or balance before this game, so its creator's teams stay. See shuffles and balances.
voice_team_only
Optional. true keeps voice to teammates while this game plays. Left out or false, the server's own settings apply. See team voice in a playlist.
preview_image
Optional. The game's picture on ballots, a PNG or JPEG in content/Images. See custom vote images.

Names are matched ignoring case. A field the file format doesn't know stops the playlist, naming the game. Some option keys to start with:

player.primary_weapon
"Battle rifle", or "Random" for a new one at every spawn
player.secondary_weapon
"Magnum", or "Map default" for the map's own
map.weapons
which weapons are placed on the map
map.vehicles
"None"
rounds.limit
3 (one round unless set)
rounds.early_victory
off unless set
map.flashlight
"On": Experimental, off unless set. See flashlight.

Flashlight (Experimental, off by default, new in 0.10.12). A game type's Flashlight option, with the map options, lets players light their own flashlight in multiplayer; "options": { "map.flashlight": "On" } turns it on for one game of a playlist. The flashlight button then lights or darkens a player's own light, and the server tells every player who is lit, also a player who joins mid-game. In this first version it works for the bodies that carry a light of their own, such as Spartans. Off is Halo 3's multiplayer as it was. Known issue: on some servers it works only in the first game of a lobby; a fix follows.

The easiest way to get option keys right is to change the options in a lobby and use SAVE TO PLAYLIST: the editor writes only the settings that differ, with their exact keys. An unknown key or label is reported by game number, with the choices it has.

Games by lobby size

A playlist, and each of its games, can name the lobby sizes it's for, so a server offers small maps to a few players and big ones to a full lobby:

playlists/big-team.playlist.json
{ "version": 2, "name": "Big Team", "players": "8-24", "recommended_players": "12-20", "games": [
  { "map": "Sandtrap", "game": "Big Team CTF", "players": "12+" },
  { "map": "Valhalla", "game": "Team Slayer", "recommended_players": "8-16" },
  { "map": "Standoff", "game": "Assault" } ] }
  • players is a limit: outside it, a game is never offered while three other games fit. A game needs both its own range and its playlist's to allow the lobby's size, and an entry's range outside its playlist's is an error.
  • recommended_players is a preference: inside it, a game counts four times its weight.
  • Ranges are written "8-20", "12+", "16" or as a bare number, from 1 to 128. Saved maps and game variants can carry ranges of their own.
  • The lobby's size is its players, split-screen players included, and the server follows it through each game, so someone who joins during play counts for the next ballot. One player coming or going counts once it has lasted 10 seconds, so a player at a range's edge doesn't flip the ballot; two or more, and the first players of an empty lobby, count at once.
  • When too few games fit, the ballot is filled with the games nearest the lobby's size, and the log warns Playlist warning: fewer than three games allow N players. At its start, dedicated names every lobby size from 1 to max_players where that happens.
  • A playlist with no ranges anywhere draws exactly as before.

Several playlists by lobby size

A server can also play several playlists, each for its own lobby sizes. Set playlists on a [[server]] or under [defaults], in place of playlist, with up to 16 files. Each entry may give the sizes it's for, which replace the file's own:

dedicated.toml
[[server]]
name = "Community Rotation"
port = 49176
max_players = 24
playlists = [
  { file = "playlists/small.playlist.json", players = "1-8" },
  { file = "playlists/big.playlist.json", players = "9+", recommended_players = "12-24" },
]
  • Each ballot draws from the games of every playlist whose range allows the lobby's size. A game several of them list is one game, at its best weight.
  • The ballot's title names the playlists in play, such as Small + Big where ranges overlap, and its voting time is the first of those playlists'.
  • The remote console's status gives the lobby size a ballot was drawn for and the playlists in play.
  • Every listed file is watched: an edit applies from the next vote.

Settings by lobby size

A game's numeric options and a playlist's vote_seconds can follow the lobby's size. In place of a number, give a curve through points of players and value:

playlists/grows.playlist.json
{ "version": 2, "name": "Grows",
  "vote_seconds": { "points": [[2, 15], [16, 25], [64, 30]] },
  "games": [
    { "map": "Valhalla", "game": "ctf", "options": {
        "rounds.minutes": { "points": [[4, 5], [16, 10], [32, 15]], "interpolation": "steps" },
        "respawn.seconds": { "formula": "3 + p/8", "max": 6 } } } ] }
  • Points: 1 to 32 of them, with players from 1 to 128 in rising order. The curve holds its first value below the first point and its last above the last.
  • interpolation: "linear", the default, draws straight lines between the points; "steps" keeps each point's value until the next; "smooth" draws a curve through them that never overshoots a point. min and max bound the result.
  • A formula in place of points is written in p, the player count, with numbers, + - * / ^, brackets and min, max, clamp(x, lo, hi), abs, sqrt, ln, log10, exp, round, floor and ceil. It must give a number at every size from 1 to 128. A curve has points or a formula, not both, and an error names the character that's wrong.
  • An option takes its curve's value rounded, and every value the curve can give must be in the option's range, checked as the playlist loads. vote_seconds stays within 5 to 120 at every size.
  • When it's read: an option as the server gets the game ready, for the lobby's size then, and it holds for the whole game. The log says so: Slayer on Guardian for 9 players: rounds.minutes = 8. vote_seconds is read as each ballot opens.
  • Combat Evolved's and Halo 2's maps take no options, so no curves either; their lobby sizes work like any other game's.

Server weights

A server's weights say how often it picks each map, game type or game by itself, over whatever playlists it plays, without editing them. Set them under [defaults.weights], or in a server's own weights:

dedicated.toml
[defaults.weights]
maps = { "Guardian" = 0.5 }
game_types = { "Oddball" = 0 }
games = [{ map = "Sandtrap", game = "Big Team Slayer", weight = 3 }]
  • 1 is normal and 10 the most. 0 means never by itself: the game stays listed and installed, and nextmap, load and queued games still reach it.
  • A game named in games takes that weight alone. Any other game's is its map's weight times its game type's, times its playlist entry's own.
  • They apply at once. The remote console's weights shows each game's share and any name that matches nothing, and weight changes one until a restart or until a reload changes the file's weights.

Sprint in a playlist

Playlist games can play with sprint. It's off for every playlist game unless its entry turns it on, even when the entry's map or game type has sprint. Choose with the playlist editor's SPRINT row, or set "sprint" under "world" in the entry:

Playlist entry
{ "map": "Valhalla", "game": "Slayer", "name": "Sprint Slayer", "world": { "sprint": "stamina" } }
sprint
"off", "unlimited" or "stamina". Off when left out.
sprint_speed_percent
Sprint speed, 110 to 200 percent; 150 when left out.
sprint_stamina_seconds
With "stamina", how long a full meter lasts, 1 to 30 seconds; 5 when left out.

Players hold Left Shift while running forward to sprint, or click the left stick on a controller.

Co-op games in a playlist

A playlist can hold co-op games beside multiplayer ones. An entry with campaign is a mission of Halo 3's campaign, and an entry with odst a game of Halo 3: ODST, set up as a server's own campaign or odst, with a weight beside it:

playlists/mixed.playlist.json
{
  "version": 2,
  "name": "Mixed",
  "games": [
    { "map": "Guardian", "game": "Slayer", "weight": 3 },
    { "campaign": { "mission": 3010, "difficulty": "heroic" }, "weight": 1 },
    { "odst": { "mission": 6100, "difficulty": "heroic" }, "weight": 1 },
    { "odst": { "mode": "firefight", "mission": 6100, "insertion": 4 } }
  ]
}
  • A co-op game starts with every player, so load_timeout applies to these entries, and to no multiplayer one.
  • A co-op game follows another in the same server. The server starts again between a co-op game and a multiplayer one, which takes a moment: its players are told, and their games join it again by themselves.
  • When a co-op entry's mission is over, won or ended, the playlist's next game follows.
  • The server needs what the entry needs, such as ODST's files, and an entry that needs ODST is named in the listing: players without it see NEEDS ODST.
  • Co-op games hold at most 16 players, so keep such a server's max_players at 16.
  • A playlist's campaign entries play Halo 3's own campaign; an odst entry names its mission by number, file or title, such as { "odst": { "mission": "sc100" } }. Other games' campaigns and mods' campaigns are hosted by a server's own campaign.
  • A server with fighting bots can't have co-op entries in its rotation.

Mod maps in a playlist

Playlist games can be on mod maps. Pick them in the game's editor, which saves them by their Workshop item, or write them by hand: workshop:, the Workshop item's ID, a slash and the map's file name without .map. A mod map's name works too.

playlists/modded.playlist.json
{
  "version": 2,
  "name": "Modded customs",
  "games": [
    { "map": "workshop:2981234567/arena", "game": "Capture the Flag" },
    { "map": "workshop:2981234567/arena", "game": "Slayer" },
    { "map": "Guardian", "game": "Gun Game" }
  ]
}
  • The ID is the number after id= in the item's Workshop address. A server downloads the items its playlist names before it starts (see Workshop downloads), and dedicated mods prints the reference of every mod map it has, ready to paste.
  • Players are told every game's mods as they join, and get them once, from Steam Workshop or the server. Before each game's countdown, every player's game starts preparing the map that won the vote. A multiplayer game then begins with whoever has it ready, and the others come in as theirs finishes.

Forge variants on mod maps

A Forge variant file (.mvar or .bin) stores only its map's number, and some mods reuse another map's: a Warlock port can share Icebox's, for example. A variant that comes in its map's own Workshop package plays on that map with nothing to set. Any other plays on the installed map with that number, unless the entry names the map it was made on in base_map, written like map, such as "workshop:item ID/map file name":

Playlist entry
{ "map": "MLG Warlock V9", "base_map": "workshop:2977651586/warlock", "game": "2V2 HARDCORE TS" }

A server's map and game take it the same way:

dedicated.toml
[[server]]
name = "MLG Warlock"
port = 49176
map = "MLG Warlock V9"
base_map = "workshop:2977651586/warlock"
game = "2V2 HARDCORE TS"
  • A base_map the variant wasn't made on is refused: 'X' was not made on Y.
  • A server downloads the Workshop items base_map names like those in map.
  • A server's or playlist's variant file saved on a mod map may not find that map yet: name the map in map and the variant in game instead.

Forge maps Project Reclaimer saves as .json name their mod map themselves. Name the saved map in map and leave out base_map. The server uses its own installed copy of the mod, even when the map was saved on another PC with the mod in another folder.

Playlist entry
{ "map": "hugegrass_balanced", "game": "Slayer" }

Rules and limits

  • No game may repeat another. Changed rules or options make a different game; a renamed but otherwise identical game is still a repeat. To offer a game more often, give it a weight.
  • A playlist can use up to 23 different mod maps, from at most 16 mods. Two mod maps whose map IDs clash, or two different mods' maps with the same file name, can't be in one playlist.
  • A playlist stores no server settings, so it works for anyone with the same maps and game types. Share it freely.