Companion and Monster AI bug and feature list

 

12/30/2009

 

 

Reported Bugs

 

Script overrun errors in act 3 at Highcliff when talking to the Lizardman leader and only then, not before or after. Unable to reproduce.

 

Auto unlock going into another (explored) room. (Reported by Vortaka - need saved game) Fihelis' estate near the beginning.

 

If a companion is injured or dies and wakes up he or she will continue to use all of the healing potions on him or her until they are fully healed. Not able to reproduce.

 

If auto pickup is turned on and there is a trap nearby, the message complaining about nearby traps keeps getting repeated. Can’t reproduce, scripts sets flag on trap, so I don’t know how it could occur.

 

Occasional jump or teleport in or out of combat. May not be due to AI itself, needs to be tested. Cannot reliably reproduce, may be side effect of lag?

 

Hold and follow sometimes not obeyed – may be related to previously heard target.

 

Duplicate casts of shield and shield of faith during buffing. Unable to reproduce at this time.

 

Investigate use of cure wounds potions – not always used when they should be. Seems to be working OK, cure wounds amount must be greater than 12.5% of total hitpoints in melee combat, otherwise it is ignored.

 

Voice commands not always heard after actions. Some of the voice commands have only a 60% chance of being said. It is easy to change but saying the line every time might not make sense.

 

Check going out of stealth after combat if not set to auto stealth and the party leader is not in stealth. Seems to be working, if current master is in stealth, companion remains in stealth. Also, follow mode prevents changes in stealth.

 

Companion running towards PC controlled character when in melee combat. May happen if out of line of sight and greater than 15 meters away.

 

Damage causing spellcaster with player queued spell to not cast spell. Unable to reproduce at this time. Voice commands (follow, guard, and attack nearest) will clear the queue (by design).

 

Unequip after combat not always happening.

 

If a ranged weapon is selected with the context menu, the weapon is not switched out if there is no ammo left.

 

When Khelgar has the hammer of Ironfist in his inventory, but does not have the equipment on, he will do nothing but continually try to equip it. There doesn’t appear to be script functions to help with this, other than checking by tag. Putting the weapon in a bag will prevent the AI from using it.

 

Bard Fascinate song does not work. Appears to be related to effect disappearing immediately. Old AI did not recheck for enemies so the target would stand around for awhile.

 

Lisbet in the OC doesn’t respond to commands. Unable to reproduce with patch 1.23.

 

Cheat cast feat use sometimes doesn’t decrement the number of feat uses used. Unable to reproduce with patch 1.23.

 

The merged creatureexamine.xml for Charlie’s UI causes a slowdown.It is safe you to just use the Charlie’s UI version of creatureexamine.xml.

 

Suggested enhancements

 

Easy

 

Animal companion summoning.

 

Default spellcasting to “Scaled”

 

Add a behavior setting to disable the use of search mode.

 

Medium

 

Try to quicken the switch to melee weapons from ranged. Currently there can be a one round delay in equipping the off hand weapon or shield.

 

Global setting to reduce sneak attacks in the OC.

 

Dumb down behavior of less intelligent monsters (even more) (I.e. for spellcasting)

 

Auto casting of long duration (1 hour +) buffs.

 

Allow guarding of a location instead of a creature. This could be done as a change in behavior of the “Stand your ground” command.

 

Rework the spellcasting threshold documentation to make clear it sets use of feats and abilities also. Could also add a setting to just turn off spells.

 

For warlock infinite buff option, cast long duration spells first if there are no nearby enemies.

 

Allow different challenge threshold to be set for using items.

 

Add party wide switch to disable auto pickup if the weight would make the companion get slowed down. Add options to only pick up good items and not junk based on gold piece value. Support putting items into bags (especially magic bags).

 

Mages can go to melee even if some low level spells are available. They should also consider their armor class before getting into melee.

 

Alchemist’s fire use on weapons.

 

For ranged weapons that allow a strength modifier, allow the use of bull’s strength during combat but at a lower priority than if they have a melee weapon equipped.

 

Add more options to the item generation code; also allow equip-able items to be created.

 

Add a “Melee attack nearby only” behavior setting.

 

