Effects 2da
The effects 2da defines the different types of game effects which exist.
The 2da is defined as an m2da in the M2DA_base 2da and has an ID of 136. It can be extended by m2da fragments which have names starting with effect. It can be referenced in scripting using the TABLE_EFFECTS constant defined in 2da_constants_h.
Structure
Column | Type | Description |
---|---|---|
ID | int | A number that uniquely identifies the entry (unless creating an M2DA override). ID numbers are listed from smallest to highest within a given file but do not need to be consecutive. |
Label | string | Used to generate human readable debug output |
Type | int | |
CancelOnPlotEvent | int | |
bConsiderHostile | int | |
bDropStealth | int | |
AllowPermanent | int | |
AllowInstant | int | |
AllowTemp | int | |
AffectImmortal | int | |
AffectPlot | int | |
Flags | int | |
FlagsOld | comment | |
Comment | comment | |
Notes | comment | |
Priority | int | Animation priority, from low (0) to high (999). If the priority field is set, the animation associated with the effect will only play if no other effect with a higher priority is present on the creature. |
Animation | int | An ID in an ANIM_2da file, defining an animation that will be played while the effect is active. |
IgnoreDeath | int | |
SimpleEffect | int | |
CameraFollow | bool |
Remarks
Effects with an ID under 1000 are engine effects, meaning their apply and remove handlers are not signalled for processing into the scripting virtual machine but instead they are handled by the game engine. However some engine effects (such as VFX and Screenshake) have their effect constructor defined in scripting and require the proper effect_<effect-name>_h
script file to be included.
Effects with an ID of 1000 or more are scripted effects, meaning they are handled entirely in scripting.
For all effects with a positive Priority, the engine assumes that INT 2 (set to 1) is used to indicate if an angle (in degrees) will be stored in FLOAT 0. This angle will be used to orient creatures playing reaction animations.