About the Script
The following script is used to control character AI in the Baldur's Gate 2 game. It is a generic script, usable by all classes:
modmanai.bs <-- the actual script file
modmanai.baf <--the source file (readable text)
You must have Baldur's Gate 2 to use this script, although it is also provides support for using Throne of Bhaal items, and can be used in the Tutu conversion (which allows playing original Baldur's Gate and Tales of the Sword Coast using the BG2 engine; see this link for information on BG1Tutu and other mods). Place the momanai.bs file in the /program files/black isle/baldur's gate 2/scripts directory. To select it, in game select it using the custom script option of the character record.
Script Features
ModMan's AI Script offers many functions. The primary objective of the script was to offer better party management and smarter selection of spells and items. This is a "hands free" script, meaning the user can just turn it on or off, and doesn't have to memorize various keys for casting summoning spells or swapping weapons. Hundreds of items and spells are included in the script, as well as special abilities of both individual NPCs (Minsc berserking) and character abilities (bard battlesong, thief detect traps, etc.). The script dynamically adjusts itself with the level of the character. This is a cheat-free script, so spells or items not possessed by characters will not be used.
The script follows a priority paradigm:
- Protect Myself - vocalize if I'm silenced; heal myself of poisons or wounds, put up protections like mirror images and stoneskins, cast restoration to restore lost levels; shout for help if I have no way to heal myself of wounds or poisons, or if I'm being attacked by an overwealming foe.
- Help the Party - heal others of poisons or wounds; pass potions to party members if they need them; protect weaker characters who ask for help.
- Cast Spells - Disable enemy casters, or large groups of enemies; charm undead or dangerous single targets; cast protective spells on my party members or myself.
- Attack With Weapons - Determine target range and either select a ranged weapon for attack, or switch to melee weapon instead. This selection will vary depending on my class, current hit points, and skill with missile weapons.
- Non-Combat Actions - Create once/day items (such as the girdle of constitution, or robe of the stars); sing a bard battlesong or find traps.
Full list of items employed: here.
Full list of spells employed by this script: here.