Add party wide settings to the hotbar. Check out other packages that also modify the hotbar.

 

Put in healing threshold behavior settings. Heal at 0%, 25%, 50%, or 75%. Allow these settings to be set for each party member.

 

Re-enable gust of wind being used as offensive spell, check that it does not get rid of area of effect spells from allies.

 

Unequip ranged ammo after combat (or possibly during) so that the best ammo is always selected for the target.

 

Have characters with persistent effects (i.e. bard inspirations) try to move to the best position during combat to help friend and/or hurt enemies.

 

Add option to back off when injured – monsters and PC party members. Monster flee and regroup option.

 

Don’t attack until after melee to ranged switch is done, prevents character from moving to target.

 

Add option or switch behavior of nearest to not switch to melee unless under melee attack.

 

Stop party from drawing too close together with an unseen and unheard enemy approaching.

 

After combat is done, check companion’s inventory looking for ranged weapons without ammo and wands that don’t have enough charges and provide a warning.

 

For the spell challenge threshold - consider other party member's melee attacks and not just caster’s in order to determine when to cast spells.

 

Add more allowed settings for spellcasting, ability, and item use thresholds.

 

Improve use of HiPS, use it not just for sneak attacks but also to improve attacks against targets with high dodge AC.

 

Support hellfire warlock and doomguide abilities.

 

Make better estimation of the amount of melee damage in a round.

 

Option to equip a weapon (i.e. bard instrument, etc) out of combat.

 

Check if unlimited use ranged spells like EB should be treated as ranged attacks for the purpose of switching to melee. Check if creature should move closer to use closer ranged attacks.

 

Behavior option to switch from attack vs. buff during combat.

 

Option to select the out of combat bard inspiration.

 

For automatic lock picking check for neutrals in the area and give a message saying why the lock will not be automatically picked.

 

Add unlock/disarm trap when right clicking a companion. Some of the other NWN commands could be added also.

 

Change out of combat healing to do unlimited healing first (bard regeneration and touch of healing) followed by limited use healing.

 

Better positioning for sneak attacks. This includes not backing away or moving into range for ranged weapon sneak attacks.

 

Add option to pause and switch to not switch and to pause once each round.

 

Change “melee for party option” to check nearby friends, whether seen or unseen.

 

Prevent multi bard parties from using the same inspiration, Due to delay between choosing what inspiration to use and singing it, the same inspiration can be used.

 

Allow auto pause to only occur if an enemy is close (for melee only party members).

 

Hard

 

Have option to equip weapon with greatest attack bonus (not a built in function like equipping the most damaging weapon).

 

Allow a preferred combat mode (parry, flurry of blows, etc., defensive?) in the behavior tab.

 

Pick best polymorph shape for situation.

 

For caster centered spells, have caster move to a better position before casting spell.

 

Write toolset add-in to allow setting behavior settings and other flags onto creatures.

 

Protection from evil not always cast for auto buff. Due to limitation of the talent system to get spells.

 

Auto buff can sometimes have two different casters cast the same spell at nearly the same time on a creature. Issue can happen in combat. Can also happen with heal spells.

 

Enable the player controlled character to be directed to cast infinite buff spells.

 

Use breach and assay resistance to reduce spell resistance of a target when needed.

 

Stop party members from running over traps. Add party wide option to not move past a trap or persistent area of effect. Possibly determine how destructive the trap or spell is before going past it.

 

Coordinate party and monster AI to try and gang of first attacks for maximum effect.

 

For ranged area of effect spells, either cast on target if far enough away or lead ahead of them so the spell location is good.

 

Metamagic support for sorcerers and bards.

 

Give a set of spells for a companion that you don’t want the AI to cast.

 

Deferred

 

Workaround for the never ending parry mode bug. (parry only useful if one attacker)

 

Option of have creature, etc. ignore the broadcast commands.

 

Druid spontaneous casting of summon spells. Because cheat cast always defaults to caster level 10, this has a noticeable change in the duration. Would have to override the summon script or have an enhancement by Obsidian to set the caster level.

 

Allow keyboard shortcuts or buttons instead of using context menu.

 

Check if action queue for familiars is preserved when switched away. Can find no ClearAllActions done, but spells queued up are not cast.

 

 

Done for 2.3 (Work in progress)

 

Additional script calls to prevent inter party fights especially those due to AoE spells.

 

Animal companion and familiar flee options when hurt or facing a challenging enemy.

 

Familiar and animal companion inventory access. (Still needs global on/off option)

 

Multi summon support in the AI.

 

Updates for Kaedrin’s PrC pack 1.39.1.

 

Modifications to at will spells and ability to instant cast a spell along with a melee attack (for module builders).

 

Done for 2.2

 

All feats are shown for familiars and animal companions.

 

Adjustments for NWN 1.23 patch.

 

Add support for warlock epic spells.

 

Changes and improvements in how guard mode works. Party members in guard mode should select targets better and position themselves better to counter observed threats.

 

Updates for Kaedrin’s PrC pack 1.38.3.

 

AI support for instant feats.

 

Better workaround for moving to unseen and unheard enemies.

 

Support for at will spells for creatures and cheat cast caster level.

 

Done for 2.1

 

When in pause and switch mode, do not pause and switch to disabled companions. Do not pause and switch during a cutscene (multiplayer conversion).

 

For auto pickup account for containers in the inventory full messages.

 

Remove use of inspire frenzy, it shouldn’t get used unless all of the party is fighters and is done to all members of the same faction (not good for monsters).

 

Rework AI to allow custom spells, classes, class spells, and racial spells to be added to it. Script functions added to allow adding the custom content on module load.

 

Improve behavior of feat use with silence and anti magic effects.

 

Basic support added for Kaedrin’s custom classes with full support for blackguard, assassin and avenger spell books. Support for 10 of the 12 reserve feats.

 

Fixed issues with fleeing persistent area of effect spells when immune to the spell. Improvements made in spellcasting with targets with immunities.

 

Respond to saw trap events and broadcast them to party members. Out of combat trap removal should work better. Changes to prevent open lock attempts being made when pathing to lock isn’t possible.

 

Familiars always follow in puppet mode.

 

Broadcast commands of attack nearest, follow me, guard me, and stand your ground now set the flags on the currently controlled party member.

 

Add pause when floor trap detected global setting.

 

Do not start monster wander if heartbeat detection is turned off and there are nearby enemies.

 

Fix follow and guard target options across module loads with SoZ cohorts since they do not have tags.

 

Fix for party members not following after directions commands are given.

 

Fix an issue where it was harder than it should be to break away from an enemy that could not see or hear you. Disabled monsters do not record last location of enemies.

 

Fix for doors not being opened when walking waypoints with monster wander on.

 

Add script only flag to not attack dying enemies (PCs).

 

 

Done for 2.0

 

Updates for new SoZ content – spells, feats, and classes.

 

Flee the scene being cast out of combat with persistent haste already active.

 

New global option and party setting for pause in combat while in puppet mode.

 

Party follow setting. Out of combat party members will follow and do other activities like picking up items if set to do so.

 

Fixes to the heartbeat detection checks.

 

Improvements to handling dying cohorts, including healing and raise dead.

 

Slaan (at Highcliff castle) sometimes comes out of his normal target area.

 

Hostile persistent area of effect spells are not cast at the same time by party members.

 

Fixes and improvements to enemies not attacking past a closed door.

 

Improvement to melee combat AI.

 

DM client actions to move monsters past doors don’t work since routine tries to prevent monster wandering past doors. Able to reproduce and it is related to the non aggressive pursue for monster wandering. The default AI doesn’t open doors with low (<5) intelligence creatures either. Turning on open doors for monster wander makes this work.

 

Reduce use of healing spells on undead enemies.

 

Done for 1.11

 

Fixed persistent spells being reported when they should not be for trap, lock, and item pickup routine. Improved reactions to persistent spells. Limits to how many persistent spells are cast in a combat.

 

Fix for ranged weapons being turned off after loading a saved game. The companion spawn script runs on the PC when a saved game is loaded. Overrode spawn script in order to prevent settings being changed when loading saved game and give better defaults when a module is started.

 

