INT File Format

INT File Format is a type of game file used in Fallout and Fallout 2.

Background
INT files are compiled scripts, designed for animating the world of Fallout. They set the behavior of all objects on the maps, and are used to create dialogues with the characters in the game.

File Format
INT files consists of the following parts:


 * Script initialization code
 * A table of procedure descriptions
 * A list of the names of procedures and variables
 * A list of text strings
 * Script object initialization code
 * The body of procedures

Note: All numbers are stored in big-endian format (the most significant byte first).

Script Initialization Code
Script initialization code is for the transfer of control to script object initialization code and providing the correct procedure return addresses(?).

This part of an INT file should have a fixed size of 42 bytes, because that is the offset at which it looks for the table of procedures.

Table 2.1 - script initialization code

Table of procedures
The table of procedures contains information about all the available procedures in an INT file.

It should be noted that the first procedure in INT files is a procedure named '..............' (14 periods). This procedure does not have a body, and is designed to make indices of procedures start at 1, not 0.

Table 2.2-Table of procedures

List of procedure and variable names
This part of the INT file contains the names of script variables and procedures. It does not include the names of local variables declared within procedures.

Some information in this section may be redundant, since referring to global variables is done by index, not by name.

Table 2.3. List of names of procedures and variables

List of strings
This part of the INT file contains all the string constants used in the script. The format is the same as the list of procedure and variables. It is possible for this section to be empty (i.e. no strings are used).

Script object initialization code
This part of the script is to initialize global script variables, export and initialize variables, export procedures, and moving to the 'start' procedure (or returning to the script initialization code if there isn't one).

Table 2.5. Script object initialization code

Body of procedure code
This part of the INT file contains a sequence of opcodes implementing the procedures of the script.