GAM File Format

These files contain global variables for games and maps.

Structure

These files are found in two places. Most are in master.dat\maps\ and contains global variables for map. The names of these files correspond to the names of the relevant map files. The other file is VAULT13.GAM, in master.dat\data\, and stores global variables for the game.

Example file: MAP_GLOBAL_VARS:

MVAR_Last_Respawn_Map          :=0;            //      (0) MVAR_Current_Gecko_Easy        :=0;            //      (1) MVAR_Current_Gecko_Hard        :=0;            //      (2) MVAR_Current_Xander_Root       :=0;            //      (3) MVAR_Current_Broc_Flower       :=0;            //      (4) MVAR_Last_Spot                 :=0;            //      (5) MVAR_Kill_Runaway              :=0;            //      (6) MVAR_Dog_Already_Dead          :=0;            //      (7)

At the beginning there is a header - "MAP_GLOBAL_VARS:" in GAM files for maps and "GAME_GLOBAL_VARS:" in VAULT13.GAM.

Next is a list of variables - first the name (as in most programming languages it can contain Latin letters, numbers, and underscores, as in "MVAR_Last_Respawn_Map"), then the assignment operator (":=", like Pascal), then the initial value of the variable, and at the end a semicolon.

Variables are referred to in scripts by their number in the list (starting at zero).

Variable names are always written with capitalized internal words to distinguish them from map variables, and following each variable is a comment with its number. This is done for the convenience of programmers.

Comments are indicated by two slashes (//), like in C++.

Original document at teamx.ru (in russian)