What are VScripts?
Dota 2 custom games use a server-side Lua scripting system called VScripts. When a custom game loads, the Dota 2 engine executes a root entry point (addon_game_mode.lua) which bootstraps every other module using Lua’s require function or Valve’s LinkLuaModifier helper for modifier classes.
All scripts live under:
require:
Script file reference
| File | Purpose |
|---|---|
addon_game_mode.lua | Root entry point; wires up all game-mode events |
pregame.lua | Hero/skill selection phase — the most important file in Redux |
ingame.lua | Gameplay systems: respawning, gold balancing, towers, mutators |
commands.lua | All player-typed chat commands (vote, debug, and cheat commands) |
optionmanager.lua | Shared key–value store for game options |
util.lua | General-purpose utilities used across all other modules |
constants.lua | Hardcoded numeric constants shared across the project |
network.lua | Network table helpers for syncing state to clients |
chat.lua | Custom chat system used during the menu/lobby phase |
skillmanager.lua | Functions for swapping hero skills mid-game |
spellfixes.lua | Per-ability corrections, fixes, and balance patches |
dedicated.lua | Dedicated-server configuration helpers |
lod_debug.lua | Console commands for server-side debugging |
optionmanager.lua | Game option accessors (GetOption / SetOption) |
panorama_shop.lua | Layout and logic for the custom Panorama shop (from Angel Arena: Black Star) |
obstacles.lua | Obstacle spawn list for the deprecated Duel arena mechanic |
survival.lua | Incomplete co-op holdout game mode (Ash47) |
challenge.lua | Incomplete co-op holdout variant (Ash47) |
triggers.lua | Map trigger handlers |
stats_client.lua | Client-side statistics collection |
Directory structure
How scripts are loaded
pregame.lua is the main bootstrap file. It requires every other core module and calls LinkLuaModifier for every Lua-based modifier that the game needs:
pregame.lua loads the game’s KV (key-value) data into GameRules.KVs:

