x0_inc_henai

This is a wrapper overtop of the 'generic AI' system with custom behavior for Henchmen.

BENEFITS:

- Easier to isolate henchmen behavior.
- Easier to debug COMBAT-AI because the advanced Henchmen behaviour won't be in those scripts.

CONS:

- Code duplication. The two 'combat round' functions will share a lot of code because the old-AI still has to allow any legacy henchmen to work.

NOTE: This file includes x0_i0_henchman.

Constants

NameValueBrief Description
BK_AI_MODE_FOLLOW9Behavior constant. Default mode, moving after the player.
BK_AI_MODE_RUN_AWAY19Behavior constant. Something is causing AI to retreat.
BK_CURRENT_AI_MODE20Behavior constant. Can only be in one AI mode at a time.
BK_FOLLOW_THRESHOLD15.0Distance constant.
BK_HEALTHRESHOLD5.0Distance constant.
BK_HEALINMELEE10Behavior constant.
BK_NEVERFIGHT30Behavior constant.

Functions

NameBrief Description
AttemptKnockSpellInternal function. Attempts to cast knock to open the door.
bkAttemptToDisarmTrapAttempt to disarm given trap.
bkAttemptToOpenLockAttempt to open a given locked object.
bkCombatAttemptHealAttempt to heal self then master.
bkCombatFollowMasterAttempts to follow master if outside range.
bkGetBehaviorGet the behavior used by AI.
bkGetCosAngleBetweenGet the cosine of the angle between two objects.
bkGetIsDoorInLineOfSightReturns TRUE if the target door is in line of sight.
bkGetIsInLineOfSightReturns TRUE if target in the line of sight of the seer.
bkManualPickNearestLockManually pick the nearest locked object.
bkRespondToHenchmenShoutHandles responses to henchmen commands, including both radial menu and voice commands.
bkSetBehaviorSet the behavior used by AI.
bkSetListeningPatternsSets up special additional listening patterns for associates.
HenchmenCombatRoundHenchman/associate combat round wrapper.

Does special stuff for henchmen and familiars, then falls back to default generic combat code.
SendForHelpSignal to other party members to help me out.


  author: Mistress