Category:Core AI Functions

From NWN Lexicon
Jump to navigationJump to search

Core AI Function Category

Functions that deal with the core artificial intelligence engine



Functions

Name Brief Description

ActionCloseDoor

An action that causes an object to close a door.

ActionForceFollowObject

Forces an NPC to follow an object.

ActionForceMoveToLocation

Attempts to move an NPC to a location.

ActionForceMoveToObject

Attempts to move an NPC to a certain distance of a target object even if a clear path doesn't exist.

ActionMoveAwayFromLocation

Causes the caller to try to move away from a location

ActionMoveAwayFromObject

Cause the action subject to move to a certain distance away from a target.

ActionMoveToLocation

Moves an NPC to a location before executing further actions in the action queue.

ActionMoveToObject

Cause action subject to move to a certain distance of a target object.

ActionRandomWalk

Causes the subject to walk to a random location close to itself.

ActivateFleeToExit

Causes a creature to run to its exit waypoint and disappear.

AssociateCheck

Checks whether an object is an henchman or not.

BashDoorCheck

Used in DetermineCombatRound to keep a henchmen bashing doors

CheckEnemyGroupingOnTarget

Gets the number of enemies in a sphere shape around a target.

CheckFriendlyFireOnTarget

Gets how many friendly creatures are within a spherical range of a target object.

CheckWayPoints

Checks to see if an NPC has a valid waypoint to walk to.

chooseTactics

Determines class-specific tactics.

CompareLastSpellCast

Determines if a spell is the same as the one previously cast by the creature.

DetermineAssociateCombatRound

This function cannot be used

DetermineCombatRound

Determines NPC actions during any given round.

DetermineSpecialBehavior

Makes a creature use behave a special way overriding default behavior.

FindSingleRangedTarget

Seeks out an enemy more than 3m away

GetAILevel

Retrieves the current AI (artificial intelligence) level that a creature is running at.

GetBehaviorState

Test whether a creature is in a particular behavior state.

GetCreatureTalentBest

Determines the best talent of a creature from a group of talents.

GetDistanceBetween

The distance in meters between two objects

GetDistanceBetweenLocations

The distance in meters between two locations in the game.

GetDistanceToObject

The distance from the caller of the script to the object in meters.

GetFactionMostDamagedMember

Get the member of oFactionMember's faction that has taken the most hit points of damage.

GetFleeToExit

Returns TRUE if the executing object can use ActivateFleeToExit.

GetFollowDistance

Determines the distance in meters that the associate should follow its 'master' at.

GetGoingToBeAttackedBy

Determines the creature that is going to attack another creature in the current combat round.

GetIsFighting

Determines whether a creature is "fighting".

GetLastGenericSpellCast

Retrieves the last spell that was cast by the calling creature.

GetLastHostileActor

Gets the last living, non plot creature that performed a hostile act against the object.

GetLastPCRested

Returns the last PC that rested.

GetLastPerceptionInaudible

Gets the last perceived object which can no longer be heard.

GetListenPatternNumber

Check if a conversation pattern has been activated in an OnConversation event.

GetMostDangerousClass

Use the four archetypes to determine the most dangerous group type facing the NPC.

GetNPCWarningStatus

Determines a NPC's state of mind toward another object.

GetRacialTypeCount

Determines the number of creatures of a race within 20 meters.

GetSpawnInCondition

Determines whether a creature has a certain condition set by BioWare's core AI system.

PlayImmobileAmbientAnimations

Makes a creature act out some animations where they stand to look more lifelike.

PlayMobileAmbientAnimations

Makes a creature act out some animations to look more lifelike.

Prefers

Determines whether the adventurer prefers using a weapon type.

RemoveAmbientSleep

Removes a sleep effect on a successful listen check.

RespondToShout

Sets NPC to respond to numerous alerts sent by PC or other NPCs.

RunNextCircuit

Makes an NPC move to their initial waypoint.

SetAILevel

Sets the AI (artificial intelligence) level of a creature.

SetAssociateStartLocation

Sets an NPC associate's start location to it's current location.

SetBehaviorState

Sets an NPC's behavior.

SetLastGenericSpellCast

Sets a local variable that stores the spell ID of the last spell cast.

SetListening

Sets whether an object should listen.

SetListeningPatterns

Prepares the listening patterns to allow for the AI to function properly.

SetListenPattern

Sets an object to listen to a particular pattern.

SetNPCWarningStatus

Stores the condition of an NPC warning status.

SetSpawnInCondition

Sets custom flags that influence the default AI scripts provided by BioWare.

SetSummonEffect

Specifies the visual special effect and specific creature to be summoned based on the spell cast.

SetSummonHelpIfAttacked

Creates an encounter that is meant to help an attacked NPC.

SetWayPointTo1

Tells an NPC to return to their first waypoint.

TalentMeleeAttack

Determines course of action while in melee combat for all NPCs.

TalentMeleeAttacked

Determines best course of action for NPC spell-caster when in melee combat.

TalentSeeInvisible

Determines if the NPC has the ability to see invisible creatures through feat or spell.

VerifyCombatMeleeTalent

Determines whether a combat talent could be used on an object.

VerifyDisarm

Determines whether a creature could possibly be disarmed.

WalkWayPoints

Make an NPC creature walk a series of preset waypoints.