GTA:SA Mission Editing Tools

Downloads

SADisAsm 2.0 (source)

Usage

sadisasm -input FILE [-external FILE] -output PATH -opcode FILE [-text FILE] [-data FILE] [-nowait] [-split none|missions|threads]

input
main.scm
external
script.img
output
Path where .gsr files will be written.
opcode
Opcode definition file (scm_sa.ini).
text
american.gxt
data
default.dat
nowait
Don't wait for [Enter] when done.
split
Output into a single file ('none'), a file for every mission & external ('missions'), or (the default) a file for every thread ('threads').

Script format

Threads, missions & externals are contained in blocks (thread|mission|extern NAME ... end). Variables defined outside of these blocks become globals, those defined inside become locals. Variables are defined with: int|float|name|string|timer NAME, NAME, .... Labels are defined by a name followed by a colon (NAME:).

Commands are given by either a keyword or a hexadecimal opcode number (preceded by an exclamation mark to negate), followed by its parameters. These parameters can be variable names, label names, mission names, external names, integers, floats (containing a decimal point), model names (preceded by a percent sign), names (enclosed in double quotes) or strings (enclosed in single quotes).

Ini format

The ini file contains a single section ('[opcodes]'). This section has lines in the following format: HexOpcode=NumParams,OpcodeName,ParamName,ParamName,...

The parameter names are optional. The first character of a parameter name should indicate its type:

i
Integer.
f
Float.
n
Name.
s
String.
b
Boolean.
l
Label.
o
Model.
O
Model, but only from the ides linked in default.dat. Use this when negative values have special meanings (for example, when creating a car generator, a value of -1 for the model means 'random').
e
External thread.
m
Mission
h
Handle.