This 2da file gives the game the resource references for scripts to run when under effect of particular statuses.
These either are additional (eg; being Confused) to the regular AI scripts (ie both heartbeat scripts run) or supplant the AI entirely (eg; domination).
Hardcoded Notes
The effects here are internally run values - you cannot define new ones (there is no "EffectCustomState") and cannot move them around, so "Confused" will always be ID 2.
This number can be seen using GetEffectInteger since the 0 index value is set to this "state", eg EffectConfused() creates one which has the ID of GetEffectInteger(EffectConfused(), 0) set to 2.
It's a little moot for the most part since GetEffectType seems to identify most if not all of the complex state types properly anyway.
A list of effects and their identifiers:
Script Effect Creator | GetEffectInteger(eEffect, 0) statescripts.2da line ID | Notes |
---|---|---|
EffectCharmed | 1 | |
EffectConfused | 2 | |
EffectFrightened | 3 | |
EffectTurned | 4 | By default Bioware used the same script for this and Fear (nw_g0_fear) thus they do the same thing. |
EffectDazed | 5 | Dazed will not trigger it's script. This can be considered a bug. Creatures still retain some control so this shouldn't be a big issue. |
EffectStunned | 6 | |
EffectDomated EffectCutsceneDominated | 7 | What script is used depends on the creature applying the effect. While it should runs script in line 7 when the creature doing the dominating is a NPC it will not - but will set the creature to uncommandable. NPC on NPC also do not add associates properly. Replaces all the scripts of a target line 10 - 22 if the creature dominating is a PC and the target is an NPC. Need to test PC vs PC and NPC vs NPC more fully. |
EffectParalyze | 8 | "Held" script is Paralysis. |
EffectSleep | 9 |
2da Contents
2da Columns
Column Label | Example | Valid Values | Description and Notes |
---|---|---|---|
ID (Blank) | 0 | 0-35 | These are hardcoded lines and you cannot move or add more. 0 appears to be unused by the game. |
STATENAME | Charmed | Human readable name | Essentially label of the state |
SCRIPTNAME | nw_g0_charm | Resref of script | For lines 0 to 9: Script that runs every 6 seconds except Dazed (line 5) which will never fire. For lines 10 to 35: Domination and DM possession scripts will override the usual creature scripts, obviously when dominated or when DM possessed. |