Event

From Dragon Age Toolset Wiki
Revision as of 00:06, 28 June 2009 by BryanDerksen (Talk | contribs) (EVENT_TYPE_GUI_OPENED)

Jump to: navigation, search

This page lists all the scripting events and why they are sent.


Contents

Perception

EVENT_TYPE_PERCEPTION_APPEAR

  • Sent When: A creature enters the perception area of creature receiving the event
  • Sent From: engine
  • Sent To: creatures

Parameters:

  • object oAppear = GetEventObject(ev,0);
  • int nHostile = GetEventInteger(ev, 0); // if hostile or not (TRUE/FALSE)
  • int bStealthed = GetEventInteger(ev, 1); // if stealthed or not (TRUE/FALSE)
  • int nHostilityChanged = GetEventInteger(ev, 2); // if the creature was already perceived but just changed hostility (TRUE/FALSE)


EVENT_TYPE_PERCEPTION_DISAPPEAR

  • Sent When: A creature exits the perception area of creature receiving the event
  • Sent From: engine
  • Sent To: creatures

Parameters:

  • Creator: The creature whose perception system detected a disappearing creature.
  • Target: Disappearing creature
  • Bool 0: Owner is hostile towards disappearing creature


Effects

EVENT_TYPE_APPLY_EFFECT

  • Sent When: an effect is applied to the receiving object
  • Sent From: engine
  • Sent To: creatures, placeables

Parameters:

  • Creator: ???
  • Current Effect: effect being applied

EVENT_TYPE_REMOVE_EFFECT

  • Sent When: an effect is removed from the receiving object
  • Sent From: engine
  • Sent To: creatures, placeables

Parameters:

  • Creator: ???
  • Current Effect: effect being removed



Combat

EVENT_TYPE_COMBAT_INITIATED

  • Sent When: Fires whenever the attack command is added into the command queue. Used to set combat mode and combat camera/music. Also fires by scripting to trigger combat after being attacked or an ally is attack.
  • Sent From: Engine
  • Sent To: creatures, players.

Parameters:

  • Creator: attacking creature
  • Object 0: target creature

EVENT_TYPE_COMBAT_END

  • Sent When: a creature doesn't perceive any more hostiles.
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_MELEE_ATTACK_START

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_COMMAND_PENDING

  • Sent When: Fires at the beginning of the attack part of the attack command OR at the beginning of an ability execution. The attack command includes walk->orient->attack - this event fires right before the attack part. When this event is received, the script is supposed to check if we need to disable a modal talent, verify mana/stamina values, verify valid target, calculate an attack roll (hit/miss/critical) and then calculate damage and inform the engine of the results.
  • Sent From: Engine
  • Sent To: creatures, players

Parameters:

  • Creator: attacking creature
  • Object 0: creature triggering the command
  • Object 1: target creature, if applicable
  • Int 0: command ID of the pending command
  • Int 1: command sub-type, if applicable - used mostly for ability ID for CommandUseAbility.
  • Int 2: ResistenceCheckResult (set in ability_core.nss)

EVENT_TYPE_COMMAND_COMPLETE

  • Sent When: creature finishes doing a command(attack, special ability, spell, conversation, etc)
  • Sent From: engine
  • Sent To: creatures, player

Parameters:

  • Creator: creature acting
  • Int 0 Type of the last command (e.g. COMMAND_TYPE_ATTACKED)
  • Int 1 The status of the execution (COMMAND_SUCCESSFUL, etc)
  • Int 2 last sub command
  • obj(0) The target that command was applied to

EVENT_TYPE_ATTACK_IMPACT