Fix healing not always being done in melee combat.

 

Fix enemy autobuff not being used.

 

Fix auras not always being enabled.

 

Improve reliability of cut scene conversations.

 

Reduce CPU usage for character and creature examine screens.

 

Add heartbeat detection options to disable or to only detect seen enemies.

 

Add party option to turn off messages during weapon switching.

 

Done for 1.10

 

Add support for some types of buffs not currently cast with the out of combat buff commands. (Summons, true seeing, and spell resistance).

 

Improvements and fixes in casting of spell protection and detect invisibility spells.

 

Fixed use of healing items when item use turned off but healing and curing is enabled attacking undead enemies.

 

For auto disarming traps, opening locks, and picking up items, check if any area of effect spells are active in the area and wait for them to expire before doing automatic actions.

 

Elemental summoning items are now used.

 

When feat/ability use is turned off, do not use limited use feats in melee such as smite evil.

 

Improve move to unheard and unseen enemy to not get stuck with other creatures moving to same enemy.

 

Show the peaceful follow mode warning message “Should I attack?” only once per combat.

 

Monsters will not use ranged weapons in their inventory unless equipped with them at the start of combat. Fixes LoH using crossbow instead of melee weapon.

 

Adjustment to heal command in checking regeneration. Will also try to use the lowest level spell that will still do full healing instead of wasting a higher level spell.

 

Add buttons to the character screen that allow saving a default set of party and global options to the campaign database. The first time a module is run, these settings are loaded. A Load button forces the settings to be loaded after a module is started and a Reset button puts all party and global settings back to default.

 

Done for 1.9

 

Enhance disable melee attacks option to use combat expertise.

 

When switching control of party members, if they are in stand ground mode, don’t start following the leader. Fix honoring stand ground mode in combat if party member is set up to follow no one.

 

Infinite buff spells being cast during resting interrupting resting.

 

Improvements in bard spells and feats, touch attack, invisibility, and persistent spell usage.

 

When changing "Disable peaceful follow” it will immediately change the settings for the current party members. They do not need to be toggled to attack and back to follow mode to change the behavior. Also changed “Disable Peaceful Follow Mode” to “Peaceful Follow Mode”

 

Add a context menu set melee weapon to used unarmed strike (no weapon).

 

Combat feat use while polymorphed. Players are unable use combat feats while polymorphed, so the AI shouldn’t either. Combat modes (parry, expertise, power attack) can be used.

 

Enable the player controlled character to be directed to cast buff spells on command and cast infinite buff spells.

 

Updates for NWN2 patch 1.12. Includes support for portraits and various spell changes.

 

Updates for Kaedrin’s PrC pack 1.32.

 

Add support for medium duration buff precast as global option.

 

With auto pick up, if the companion doesn’t have any space in the inventory, a message is given that the inventory is full and no more items are picked up until space is made in the inventory.

 

Done for 1.8

 

Add support for all druid polymorph feats. Improve support for stone and iron skin (especially use of stone skin more often by cleric). Improve logic for determining best polymorph shape (.i.e. check if greater magic fang spell is available and use a form that supports it.)

 

Under certain circumstances, when a character is trying to melee and nearby friends block their path to the enemy they do doing, they will now either try to maneuver around their friends, or switch to ranged, or use a spell.

 

Improve and rework the use of elemental shield and weapon buff spells.

 

Add support for more spells from Kaedrin’s PrC pack.

 

Update skills UI for NWN2 patch 1.11 changes.

 

Don’t equip torches automatically. Use of a torch can still be set with context menu.

 

Add support for most epic spells.

 

Don’t unequip shield when switching from melee to ranged weapons.

 

Fix for settings of weapons and shields to use (via context menu) not always followed.

 

Done for 1.7

 

Prevent shield from being equipped when spellcasting if auto weapon switching is off.

 

Stop restoration spells from being used on friends with enlarge cast on them.

 

Fix problem with dominated creatures not fighting.

 

Adjustments to friendly targeting and back away test conditions.

 

Start adding support for spells from Kaedrin’s PrC pack.

 

Additional support for MotB classes and feats.

 

Stop attacking distant foes with nearby enemies in melee range.

 

