DocsMegalithReference

Limits

LimitValue
Source file1 MiB; the script stored with its source and settings must fit 2 MiB
Saved .json game type4 MiB
Source structure262,144 tokens; 4,096 statements a block; 16 arguments a call, 16 values a function
VariablesSee the variables table; a script's functions' values and locals count as its temporaries
Nesting32 levels in the file, 64 calls and blocks while running
Steps per event65,536 in a game of up to 16 players; in a bigger game that many times the square of the players in sixteens, begun ones counted (262,144 with 17 to 32 players, 4,194,304 with 113 to 128), since a script's loops over the players nest
World objects a loop visits8,192
Created objects2,048 at once
World changes in one tick4,096
Trait sets16
Options32 declared; script_option[0] to [15] read
Declared objects64
Teams8, or up to 64 with declare team_count in Slayer, Oddball, King of the Hill, VIP and Territories; team names 1 to 24 bytes
Classes128, at most 48 a team; 2 to 8 teams with classes
Squads16 a team
Deploy points, waypoints64 deploy points at once; 64 waypoints shown at once
AliasesAn alias names a variable or a constant; its value has at most 64 parts
Sounds8 a tick; 16 looping at once
Weapon pickup bars, driver bars16 of each per player
HUD widgets32 a mode, with a copy for each player; 96 UTF-8 bytes of text each, value text included; a 1280 × 720 script screen; font sizes 8 to 72
AttachmentsChains of up to 32 objects
Labels, model variants32 bytes; script labels (set_forge_label) on at most 1,024 objects
Tag paths256 bytes
Button presses10 a second from each player

If an event fails, such as a division by zero, a value out of range or too many steps, its changes to the script's state are thrown away and the script stops for the rest of the game: the game goes on without it, and the host's log says why and where, by the line and column of the assignment, call or condition it stopped at, such as (line 948, column 16). Once world changes begin applying, a later failure can't undo earlier moves, deletions, points or team changes. A loop over every object on a busy map can reach the step limit even when each call is fine.