An attack has impacted the target. This can be melee (sword hit), ranged (arrow hit) or spell (fireball explodes). Used for applying damage, and handling abilities that function on hit (Berserk etc').

  • Sent When: Exact moment of impact
  • Sent From: Engine
  • Sent To: attacking creature or player.

Parameters:

  • Creator: attacker
  • Object 0: attacker
  • Object 1: target
  • Int 0: hit result (hit, miss, critical etc')
  • Int 1: damage

EVENT_TYPE_ATTACKED

  • Sent When: another object tried attacking this creature using melee/ranged weapons (hit or miss), talents or spells.
  • Sent From: scripts (Rules_ResolveAttack function)
  • Sent To: creatures, placeables

Parameters:

  • Creator: attacking object
  • Object 0: attacking object

EVENT_TYPE_ALLY_ATTACKED

  • Sent When: an ally has received the ATTACKED event. An ally is an object with the same group ID.
  • Sent From: scripts (rules_core - attack event handler)
  • Sent To: Allied creatures, placeables (of the same group as the sender)

Parameters:

  • Creator: ally object (object being attacked)
  • Object 0: attacking object


Damage and death

EVENT_TYPE_DAMAGED

  • Sent When: an object loses 1 hit point or more
  • Sent From: scripts
  • Sent To: creatures, placeables

Parameters:

  • Creator: creature dealing the damage
  • Int 0: amount of damage dealt
  • Int 1: type of damage dealt

EVENT_TYPE_DOT_TICK

Damage over time tick event. This is activated from EffectDOT and keeps rescheduling itself while DOTs are in effect on the creature

  • Sent When:
  • Sent From:
  • Sent To: creatures

Parameters:

EVENT_TYPE_DYING

  • Sent When: a creature received the killing blow.
  • Sent From: effect_death_h
  • Sent To: the creature getting the killing blow.

creature_core handles XP and treasure awards.

Parameters:

  • Object 0: Killer


EVENT_TYPE_DEATH

  • Sent When: creature or placeable have the death effect applied (regardless of hitpoints)
  • Sent From: scripts
  • Sent To: creatures, placeables

Handles shutdown of creature's AI, perception, etc. and replaces it with a bodybag.

Parameters:

  • Creator: killing object

EVENT_TYPE_RESURRECTION

  • Sent When: Creature resurrected.
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_TEAM_DESTROYED

  • Sent When: Fires when an entire team of creatures is destroyed.
  • Sent From:
  • Sent To: Area the team is in

The event is fired to the last living creature on the team.

Parameters:

  • integer 0 is the team number that was destroyed.


Inventory

EVENT_TYPE_INVENTORY_ADDED

  • Sent When: An item is added to the personal inventory of the object receiving the event or the party inventory.
  • Sent From: engine
  • Sent To: creatures, placeables, player/party

Parameters:

  • Creator: old owner of the item, OBJECT_INVALID if item is created on object
  • Object 0: item being added

EVENT_TYPE_INVENTORY_REMOVED

  • Sent When: An item is removed from the personal inventory of the object receiving the event or the party inventory.
  • Sent From: engine
  • Sent To: creatures, placeables, player/party

Parameters:

  • Creator: new owner of the item, OBJECT_INVALID if item is being destroyed on object
  • Object 0: item being added

EVENT_TYPE_EQUIP

  • Sent When: The current creature has equipped an item
  • Sent From: engine
  • Sent To: creatures

Parameters:

  • Creator: The object equipping an item
  • Object0: The item being equipped

EVENT_TYPE_UNEQUIP

  • Sent When: The current creature has unequipped an item
  • Sent From: engine
  • Sent To: creatures

Parameters:

  • Creator: item being unequipped

EVENT_TYPE_CAMPAIGN_ITEM_ACQUIRED

  • Sent When: items with the ITEM_ACQUIRED_EVENT_ID variable set are picked up.
  • Sent From:
  • Sent To: module

Parameters:

  • Creator: item acquirer
  • Object 0: the item that's been acquired

EVENT_TYPE_INVENTORY_FULL

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_OUT_OF_AMMO

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:


Movement

EVENT_TYPE_BLOCKED

  • Sent When: The current creature's path has been blocked while moving by a creature or door. This event will NOT fire when blocked by placeables who can not change the walk mesh or terrain.
  • Sent From: engine
  • Sent To: creatures

Parameters:

  • Creator: blocking object. Also, this doesn't exist yet, but we'll need this event to fire for any time that the pathfinding failed.

EVENT_TYPE_ENTER

  • Sent When: A creature enters the object receiving the event
  • Sent From: engine
  • Sent To: AOEs, areas, triggers

Parameters:

  • Creator: creature entering the object

EVENT_TYPE_EXIT

  • Sent When: A creature exits the object receiving the event
  • Sent From: engine
  • Sent To: AOEs, areas, triggers

Parameters:

  • Creator: creature exiting the object

EVENT_TYPE_REACHED_WAYPOINT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:


Traps

EVENT_TYPE_APPROACH_TRAP

  • Sent When: Trap triggered and the creature receiving this event should approach the trap
  • Sent From:
  • Sent To: creature

Parameters:

  • Object 0: trap

EVENT_TYPE_TRAP_ARM

  • Sent When: Sent by script to request that a trap arm itself.
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_TRAP_TRIGGER_ENTER

  • Sent When:
  • Sent From: area of effect 'trigger'
  • Sent To: trap's signal target(s).

Parameters:

EVENT_TYPE_TRAP_DISARMED

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_TRAP_TRIGGER_ARMED

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_TRAP_TRIGGER_EXIT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_TRAP_TRIGGERED

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:


Game state events

EVENT_TYPE_SPAWN

  • Sent When: an object spawns into the game. This event can fire only once per game for each object, regardless of save games.
  • Sent From: engine
  • Sent To: creatures, placeables, triggers, AOEs,

Parameters:

  • Creator: ??? -> should probably be parent of object spawning (area. module etc')

EVENT_TYPE_MODULE_START

  • Sent When: The module starts. This can happen only once for a single game instance.
  • Sent From: engine
  • Sent To: module

Parameters:

  • Creator: ???

EVENT_TYPE_MODULE_LOAD

  • Sent When: The module loads from a save game. This event can fire more than once for a single module or game instance.
  • Sent From: engine
  • Sent To: module

Parameters:

  • Creator: ???

EVENT_TYPE_AREALOAD_SPECIAL

  • Sent When: it is for playing things like cutscenes and movies when you enter an area, things that do not involve AI or actual game play
  • Sent From: engine
  • Sent To:

Parameters:

EVENT_TYPE_AREALOAD_PRELOADEXIT

  • Sent When: for things you want to happen while the load screen is still up, things like moving creatures around
  • Sent From: engine
  • Sent To:

Parameters:

EVENT_TYPE_AREALOAD_POSTLOADEXIT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

Sent by: The engine When: fires at the same time that the load screen is going away, and can be used for things that you want to make sure the player sees.

EVENT_TYPE_AREALOADSAVE_POSTLOADEXIT

  • Sent When: fires at the same time that the load screen is going away, but only when loading a savegame.
  • Sent From: engine
  • Sent To:

Parameters:

EVENT_TYPE_GAMEMODE_CHANGE

  • Sent When: Game Mode Switch
  • Sent From:
  • Sent To: module

Parameters:

  • int(0) - New Game Mode (GM_* constant)
  • int(1) - Old Game Mode (GM_* constant)

EVENT_TYPE_DELAYED_GM_CHANGE

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_SET_GAME_MODE

  • Sent When: the game mode is set
  • Sent From:
  • Sent To: module

Parameters:

  • the game mode being set is carried as an integer on the event.


Plots

EVENT_TYPE_SET_PLOT

  • Sent When: A plot is setting a plot flag
  • Sent From: engine
  • Sent To: plot script

Parameters:

  • Creator: owner of the plot table, should be a player
  • String 0: plot GUID, defined as string constant
  • Int 1: bit flag number being affected
  • Int 2: the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')
  • Int 3: On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)
  • Int 4: 1 if the current flag (Int 1) is defined, 0 for normal flag.

IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!

EVENT_TYPE_GET_PLOT

  • Sent When: A plot is setting a plot flag
  • Sent From: engine
  • Sent To: plot script

Parameters:

  • Creator: owner of the plot table, should be a player
  • String 0: plot GUID, defined as string constants
  • Int 1: bit flag number being affected
  • Int 4: 1 if the current flag (Int 1) is defined, 0 for normal flag.


Dialogue

EVENT_TYPE_DIALOGUE

  • Sent When: An object tries to initiate dialog with the object receiving the event, either by clicking or by scripting
  • Sent From: engine (clicking on object to talk) or scripts (manually sending this event)
  • Sent To: creatures, placeables

Parameters:

  • Creator: Initiating object
  • String 0: Dialog to initiate, "" to use default object dialog

EVENT_TYPE_DELAYED_SHOUT

  • Sent When: Used to fire a dialog shout every few seconds.
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_AMBIENT_CONTINUE

  • Sent When: conversation ends or player is nearby to resume ambient behaviour
  • Sent From: engine
  • Sent To: creature

If the event was fired because the party is near a creature, the 'instigator' is the nearest party member. If the event was fired at the end of a conversation, the 'instigator' is the creature conversing.

Parameters:

  • Object 0: Instigator

Party management

EVENT_TYPE_PARTYMEMBER_ADDED

  • Sent When: Party member added to active party using the party GUI
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_PARTYMEMBER_DROPPED

  • Sent When: Party member removed from active party using the party GUI
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_PARTYPICKER_CLOSED

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_PARTY_MEMBER_HIRED

  • Sent When: Fires first time a party member is added to the party. For plot followers: follower recruited (added to pool). For other followers: UT_Hire called
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_PARTY_MEMBER_FIRED

  • Sent When: Fires when an active or locked-active party member is removed from the active party
  • Sent From:
  • Sent To:

Parameters:


EVENT_TYPE_PARTY_MEMBER_RES_TIMER

Resurrection timer used if a creature dies in explore mode.

party members are rezzed on this event if it happens outside of combat.

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_GIFT_ITEM

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_MODULE_HANDLE_FOLLOWER_DEATH

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_MODULE_HANDLE_GIFT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

  • Follower: Object 0
  • GiftTag: String 0

EVENT_TYPE_SUMMON_DIED

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:


Character generation and level advancement

EVENT_TYPE_CHARGEN_START and EVENT_TYPE_CHARGEN_END

A range of event constants (nEvent >= EVENT_TYPE_CHARGEN_START && nEvent <= EVENT_TYPE_CHARGEN_END) that occur during character generation.

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_PLAYER_LEVELUP

  • Sent When: Creature is spawned.
  • Sent From: Fired by sys_rewards_h.RewardXP (the levelup system)
  • Sent To: player_core

Parameters:

EVENT_TYPE_PLAYERLEVELUP

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_CHARGEN_AUTOLEVEL

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_MODULE_CHARGEN_DONE

Fired the the core chargen script into the module

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_GUI_OPENED

GUI tutorial calls

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

World map

EVENT_TYPE_TRANSITION_TO_WORLD_MAP

  • Sent When: Player uses the generic transition system to open the world map
  • Sent From:
  • Sent To: module

Parameters:

  • string sWorldMap = GetEventString(ev, 0);
  • string sTransType = GetEventString(ev, 1);
  • string sWorldMapLoc1 = GetEventString(ev, 2);
  • string sWorldMapLoc2 = GetEventString(ev, 3);
  • string sWorldMapLoc3 = GetEventString(ev, 4);
  • string sWorldMapLoc4 = GetEventString(ev, 5);
  • string sWorldMapLoc5 = GetEventString(ev, 6);


EVENT_TYPE_WORLD_MAP_CLOSED

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

  • Integer 0: close type, 0 for cancel, 1 for travel.

EVENT_TYPE_WORLD_MAP_USED

!!Note: This event may be obsolete, I think EVENT_TYPE_BEGIN_TRAVEL is the one that actually fires now.!!

  • Sent When: the player clicks on a destination in the world map
  • Sent From: engine
  • Sent To: module

Parameters:

  • int nFrom = GetEventInteger(ev, 0); // travel start location
  • int nTo = GetEventInteger(ev, 1); // travel target location

EVENT_TYPE_BEGIN_TRAVEL

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

  • string sSource = GetEventString(ev, 0); // area tag source location
  • string sTarget = GetEventString(ev, 1); // area tag target location
  • string sWPOverride = GetEventString(ev, 2); // waypoint tag override
  • int nSourceTerrain = GetEventInteger(ev, 0);
  • int nTargetTerrain = GetEventInteger(ev, 1);
  • int nWorldMap = GetEventInteger(ev, 2);
  • object oSourceLocation = GetEventObject(ev, 0); // source location object

EVENT_TYPE_WORLDMAP_PRETRANSITION

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_WORLDMAP_POSTTRANSITION

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:

EVENT_TYPE_FINISH_TRAVEL

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:


Found in placeable_core

EVENT_TYPE_PLACEABLE_ONCLICK

  • Sent When: player clicks on object.
  • Sent From: engine
  • Sent To: placeable

Parameters:

EVENT_TYPE_USE

  • Sent When: creature clicks on the placeable.
  • Sent From: engine
  • Sent To: placeable

Parameters:


EVENT_TYPE_UNLOCKED

  • Sent When: Sent by script when placeable is unlocked.
  • Sent From:
  • Sent To: placeable

Parameters:

EVENT_TYPE_SET_OBJECT_ACTIVE

  • Sent When: Sent by script to change active state. Needed since CommandDoFunction was removed and we're using CommandDoEvent
  • Sent From:
  • Sent To:

Parameters:


EVENT_TYPE_PLACEABLE_COLLISION

  • Sent When: player collides with object (if EnableCollisionEvent column in placeables.xls is non-zero).
  • Sent From: engine
  • Sent To:

Parameters:

EVENT_TYPE_POPUP_RESULT

  • Sent When: player responds to area transition prompt.
  • Sent From:
  • Sent To: module

Parameters:

  • object oOwner = GetEventObject(ev, 0); // owner of popup
  • int nPopupID = GetEventInteger(ev, 0); // popup ID
  • int nButton = GetEventInteger(ev, 1); // button result (1 - 4)
  • string sInput = GetEventString(ev,0); // string entered into optional text field

Calling the "ShowPopup" script function causes a popup window to be displayed to the user, with up to four buttons whose text is defined in the "popups" 2DA and up to one text input field (with a filter on the input the player can type there that's the same as the filter on player names - up to 20 characters, no spaces, limited punctuation, no empty strings). This event is generated and sent to the module script with the popup's result.

Found in rules_core

EVENT_TYPE_ITEM_ONHIT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_CONFUSION_CALLBACK

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:



EVENT_TYPE_DESTROY_OBJECT

  • Sent When: Object should be destroyed
  • Sent From:
  • Sent To:

Parameters:

Found in player_core

EVENT_TYPE_HEARTBEAT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:


EVENT_TYPE_LOAD_TACTICS_PRESET

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:




Spellcasting

EVENT_TYPE_ABILITY_CAST_START

- Update mana/stamina - Calculate *combat* attack/miss (only for hit based talents like Deadly Strike) - Calculate resistance check/failure for non-AOE abilities (if valid) - Calculate *combat* damage (only for hit based talents like Deadly Strike) Most of the above information is then passed on to the engine who need to decide what animations to play (or not to play). The engine then returns most of this information along with the CAST_IMPACT event back to this script (see below)

  • Sent When: whenever any ability (spell, talent) is used
  • Sent From: engine
  • Sent To:

Parameters:

  • Object 1 - the item used to cast the ability (optional)
  • Object 2 - the object that the ability was targeted

note: in case of a projectile impact, there might be more than one target (object 2+...) this allows doing things like lightning bolts going through targets, but this is not currently made use of in Dragon Age.

EVENT_TYPE_ABILITY_CAST_IMPACT

  • Sent When: Fires for the moment of impact for every ability. This is where damage should be applied, fireballs explode, enemies get poisoned etc. We assume that stamina/mana have been deducted when the ability was triggered (COMMAND_PENDING stage)
  • Sent From: engine
  • Sent To:

Parameters:

  • Object 1 - the item used to cast the ability (optional)
  • Object 2 - the object that the ability was targeted

note: in case of a projectile impact, there might be more than one target (object 2+...) this allows doing things like lightning bolts going through targets, but this is not currently made use of in Dragon Age.

EVENT_TYPE_CAST_AT

  • Sent When: placeable is hit by a spell.
  • Sent From: engine
  • Sent To: placeable

Parameters:

EVENT_TYPE_COMBO_IGNITE

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:


EVENT_TYPE_SPELLCASTAT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_SPELLSCRIPT_CAST

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_SPELLSCRIPT_DEACTIVATE

  • Sent When: Talent deactivated
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_SPELLSCRIPT_IMPACT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_SPELLSCRIPT_PENDING

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:


Proving events

EVENT_TYPE_PROVING_ENTER

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_PROVING_EXIT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_PROVING_LOSE

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_PROVING_START

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_PROVING_WIN

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:



Debugging

EVENT_TYPE_DEBUG_KICKSTART_AI

  • Sent When: Kickstart the AI if it was frozen out. Debug Event, do not use in production scripts
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_DEATH_RES_PARTY

Party Resurrection button (cheat, death UI)

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:


EVENT_TYPE_DEBUG_RESURRECTION

This makes the resurrection button work.

  • Sent When:
  • Sent From:
  • Sent To: module

Parameters:


Stats

EVENT_TYPE_STAT_REGEN

  • Sent When: Stat regeneration. might be changed in the future.
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_MANA_STAM_DEPLETED

  • Sent When: Creature ran out of mana or stamina
  • Sent From:
  • Sent To:

Parameters:


Miscellaney

EVENT_TYPE_CLICK

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_CUSTOM_COMMAND_COMPLETE

Also EVENT_TYPE_CUSTOM_EVENT_01 to EVENT_TYPE_CUSTOM_EVENT_08

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_FAILTOOPEN

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_HANDLE_CUSTOM_AI

Handle any custom AI before handling the built-in AI.

This event is sent to creature scripts after custom AI has been enabled (call CAI_SetCustomAI(OBJECT_SELF, CAI_INITIATE) in the EVENT_TYPE_SPAWN event).

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_INVALID

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_LISTENER

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_LOCKED

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_QA_EVENT

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_QA_EVENT_BLA

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_STEALING_FAILURE

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_STEALING_SUCCESS

  • Sent When:
  • Sent From:
  • Sent To:

Parameters:

EVENT_TYPE_UNIQUE_POWER

  • Sent When: a unique power for an item is used
  • Sent From:
  • Sent To:

Parameters:

  • Ability = Integer 0
  • Item = Object 0
  • Caster = Object 1
  • Target = Object 2


Shouts

Shouts (events) are used to make creatures communicate with one another. This is a list of all the shouts referenced in the AI documentation.

Creature Shouts

  • SHOUT_TYPE_WASATTACKED When I am attacked, signal this event for all allies. What do the allies do? They will go into combat round, not specifically targeting this attacker but becoming combat ready.
  • SHOUT_TYPE_SAWENEMY Attack enemy.
  • SHOUT_TYPE_KILLEDME Attack enemy.
  • SHOUT_TYPE_SWITCH_MELEE Will switch to melee weapons, useful for certain plot situations
  • SHOUT_TYPE_WAKE_UP Any creature that hears this shout will wake up, if sleeping. This shout needs to be manually called.
  • SHOUT_TYPE_FOUND_SOMEONE (YaronToDo) a scout sees someone they broadcasts this event. Allies go here. (NOT DONE)

Commander-Specific Orders

  • SHOUT_TYPE_FINISHHIM Attacks a specified enemy till they are dead. A Commander issues order generally.
  • SHOUT_TYPE_ATTACK_WIZARD (YaronToDo) Starting targeting wizard class enemies instead of others.
  • SHOUT_TYPE_FLANK Rogues will get into a flanking position to an appropriate enemy
  • SHOUT_TYPE_SWITCH_RANGED Will randomly choose one ally and ask them to switch to a ranged weapon. This is mostly done to even out the number of participants in melee battle for animation purposes (closer to even the sides are, the better things look)