Improve weapon switching and decisions in general when attacking distant foes.

 

For spellcasting thresholds, use the total party strength vs. the total enemies strength instead of just using your strength vs. the total enemies strength.

 

Improvements in the melee attack distance when any party is in melee distance behavior setting.

 

Stop peaceful mode carrying over after domination and stopping the creature from attacking its enemies.

 

Fear spells that cause enemies to draw party apart.

 

Add global option to have AI controlled warlocks use hideous blow in one round instead of two.

 

Add party settings to allow more damage to be done to allies.

 

Add global setting for monsters to damage allies based on alignment.

 

Charmed creatures are ignored and not attacked by creatures of same faction. Charmed creatures are also now targets for cure spells.

 

Party behavior setting added to allow turning off the peaceful follow mode when a follow command is issued.

 

Plot creatures do not respond to shouts for help.

 

Fix spontaneous cure or inflict spells being infinitely cast.

 

Change spontaneous casting code to be more flexible with new or changed domains.

 

Fix and improvements to spell selection code and in particular healing spells.

 

Improvements in the use of flurry of blows in combination with other feats.

 

Done for 1.6

 

Add support for most MotB feats and spells.

 

Rework regeneration, power word, and attribute buffing code.

 

Fixes for self targeting in various cone and cylinder spells.

 

Whirlwind attacks only works for the first round, later rounds the character does nothing.

 

Tortoise shell being used in combat without check for percent HP and freedom of movement.

 

Tiefling darkness being continually cast.

 

Rogue familiar not automatically opening locks. If not in control of master, the open event is not sent to the familiar.

 

Adjustments to improve keeping party together.

 

Tweaks in the use of darkness.

 

Done for 1.5

 

Add an option to equip a user defined set of ranged and melee weapons using the context menu.

 

Add a broadcast context menu option to turn off follow for all non associates.

 

Add a “No melee” behavior option. Character will not go into melee combat (useful for mages and familiars along with back away).

 

Add a flag that switches to melee if any member of the party is in melee combat.

 

Add special troll killing AI.

 

Updates for NWN2 1.10 patch.

 

Fixes for some spell categorizations and add support for ethereal jaunt.

 

Reduce the number of power attack mode switches during combat. Have the combat mode setting control use of power attack.

 

Add behavior option to disable the use of stealth during combat.

 

Add party wide option to unequip weapons outside of combat.

 

Add party wide option to summon familiars and to summon animal companions outside of combat.

 

Done for 1.4

 

Slowdowns or freezing of the game while using the AI.

 

After the Targas and githyanki mage encounter spawns the spiders, instead of disappearing the githyanki just moves a few feet away and remains there. This now works.

 

Targas and githyanki mage will now exchanging spells before the encounter. Githyanki mage will exit area after encounter.

 

Fix short pause in running for AI controlled creatures when attacking a distant target.

 

Turn undead is no longer cast on allies unless they are summons or the difficulty level less than hardcore.

 

AI controlled creatures no longer run away from friendly persistent area of effect spells in normal difficulty or below. Also improved persistent area of spell detection and handling in general.

 

Done for 1.3

 

For a ranged attacker (ranged weapons or spells), when attacking a creature that is not in line of sight that an ally is attacking, try to go behind the ally in order to prevent getting into melee range.

 

Change follow behavior to follow another companion.

 

Change guard to guard just one companion, and not the one the PC is currently controlling.

 

Allow the guard distance to be changed.

 

Improve back away code to be run more often.

 

Adjustments and improvements to dispel and breach casting.

 

Send message to PC for every item picked up by the auto pick up routine.

 

Slaan (at Highcliff castle) sometimes comes out of his normal target area.

 

Use bull’s strength on melee type characters during buffing even if they are currently using ranged weapons.

 

General improvements to the spellcasting routines.

 

Puppet mode does not turn off the infinite cast behavior option.

 

"I don't know how to use this shield!" message being given by monsters.

 

Reduce number of times main AI scripts (hench_o0_ai) is called.

 

Add support for using feint, smite infidel, and sacred vengeance.

 

Done for 1.2

 

Triggered conversations not occurring in OC.

 

