Oblivion Mod:Mod File Format/SCPT

1 byte removed, 14:22, 17 September 2018
Holds the compiled script data. Note that an empty script (with just a "scriptname ...") has a 4-byte SCDA with a value of 0x00000001D.
The compiled script consists of a list of 2-byte opcodes, each followed by the 2-byte length of its arguments, optionally followed by the 2-byte number of arguments and the arguments itself. Arguments with a variable length (strings, RPN-encoded expressions and so on) have an additional 2-byte length prepending them. The only noteablenotable exception to this rule is the ''SetCurrentReference'' pseudo-instruction (represented as a single dot in the script editor), which consists only of its opcode (0x001C) and the 2-byte index of the SCRO subrecord to be used.
SCRO subrecords in expressions are referenced using 0x72, followed by the 2-byte index of the corresponding subrecord. SLSD/SLVR subrecords use 0x73, followed by the index. The first subrecord has the index 1.