ScriptFile Asset
The scriptfile asset is used on Modern Warfare 3, Ghosts, and Advanced Warfare. It is Infinity Ward's attempt at protecting their game scripts from being modified. Compared to Treyarch's scriptparsetree, the scriptfile gives away less information on identifying which game script file it originated from. All unnecessary strings have been removed and file names have even been renamed as number id's.
struct ScriptFile
{
const char *name;
int compressedLen;
int len;
int bytecodeLen;
const char *buffer;
char *bytecode;
};Buffer
The buffer is a zlib compressed section in which the compressed size is equal to compressedLen and it's uncompressed size is equal to len.
This section of data is not needed during runtime. Before being executed, the linker runs through the bytecode once and links the buffer and bytecode section together so that all programs can be ran as one. It contains strings and function call info.
In order to be linked correctly, the buffer and bytecode section must be read synchronously (e.g. when reading the OP_GetString opcode, the buffer pointer must be pointing to the string ready to be loaded). The linker does this by incrementing the buffer pointer each time it reads an opcode that uses it.
At the beginning of each function, the linker loads a 32 bit value, which is the length of the function in the program section. Then it loads a 16 bit value which is the function id. If the id is equal to zero, then it will load a string after it, which is the name of the function. After this, the opcodes may begin to use the data section. The opcodes that use the data section are OP_GetAnimTree, OP_GetString, OP_GetIString, OP_GetAnimation, OP_GetFarFunction, OP_EvalLevelFieldVariable, OP_EvalAnimFieldVariable, OP_EvalSelfFieldVariable, OP_EvalFieldVariable, OP_EvalLevelFieldVariableRef, OP_EvalAnimFieldVariableRef, OP_EvalSelfFieldVariableRef, OP_EvalFieldVariableRef, OP_ClearFieldVariable, OP_SetLevelFieldVariableField, OP_SetSelfFieldVariableField, all the far call opcodes, and OP_endswitch.
Byte Code
The byte is the actual compiled game script code.
Operation Codes
Modern Warfare 3
XBOX & PS3
#define OP_End 0
#define OP_Return 1
#define OP_GetUndefined 2
#define OP_GetZero 3
#define OP_GetByte 4
#define OP_GetAnimTree 5
#define OP_GetNegByte 6
#define OP_GetUnsignedShort 7
#define OP_GetNegUnsignedShort 8
#define OP_GetInteger 9
#define OP_GetBuiltinFunction 0xA
#define OP_GetBuiltinMethod 0xB
#define OP_GetFloat 0xC
#define OP_GetString 0xD
#define OP_GetIString 0xE
#define OP_GetVector 0xF
#define OP_GetLevelObject 0x10
#define OP_GetAnimObject 0x11
#define OP_GetSelf 0x12
#define OP_GetThisthread 0x13
#define OP_GetLevel 0x14
#define OP_GetGame 0x15
#define OP_GetAnim 0x16
#define OP_GetAnimation 0x17
#define OP_GetGameRef 0x18
#define OP_GetLocalFunction 0x19
#define OP_GetFarFunction 0x1A
#define OP_CreateLocalVariable 0x1B
#define OP_RemoveLocalVariables 0x1C
#define OP_EvalLocalVariableCached0 0x1D
#define OP_EvalLocalVariableCached1 0x1E
#define OP_EvalLocalVariableCached2 0x1F
#define OP_EvalLocalVariableCached3 0x20
#define OP_EvalLocalVariableCached4 0x21
#define OP_EvalLocalVariableCached5 0x22
#define OP_EvalLocalVariableCached 0x23
#define OP_EvalLocalArrayCached 0x24
#define OP_EvalArray 0x25
#define OP_EvalLocalArrayRefCached0 0x26
#define OP_EvalNewLocalArrayRefCached0 0x27
#define OP_EvalLocalArrayRefCached 0x28
#define OP_EvalArrayRef 0x29
#define OP_ClearArray 0x2A
#define OP_EmptyArray 0x2B
#define OP_AddArray 0x2C
#define OP_GetSelfObject 0x2D
#define OP_EvalLevelFieldVariable 0x2E
#define OP_EvalAnimFieldVariable 0x2F
#define OP_EvalSelfFieldVariable 0x30
#define OP_EvalFieldVariable 0x31
#define OP_EvalLevelFieldVariableRef 0x32
#define OP_EvalAnimFieldVariableRef 0x33
#define OP_EvalSelfFieldVariableRef 0x34
#define OP_EvalFieldVariableRef 0x35
#define OP_ClearFieldVariable 0x36
#define OP_SafeCreateVariableFieldCached 0x37
#define OP_SafeSetVariableFieldCached0 0x38
#define OP_SafeSetVariableFieldCached 0x39
#define OP_SafeSetWaittillVariableFieldCached 0x3A
#define OP_clearparams 0x3B
#define OP_checkclearparams 0x3C
#define OP_EvalLocalVariableRefCached0 0x3D
#define OP_EvalNewLocalVariableRefCached0 0x3E // nop
#define OP_EvalLocalVariableRefCached 0x3F
#define OP_SetLevelFieldVariableField 0x40
#define OP_SetVariableField 0x41
#define OP_ClearVariableField 0x42 // nop
#define OP_SetAnimFieldVariableField 0x43
#define OP_SetSelfFieldVariableField 0x44
#define OP_SetLocalVariableFieldCached0 0x45
#define OP_SetNewLocalVariableFieldCached0 0x46
#define OP_SetLocalVariableFieldCached 0x47
#define OP_ClearLocalVariableFieldCached 0x48
#define OP_ClearLocalVariableFieldCached0 0x49
#define OP_CallBuiltin0 0x4A
#define OP_CallBuiltin1 0x4B
#define OP_CallBuiltin2 0x4C
#define OP_CallBuiltin3 0x4D
#define OP_CallBuiltin4 0x4E
#define OP_CallBuiltin5 0x4F
#define OP_CallBuiltin 0x50
#define OP_CallBuiltinMethod0 0x51
#define OP_CallBuiltinMethod1 0x52
#define OP_CallBuiltinMethod2 0x53
#define OP_CallBuiltinMethod3 0x54
#define OP_CallBuiltinMethod4 0x55
#define OP_CallBuiltinMethod5 0x56
#define OP_CallBuiltinMethod 0x57
#define OP_wait 0x58
#define OP_waittillFrameEnd 0x59
#define OP_PreScriptCall 0x5A
#define OP_ScriptLocalFunctionCall2 0x5B
#define OP_ScriptLocalFunctionCall 0x5C
#define OP_ScriptLocalMethodCall 0x5D
#define OP_ScriptLocalThreadCall 0x5E
#define OP_ScriptLocalChildThreadCall 0x5F
#define OP_ScriptLocalMethodThreadCall 0x60
#define OP_ScriptLocalMethodChildThreadCall 0x61
#define OP_ScriptFarFunctionCall2 0x62
#define OP_ScriptFarFunctionCall 0x63
#define OP_ScriptFarMethodCall 0x64
#define OP_ScriptFarThreadCall 0x65
#define OP_ScriptFarChildThreadCall 0x66
#define OP_ScriptFarMethodThreadCall 0x67
#define OP_ScriptFarMethodChildThreadCall 0x68
#define OP_ScriptFunctionCallPointer 0x69
#define OP_ScriptMethodCallPointer 0x6A
#define OP_ScriptThreadCallPointer 0x6B
#define OP_ScriptMethodChildThreadCallPointer 0x6C
#define OP_ScriptMethodThreadCallPointer 0x6D
#define OP_ScriptMethodChildThreadCallPointer 0x6E
#define OP_CallBuiltinPointer 0x6F
#define OP_CallBuiltinMethodPointer 0x70
#define OP_DecTop 0x71
#define OP_CastFieldObject 0x72
#define OP_EvalLocalVariableObjectCached 0x73
#define OP_CastBool 0x74
#define OP_BoolNot 0x75
#define OP_BoolComplement 0x76
#define OP_JumpOnFalse 0x77
#define OP_JumpOnTrue 0x78
#define OP_JumpOnFalseExpr 0x79
#define OP_JumpOnTrueExpr 0x7A
#define OP_jump 0x7B
#define OP_jumpback 0x7C
#define OP_inc 0x7D
#define OP_dec 0x7E
#define OP_bit_or 0x7F
#define OP_bit_ex_or 0x80
#define OP_bit_and 0x81
#define OP_equality 0x82
#define OP_inequality 0x83
#define OP_less 0x84
#define OP_greater 0x85
#define OP_less_equal 0x86
#define OP_greater_equal 0x87
#define OP_shift_left 0x88
#define OP_shift_right 0x89
#define OP_plus 0x8A
#define OP_minus 0x8B
#define OP_multiply 0x8C
#define OP_divide 0x8F
#define OP_mod 0x8E
#define OP_size 0x8F
#define OP_waittillmatch 0x90
#define OP_waittillmatch2 0x91 // nop
#define OP_waittill 0x92
#define OP_notify 0x93
#define OP_endon 0x94
#define OP_voidCodepos 0x95
#define OP_switch 0x96
#define OP_endswitch 0x97
#define OP_vector 0x98PC
#define OP_End 0x0
#define OP_Return 0x1
#define OP_GetByte 0x2
#define OP_GetNegByte 0x3
#define OP_GetUnsignedShort 0x4
#define OP_GetNegUnsignedShort 0x5
#define OP_GetInteger 0x6
#define OP_GetBuiltinFunction 0x7
#define OP_GetBuiltinMethod 0x8
#define OP_GetFloat 0x9
#define OP_GetString 0xA
#define OP_GetUndefined 0xB
#define OP_GetZero 0xC
#define OP_waittillFrameEnd 0xD
#define OP_CreateLocalVariable 0xE
#define OP_RemoveLocalVariables 0xF
#define OP_EvalLocalVariableCached0 0x10
#define OP_EvalLocalVariableCached1 0x11
#define OP_EvalLocalVariableCached2 0x12
#define OP_EvalLocalVariableCached3 0x13
#define OP_EvalLocalVariableCached4 0x14
#define OP_EvalLocalVariableCached5 0x15
#define OP_EvalLocalVariableCached 0x16
#define OP_EvalLocalArrayCached 0x17
#define OP_EvalArray 0x18
#define OP_EvalNewLocalArrayRefCached0 0x19
#define OP_EvalLocalArrayRefCached0 0x1A
#define OP_EvalLocalArrayRefCached 0x1B
#define OP_EvalArrayRef 0x1C
#define OP_ClearArray 0x1D
#define OP_EmptyArray 0x1E
#define OP_AddArray 0x1F
#define OP_PreScriptCall 0x20
#define OP_ScriptLocalFunctionCall2 0x21
#define OP_ScriptLocalFunctionCall 0x22
#define OP_ScriptLocalMethodCall 0x23
#define OP_ScriptLocalThreadCall 0x24
#define OP_ScriptLocalChildThreadCall 0x25
#define OP_ScriptLocalMethodThreadCall 0x26
#define OP_ScriptLocalMethodChildThreadCall 0x27
#define OP_ScriptFarFunctionCall2 0x28
#define OP_ScriptFarFunctionCall 0x29
#define OP_ScriptFarMethodCall 0x2A
#define OP_ScriptFarThreadCall 0x2B
#define OP_ScriptFarChildThreadCall 0x2C
#define OP_ScriptFarMethodThreadCall 0x2D
#define OP_ScriptFarMethodChildThreadCall 0x2E
#define OP_ScriptFunctionCallPointer 0x2F
#define OP_ScriptMethodCallPointer 0x30
#define OP_ScriptThreadCallPointer 0x31
#define OP_ScriptMethodChildThreadCallPointer 0x32
#define OP_ScriptMethodThreadCallPointer 0x33
#define OP_ScriptMethodChildThreadCallPointer 0x34
#define OP_CallBuiltinPointer 0x35
#define OP_CallBuiltinMethodPointer 0x36
#define OP_GetIString 0x37
#define OP_GetVector 0x38
#define OP_GetLevelObject 0x39
#define OP_GetAnimObject 0x3A
#define OP_GetSelf 0x3B
#define OP_GetThisthread 0x3C
#define OP_GetLevel 0x3D
#define OP_GetGame 0x3E
#define OP_GetAnim 0x3F
#define OP_GetAnimation 0x40
#define OP_GetGameRef 0x41
#define OP_inc 0x42
#define OP_dec 0x43
#define OP_bit_or 0x44
#define OP_JumpOnFalseExpr 0x45
#define OP_bit_ex_or 0x46
#define OP_bit_and 0x47
#define OP_equality 0x48
#define OP_inequality 0x49
#define OP_less 0x4A
#define OP_greater 0x4B
#define OP_JumpOnTrueExpr 0x4C
#define OP_less_equal 0x4D
#define OP_jumpback 0x4E
#define OP_waittillmatch2 0x4F // nop
#define OP_waittill 0x50
#define OP_notify 0x51
#define OP_endon 0x52
#define OP_voidCodepos 0x53
#define OP_switch 0x54
#define OP_endswitch 0x55
#define OP_vector 0x56
#define OP_JumpOnFalse 0x57
#define OP_greater_equal 0x58
#define OP_shift_left 0x59
#define OP_shift_right 0x5A
#define OP_plus 0x5B
#define OP_jump 0x5C
#define OP_minus 0x5D
#define OP_multiply 0x5E
#define OP_divide 0x5F
#define OP_mod 0x60
#define OP_JumpOnTrue 0x61
#define OP_size 0x62
#define OP_waittillmatch 0x63
#define OP_GetLocalFunction 0x64
#define OP_GetFarFunction 0x65
#define OP_GetSelfObject 0x66
#define OP_EvalLevelFieldVariable 0x67
#define OP_EvalAnimFieldVariable 0x68
#define OP_EvalSelfFieldVariable 0x69
#define OP_EvalFieldVariable 0x6A
#define OP_EvalLevelFieldVariableRef 0x6B
#define OP_EvalAnimFieldVariableRef 0x6C
#define OP_EvalSelfFieldVariableRef 0x6D
#define OP_EvalFieldVariableRef 0x6E
#define OP_ClearFieldVariable 0x6F
#define OP_SafeCreateVariableFieldCached 0x70
#define OP_SafeSetVariableFieldCached0 0x71
#define OP_SafeSetVariableFieldCached 0x72
#define OP_SafeSetWaittillVariableFieldCached 0x73
#define OP_GetAnimTree 0x74
#define OP_clearparams 0x75
#define OP_checkclearparams 0x76
#define OP_EvalLocalVariableRefCached0 0x77
#define OP_EvalNewLocalVariableRefCached0 0x78 // nop
#define OP_EvalLocalVariableRefCached 0x79
#define OP_SetLevelFieldVariableField 0x7A
#define OP_SetVariableField 0x7B
#define OP_ClearVariableField 0x7C // nop
#define OP_SetAnimFieldVariableField 0x7D
#define OP_SetSelfFieldVariableField 0x7E
#define OP_SetLocalVariableFieldCached0 0x7F
#define OP_SetNewLocalVariableFieldCached0 0x80
#define OP_SetLocalVariableFieldCached 0x81
#define OP_ClearLocalVariableFieldCached 0x82
#define OP_ClearLocalVariableFieldCached0 0x83
#define OP_CallBuiltin0 0x84
#define OP_CallBuiltin1 0x85
#define OP_CallBuiltin2 0x86
#define OP_CallBuiltin3 0x87
#define OP_CallBuiltin4 0x88
#define OP_CallBuiltin5 0x89
#define OP_CallBuiltin 0x8A
#define OP_CallBuiltinMethod0 0x8B
#define OP_CallBuiltinMethod1 0x8C
#define OP_CallBuiltinMethod2 0x8D
#define OP_CallBuiltinMethod3 0x8E
#define OP_CallBuiltinMethod4 0x8F
#define OP_CallBuiltinMethod5 0x90
#define OP_CallBuiltinMethod 0x91
#define OP_wait 0x92
#define OP_DecTop 0x93
#define OP_CastFieldObject 0x94
#define OP_EvalLocalVariableObjectCached 0x95
#define OP_CastBool 0x96
#define OP_BoolNot 0x97
#define OP_BoolComplement 0x98Ghosts
The opcodes for Ghosts do the exact same thing as the Modern Warfare 3 opcodes, only their values seem to be scrambled in some way.
XBOX & PS3 & Wii U
#define OP_CastFieldObject 0x1D
#define OP_SetLocalVariableFieldCached 0x1E
#define OP_plus 0x1F
#define OP_RemoveLocalVariables 0x20
#define OP_EvalSelfFieldVariableRef 0x21
#define OP_ScriptFarMethodChildThreadCall 0x22
#define OP_GetGameRef 0x23
#define OP_EvalAnimFieldVariable 0x24
#define OP_EvalLevelFieldVariableRef 0x25
#define OP_GetThisthread 0x26
#define OP_greater 0x27
#define OP_waittillmatch 0x28
#define OP_shift_right 0x29
#define OP_dec 0x2A
#define OP_JumpOnTrue 0x2B
#define OP_bit_or 0x2C
#define OP_equality 0x2D
#define OP_ClearLocalVariableFieldCached0 0x2E
#define OP_notify 0x2F
#define OP_GetVector 0x30
#define OP_ScriptMethodChildThreadCallPointer 0x31
#define OP_voidCodepos 0x32
#define OP_GetByte 0x33
#define OP_ScriptFarMethodThreadCall 0x34
#define OP_SetSelfFieldVariableField 0x35
#define OP_JumpOnFalseExpr 0x36
#define OP_GetUndefined 0x37
#define OP_jumpback 0x38
#define OP_JumpOnTrueExpr 0x39
#define OP_CallBuiltin0 0x3A
#define OP_CallBuiltin1 0x3B
#define OP_CallBuiltin2 0x3C
#define OP_CallBuiltin3 0x3D
#define OP_CallBuiltin4 0x3E
#define OP_CallBuiltin5 0x3F
#define OP_CallBuiltin 0x40
#define OP_SetLocalVariableFieldCached0 0x41
#define OP_ClearFieldVariable 0x42
#define OP_GetLevel 0x43
#define OP_size 0x44
#define OP_SafeSetWaittillVariableFieldCached 0x45
#define OP_ScriptLocalThreadCall 0x46
#define OP_AddArray 0x47
#define OP_endon 0x48
#define OP_EvalFieldVariable 0x49
#define OP_shift_left 0x4A
#define OP_EvalLocalArrayRefCached0 0x4B
#define OP_Return 0x4C
#define OP_CreateLocalVariable 0x4D
#define OP_SafeSetVariableFieldCached0 0x4E
#define OP_GetBuiltinFunction 0x4F
#define OP_ScriptLocalMethodCall 0x50
#define OP_CallBuiltinMethodPointer 0x51
#define OP_ScriptLocalChildThreadCall 0x52
#define OP_GetSelfObject 0x53
#define OP_GetGame 0x54
#define OP_SetLevelFieldVariableField 0x55
#define OP_EvalArray 0x56
#define OP_GetSelf 0x57
#define OP_End 0x58
#define OP_EvalSelfFieldVariable 0x59
#define OP_less_equal 0x5A
#define OP_EvalLocalVariableCached0 0x5B
#define OP_EvalLocalVariableCached1 0x5C
#define OP_EvalLocalVariableCached2 0x5D
#define OP_EvalLocalVariableCached3 0x5E
#define OP_EvalLocalVariableCached4 0x5F
#define OP_EvalLocalVariableCached5 0x60
#define OP_EvalLocalVariableCached 0x61
#define OP_EvalNewLocalArrayRefCached0 0x62
#define OP_ScriptMethodChildThreadCallPointer 0x63
#define OP_EvalLocalVariableObjectCached 0x64
#define OP_ScriptLocalMethodThreadCall 0x65
#define OP_GetInteger 0x66
#define OP_ScriptMethodCallPointer 0x67
#define OP_checkclearparams 0x68
#define OP_SetAnimFieldVariableField 0x69
// nop
#define OP_minus 0x6B
#define OP_ScriptLocalFunctionCall2 0x6C
#define OP_GetNegUnsignedShort 0x6D
#define OP_GetNegByte 0x6E
#define OP_SafeCreateVariableFieldCached 0x6F
#define OP_greater_equal 0x70
#define OP_vector 0x71
#define OP_GetBuiltinMethod 0x72
#define OP_endswitch 0x73
#define OP_ClearArray 0x74
#define OP_DecTop 0x75
#define OP_CastBool 0x76
#define OP_EvalArrayRef 0x77
#define OP_SetNewLocalVariableFieldCached0 0x78
#define OP_GetZero 0x79
#define OP_wait 0x7A
#define OP_waittill 0x7B
#define OP_GetIString 0x7C
#define OP_ScriptFarFunctionCall 0x7D
#define OP_GetAnimObject 0x7E
#define OP_GetAnimTree 0x7F
#define OP_EvalLocalArrayCached 0x80
#define OP_mod 0x81
#define OP_ScriptFarThreadCall 0x82
#define OP_GetUnsignedShort 0x83
#define OP_clearparams 0x84
#define OP_ScriptMethodThreadCallPointer 0x85
#define OP_ScriptFunctionCallPointer 0x86
#define OP_EmptyArray 0x87
#define OP_SafeSetVariableFieldCached 0x88
// nop
#define OP_EvalFieldVariableRef 0x8A
#define OP_ScriptLocalMethodChildThreadCall 0x8B
// nop
#define OP_GetFloat 0x8D
#define OP_EvalLocalVariableRefCached 0x8E
#define OP_JumpOnFalse 0x8F
#define OP_BoolComplement 0x90
#define OP_ScriptThreadCallPointer 0x91
#define OP_ScriptFarFunctionCall2 0x92
#define OP_less 0x93
#define OP_BoolNot 0x94
#define OP_waittillFrameEnd 0x95
#define OP_GetString 0x96
#define OP_EvalLevelFieldVariable 0x97
#define OP_GetLevelObject 0x98
#define OP_inc 0x99
#define OP_CallBuiltinMethod0 0x9A
#define OP_CallBuiltinMethod1 0x9B
#define OP_CallBuiltinMethod2 0x9C
#define OP_CallBuiltinMethod3 0x9D
#define OP_CallBuiltinMethod4 0x9E
#define OP_CallBuiltinMethod5 0x9F
#define OP_CallBuiltinMethod 0xA0
#define OP_GetAnim 0xA1
#define OP_switch 0xA2
#define OP_SetVariableField 0xA3
#define OP_divide 0xA4
#define OP_GetLocalFunction 0xA5
#define OP_ScriptFarChildThreadCall 0xA6
#define OP_multiply 0xA7
#define OP_ClearLocalVariableFieldCached 0xA8
#define OP_EvalAnimFieldVariableRef 0xA9
#define OP_EvalLocalArrayRefCached 0xAA
#define OP_EvalLocalVariableRefCached0 0xAB
#define OP_bit_and 0xAC
#define OP_GetAnimation 0xAD
#define OP_GetFarFunction 0xAE
#define OP_CallBuiltinPointer 0xAF
#define OP_jump 0xB0
#define OP_PreScriptCall 0xB1
#define OP_ScriptFarMethodCall 0xB2
#define OP_inequality 0xB3
#define OP_ScriptLocalFunctionCall 0xB4
#define OP_bit_ex_or 0xB5PC
#define OP_SetNewLocalVariableFieldCached0 0x17
#define OP_EvalSelfFieldVariable 0x18
#define OP_Return 0x19
#define OP_CallBuiltin0 0x1A
#define OP_CallBuiltin1 0x1B
#define OP_CallBuiltin2 0x1C
#define OP_CallBuiltin3 0x1D
#define OP_CallBuiltin4 0x1E
#define OP_CallBuiltin5 0x1F
#define OP_CallBuiltin 0x20
#define OP_BoolNot 0x21
#define OP_ScriptFarMethodThreadCall 0x22
#define OP_JumpOnTrueExpr 0x23
#define OP_SetLevelFieldVariableField 0x24
#define OP_CastBool 0x25
#define OP_EvalNewLocalArrayRefCached0 0x26
#define OP_CallBuiltinPointer 0x27
#define OP_inequality 0x28
#define OP_GetThisthread 0x29
#define OP_ClearFieldVariable 0x2A
#define OP_GetFloat 0x2B
#define OP_SafeCreateVariableFieldCached 0x2C
#define OP_ScriptFarFunctionCall2 0x2D
#define OP_ScriptFarFunctionCall 0x2E
#define OP_ScriptFarChildThreadCall 0x2F
#define OP_ClearLocalVariableFieldCached0 0x30
#define OP_ClearLocalVariableFieldCached 0x31
#define OP_checkclearparams 0x32
#define OP_CastFieldObject 0x33
#define OP_End 0x34
#define OP_size 0x35
#define OP_EmptyArray 0x36
#define OP_bit_and 0x37
#define OP_less_equal 0x38
#define OP_voidCodepos 0x39
#define OP_ScriptMethodThreadCallPointer 0x3A
#define OP_endswitch 0x3B
#define OP_ClearVariableField 0x3C
#define OP_divide 0x3D
#define OP_ScriptFarMethodChildThreadCall 0x3E
#define OP_GetUnsignedShort 0x3F
#define OP_JumpOnTrue 0x40
#define OP_GetSelf 0x41
#define OP_ScriptFarThreadCall 0x42
#define OP_ScriptLocalThreadCall 0x43
#define OP_SetLocalVariableFieldCached0 0x44
#define OP_SetLocalVariableFieldCached 0x45
#define OP_plus 0x46
#define OP_BoolComplement 0x47
#define OP_ScriptMethodCallPointer 0x48
#define OP_inc 0x49
#define OP_RemoveLocalVariables 0x4A
#define OP_JumpOnFalseExpr 0x4B
#define OP_switch 0x4C
#define OP_clearparams 0x4D
#define OP_EvalLocalVariableRefCached0 0x4E
#define OP_EvalLocalVariableRefCached 0x4F
#define OP_ScriptLocalMethodCall 0x50
#define OP_EvalFieldVariable 0x51
#define OP_EvalFieldVariableRef 0x52
#define OP_GetString 0x53
#define OP_ScriptFunctionCallPointer 0x54
#define OP_EvalLevelFieldVariable 0x55
#define OP_GetVector 0x56
#define OP_endon 0x57
#define OP_greater_equal 0x58
#define OP_GetSelfObject 0x59
#define OP_SetAnimFieldVariableField 0x5A
#define OP_SetVariableField 0x5B
#define OP_ScriptLocalFunctionCall2 0x5C
#define OP_ScriptLocalFunctionCall 0x5D
#define OP_EvalLocalArrayRefCached0 0x5E
#define OP_EvalLocalArrayRefCached 0x5F
#define OP_GetFarFunction 0x60
#define OP_less 0x61
#define OP_GetGameRef 0x62
#define OP_waittillFrameEnd 0x63
#define OP_SafeSetVariableFieldCached0 0x64
#define OP_SafeSetVariableFieldCached 0x65
#define OP_ScriptMethodChildThreadCallPointer 0x66
#define OP_GetLevel 0x67
#define OP_notify 0x68
#define OP_DecTop 0x69
#define OP_shift_left 0x6A
#define OP_ScriptLocalMethodThreadCall 0x6B
#define OP_ScriptLocalMethodChildThreadCall 0x6C
#define OP_greater 0x6D
#define OP_EvalLocalVariableCached0 0x6E
#define OP_EvalLocalVariableCached1 0x6F
#define OP_EvalLocalVariableCached2 0x70
#define OP_EvalLocalVariableCached3 0x71
#define OP_EvalLocalVariableCached4 0x72
#define OP_EvalLocalVariableCached5 0x73
#define OP_EvalLocalVariableCached 0x74
#define OP_SafeSetWaittillVariableFieldCached 0x75
#define OP_jump 0x76
#define OP_ScriptThreadCallPointer 0x77
#define OP_GetZero 0x78
#define OP_wait 0x79
#define OP_minus 0x7A
#define OP_SetSelfFieldVariableField 0x7B
#define OP_EvalNewLocalVariableRefCached0 0x7C
#define OP_multiply 0x7D
#define OP_CreateLocalVariable 0x7E
#define OP_ScriptLocalChildThreadCall 0x7F
#define OP_GetInteger 0x80
#define OP_mod 0x81
#define OP_EvalAnimFieldVariableRef 0x82
#define OP_GetBuiltinFunction 0x83
#define OP_GetGame 0x84
#define OP_waittill 0x85
#define OP_dec 0x86
#define OP_EvalLocalVariableObjectCached 0x87
#define OP_PreScriptCall 0x88
#define OP_GetAnim 0x89
#define OP_GetUndefined 0x8A
#define OP_EvalLevelFieldVariableRef 0x8B
#define OP_GetAnimObject 0x8C
#define OP_GetLevelObject 0x8D
#define OP_bit_ex_or 0x8E
#define OP_equality 0x8F
#define OP_ClearArray 0x90
#define OP_jumpback 0x91
#define OP_GetAnimation 0x92
#define OP_EvalAnimFieldVariable 0x93
#define OP_GetAnimTree 0x94
#define OP_GetIString 0x95
#define OP_EvalArrayRef 0x96
#define OP_EvalSelfFieldVariableRef 0x97
#define OP_GetNegByte 0x98
#define OP_GetBuiltinMethod 0x99
#define OP_CallBuiltinMethodPointer 0x9A
#define OP_EvalArray 0x9B
#define OP_vector 0x9C
#define OP_ScriptFarMethodCall 0x9D
#define OP_EvalLocalArrayCached 0x9E
#define OP_GetByte 0x9F
#define OP_ScriptChildThreadCallPointer 0xA0
#define OP_bit_or 0xA1
#define OP_AddArray 0xA2
#define OP_waittillmatch2 0xA3
#define OP_waittillmatch 0xA4
#define OP_GetLocalFunction 0xA5
#define OP_GetNegUnsignedShort 0xA6
#define OP_shift_right 0xA7
#define OP_CallBuiltinMethod0 0xA8
#define OP_CallBuiltinMethod1 0xA9
#define OP_CallBuiltinMethod2 0xAA
#define OP_CallBuiltinMethod3 0xAB
#define OP_CallBuiltinMethod4 0xAC
#define OP_CallBuiltinMethod5 0xAD
#define OP_CallBuiltinMethod 0xAE
#define OP_JumpOnFalse 0xAF
#define OP_count 0xB0Advanced Warfare
The opcodes for AW haven't changed from Ghosts except for the newly introduced opcode OP_waitFrame.
PS3
#define OP_CastFieldObject 0x1D
#define OP_SetLocalVariableFieldCached 0x1E
#define OP_plus 0x1F
#define OP_RemoveLocalVariables 0x20
#define OP_EvalSelfFieldVariableRef 0x21
#define OP_ScriptFarMethodChildThreadCall 0x22
#define OP_GetGameRef 0x23
#define OP_EvalAnimFieldVariable 0x24
#define OP_EvalLevelFieldVariableRef 0x25
#define OP_GetThisthread 0x26
#define OP_greater 0x27
#define OP_waittillmatch 0x28
#define OP_shift_right 0x29
#define OP_dec 0x2A
#define OP_JumpOnTrue 0x2B
#define OP_bit_or 0x2C
#define OP_equality 0x2D
#define OP_ClearLocalVariableFieldCached0 0x2E
#define OP_notify 0x2F
#define OP_GetVector 0x30
#define OP_ScriptMethodChildThreadCallPointer 0x31
#define OP_PreScriptCall 0x32
#define OP_GetByte 0x33
#define OP_ScriptFarMethodThreadCall 0x34
#define OP_SetSelfFieldVariableField 0x35
#define OP_JumpOnFalseExpr 0x36
#define OP_GetUndefined 0x37
#define OP_jumpback 0x38
#define OP_JumpOnTrueExpr 0x39
#define OP_CallBuiltin0 0x3A
#define OP_CallBuiltin1 0x3B
#define OP_CallBuiltin2 0x3C
#define OP_CallBuiltin3 0x3D
#define OP_CallBuiltin4 0x3E
#define OP_CallBuiltin5 0x3F
#define OP_CallBuiltin 0x40
#define OP_SetLocalVariableFieldCached0 0x41
#define OP_ClearFieldVariable 0x42
#define OP_GetLevel 0x43
#define OP_size 0x44
#define OP_SafeSetWaittillVariableFieldCached 0x45
#define OP_ScriptLocalThreadCall 0x46
#define OP_AddArray 0x47
#define OP_endon 0x48
#define OP_EvalFieldVariable 0x49
#define OP_shift_left 0x4A
#define OP_EvalLocalArrayRefCached0 0x4B
#define OP_Return 0x4C
#define OP_CreateLocalVariable 0x4D
#define OP_SafeSetVariableFieldCached0 0x4E
#define OP_GetBuiltinFunction 0x4F
#define OP_ScriptLocalMethodCall 0x50
#define OP_CallBuiltinMethodPointer 0x51
#define OP_ScriptLocalChildThreadCall 0x52
#define OP_GetSelfObject 0x53
#define OP_GetGame 0x54
#define OP_SetLevelFieldVariableField 0x55
#define OP_EvalArray 0x56
#define OP_GetSelf 0x57
#define OP_End 0x58
#define OP_EvalSelfFieldVariable 0x59
#define OP_less_equal 0x5A
#define OP_EvalLocalVariableCached0 0x5B
#define OP_EvalLocalVariableCached1 0x5C
#define OP_EvalLocalVariableCached2 0x5D
#define OP_EvalLocalVariableCached3 0x5E
#define OP_EvalLocalVariableCached4 0x5F
#define OP_EvalLocalVariableCached5 0x60
#define OP_EvalLocalVariableCached 0x61
#define OP_EvalNewLocalArrayRefCached0 0x62
#define OP_ScriptMethodChildThreadCallPointer 0x63
#define OP_EvalLocalVariableObjectCached 0x64
#define OP_ScriptLocalMethodThreadCall 0x65
#define OP_GetInteger 0x66
#define OP_ScriptMethodCallPointer 0x67
#define OP_checkclearparams 0x68
#define OP_SetAnimFieldVariableField 0x69
// nop
#define OP_minus 0x6B
#define OP_ScriptLocalFunctionCall2 0x6C
#define OP_GetNegUnsignedShort 0x6D
#define OP_GetNegByte 0x6E
#define OP_SafeCreateVariableFieldCached 0x6F
#define OP_greater_equal 0x70
#define OP_vector 0x71
#define OP_GetBuiltinMethod 0x72
#define OP_endswitch 0x73
#define OP_ClearArray 0x74
#define OP_DecTop 0x75
#define OP_CastBool 0x76
#define OP_EvalArrayRef 0x77
#define OP_SetNewLocalVariableFieldCached0 0x78
#define OP_GetZero 0x79
#define OP_wait 0x7A
#define OP_waittill 0x7B
#define OP_GetIString 0x7C
#define OP_ScriptFarFunctionCall 0x7D
#define OP_GetAnimObject 0x7E
#define OP_GetAnimTree 0x7F
#define OP_EvalLocalArrayCached 0x80
#define OP_mod 0x81
#define OP_ScriptFarThreadCall 0x82
#define OP_GetUnsignedShort 0x83
#define OP_clearparams 0x84
#define OP_ScriptMethodThreadCallPointer 0x85
#define OP_ScriptFunctionCallPointer 0x86
#define OP_EmptyArray 0x87
#define OP_SafeSetVariableFieldCached 0x88
// nop
#define OP_EvalFieldVariableRef 0x8A
#define OP_ScriptLocalMethodChildThreadCall 0x8B
// nop
#define OP_GetFloat 0x8D
#define OP_EvalLocalVariableRefCached 0x8E
#define OP_JumpOnFalse 0x8F
#define OP_BoolComplement 0x90
#define OP_ScriptThreadCallPointer 0x91
#define OP_ScriptFarFunctionCall2 0x92
#define OP_less 0x93
#define OP_BoolNot 0x94
#define OP_waittillFrameEnd 0x95
#define OP_waitFrame 0x96
#define OP_GetString 0x97
#define OP_EvalLevelFieldVariable 0x98
#define OP_GetLevelObject 0x99
#define OP_inc 0x9A
#define OP_CallBuiltinMethod0 0x9B
#define OP_CallBuiltinMethod1 0x9C
#define OP_CallBuiltinMethod2 0x9D
#define OP_CallBuiltinMethod3 0x9E
#define OP_CallBuiltinMethod4 0x9F
#define OP_CallBuiltinMethod5 0xA0
#define OP_CallBuiltinMethod 0xA1
#define OP_GetAnim 0xA2
#define OP_switch 0xA3
#define OP_SetVariableField 0xA4
#define OP_divide 0xA5
#define OP_GetLocalFunction 0xA6
#define OP_ScriptFarChildThreadCall 0xA7
#define OP_multiply 0xA8
#define OP_ClearLocalVariableFieldCached 0xA9
#define OP_EvalAnimFieldVariableRef 0xAA
#define OP_EvalLocalArrayRefCached 0xAB
#define OP_EvalLocalVariableRefCached0 0xAC
#define OP_bit_and 0xAD
#define OP_GetAnimation 0xAE
#define OP_GetFarFunction 0xAF
#define OP_CallBuiltinPointer 0xB0
#define OP_jump 0xB1
#define OP_voidCodePos 0xB2
#define OP_ScriptFarMethodCall 0xB3
#define OP_inequality 0xB4
#define OP_ScriptLocalFunctionCall 0xB5
#define OP_bit_ex_or 0xB6OP_waitFrame
This opcode was introduced as a replacement for the function waitframe inside common_scripts/utility.
waitframe()
{
wait( 0.05 );
}OP_EvalLocalArrayRefCached0
This opcode evaluates the last created local array using OP_EvalArrayRef internally.
OP_EvalNewLocalArrayRefCached0
This opcode is used to create a local array and set one of its elements without having to initialize it first. This opcode jumps internally to OP_EvalLocalArrayRefCached0.
array["friendly"] = 3;The asm:
OP_GetByte 3
OP_GetString "friendly"
OP_EvalNewLocalArrayRefCached0 0
OP_SetVariableFieldOP_EvalArrayRef
This opcode is used to evaluate an array index to set its value afterwards. The first ent on the stack is the index, the second ent is the value. In scriptfiles, this opcode is only used to evaluate fields.
level.array[0] = 1;The asm:
OP_GetByte 1
OP_GetZero
OP_EvalLevelFieldVariableRef array
OP_EvalArrayRef
OP_SetVariableFieldOP_AddArray
This opcode is used to append an object of any type to an array. When initializing a new array, it starts off from an empty one.
array = [ 0, 1 ];The asm:
OP_EmptyArray
OP_GetZero
OP_AddArray
OP_GetByte 1
OP_AddArray
OP_SetNewLocalVariableFieldCached0 0This opcode can also build on another array, but is not supposed to be used like this.
array2 = array + [ 2.0, "3" ];The asm:
OP_EvalLocalVariableCached0
OP_GetFloat 2.0
OP_AddArray
OP_GetString "3"
OP_AddArray
OP_SetNewLocalVariableFieldCached0 1OP_SetNewLocalVariableFieldCached0
This creates a new local variable and then sets the ent on the stack as its value. The variable index is stored as a byte after the opcode.
OP_CallBuiltin
These opcodes are used to make calls to native functions built into the game's executable. Unlike methods, these functions do not pass any objects. For opcodes OP_CallBuiltin0 through OP_CallBuiltin5, the number it ends with is the number of parameters to be passed to the function. For OP_CallBuiltin, the number of parameters is loaded after the opcode as an 8 bit integer. The function id is then loaded as a 16 bit integer. That value is then used as an index in the function table below.
| Function | MW3 | |
|---|---|---|
| PC ID | PS3/XBOX ID | |
| createprintchannel | N/A | 0x1 |
| setprintchannel | 0xe | 0x2 |
| 0xf | 0x3 | |
| println | 0x10 | 0x4 |
| print3d | 0x11 | 0x5 |
| line | 0x12 | 0x6 |
| precacheturret | N/A | 0x7 |
| getweaponarray | N/A | 0x8 |
| spawnturret | 0x13 | 0x9 |
| canspawnturret | 0x14 | 0xa |
| assert | 0x15 | 0xb |
| assertex | 0x26 | 0xc |
| assertmsg | 0x27 | 0xd |
| isdefined | 0x28 | 0xe |
| isstring | 0x29 | 0xf |
| setdvar | 0x2a | 0x10 |
| setdynamicdvar | 0x2b | 0x11 |
| setdvarifuninitialized | 0x2c | 0x12 |
| setdevdvar | 0x2d | 0x13 |
| setdevdvarifuninitialized | 0x2e | 0x14 |
| getdvar | 0x2f | 0x15 |
| getdvarint | 0x30 | 0x16 |
| getdvarfloat | 0x31 | 0x17 |
| getdvarvector | 0x32 | 0x18 |
| gettime | 0x33 | 0x19 |
| getentbynum | 0x34 | 0x1a |
| getweaponmodel | 0x35 | 0x1b |
| getweaponhidetags | 0x51 | 0x1c |
| getanimlength | 0x52 | 0x1d |
| animhasnotetrack | 0x53 | 0x1e |
| getnotetracktimes | 0x54 | 0x1f |
| spawn | 0x55 | 0x20 |
| spawnloopsound | 0x56 | 0x21 |
| bullettrace | 0x57 | 0x22 |
| bullettracepassed | 0x58 | 0x23 |
| sighttracepassed | 0x74 | 0x24 |
| physicstrace | 0x75 | 0x25 |
| physicstracenormal | 0x76 | 0x26 |
| playerphysicstrace | 0x77 | 0x27 |
| getgroundposition | 0x78 | 0x28 |
| getmovedelta | 0x79 | 0x29 |
| getangledelta | 0x7a | 0x2a |
| getnorthyaw | 0x7b | 0x2b |
| setnorthyaw | 0x96 | 0x2c |
| setslowmotion | 0x97 | 0x2d |
| randomint | 0x98 | 0x2e |
| randomfloat | 0x99 | 0x2f |
| randomintrange | 0x9a | 0x30 |
| randomfloatrange | 0x9b | 0x31 |
| sin | 0x9c | 0x32 |
| cos | 0x9d | 0x33 |
| tan | 0x9e | 0x34 |
| asin | 0x9f | 0x35 |
| acos | 0xa0 | 0x36 |
| atan | 0xa1 | 0x37 |
| int | 0xa2 | 0x38 |
| float | 0xa3 | 0x39 |
| abs | 0xa4 | 0x3a |
| min | 0xa5 | 0x3b |
| max | 0xc6 | 0x3c |
| floor | 0xc7 | 0x3d |
| ceil | 0xc8 | 0x3e |
| exp | 0xc9 | 0x3f |
| log | 0xca | 0x40 |
| sqrt | 0xcb | 0x41 |
| squared | 0xcc | 0x42 |
| clamp | 0xcd | 0x43 |
| angleclamp | 0xce | 0x44 |
| angleclamp180 | 0xcf | 0x45 |
| vectorfromlinetopoint | 0xd0 | 0x46 |
| pointonsegmentnearesttopoint | 0xd1 | 0x47 |
| distance | 0xd2 | 0x48 |
| distance2d | 0xd3 | 0x49 |
| distancesquared | 0xd4 | 0x4a |
| length | 0xd5 | 0x4b |
| lengthsquared | 0xd6 | 0x4c |
| closer | 0xd7 | 0x4d |
| vectordot | 0xd8 | 0x4e |
| vectornormalize | 0xf6 | 0x4f |
| vectortoangles | 0xf7 | 0x50 |
| vectortoyaw | 0xf8 | 0x51 |
| vectorlerp | 0xf9 | 0x52 |
| anglestoup | 0xfa | 0x53 |
| anglestoright | 0xfb | 0x54 |
| anglestoforward | 0xfc | 0x55 |
| combineangles | 0xfd | 0x56 |
| transformmove | 0xfe | 0x57 |
| issubstr | 0xff | 0x58 |
| isendstr | 0x100 | 0x59 |
| getsubstr | 0x101 | 0x5a |
| tolower | 0x102 | 0x5b |
| strtok | 0x103 | 0x5c |
| stricmp | 0x104 | 0x5d |
| ambientplay | 0x105 | 0x5e |
| ambientstop | 0x125 | 0x5f |
| precachemodel | 0x126 | 0x60 |
| precacheshellshock | 0x127 | 0x61 |
| precacheitem | 0x128 | 0x62 |
| precacheshader | 0x129 | 0x63 |
| precachestring | 0x12a | 0x64 |
| precachemenu | 0x12b | 0x65 |
| precacherumble | 0x12c | 0x66 |
| precachelocationselector | 0x12d | 0x67 |
| precacheleaderboards | 0x12e | 0x68 |
| precacheheadicon | 0x146 | 0xe9 |
| loadfx | 0x12f | 0x1c5 |
| playfx | 0x130 | 0x1c6 |
| unknown | N/A | 0x69 |
| playfxontag | 0x131 | 0x6a |
| stopfxontag | 0x132 | 0x6b |
| killfxontag | N/A | 0x6c |
| playloopedfx | 0x133 | 0x6d |
| spawnfx | 0x134 | 0x6e |
| triggerfx | 0x135 | 0x6f |
| playfxontagforclients | 0x136 | 0x70 |
| physicsexplosionsphere | 0x15a | 0x71 |
| physicsexplosioncylinder | 0x15b | 0x72 |
| physicsjolt | 0x15c | 0x73 |
| physicsjitter | 0x15d | 0x74 |
| setexpfog | 0x15e | 0x75 |
| isexplosivedamagemod | 0x15f | 0x76 |
| radiusdamage | 0x160 | 0x77 |
| setplayerignoreradiusdamage | 0x161 | 0x78 |
| glassradiusdamage | 0x162 | 0x79 |
| earthquake | 0x163 | 0x7a |
| getnumparts | 0x164 | 0x7b |
| getpartname | 0x182 | 0x7c |
| weaponfiretime | 0x183 | 0x7d |
| weaponclipsize | 0x184 | 0x7e |
| weaponisauto | 0x185 | 0x7f |
| weaponissemiauto | 0x186 | 0x80 |
| weaponisboltaction | 0x187 | 0x81 |
| weaponinheritsperks | 0x188 | 0x82 |
| weaponburstcount | 0x189 | 0x83 |
| weapontype | 0x18a | 0x84 |
| weaponclass | 0x18b | 0x85 |
| weaponinventorytype | 0x1b5 | 0x86 |
| weaponstartammo | 0x1b6 | 0x87 |
| weaponmaxammo | 0x1b7 | 0x88 |
| weaponaltweaponname | 0x1b8 | 0x89 |
| isweaponcliponly | 0x1b9 | 0x8a |
| isweapondetonationtimed | 0x1ba | 0x8b |
| weaponhasthermalscope | 0x1bb | 0x8c |
| getvehiclenode | 0x1bc | 0x8d |
| getvehiclenodearray | 0x1bd | 0x8e |
| getallvehiclenodes | 0x1be | 0x8f |
| getnumvehicles | 0x1bf | 0x90 |
| precachevehicle | 0x1c0 | 0x91 |
| spawnvehicle | 0x1c1 | 0x92 |
| getarray | 0x1c2 | 0x93 |
| getspawnerarray | 0x198 | 0x94 |
| playrumbleonposition | 0x199 | 0x95 |
| playrumblelooponposition | 0x19a | 0x96 |
| stopallrumbles | 0x19b | 0x97 |
| soundexists | 0x19c | 0x98 |
| openfile | 0x19d | 0x99 |
| closefile | 0x19e | 0x9a |
| fprintln | 0x19f | 0x9b |
| fprintfields | 0x1a0 | 0x9c |
| freadln | 0x1a1 | 0x9d |
| fgetarg | 0x1a2 | 0x9e |
| setminimap | 0x1a3 | 0x9f |
| setthermalbodymaterial | 0x1a4 | 0xa0 |
| getarraykeys | 0x1a5 | 0xa1 |
| getfirstarraykey | 0x1a6 | 0xa2 |
| getnextarraykey | 0x18c | 0xa3 |
| sortbydistance | 0x18d | 0xa4 |
| tablelookup | 0x18e | 0xa5 |
| tablelookupbyrow | 0x18f | 0xa6 |
| tablelookupistring | 0x190 | 0xa7 |
| tablelookupistringbyrow | 0x191 | 0xa8 |
| tablelookuprownum | 0x192 | 0xa9 |
| getmissileowner | 0x193 | 0xaa |
| magicbullet | 0x194 | 0xab |
| getweaponflashtagname | 0x195 | 0xac |
| averagepoint | 0x196 | 0xad |
| averagenormal | 0x197 | 0xae |
| getglass | 0x1a7 | 0xaf |
| getglassarray | 0x1a8 | 0xb0 |
| getglassorigin | 0x1a9 | 0xb1 |
| isglassdestroyed | 0x1aa | 0xb2 |
| destroyglass | 0x1ab | 0xb3 |
| deleteglass | 0x1ac | 0xb4 |
| getentchannelscount | 0x1ad | 0xb5 |
| getentchannelname | N/A | 0xb6 |
| objective_add | 0x1af | 0xb7 |
| objective_delete | 0x1b0 | 0xb8 |
| objective_state | 0x1b1 | 0xb9 |
| objective_icon | 0x1b2 | 0xba |
| objective_position | 0x1b3 | 0xbb |
| objective_current | 0x1b4 | 0xbc |
| objective_onentity | 0x165 | 0xbd |
| objective_team | 0x166 | 0xbe |
| objective_player | 0x167 | 0xbf |
| objective_playerteam | 0x168 | 0xc0 |
| objective_playerenemyteam | 0x169 | 0xc1 |
| iprintln | 0x16a | 0xc2 |
| iprintlnbold | 0x16b | 0xc3 |
| logstring | 0x16c | 0xc4 |
| getent | 0x16d | 0xc5 |
| getentarray | 0x16e | 0xc6 |
| spawnplane | 0x16f | 0xc7 |
| spawnstruct | 0x170 | 0xc8 |
| spawnhelicopter | 0x171 | 0xc9 |
| isalive | 0x172 | 0xca |
| isspawner | 0x173 | 0xcb |
| createattractorent | 0x174 | 0xcc |
| createattractororigin | 0x175 | 0xcd |
| createrepulsorent | 0x176 | 0xce |
| createrepulsororigin | 0x177 | 0xcf |
| deleteattractor | 0x178 | 0xd0 |
| playsoundatpos | 0x179 | 0xd1 |
| newhudelem | 0x17a | 0x1c7 |
| newclienthudelem | 0x17b | 0xd2 |
| newteamhudelem | 0x17c | 0xd3 |
| newdamageindicatorhudelem | N/A | 0xd4 |
| resettimeout | 0x17d | 0xd5 |
| precachefxteamthermal | 0x17e | 0xd6 |
| isplayer | 0x17f | 0xd7 |
| isplayernumber | 0x180 | 0xd8 |
| setsunlight | 0x39 | 0x191 |
| resetsunlight | 0x3a | 0x192 |
| setwinningplayer | 0x181 | 0xd9 |
| setwinningteam | 0x137 | 0xda |
| announcement | 0x138 | 0xdb |
| clientannouncement | 0x139 | 0xdc |
| getteamscore | 0x13a | 0xdd |
| setteamscore | 0x13b | 0xde |
| setclientnamemode | 0x13c | 0xdf |
| updateclientnames | 0x13d | 0xe0 |
| getteamplayersalive | 0x13e | 0xe1 |
| logprint | 0x13f | 0xe2 |
| worldentnumber | 0x140 | 0xe3 |
| obituary | 0x141 | 0xe4 |
| positionwouldtelefrag | 0x142 | 0xe5 |
| canspawn | 0x143 | 0xe6 |
| getstarttime | 0x144 | 0xe7 |
| precachestatusicon | 0x145 | 0xe8 |
| precacheminimapicon | 0x147 | 0xea |
| precachempanim | 0x148 | 0xeb |
| restart | 0x149 | 0xec |
| exitlevel | 0x14a | 0xed |
| addtestclient | 0x14b | 0xee |
| makedvarserverinfo | 0x14c | 0xef |
| setarchive | 0x14d | 0xf0 |
| allclientsprint | 0x14e | 0xf1 |
| clientprint | 0x14f | 0xf2 |
| mapexists | 0x150 | 0xf3 |
| isvalidgametype | 0x151 | 0xf4 |
| matchend | 0x152 | 0xf5 |
| setplayerteamrank | 0x153 | 0xf6 |
| endparty | 0x154 | 0xf7 |
| setteamradar | 0x155 | 0xf8 |
| getteamradar | 0x156 | 0xf9 |
| setteamradarstrength | 0x157 | 0xfa |
| getteamradarstrength | 0x158 | 0xfb |
| getuavstrengthmin | 0x159 | 0xfc |
| getuavstrengthmax | 0x106 | 0xfd |
| getuavstrengthlevelneutral | 0x107 | 0xfe |
| getuavstrengthlevelshowenemyfastsweep | 0x108 | 0xff |
| getuavstrengthlevelshowenemydirectional | 0x109 | 0x100 |
| blockteamradar | 0x10a | 0x101 |
| unblockteamradar | 0x10b | 0x102 |
| isteamradarblocked | 0x10c | 0x103 |
| getassignedteam | 0x10d | 0x104 |
| setmatchdata | 0x10e | 0x105 |
| getmatchdata | 0x10f | 0x106 |
| sendmatchdata | 0x110 | 0x107 |
| clearmatchdata | 0x111 | 0x108 |
| setmatchdatadef | 0x112 | 0x109 |
| setmatchclientip | 0x113 | 0x10a |
| setmatchdataid | 0x114 | 0x10b |
| setclientmatchdata | 0x115 | 0x10c |
| getclientmatchdata | 0x116 | 0x10d |
| setclientmatchdatadef | 0x117 | 0x10e |
| sendclientmatchdata | 0x118 | 0x10f |
| getbuildversion | 0x119 | 0x110 |
| getbuildnumber | 0x11a | 0x111 |
| getsystemtime | 0x11b | 0x112 |
| getmatchrulesdata | 0x11c | 0x113 |
| isusingmatchrulesdata | 0x11d | 0x114 |
| kick | 0x11e | 0x115 |
| issplitscreen | 0x11f | 0x116 |
| setmapcenter | 0x120 | 0x117 |
| setgameendtime | 0x121 | 0x118 |
| visionsetnaked | 0x122 | 0x119 |
| visionsetnight | 0x123 | 0x11a |
| visionsetmissilecam | 0x124 | 0x11b |
| visionsetthermal | 0xd9 | 0x11c |
| visionsetpain | 0xda | 0x11d |
| endlobby | 0xdb | 0x11e |
| ambience | 0xdc | 0x11f |
| getmapcustom | 0xdd | 0x120 |
| updateskill | 0xde | 0x121 |
| spawnsighttrace | 0xdf | 0x122 |
| incrementcounter | N/A | 0x123 |
| getcountertotal | N/A | 0x124 |
OP_CallBuiltinMethod
These opcodes are used to make calls to native methods built into the game's executable. Unlike functions, the methods must pass an object. For OP_CallBuiltinMethod0 - OP_CallBuiltinMethod5, the number it ends with is the number of parameters to be passed to the function. For OP_CallBuiltinMethod, the number of parameters is loaded after the opcode as an 8 bit integer. The method id is then loaded as a 16 bit integer. That value is then used as an index in the method table below.
| Method | MW3 | |
|---|---|---|
| PC ID | PS3/XBOX ID | |
| attach | 0x8017 | 0x8000 |
| attachshieldmodel | 0x8018 | 0x8001 |
| detach | 0x8024 | 0x8002 |
| detachshieldmodel | 0x8025 | 0x8003 |
| moveshieldmodel | 0x8026 | 0x8004 |
| detachall | 0x8027 | 0x8005 |
| getattachsize | 0x8028 | 0x8006 |
| getattachmodelname | 0x8029 | 0x8007 |
| getattachtagname | 0x802a | 0x8008 |
| getattachignorecollision | 0x8043 | 0x8009 |
| hidepart | 0x8044 | 0x800a |
| allinstances | 0x8045 | 0x800b |
| hideallparts | 0x8046 | 0x800c |
| showpart | 0x8047 | 0x800d |
| showallparts | 0x8048 | 0x800e |
| linkto | 0x8049 | 0x800f |
| linktoblendtotag | 0x804a | 0x8010 |
| unlink | 0x804b | 0x8011 |
| islinked | 0x8063 | 0x8012 |
| enablelinkto | 0x8064 | 0x8013 |
| playerlinkto | 0x8075 | 0x8014 |
| playerlinktodelta | 0x8076 | 0x8015 |
| playerlinkweaponviewtodelta | 0x8077 | 0x8016 |
| playerlinktoabsolute | 0x8078 | 0x8017 |
| playerlinktoblend | 0x8079 | 0x8018 |
| playerlinkedoffsetenable | 0x807a | 0x8019 |
| playerlinkedoffsetdisable | 0x8094 | 0x801a |
| playerlinkedsetviewznear | 0x8095 | 0x801b |
| playerlinkedsetusebaseangleforviewclamp | 0x8096 | 0x801c |
| lerpviewangleclamp | 0x8097 | 0x801d |
| setviewangleresistance | 0x8098 | 0x801e |
| geteye | 0x8099 | 0x801f |
| istouching | 0x809a | 0x8020 |
| stoploopsound | 0x809b | 0x8021 |
| stopsounds | 0x809c | 0x8022 |
| playrumbleonentity | 0x809d | 0x8023 |
| playrumblelooponentity | 0x809e | 0x8024 |
| stoprumble | 0x809f | 0x8025 |
| delete | 0x80a0 | 0x8026 |
| setmodel | 0x80a1 | 0x8027 |
| laseron | 0x80a2 | 0x8028 |
| laseroff | 0x80a3 | 0x8029 |
| laseraltviewon | 0x80a4 | 0x802a |
| laseraltviewoff | 0x80a5 | 0x802b |
| thermalvisionon | 0x80a6 | 0x802c |
| thermalvisionoff | 0x80a7 | 0x802d |
| thermaldrawenable | 0x8023 | 0x82ef |
| thermaldrawdisable | 0x8000 | 0x82f0 |
| thermalvisionfofoverlayon | 0x80a8 | 0x802e |
| thermalvisionfofoverlayoff | 0x80a9 | 0x802f |
| autospotoverlayon | 0x80aa | 0x8030 |
| autospotoverlayoff | 0x80ab | 0x8031 |
| setcontents | 0x80ac | 0x8032 |
| makeusable | 0x80ad | 0x8033 |
| makeunusable | 0x80ae | 0x8034 |
| setcursorhint | 0x80c6 | 0x8035 |
| sethintstring | 0x80c7 | 0x8036 |
| forceusehinton | 0x80c8 | 0x8037 |
| forceusehintoff | 0x80c9 | 0x8038 |
| makesoft | 0x80ca | 0x8039 |
| makehard | 0x80cb | 0x803a |
| willneverchange | 0x80cc | 0x803b |
| startfiring | 0x80cd | 0x803c |
| stopfiring | 0x80ce | 0x803d |
| isfiringturret | 0x80cf | 0x803e |
| startbarrelspin | 0x80d0 | 0x803f |
| stopbarrelspin | 0x80d1 | 0x8040 |
| getbarrelspinrate | 0x80d2 | 0x8041 |
| remotecontrolturret | 0x80d3 | 0x8042 |
| remotecontrolturretoff | 0x80d4 | 0x8043 |
| shootturret | 0x80d5 | 0x8044 |
| getturretowner | 0x80d6 | 0x8045 |
| setsentryowner | 0x80ee | 0x8046 |
| setsentrycarrier | 0x80ef | 0x8047 |
| setturretminimapvisible | 0x80f0 | 0x8048 |
| settargetentity | 0x80f1 | 0x8049 |
| snaptotargetentity | 0x80f2 | 0x804a |
| cleartargetentity | 0x80f3 | 0x804b |
| getturrettarget | 0x80f4 | 0x804c |
| setplayerspread | 0x80f5 | 0x804d |
| setaispread | 0x80f6 | 0x804e |
| setsuppressiontime | 0x80f7 | 0x804f |
| setconvergencetime | 0x8119 | 0x8050 |
| setconvergenceheightpercent | 0x811a | 0x8051 |
| setturretteam | 0x811b | 0x8052 |
| maketurretsolid | 0x811c | 0x8053 |
| maketurretoperable | 0x811d | 0x8054 |
| maketurretinoperable | 0x811e | 0x8055 |
| setturretaccuracy | 0x813a | 0x8056 |
| setrightarc | 0x813b | 0x8057 |
| setleftarc | 0x813c | 0x8058 |
| settoparc | 0x813d | 0x8059 |
| setbottomarc | 0x813e | 0x805a |
| setautorotationdelay | 0x813f | 0x805b |
| setdefaultdroppitch | 0x8140 | 0x805c |
| restoredefaultdroppitch | 0x8141 | 0x805d |
| turretfiredisable | 0x8142 | 0x805e |
| turretfireenable | 0x8161 | 0x805f |
| setturretmodechangewait | 0x8162 | 0x8060 |
| usetriggerrequirelookat | 0x8163 | 0x8061 |
| getstance | 0x8164 | 0x8062 |
| setstance | 0x8165 | 0x8063 |
| itemweaponsetammo | 0x8166 | 0x8064 |
| getammocount | 0x8167 | 0x8065 |
| gettagorigin | 0x8168 | 0x8066 |
| gettagangles | 0x8169 | 0x8067 |
| shellshock | 0x816a | 0x8068 |
| stunplayer | 0x816b | 0x8069 |
| stopshellshock | 0x816c | 0x806a |
| fadeoutshellshock | 0x816d | 0x806b |
| setdepthoffield | 0x816e | 0x806c |
| setviewmodeldepthoffield | 0x816f | 0x806d |
| setmotionblurmovescale | 0x8170 | 0x806e |
| setmotionblurturnscale | 0x8190 | 0x806f |
| setmotionblurzoomscale | 0x8191 | 0x8070 |
| viewkick | 0x8192 | 0x8071 |
| localtoworldcoords | 0x8193 | 0x8072 |
| getentitynumber | 0x8194 | 0x8073 |
| getentityvelocity | 0x8195 | 0x8074 |
| enablegrenadetouchdamage | 0x8196 | 0x8075 |
| disablegrenadetouchdamage | 0x8197 | 0x8076 |
| enableaimassist | 0x8198 | 0x8077 |
| disableaimassist | 0x81b7 | 0x8078 |
| radiusdamage | 0x81b8 | 0x8079 |
| detonate | 0x81b9 | 0x807a |
| damageconetrace | 0x81ba | 0x807b |
| sightconetrace | 0x81bb | 0x807c |
| settargetent | 0x81bc | 0x807d |
| settargetpos | 0x81bd | 0x807e |
| cleartarget | 0x81be | 0x807f |
| setflightmodedirect | 0x81bf | 0x8080 |
| setflightmodetop | 0x81c0 | 0x8081 |
| getlightintensity | 0x81c1 | 0x8082 |
| setlightintensity | 0x81c2 | 0x8083 |
| isragdoll | 0x81c3 | 0x8084 |
| setmovespeedscale | 0x81c4 | 0x8085 |
| cameralinkto | 0x81c5 | 0x8086 |
| cameraunlink | 0x81c6 | 0x8087 |
| controlslinkto | 0x81e3 | 0x8088 |
| controlsunlink | 0x81e4 | 0x8089 |
| makevehiclesolidcapsule | 0x81e5 | 0x808a |
| makevehiclesolidsphere | 0x81e6 | 0x808b |
| remotecontrolvehicle | 0x81e8 | 0x808d |
| remotecontrolvehicleoff | 0x81e9 | 0x808e |
| isfiringvehicleturret | 0x81ea | 0x808f |
| drivevehicleandcontrolturret | 0x81eb | 0x8090 |
| drivevehicleandcontrolturretoff | 0x81ec | 0x8091 |
| getplayersetting | 0x81ed | 0x8092 |
| getlocalplayerprofiledata | 0x81ee | 0x8093 |
| setlocalplayerprofiledata | 0x81ef | 0x8094 |
| remotecamerasoundscapeon | 0x81f0 | 0x8095 |
| remotecamerasoundscapeoff | 0x81f1 | 0x8096 |
| radarjamon | 0x81f2 | 0x8097 |
| radarjamoff | 0x81f3 | 0x8098 |
| setmotiontrackervisible | 0x81f4 | 0x8099 |
| getmotiontrackervisible | 0x81f5 | 0x809a |
| circle | 0x81f6 | 0x809b |
| getpointinbounds | 0x81f7 | 0x809c |
| transfermarkstonewscriptmodel | 0x81f8 | 0x809d |
| setwatersheeting | 0x81f9 | 0x809e |
| setweaponhudiconoverride | 0x81fa | 0x809f |
| getweaponhudiconoverride | 0x81fb | 0x80a0 |
| setempjammed | 0x81fc | 0x80a1 |
| playersetexpfog | 0x81fd | 0x80a2 |
| isitemunlocked | 0x81fe | 0x80a3 |
| getplayerdata | 0x81ff | 0x80a4 |
| setplayerdata | 0x821a | 0x80a5 |
| trackerupdate | N/A | 0x80a6 |
| pingplayer | 0x821c | 0x80a7 |
| buttonpressed | 0x821d | 0x80a8 |
| sayall | 0x821e | 0x80a9 |
| sayteam | 0x821f | 0x80aa |
| showscoreboard | 0x8220 | 0x80ab |
| setspawnweapon | 0x8221 | 0x80ac |
| dropitem | 0x8222 | 0x80ad |
| dropscavengerbag | 0x8223 | 0x80ae |
| finishplayerdamage | 0x823c | 0x80af |
| suicide | 0x823d | 0x80b0 |
| closeingamemenu | 0x823e | 0x80b1 |
| iprintln | 0x823f | 0x80b2 |
| iprintlnbold | 0x8240 | 0x80b3 |
| spawn | 0x8241 | 0x80b4 |
| setentertime | 0x8242 | 0x80b5 |
| cloneplayer | 0x8243 | 0x80b6 |
| istalking | 0x8244 | 0x80b7 |
| allowspectateteam | 0x8245 | 0x80b8 |
| getguid | 0x8246 | 0x80b9 |
| getxuid | 0x8266 | 0x80ba |
| ishost | 0x8267 | 0x80bb |
| getspectatingplayer | 0x8268 | 0x80bc |
| predictstreampos | 0x8269 | 0x80bd |
| updatescores | 0x826a | 0x80be |
| updatedmscores | 0x826b | 0x80bf |
| setrank | 0x826c | 0x80c0 |
| setcardtitle | 0x826d | 0x80c1 |
| setcardicon | 0x828c | 0x80c2 |
| setcardnameplate | 0x828d | 0x80c3 |
| setcarddisplayslot | 0x828e | 0x80c4 |
| kc_regweaponforfxremoval | 0x828f | 0x80c5 |
| laststandrevive | 0x8290 | 0x80c6 |
| setspectatedefaults | 0x8291 | 0x80c7 |
| getthirdpersoncrosshairoffset | 0x8292 | 0x80c8 |
| disableweaponpickup | 0x8293 | 0x80c9 |
| enableweaponpickup | 0x8294 | 0x80ca |
| issplitscreenplayer | N/A | 0x80cb |
| issplitscreenplayerprimary | N/A | 0x80cc |
| getviewmodel | 0x82b1 | 0x80cd |
| fragbuttonpressed | 0x82b2 | 0x80ce |
| secondaryoffhandbuttonpressed | 0x82b3 | 0x80cf |
| getcurrentweaponclipammo | 0x82b4 | 0x80d0 |
| setvelocity | 0x82b5 | 0x80d1 |
| getplayerviewheight | 0x82b6 | 0x80d2 |
| enablemousesteer | 0x8309 | 0x8309 |
| getnormalizedmovement | 0x82b7 | 0x80d3 |
| getnormalizedcameramovement | 0x82ce | 0x80d4 |
| giveweapon | 0x82cf | 0x80d5 |
| takeweapon | 0x82d0 | 0x80d6 |
| takeallweapons | 0x82d1 | 0x80d7 |
| getcurrentweapon | 0x82d2 | 0x80d8 |
| getcurrentprimaryweapon | 0x82d3 | 0x80d9 |
| getcurrentoffhand | 0x82d4 | 0x80da |
| hasweapon | 0x82d5 | 0x80db |
| switchtoweapon | 0x82d6 | 0x80dc |
| switchtoweaponimmediate | 0x82d7 | 0x80dd |
| switchtooffhand | 0x82d8 | 0x80de |
| givestartammo | 0x82f2 | 0x80df |
| givemaxammo | 0x82f3 | 0x80e0 |
| getfractionstartammo | 0x82f4 | 0x80e1 |
| getfractionmaxammo | 0x82f5 | 0x80e2 |
| isdualwielding | 0x82f6 | 0x80e3 |
| isreloading | 0x82f7 | 0x80e4 |
| isswitchingweapon | 0x82f8 | 0x80e5 |
| setorigin | 0x82f9 | 0x80e6 |
| getvelocity | 0x82fa | 0x80e7 |
| setplayerangles | 0x82fb | 0x80e8 |
| getplayerangles | 0x82fc | 0x80e9 |
| usebuttonpressed | 0x82fd | 0x80ea |
| attackbuttonpressed | 0x82fe | 0x80eb |
| adsbuttonpressed | 0x82ff | 0x80ec |
| meleebuttonpressed | 0x8300 | 0x80ed |
| playerads | 0x8301 | 0x80ee |
| isonground | 0x8302 | 0x80ef |
| isusingturret | 0x8303 | 0x80f0 |
| setviewmodel | 0x8304 | 0x80f1 |
| setoffhandprimaryclass | 0x8305 | 0x80f2 |
| getoffhandprimaryclass | 0x8306 | 0x80f3 |
| setoffhandsecondaryclass | 0x82d9 | 0x80f4 |
| getoffhandsecondaryclass | 0x82da | 0x80f5 |
| beginlocationselection | 0x82db | 0x80f6 |
| endlocationselection | 0x82dc | 0x80f7 |
| disableweapons | 0x82dd | 0x80f8 |
| enableweapons | 0x82de | 0x80f9 |
| disableoffhandweapons | 0x82df | 0x80fa |
| enableoffhandweapons | 0x82e0 | 0x80fb |
| disableweaponswitch | 0x82e1 | 0x80fc |
| enableweaponswitch | 0x82e2 | 0x80fd |
| openpopupmenu | 0x82e3 | 0x80fe |
| openpopupmenunomouse | 0x82e4 | 0x80ff |
| closepopupmenu | 0x82e5 | 0x8100 |
| openmenu | 0x82e6 | 0x8101 |
| closemenu | 0x82e7 | 0x8102 |
| freezecontrols | 0x82e9 | 0x8104 |
| disableusability | 0x82ea | 0x8105 |
| enableusability | 0x82eb | 0x8106 |
| setwhizbyspreads | 0x82ec | 0x8107 |
| setwhizbyradii | 0x82ed | 0x8108 |
| setreverb | 0x82ee | 0x8109 |
| deactivatereverb | 0x82ef | 0x810a |
| setvolmod | 0x82f0 | 0x810b |
| setchannelvolume | 0x82f1 | 0x810c |
| setchannelvolumes | 0x82b8 | 0x810d |
| deactivatechannelvolumes | 0x82b9 | 0x810e |
| playlocalsound | 0x82ba | 0x810f |
| stoplocalsound | 0x82bb | 0x8110 |
| setweaponammoclip | 0x82bc | 0x8111 |
| setweaponammostock | 0x82bd | 0x8112 |
| getweaponammoclip | 0x82be | 0x8113 |
| getweaponammostock | 0x82bf | 0x8114 |
| anyammoforweaponmodes | 0x82c0 | 0x8115 |
| setclientdvar | 0x82c1 | 0x8116 |
| setclientdvars | 0x82c2 | 0x8117 |
| allowads | 0x82c3 | 0x8118 |
| allowjump | 0x82c4 | 0x8119 |
| allowsprint | 0x82c5 | 0x811a |
| setspreadoverride | 0x82c6 | 0x811b |
| resetspreadoverride | 0x82c7 | 0x811c |
| setaimspreadmovementscale | 0x82c8 | 0x811d |
| setactionslot | 0x82c9 | 0x811e |
| setviewkickscale | 0x82ca | 0x811f |
| getviewkickscale | 0x82cb | 0x8120 |
| getweaponslistall | 0x82cc | 0x8121 |
| getweaponslistprimaries | 0x82cd | 0x8122 |
| getweaponslistoffhands | 0x8296 | 0x8123 |
| getweaponslistitems | 0x8297 | 0x8124 |
| getweaponslistexclusives | 0x8298 | 0x8125 |
| getweaponslist | 0x8299 | 0x8126 |
| canplayerplacesentry | 0x829a | 0x8127 |
| canplayerplacetank | 0x829b | 0x8128 |
| visionsetnakedforplayer | 0x829c | 0x8129 |
| visionsetnightforplayer | 0x829d | 0x812a |
| visionsetmissilecamforplayer | 0x829e | 0x812b |
| visionsetthermalforplayer | 0x829f | 0x812c |
| visionsetpainforplayer | 0x82a0 | 0x812d |
| setblurforplayer | 0x82a1 | 0x812e |
| getplayerweaponmodel | 0x82a2 | 0x812f |
| getplayerknifemodel | 0x82a3 | 0x8130 |
| updateplayermodelwithweapons | 0x82a4 | 0x8131 |
| notifyonplayercommand | 0x82a5 | 0x8132 |
| canmantle | 0x82a6 | 0x8133 |
| forcemantle | 0x82a7 | 0x8134 |
| ismantling | 0x82a8 | 0x8135 |
| playfx | 0x82a9 | 0x8136 |
| recoilscaleon | 0x82aa | 0x8137 |
| recoilscaleoff | 0x82ab | 0x8138 |
| weaponlockstart | 0x82ac | 0x8139 |
| weaponlockfinalize | 0x82ad | 0x813a |
| weaponlockfree | 0x82ae | 0x813b |
| weaponlocktargettooclose | 0x82af | 0x813c |
| weaponlocknoclearance | 0x826e | 0x813d |
| visionsyncwithplayer | 0x826f | 0x813e |
| showhudsplash | 0x8270 | 0x813f |
| setperk | 0x8271 | 0x8140 |
| hasperk | 0x8272 | 0x8141 |
| clearperks | 0x8273 | 0x8142 |
| unsetperk | 0x8274 | 0x8143 |
| noclip | 0x8275 | 0x8144 |
| ufo | 0x8276 | 0x8145 |
| moveto | 0x8277 | 0x8146 |
| movex | 0x8278 | 0x8147 |
| movey | 0x8279 | 0x8148 |
| movez | 0x827A | 0x8149 |
| movegravity | 0x827B | 0x814A |
| moveslide | 0x827C | 0x814B |
| stopmoveslide | 0x827D | 0x814C |
| rotateto | 0x827E | 0x814D |
| rotatepitch | 0x827F | 0x814E |
| rotateyaw | 0x8280 | 0x814F |
| rotateroll | 0x8281 | 0x8150 |
| addpitch | 0x8282 | 0x8151 |
| addyaw | 0x8283 | 0x8152 |
| addroll | 0x8284 | 0x8153 |
| vibrate | 0x8285 | 0x8154 |
| rotatevelocity | 0x8286 | 0x8155 |
| solid | 0x8287 | 0x8156 |
| notsolid | 0x8288 | 0x8157 |
| setcandamage | 0x8289 | 0x8158 |
| setcanradiusdamage | 0x828A | 0x8159 |
| physicslaunchclient | 0x828B | 0x815A |
| physicslaunchserver | 0x8247 | 0x815B |
| physicslaunchserveritem | 0x8248 | 0x815C |
| clonebrushmodeltoscriptmodel | 0x8249 | 0x815D |
| scriptmodelplayanim | 0x824A | 0x815E |
| scriptmodelclearanim | 0x824B | 0x815F |
| vehicle_teleport | 0x824C | 0x8160 |
| attachpath | 0x824D | 0x8161 |
| getattachpos | 0x824E | 0x8162 |
| startpath | 0x824F | 0x8163 |
| setswitchnode | 0x8250 | 0x8164 |
| setwaitspeed | 0x8251 | 0x8165 |
| vehicle_finishdamage | 0x8252 | 0x8166 |
| vehicle_setspeed | 0x8253 | 0x8167 |
| vehicle_setspeedimmediate | 0x8254 | 0x8168 |
| vehicle_rotateyaw | 0x8255 | 0x8169 |
| vehicle_getspeed | 0x8256 | 0x816a |
| vehicle_getvelocity | 0x8257 | 0x816b |
| vehicle_getbodyvelocity | 0x8258 | 0x816c |
| vehicle_getsteering | 0x8259 | 0x816d |
| vehicle_getthrottle | 0x825A | 0x816e |
| vehicle_turnengineoff | 0x825B | 0x816f |
| vehicle_turnengineon | 0x825C | 0x8170 |
| getgoalspeedmph | 0x825D | 0x8171 |
| setacceleration | 0x825E | 0x8172 |
| setdeceleration | 0x825F | 0x8173 |
| resumespeed | 0x8260 | 0x8174 |
| setyawspeed | 0x8261 | 0x8175 |
| setyawspeedbyname | 0x8262 | 0x8176 |
| setmaxpitchroll | 0x8263 | 0x8177 |
| setairresistance | 0x8264 | 0x8178 |
| setturningability | 0x8265 | 0x8179 |
| setjitterparams | 0x8224 | 0x817a |
| sethoverparams | 0x8225 | 0x817b |
| joltbody | 0x8226 | 0x817c |
| freevehicle | 0x8227 | 0x817d |
| getwheelsurface | 0x8228 | 0x817e |
| getvehicleowner | 0x8229 | 0x817f |
| setvehiclelookattext | 0x822A | 0x8180 |
| setvehicleteam | 0x822B | 0x8181 |
| setneargoalnotifydist | 0x822C | 0x8182 |
| setvehgoalpos | 0x822D | 0x8183 |
| setgoalyaw | 0x822E | 0x8184 |
| cleargoalyaw | 0x822F | 0x8185 |
| settargetyaw | 0x8230 | 0x8186 |
| cleartargetyaw | 0x8231 | 0x8187 |
| vehicle_helisetai | 0x8232 | 0x8188 |
| setturrettargetvec | 0x8233 | 0x8189 |
| setturrettargetent | 0x8234 | 0x818a |
| clearturrettarget | 0x8235 | 0x818b |
| vehicle_canturrettargetpoint | 0x8236 | 0x818c |
| setlookatent | 0x8237 | 0x818d |
| clearlookatent | 0x8238 | 0x818e |
| setvehweapon | 0x8239 | 0x818f |
| fireweapon | 0x823A | 0x8190 |
| vehicleturretcontrolon | 0x823B | 0x8191 |
| vehicleturretcontroloff | 0x8200 | 0x8192 |
| isturretready | 0x8201 | 0x8193 |
| vehicledriveto | 0x8202 | 0x8194 |
| vehicle_dospawn | 0x8203 | 0x8195 |
| vehicle_isphysveh | 0x8204 | 0x8196 |
| vehphys_crash | 0x8205 | 0x8197 |
| vehphys_launch | 0x8206 | 0x8198 |
| vehphys_disablecrashing | 0x8207 | 0x8199 |
| vehphys_enablecrashing | 0x8208 | 0x819a |
| vehphys_setspeed | 0x8209 | 0x819b |
| vehphys_setconveyorbelt | 0x820A | 0x819c |
| freehelicopter | 0x820B | 0x819D |
| setdamagestage | 0x8002 | 0x82F2 |
| settext | 0x80b6 | 0x827d |
| clearalltextafterhudelem | 0x80b7 | 0x827e |
| setshader | 0x80b8 | 0x827f |
| settargetent | 0x80b9 | 0x8280 |
| cleartargetent | 0x80ba | 0x8281 |
| settimer | 0x80bb | 0x8282 |
| settimerup | 0x80bc | 0x8283 |
| settimerstatic | 0x80bd | 0x8284 |
| settenthstimer | 0x80be | 0x8285 |
| settenthstimerup | 0x80bf | 0x8286 |
| settenthstimerstatic | 0x80c0 | 0x8287 |
| setclock | 0x80c1 | 0x8288 |
| setclockup | 0x80c2 | 0x8289 |
| setvalue | 0x80c3 | 0x828a |
| setwaypoint | 0x80c4 | 0x828b |
| rotatingicon | 0x80c5 | 0x828c |
| secondaryarrow | 0x807b | 0x828d |
| setwaypointiconoffscreenonly | 0x807c | 0x828e |
| fadeovertime | 0x807d | 0x828f |
| scaleovertime | 0x807e | 0x8290 |
| moveovertime | 0x807f | 0x8291 |
| reset | 0x8080 | 0x8292 |
| destroy | 0x8081 | 0x8293 |
| setpulsefx | 0x8082 | 0x8294 |
| setplayernamestring | 0x8083 | 0x8295 |
| changefontscaleovertime | N/A | 0x8296 |
| fadeovertime2 | 0x830b | N/A |
| scaleovertime2 | 0x830c | N/A |
| moveovertime2 | 0x8084 | N/A |
| getorigin | 0x808E | 0x82a0 |
| useby | 0x8092 | 0x82a4 |
| playsound | 0x8093 | 0x82a5 |
| playsoundasmaster | 0x806E | 0x82af |
| playsoundtoteam | 0x8003 | 0x82f3 |
| playsoundtoplayer | 0x8004 | 0x82f4 |
| playloopsound | 0x806F | 0x82b0 |
| getnormalhealth | 0x8074 | 0x82b5 |
| setnormalhealth | 0x804C | 0x82b6 |
| show | 0x804F | 0x82b9 |
| hide | 0x8050 | 0x82ba |
| playerhide | 0x8005 | 0x82f5 |
| showtoplayer | 0x8006 | 0x82f6 |
| enableplayeruse | 0x8007 | 0x82f7 |
| disableplayeruse | 0x8008 | 0x82f8 |
| setscriptmoverkillcam | 0x830A | 0x830a |
| makescrambler | 0x8009 | 0x82f9 |
| makeportableradar | 0x800A | 0x82fa |
| maketrophysystem | 0x800B | 0x82fb |
| setmode | 0x8060 | 0x82ca |
| getmode | 0x8061 | 0x82cb |
| placespawnpoint | 0x800C | 0x82fc |
| setteamfortrigger | 0x800D | 0x82fd |
| clientclaimtrigger | 0x800E | 0x82fe |
| clientreleasetrigger | 0x800F | 0x82ff |
| releaseclaimedtrigger | 0x8010 | 0x8300 |
| isusingonlinedataoffline | 0x8011 | 0x8301 |
| getrestedtime | 0x8012 | 0x8302 |
| sendleaderboards | 0x8013 | 0x8303 |
| logstring | 0x8020 | 0x82ec |
| isonladder | 0x8014 | 0x8304 |
| startragdoll | 0x801E | 0x82ea |
| getcorpseanim | 0x8015 | 0x8305 |
| playerforcedeathanim | 0x8016 | 0x8306 |
| startac130 | 0x8307 | 0x8307 |
| stopac130 | 0x8308 | 0x8308 |
OP_ScriptLocal Calls
These opcodes are used to make local calls to functions or methods in the same script file. After the opcode is a signed 24 bit integer. After casting to a 32 bit integer, it is shifted to the left 8 bits and then to the right 10 bits to get the true offset. For threaded calls (OP_ScriptLocalThreadCall - OP_ScriptLocalMethodChildThreadCall), the parameter count is loaded afterwards as an 8 bit integer.
OP_ScriptFar Calls
These opcodes are used to make far calls to functions or methods in an external script file. During link-time the file name and the function name is used to create the offset. The file name is loaded from the buffer as a 16 bit value. If this value is not equal to zero, then this value is converted to a string, which is the file name. If this value is equal to zero, then a string is loaded afterwards, which is the file name. The function it calls is also loaded in the the buffer as another 16 bit value, and its name is loaded the same way as the file name. After being linked the offset is stored after the opcode as a 24 bit integer. After casting to a 32 bit integer, it is shifted to the left 8 bits and then to the right 10 bits to get the true offset. For threaded calls (OP_ScriptFarThreadCall - OP_ScriptFarMethodChildThreadCall), the parameter count is loaded afterwards as an 8 bit integer.
OP_Script Pointer Calls
These opcodes load a pointer from the stack and simply jump to them. For threaded calls (OP_ScriptThreadCallPointer - OP_ScriptMethodChildThreadCallPointer), the parameter count is loaded afterwards as an 8 bit integer.
Field IDs
In Ghosts and AW, fields have been sorted alphabetically and were then enumerated. This way, fields starting with the letter a such as "alignx" have got the lowest field ids.
Client Fields
| Field | MW3 | AW |
|---|---|---|
| PS3 ID | PS3 ID | |
| name | 0x2D1 | 0x2AF |
| sessionteam | 0x2D2 | 0x3C1 |
| sessionstate | 0x2D3 | 0x3C0 |
| maxhealth | 0x2D4 | 0x279 |
| score | 0x2D5 | 0x394 |
| deaths | 0x2D6 | 0x112 |
| extrascore0 | 0x16D | |
| extrascore1 | 0x16E | |
| killstreakcount | 0x242 | |
| objective | 0x2DA | |
| statusicon | 0x2D7 | |
| headicon | 0x2D8 | 0x1E8 |
| headiconteam | 0x2D9 | 0x1E9 |
| kills | 0x2DB | 0x240 |
| assists | 0x2DC | 0x53 |
| hasradar | 0x2DD | 0x1E4 |
| isradarblocked | 0x2DE | 0x217 |
| radarstrength | 0x2DF | 0x357 |
| radarshowenemydirection | 0x2E0 | 0x356 |
| radarmode | 0x2E1 | 0x355 |
| enemyradarmode | 0x14D | |
| forcespectatorclient | 0x2E2 | 0x19C |
| killcamentity | 0x2E3 | 0x23E |
| killcamentitylookat | 0x2E4 | 0x23F |
| spectatekillcam | 0x3E3 | |
| archivetime | 0x2E5 | 0x4D |
| psoffsettime | 0x2E6 | 0x352 |
| pers | 0x2E7 | 0x311 |
| game_extrainfo | 0x1B5 | |
| playercardpatch | 0x325 | |
| playercardbackground | 0x324 |
Entity Fields
| Field | MW3 | AW |
|---|---|---|
| PS3 ID | PS3 ID | |
| code_classname | 0x2C3 | 0xB1 |
| classname | 0x2C4 | 0xAF |
| origin | 0x2C5 | 0x2EA |
| model | 0x2C6 | 0x2A4 |
| spawnflags | 0x2C7 | 0x3DF |
| target | 0x2C8 | 0x4A9 |
| targetname | 0x2C9 | 0x4AB |
| count | 0x2CA | |
| health | 0x2CB | 0x1EB |
| dmg | 0x2CC | 0x12A |
| angles | 0x2CD | 0x45 |
| birthtime | 0x2CE | 0x81 |
| script_linkname | 0x2CF | 0x39D |
| slidevelocity | 0x2D0 | 0x3D0 |
| owner | 0x2ED |
Vehicle Script Fields
| Field | MW3 | Ghosts | AW |
|---|---|---|---|
| PS3 ID | PC ID | PS3 ID | |
| veh_speed | 0x2FF | 0x2B9 | 0x4FC |
| veh_pathspeed | 0x300 | 0x2B6 | 0x4F9 |
| veh_transmission | 0x301 | 0x2BC | 0x4FF |
| veh_pathdir | 0x302 | 0x2B5 | 0x4F8 |
| veh_pathtype | 0x303 | 0x2B7 | 0x4FA |
| veh_topspeed | 0x304 | 0x2BB | 0x4FE |
| veh_brake | 0x305 | 0x2B0 | 0x4F2 |
| veh_throttle | 0x306 | 0x2BA | 0x4FD |
Hudelem Fields
| Field | MW3 | AW |
|---|---|---|
| PS3 ID | PS3 ID | |
| x | 0x2E8 | 0x534 |
| y | 0x2E9 | 0x53C |
| z | 0x2EA | 0x53F |
| fontscale | 0x2EB | 0x190 |
| font | 0x2EC | 0x18F |
| alignx | 0x2ED | 0x30 |
| aligny | 0x2EE | 0x31 |
| horzalign | 0x2EF | 0x1F8 |
| vertalign | 0x2F0 | 0x504 |
| color | 0x2F1 | 0xC9 |
| alpha | 0x2F2 | 0x3B |
| label | 0x2F3 | 0x249 |
| sort | 0x2F4 | 0x3D9 |
| foreground | 0x2F5 | 0x19E |
| lowresbackground | 0x2F6 | 0x26B |
| hidewhendead | 0x2F7 | 0x1F0 |
| hidewheninmenu | 0x2F8 | 0x1F2 |
| glowcolor | 0x2FA | 0x1C4 |
| glowalpha | 0x2FB | 0x8C |
| archived | 0x2FC | 0x4C |
| showinkillcam | 0x3C8 | |
| hidein3rdperson | 0x2FD | 0x1EF |
| positioninworld | 0x333 | |
| hidewhenindemo | 0x2FE | |
| enablehudlighting | 0x140 |
Vehicle Node Fields
| Field | MW3 | AW |
|---|---|---|
| PS3 ID | PS3 ID | |
| targetname | 0x2C9 | 0x4AB |
| target | 0x2C8 | 0x4A9 |
| script_linkname | 0x2CF | 0x39D |
| script_noteworthy | 0x307 | 0x39F |
| origin | 0x2C5 | 0x2EA |
| angles | 0x2CD | 0x45 |
| speed | 0x308 | 0x3E7 |
| lookahead | 0x309 | 0x25F |