Traps 2da

From Dragon Age Toolset Wiki
Jump to: navigation, search

The traps 2da defines the various elements that constitute each trap in the game.

The 2da is defined as an m2da in the M2DA_base 2da and has an ID of 182. It can be extended by m2da fragments which have names starting with traps. It can be referenced in scripting using the TABLE_TRAPS 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 Human-friendly name for the trap
TrapPlaceable string
aoe_index int A row ID in the Persistent 2da
AoEVFX int A row ID in the VFX_Base 2da
HideWhenUndetected int
AnimImpact int [Undocumented]
ResetDelay float Offset added to the longest duration effect to determine when trap is reset
Projectile int A row ID in the PRJ_base 2da
ProjectileCount int The number of projectiles released
ProjectileCrust int A row ID in the VFX_Base 2da
LocationVfx int
  • If negative, this will be played at the location of the placeable
  • If positive, this will be applied on the target object
Effect1 int The literal value of an TRAP_EFFECT_* constant
Effect1_Float1 float (optional) A parameter to configure the effect
Effect1_Float2 float (optional) A parameter to configure the effect
Effect1_Int1 int (optional) A parameter to configure the effect
Effect1_Int2 int (optional) A parameter to configure the effect
Effect1_Duration float (optional) The duration of a temporary effect
Effect1_Resource string (optional) Resource name of a resource used or created by the effect
Effect2 int See Effect1
Effect2_Float1 float See Effect1_Float1
Effect2_Float2 float See Effect1_Float2
Effect2_Int1 int See Effect1_Int1
Effect2_Int2 int See Effect1_Int2
Effect2_Duration float See Effect1_Duration
Effect2_Resource string See Effect1_Resource
Effect3 int See Effect1
Effect3_Float1 float See Effect1_Float1
Effect3_Float2 float See Effect1_Float2
Effect3_Int1 int See Effect1_Int1
Effect3_Int2 int See Effect1_Int2
Effect3_Duration float See Effect1_Duration
Effect3_Resource string See Effect1_Resource
Effect4 int See Effect1
Effect4_Float1 float See Effect1_Float1
Effect4_Float2 float See Effect1_Float2
Effect4_Int1 int See Effect1_Int1
Effect4_Int2 int See Effect1_Int2
Effect4_Duration float See Effect1_Duration
Effect4_Resource string See Effect1_Resource

Remarks

The sys_traps_h._Trap_ApplyEffect function is used to map the TRAP_EFFECT_* values onto the appropriate effect type and creates the actual effect. However this is not a direct translation so, for example TRAP_EFFECT_PARALYSE has a literal value of 10 but is mapped onto EFFECT_TYPE_PARALYSE which as a literal value of 8. Adding new trap effects would require the _Trap_ApplyEffect function to be updated and all dependant scripts would have to be recompiled.