...
- Exist as an OBJECT_TYPE_AREA_OF_EFFECT and searchable specifically with GetFirstObjectInShape and GetNearestObject (yes both movable and non-movable ones)
- Has a tag matching the "LABEL" column and findable using GetObjectByTag and GetNearestObjectByTag
- This is also - without further interaction - the only way to get the bounding sizes and other properties
- Has special properties set on it regarding:
- The creator (the object the script applying the effect was called from) returned by GetAreaOfEffectCreator(OBJECT_SELF)
- The event scripts: On Enter, On Exit and Heartbeat - done from the script command or the 2da line - there is also a User Defined Event apparently available, but cannot be set at inception but later can with SetEventScript (needs testing!)
- The size and shape of it from the 2da entry
- The duration remaining (not sure this can be retrieved unless it's a mobile one)
- The spell ID which is used when applying effects (so they can be accurately removed later) - however GetSpellId() fails, instead use GetEffectSpellId(EffectDazed()) as a workaround
- The spell save DC - should set to the right amount when GetSpellSaveDC is called, and should in later versions of NWN:EE correctly save
- The caster level - should be set to the right amount when using ResistSpell
- GetCasterLevel() (any variant) does not work properly and changesa s changes as new spells are cast even in NWN:EE
- Need to test the effect caster level assigned by an effectEffects applied by an AOE in has no caster level set (making them always dispellable). Note that effects caused by an AOE usually should only be removed when the AOE itself is - if coded well this will always be the case - so could be made extraordinary instead.
- If the AOE calls EventSpellCastAt it will use the creator, not itself, as the caster
- If the AOE applies an effect apparently (needs fully testing - in the case of now-invalid casters also!) it gets created with the correct spell ID and that the creator is GetAreaOfEffectCreator.
...
- An orientation is properly set (especially relevant for square and rectangular areas)
Scripts
There are actually 4 event scripts, 3 defined in vfx_persistent.2da and apparently an On User Defined one.
- OnEnter - fired when a object enters
- OnExit - fired when an object leaves, or when the AOE is destroyed/expires and the objects all "leave" it
- OnHeartbeat - fired roughly every round (6 seconds) to apply continual effects for those with in
- OnUserDefined - when SignalEvent is used on the object and it is of type UserDefinedEvent.
Hardcoded Aspects
Line 7 VFX_PER_WALLBLADE is the only persistent VFX that enables environmental mapping on the model. Sadly we can't bypass this with progfx.2da unhardcoding.
...
Mobile AOEs (usually cast on self) if they don't get their position updated can mean the person moving around can move out of them - especially if at high speed in a small AOE object or on a laggy server.
Since removing all effects from the spell removes the AOE itself this is a fun time when a bard manages to stop singing because they ran outside of their own singing AOE!
...