Improvements to default behavior option selections.

 

Auto buff sometimes cast barkskin twice on a character.

 

Alchemical fire being used on creatures with nearby friends so they are getting splash damage.

 

Added support for auras (i.e. paladin and blackguard)

 

Done for 1.1

 

Context menu support added for healing and buffing requests to party or to one member of the party. Companions will continue healing or buffing while they have spells and not in combat.

 

Lag when starting up moving in a direction and the time that companions and associates start to follow.

 

Fixes and improvements for various spells including spontaneous conversions.

 

Off –hand weapons, shields, and healing kits inside of bags are no longer used.

 

Fixed weapon switching from behavior setting screen for non controlled character.

 

Changed “follow me” to turn off stealth, track, etc. so that the associate can match speed with the PC. If PC is in stealth then stealth is not turned off. Issuing an attack nearest allows the companion to go back into stealth if the stealth behavior setting is turned on.

 

Enable use of certain druid spells meant for only for animal companions or for the druid while in wildshape.

 

Set default behavior settings for the first time in order to give better results without tweaking the AI. Global flag can turn this off.

 

Add global settings to have enemies auto quick cast long duration spells before combat, be able to use equipped items, and to generate healing and buffing potions.

 

Adjustments for changes in spells for patch 1.06.

 

Commands (follow, stand your ground, guard me, and attack nearest) broadcast to group do not get sent to the controlled character. The flags are now set on the controlled character so that when control changes, the previously controlled character doesn’t do something unexpected.

 

Added back in the “Scout” feature. Used to send in summoned creatures first to soak up damage.

 

Consider concealment in target selection.

 

Weapon equipping code will use shields with appropriate ranged weapons (i.e. throwing axes).

 

Done for 1.0

 

Adjustment to prevent stealth from being entered in combat unless the creature has sneak attack.

 

Erf and hak versions of AI created, comments and some documentation created.

 

Minor fixes to spell casting code. More changes to darkness spellcasting AI.

 

Done for 0.21

 

Updated character screen for patch 1.05 changes.

 

Dragon does not use breath as often as it should.

 

Changed dragon breath use to be unlimited (up to every third round limit as in default AI).

 

Fix damage/cure amount estimation for heal and harm.

 

Fix assassin darkness.

 

Improved use of sunbeam and sunburst.

 

 

Done for 0.20

 

Check the area of effect damage for firebomb.

 

High level healers don’t always cast healing spells.

 

Update scripts to new associate scripts (gb_assoc_*) and other changes for 1.05 beta.

 

Flag that prevented hearing without line of sight or previous was not set if monster wander was turned off.

 

Enabled support for more spells (enlarge, raise dead, resurrection, etc.), fixed issues with attribute buffs.


Done for 0.19

 

Target selection problem for creatures with sneak attack.

 

Divide by zero problem if target was at 0 HP.

 

Warlock Hideous Blow casting loops indefinitely.

 

Companions switch to melee if there is a nearby enemy and their target was far away.

 

Chance of spell touch attacks now considered.

 

Correction for paladin and ranger spell casting level. Practiced spellcaster feats considered for spell casting level.

 

Done for 0.18

 

Restoration of associate behavior settings on summon.

 

Done for 0.17

 

If one creature in a group that is stealthing and is attacked, unstealth and then attack since it is best to close in and attack.

 

Musical intruments being equipped as an off hand weapon.

 

Global option to reduce or eliminate use of knockdown.

 

Turn off use of hearing unless target is in line of sight (reduce monsters bunching up on the other side of doors)

 

Fix for firebrand, missile storm, and use of dispel to remove effects on allies. Also increased use of area of effect spells in general.

 

Done for 0.16

 

Disarm trap not being done (I have a save)

 

Sometimes a ranged weapon is used even if there is a melee attacker.

 

Use of power attack to get around damage reduction.

 

Behavior option to enable use of healing and cure potions or items even if item usage is turned off.

 

AI using too much CPU. ichibanb reported this for the Endless Depths module. Problem should be apparent near the beginning. Also a report that the goblins cave in the Tragidor mod was like a freeze frame (but this even with the default AI)