Limits
| Limit | Value |
|---|---|
| Source file | 1 MiB; the script stored with its source and settings must fit 2 MiB |
Saved .json game type | 4 MiB |
| Source structure | 262,144 tokens; 4,096 statements a block; 16 arguments a call, 16 values a function |
| Variables | See the variables table; a script's functions' values and locals count as its temporaries |
| Nesting | 32 levels in the file, 64 calls and blocks while running |
| Steps per event | 65,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 visits | 8,192 |
| Created objects | 2,048 at once |
| World changes in one tick | 4,096 |
| Trait sets | 16 |
| Options | 32 declared; script_option[0] to [15] read |
| Declared objects | 64 |
| Teams | 8, or up to 64 with declare team_count in Slayer, Oddball, King of the Hill, VIP and Territories; team names 1 to 24 bytes |
| Classes | 128, at most 48 a team; 2 to 8 teams with classes |
| Squads | 16 a team |
| Deploy points, waypoints | 64 deploy points at once; 64 waypoints shown at once |
| Aliases | An alias names a variable or a constant; its value has at most 64 parts |
| Sounds | 8 a tick; 16 looping at once |
| Weapon pickup bars, driver bars | 16 of each per player |
| HUD widgets | 32 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 |
| Attachments | Chains of up to 32 objects |
| Labels, model variants | 32 bytes; script labels (set_forge_label) on at most 1,024 objects |
| Tag paths | 256 bytes |
| Button presses | 10 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.
