Difference between revisions of "Action"

From NWN Lexicon
Jump to: navigation, search
(Created page with "=ACTION_* Constant Group= Standard actions. <br /><br /> ===Constants=== {| border="1" ! width="25%" | Constant ! width="10%" | Value ! Description |- | v...")
 
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=ACTION_* Constant Group=
+
{{DISPLAYTITLE:ACTION_* Constant Group}}
 +
Constants representing standard actions that objects can perform. See [[:Category:Action on Object Functions]] for most of these.
  
Standard actions.
+
Note there are several things that would be considered "actions" that cannot be detected by this, especially since ACTION_INVALID can be returned in a lot of cases.
  
<br /><br />
+
For some stances (Parry, Defensive Casting, etc.) see relevant stance functions.
  
===Constants===
+
==Constants==
  
 
+
{| class="wikitable padding-5 sortable" border="1" style="min-width: 600px;"
 
+
|-
{| border="1"
+
! style="text-align: left;" | Constant
! width="25%" | Constant
+
! style="text-align: left;" width="60" | Value
! width="10%" | Value
+
! style="text-align: left;" | Function
! Description
+
! style="text-align: left;" class="unsortable" | Description
 
|-
 
|-
| valign="top" | ACTION_ANIMALEMPATHY
+
| ACTION_ANIMALEMPATHY
 
| 16
 
| 16
|
+
| [[ActionUseSkill]]([[Skill|SKILL_ANIMAL_EMPATHY]], oAnimal)
{| style="border: 0" width="100%"
+
| When using the Animal Empathy skill
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_ATTACKOBJECT
+
| ACTION_ATTACKOBJECT
 
| 3
 
| 3
|
+
| [[ActionAttack]]
{| style="border: 0" width="100%"
+
| Attacking an object. Could be ranged, melee, or even potentially a special attack since hardly any are listed here (only Ki Damage and Smite Evil for some reason).
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_CASTSPELL
+
| ACTION_CASTSPELL
 
| 4
 
| 4
|
+
| [[ActionCastSpellAtObject]] or [[ActionCastSpellAtLocation]] or appropriate talent found.
{| style="border: 0" width="100%"
+
| Given feat usage isn't categorised here it could also return for ActionUseFeat(). Needs further testing.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_CLOSEDOOR
+
| ACTION_CLOSEDOOR
 
| 6
 
| 6
|
+
| [[ActionCloseDoor]]
{| style="border: 0" width="100%"
+
| Closing a door
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_COUNTERSPELL
+
| ACTION_COUNTERSPELL
 
| 31
 
| 31
|
+
| [[ActionCounterSpell]]
{| style="border: 0" width="100%"
+
| Counter spelling a target creature
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_DIALOGOBJECT
+
| ACTION_DIALOGOBJECT
 
| 7
 
| 7
|
+
| [[ActionStartConversation]]
{| style="border: 0" width="100%"
+
| This is when in a conversation. Note PC's can functionally move during these so unknown what they return if also moving to a point (in fact NPCs can do some actions during conversation too...).
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_DISABLETRAP
+
| ACTION_DISABLETRAP
 
| 8
 
| 8
|
+
| [[ActionUseSkill]]([[Skill|SKILL_DISABLE_TRAP]], oTrap)
{| style="border: 0" width="100%"
+
| Disabling a trap
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_DROPITEM
+
| ACTION_DROPITEM
 
| 2
 
| 2
|
+
| [[ActionPutDownItem]]
{| style="border: 0" width="100%"
+
| Putting down an item
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_EXAMINETRAP
+
| ACTION_EXAMINETRAP
 
| 11
 
| 11
|
+
| [[ActionUseSkill]]([[Skill|SKILL_DISABLE_TRAP]], oTrap, [[Subskill|SUBSKILL_EXAMINETRAP]])
{| style="border: 0" width="100%"
+
| Examining a trap.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_FLAGTRAP
+
| ACTION_FLAGTRAP
 
| 10
 
| 10
|
+
| [[ActionUseSkill]]([[Skill|SKILL_DISABLE_TRAP]], oTrap, [[Subskill|SUBSKILL_FLAGTRAP]])
{| style="border: 0" width="100%"
+
| Flagging a trap.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_FOLLOW
+
| ACTION_FOLLOW
 
| 35
 
| 35
|
+
| [[ActionForceFollowObject]]
{| style="border: 0" width="100%"
+
| This is usually present until cleared or interrupted.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_HEAL
+
| ACTION_HEAL
 
| 33
 
| 33
|
+
| [[ActionUseSkill]]([[Skill|SKILL_HEAL]], oToHeal, 0, oHealingKit)
{| style="border: 0" width="100%"
+
| Healing using a healing kit
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_INVALID
+
| ACTION_INVALID
 
| 65535
 
| 65535
|
+
| Many! Most other actions.
{| style="border: 0" width="100%"
+
| This fires for a lot of things, such as a player using WASD movement, animations and other actions not listed on this page. See [[GetCurrentAction]] for more information.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_ITEMCASTSPELL
+
| ACTION_ITEMCASTSPELL
 
| 19
 
| 19
|
+
| [[ActionUseItemOnObject]]/[[ActionUseItemAtLocation]] (or Talents)
{| style="border: 0" width="100%"
+
| Scrolls, wands, potions and other magical items which can cast spells.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_KIDAMAGE
+
| ACTION_KIDAMAGE
 
| 41
 
| 41
|
+
| [[ActionUseFeat]]([[Feat|FEAT_KI_DAMAGE]], oTarget)
{| style="border: 0" width="100%"
+
| Ki Damage feat. '''This constant is likely not returned by [[GetCurrentAction]] and instead it will be ACTION_ATTACK.'''
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_LOCK
+
| ACTION_LOCK
 
| 14
 
| 14
|
+
| [[ActionLockObject]] or [[ActionUseSkill]]([[Skill|SKILL_OPEN_LOCK]], oDoorOrPlaceable)
{| style="border: 0" width="100%"
+
| The second one may not work, depending on the circumstance (while the skill is called Open Lock, it is also used for locking).
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_MOVETOPOINT
+
| ACTION_MOVETOPOINT
 
| 0
 
| 0
|
+
| [[ActionMoveToObject]] [[ActionMoveToLocation]]
{| style="border: 0" width="100%"
+
| This is specifically moving to a clicked point it seems, since it uses ACTION_INVALID if the player is using WASD movement. No idea if [[ActionMoveAwayFromLocation]] or [[ActionMoveAwayFromObject]] trigger it.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_OPENDOOR
+
| ACTION_OPENDOOR
 
| 5
 
| 5
|
+
| [[ActionOpenDoor]]
{| style="border: 0" width="100%"
+
| Opening a door.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_OPENLOCK
+
| ACTION_OPENLOCK
 
| 13
 
| 13
|
+
| [[ActionUseSkill]]([[Skill|SKILL_OPEN_LOCK]], oLockedObject)
{| style="border: 0" width="100%"
+
| Opening a lock on a door or placeable.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_PICKPOCKET
+
| ACTION_PICKPOCKET
 
| 34
 
| 34
|
+
| [[ActionUseSkill]]([[Skill|SKILL_PICK_POCKET]], oPickPocketTarget)
{| style="border: 0" width="100%"
+
| Picking someones pocket. Nice gems you have, shame if someone snatched them from you...
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_PICKUPITEM
+
| ACTION_PICKUPITEM
 
| 1
 
| 1
|
+
| [[ActionPickUpItem]]
{| style="border: 0" width="100%"
+
| Picking up an item (may include walking to it first)
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_RANDOMWALK
+
| ACTION_RANDOMWALK
 
| 43
 
| 43
|
+
| [[ActionRandomWalk]]
{| style="border: 0" width="100%"
+
| This was added in the Hordes sets of patches. It is the value associated with [[ActionRandomWalk]](). Note: In pre-1.64 patches, it referenced the wrong line in the actions.2da file, but it has now been corrected.
| style="border: 0" width="99%" valign="top" | This was added in the hordes sets of patches. It is the value in association with ActionRandomWalk(). Note: In pre-1.64 patches, it referenced the wrong line in the actions.2da file, but it has now been corrected.
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_RECOVERTRAP
+
| ACTION_RECOVERTRAP
 
| 9
 
| 9
|
+
| [[ActionUseSkill]]([[Skill|SKILL_DISABLE_TRAP]], oTrap, [[Subskill|SUBSKILL_RECOVERTRAP]])
{| style="border: 0" width="100%"
+
| Recovering a trap.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_REST
+
| ACTION_REST
 
| 17
 
| 17
|
+
| [[ActionRest]]
{| style="border: 0" width="100%"
+
| NB: Only Henchmen tends to "sit and rest" when this is called on them so very unlikely to find this outside of PCs and henchmen.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_SETTRAP
+
| ACTION_SETTRAP
 
| 12
 
| 12
|
+
| [[ActionUseItemOnObject]]/[[ActionUseItemAtLocation]]
{| style="border: 0" width="100%"
+
| NPC's can now set traps, and PCs can select this action from the radial menus.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_SIT
+
| ACTION_SIT
 
| 37
 
| 37
|
+
| [[ActionSit]]
{| style="border: 0" width="100%"
+
| Sitting on an object.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_SMITEGOOD
+
| ACTION_SMITEGOOD
 
| 40
 
| 40
|
+
| [[ActionUseFeat]]([[Feat|FEAT_SMITE_GOOD]]) (and probably [[Feat|FEAT_SMITE_EVIL]])
{| style="border: 0" width="100%"
+
| Extra damage against certain alignments. '''This constant is likely not returned by [[GetCurrentAction]] and instead it will be ACTION_ATTACK.'''
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_TAUNT
+
| ACTION_TAUNT
 
| 18
 
| 18
|
+
| [[SetActionMode]]([[Action mode|ACTION_MODE_PARRY]] is probably best here.
{| style="border: 0" width="100%"
+
| If a creature is currently taunting. Can also be found using [[GetActionMode]] (which is probably more reliable).
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_USEOBJECT
+
| ACTION_USEOBJECT
 
| 15
 
| 15
|
+
| [[ActionInteractObject]]
{| style="border: 0" width="100%"
+
| "Use" and object by interacting, may include walking up to it first.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|-
 
|-
| valign="top" | ACTION_WAIT
+
| ACTION_WAIT
 
| 36
 
| 36
|
+
| [[ActionWait]]
{| style="border: 0" width="100%"
+
| Used purely on NPCs. This is the way to put a delay between two actions firing.
| style="border: 0" width="99%" valign="top" | UNKNOWN
 
|}
 
 
|}
 
|}
  
 
+
==See Also==
 
 
====See Also====
 
  
 
{| class="seealso"
 
{| class="seealso"
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
|
+
|[[GetCurrentAction|GetCurrentAction]]
[[GetCurrentAction | GetCurrentAction ]]
+
|}<br />
|}
 
 
 
 
----
 
----
 
[[Category:Constants]]
 
[[Category:Constants]]

Latest revision as of 22:13, 24 August 2021

Constants representing standard actions that objects can perform. See Category:Action on Object Functions for most of these.

Note there are several things that would be considered "actions" that cannot be detected by this, especially since ACTION_INVALID can be returned in a lot of cases.

For some stances (Parry, Defensive Casting, etc.) see relevant stance functions.

Constants

Constant Value Function Description
ACTION_ANIMALEMPATHY 16 ActionUseSkill(SKILL_ANIMAL_EMPATHY, oAnimal) When using the Animal Empathy skill
ACTION_ATTACKOBJECT 3 ActionAttack Attacking an object. Could be ranged, melee, or even potentially a special attack since hardly any are listed here (only Ki Damage and Smite Evil for some reason).
ACTION_CASTSPELL 4 ActionCastSpellAtObject or ActionCastSpellAtLocation or appropriate talent found. Given feat usage isn't categorised here it could also return for ActionUseFeat(). Needs further testing.
ACTION_CLOSEDOOR 6 ActionCloseDoor Closing a door
ACTION_COUNTERSPELL 31 ActionCounterSpell Counter spelling a target creature
ACTION_DIALOGOBJECT 7 ActionStartConversation This is when in a conversation. Note PC's can functionally move during these so unknown what they return if also moving to a point (in fact NPCs can do some actions during conversation too...).
ACTION_DISABLETRAP 8 ActionUseSkill(SKILL_DISABLE_TRAP, oTrap) Disabling a trap
ACTION_DROPITEM 2 ActionPutDownItem Putting down an item
ACTION_EXAMINETRAP 11 ActionUseSkill(SKILL_DISABLE_TRAP, oTrap, SUBSKILL_EXAMINETRAP) Examining a trap.
ACTION_FLAGTRAP 10 ActionUseSkill(SKILL_DISABLE_TRAP, oTrap, SUBSKILL_FLAGTRAP) Flagging a trap.
ACTION_FOLLOW 35 ActionForceFollowObject This is usually present until cleared or interrupted.
ACTION_HEAL 33 ActionUseSkill(SKILL_HEAL, oToHeal, 0, oHealingKit) Healing using a healing kit
ACTION_INVALID 65535 Many! Most other actions. This fires for a lot of things, such as a player using WASD movement, animations and other actions not listed on this page. See GetCurrentAction for more information.
ACTION_ITEMCASTSPELL 19 ActionUseItemOnObject/ActionUseItemAtLocation (or Talents) Scrolls, wands, potions and other magical items which can cast spells.
ACTION_KIDAMAGE 41 ActionUseFeat(FEAT_KI_DAMAGE, oTarget) Ki Damage feat. This constant is likely not returned by GetCurrentAction and instead it will be ACTION_ATTACK.
ACTION_LOCK 14 ActionLockObject or ActionUseSkill(SKILL_OPEN_LOCK, oDoorOrPlaceable) The second one may not work, depending on the circumstance (while the skill is called Open Lock, it is also used for locking).
ACTION_MOVETOPOINT 0 ActionMoveToObject ActionMoveToLocation This is specifically moving to a clicked point it seems, since it uses ACTION_INVALID if the player is using WASD movement. No idea if ActionMoveAwayFromLocation or ActionMoveAwayFromObject trigger it.
ACTION_OPENDOOR 5 ActionOpenDoor Opening a door.
ACTION_OPENLOCK 13 ActionUseSkill(SKILL_OPEN_LOCK, oLockedObject) Opening a lock on a door or placeable.
ACTION_PICKPOCKET 34 ActionUseSkill(SKILL_PICK_POCKET, oPickPocketTarget) Picking someones pocket. Nice gems you have, shame if someone snatched them from you...
ACTION_PICKUPITEM 1 ActionPickUpItem Picking up an item (may include walking to it first)
ACTION_RANDOMWALK 43 ActionRandomWalk This was added in the Hordes sets of patches. It is the value associated with ActionRandomWalk(). Note: In pre-1.64 patches, it referenced the wrong line in the actions.2da file, but it has now been corrected.
ACTION_RECOVERTRAP 9 ActionUseSkill(SKILL_DISABLE_TRAP, oTrap, SUBSKILL_RECOVERTRAP) Recovering a trap.
ACTION_REST 17 ActionRest NB: Only Henchmen tends to "sit and rest" when this is called on them so very unlikely to find this outside of PCs and henchmen.
ACTION_SETTRAP 12 ActionUseItemOnObject/ActionUseItemAtLocation NPC's can now set traps, and PCs can select this action from the radial menus.
ACTION_SIT 37 ActionSit Sitting on an object.
ACTION_SMITEGOOD 40 ActionUseFeat(FEAT_SMITE_GOOD) (and probably FEAT_SMITE_EVIL) Extra damage against certain alignments. This constant is likely not returned by GetCurrentAction and instead it will be ACTION_ATTACK.
ACTION_TAUNT 18 SetActionMode(ACTION_MODE_PARRY is probably best here. If a creature is currently taunting. Can also be found using GetActionMode (which is probably more reliable).
ACTION_USEOBJECT 15 ActionInteractObject "Use" and object by interacting, may include walking up to it first.
ACTION_WAIT 36 ActionWait Used purely on NPCs. This is the way to put a delay between two actions firing.

See Also

functions:  GetCurrentAction