EEex Opcodes
Opcode |
Name |
|---|---|
Set Temporary AI Script |
|
Set Extended Stat |
|
Invoke Lua |
|
Screen Effects |
Opcode #400 (Set Temporary AI Script)
Summary
Works exactly like Opcode #82, except:
The original script is restored when the duration runs out or the effect otherwise ends.
An empty resref can null a script slot.
Warning
Any changes made to the script level after this opcode has taken effect will be lost when the effect expires.
Opcode Field |
Name |
Description |
|---|---|---|
Parameter #2 |
Script Level |
The script level to set. Values correspond to
|
Resource |
Script Resref |
The resref to set the script level to. |
Opcode #401 (Set Extended Stat)
Summary
Modifies the value of an extended stat. Extended stats are those with ids outside of the vanilla range in STATS.IDS.
Note
All operations are clamped such that results outside of the stat's range will resolve to the exceeded extrema.
Opcode Field |
Name |
Description |
|---|---|---|
Parameter #1 |
Operand Value |
The value used to modify the stat via the method defined by |
Parameter #2 |
Operation Type |
The method used to modify the stat:
|
Special |
Extended Stat ID |
The id of the extended stat to modify. |
To register an extended stat:
Append
STATS.IDSwith a unique id greater than202.Define the stat's minimum, maximum, and default values by appending
X-STATS.2DA.
Opcode #402 (Invoke Lua)
Summary
Invokes a global Lua function.
Note
The function name must be 8 characters or less, and be ALL UPPERCASE.
Opcode Field |
Name |
Description |
|---|---|---|
Resource |
Lua Callback Name |
The all-uppercase name of the Lua function callback. Function signature: FUNC(op402: CGameEffect, sprite: CGameSprite)
|
Opcode #403 (Screen Effects)
Summary
Registers a global Lua function that is called whenever an effect is added to the target creature.
If this function returns true the effect being added is blocked.
Note
The function name must be 8 characters or less, and be ALL UPPERCASE.
Opcode Field |
Name |
Description |
|---|---|---|
Resource |
Lua Callback Name |
The all-uppercase name of the Lua function callback. Function signature: FUNC(op403: CGameEffect, effect: CGameEffect, sprite: CGameSprite) -> boolean
|