Skip to main content
Every match progresses through eleven distinct phases. The server advances through them automatically; players interact with each phase via the custom UI panels that appear at the appropriate time.

Phase overview

#Internal constantNameWhat happens
1PHASE_LOADINGLoadingThe server waits for all players to connect and finish loading. Setup timers are suspended and auto-launch is disabled until this phase completes.
2PHASE_OPTION_VOTINGOption votingPlayers vote on high-level game settings — map variant, gamemode (All Pick, Single Draft, etc.), banning rules, and fast-start options. Votes are counted by percentage threshold.
3PHASE_OPTION_SELECTIONOption selectionRemaining options that were not resolved by vote are configured. The host or server defaults finalise the option set that will govern the rest of the match.
4PHASE_BANNINGBanningAbilities (and optionally heroes) are banned from the pool. Each player receives a limited number of bans. Invisibility abilities can also be banned globally if that option was voted in.
5PHASE_SELECTIONHero & ability selectionPlayers choose their hero and pick abilities from the filtered pool. This is the primary pick phase for standard All Pick and similar modes.
6PHASE_DRAFTINGDraftingPlaceholder phase reserved for draft-style modes (e.g. mirror draft). Players alternate picks from a shared pool of heroes and abilities.
7PHASE_RANDOM_SELECTIONRandom selectionUsed in All Random mode. The server automatically assigns a hero and a randomised ability build to each player. Players can still review their assigned build before the game starts.
8PHASE_REVIEWReviewAll players can inspect their finalised build and those of their teammates before heroes are spawned. No further changes can be made at this point.
9PHASE_SPAWN_HEROESSpawn heroesHeroes are created on the map. The item-picking panel becomes available simultaneously. Internally this phase transitions immediately into item picking.
10PHASE_ITEM_PICKINGItem pickingPlayers spend their starting gold on starting items from the shop before the game clock begins.
11PHASE_INGAMEIn-gameThe game clock starts, creeps spawn, and normal Dota 2 rules apply. Chat commands and in-game votes become available.

Phase transitions

Phase advancement is managed by the pregame controller (pregame.lua). Each phase has a configurable timer; when the timer expires the server calls setPhase with the next phase constant. Some transitions are gated — for example, the server will not leave PHASE_LOADING until all connected players have loaded.
The PHASE_DRAFTING constant exists in the code as a placeholder. Draft mode behaviour is partially implemented but may not be fully available in all map variants.

Build docs developers (and LLMs) love