Cirerrek's AI Scripts

This is a selection of AI scripts by cirerrek.

eSeries

The eSeries is a collection of Party AI Scripts for Baldur's Gate II: Shadows of Amn with or without the expansion Throne of Bhaal, Baldur's Gate: Enhanced Edition,. Baldur's Gate II: Enhanced Edition, and the conversions Tutu, BGT, and EET. Currently there are seven scripts included in the series: eArcher, eFighter, eMage, eMulti, ePriest, ePureF, and eThief. As you should be able to tell from the names of the scripts, they are tailored to specific character classes. There is some overlap in abilities, but generally speaking, the scripts are most potent when they are assigned to a character of the corresponding class.

The eSeries sprang from the magnificent Player AI Scripts known as the gSeries, which was developed by Greg Hodgson (aka Sarkyn). The gSeries was fully fleshed for doing battle in Baldur's Gate II: Shadows of Amn but, unfortunately for those of us who loved the capabilties of the series, Greg chose to exit the Baldur's Gate Scripting community prior to updating the scripts with the scripting options available in the final chapter of the Baldur's Gate Trilogy, The Throne of Bhaal. Considering the intrusions of real life and all the other wonderful videogames available for capturing our imaginations, I don't blame Greg in the slightest for finding other things to fill up his time. Wherever he is, I hope that life is treating him well. Cheers, Greg!

So one day while playing Throne of Bhaal, I decided I just couldn't take the gSeries' lack of ToB support any longer and although there were a couple of other high quality Player AI Scripts out there, Rich Martel's [uScript_2001-09-27] and Gebhard Blucher's [GB-Scripts] for instance, my loyalty to the scripts that had performed so well in Shadows of Amn superceded my interest in convenience and despite my relatively rudimentary understanding of Infinity Engine AI scripting, I, with Greg's consent, jumped in and began to overhaul the gSeries to bring it up to ToB date.

gMinion

These scripts are designed to enhance and increase the enjoyment of the Baldurs Gate II series of games produced by Bioware. They increase the ingame intelligence of the creatures that are summoned by Spells and Items, so that they behave more in line with the original intentions of both Bioware and more Purist D&D Roleplayers.

The gMinion Series consists of:

  • BCS (Baldurs Character Script) files that replace ingame BCS files
  • BCS scripts that act as substitutes for Allied Summons
  • Auxillary files that fix things wrong with Creatures and Spells (CRE & SPL files)

Notes:

  • The AI applies only to PARTY monsters and does not increase the intelligence of "wild" or enemy creatures.

gMinion was created by Greg Hodgson (aka Sarkyn). I've have updated the gMinion series here and there to account for the additional summons available in the expansion pack TOB, but the majority of original content is intact and as potent as ever.

Sequencer Memory

seqmem.bs is a little script written by cirerrek to enable a player to remember what they have stored in their minor spell sequencers, spell sequencers, and spell triggers, after a couple of days away from the game.

The basic mechanics for this script were originally developed by Bruce Harding.

Sequencer Memory is really intended to be a plugin for existing Player AI scripts and you are welcome to add it to your own. The downloadable version of this script includes the commented .baf for your convenience.

The variables set by this script can easily be used to allow Player AI scripts to cast sequencers automatically. I don't plan on going into any details about this here, but if you are interested in this feature and are having trouble figuring out how to implement it, please contact me on the forums.

The script will NOT report the exact spells you have stored in your sequencers but it will give you a general idea of how you originally chose to target the sequencer(s). The three targeting strategies available are: Offensive, Disabling, and Defensive.

You select a targeting strategy through the use of hotkeys. The choice of keys may seem a bit odd, but they are some of the few hotkeys that were not used by the eSeries player AI scripts developed by Sarkyn and modified/continued/updated by me (cirerrek).

tSeries

Like the eSeries for BG2, tSeries is a set of Player AI scripts for Planescape: Torment. The basis for these scripts comes from Gebhard Blucher's Planescape: Torment Player AI Scripts. I borrowed the scripts that he created and expanded upon them so that they are a bit more comprehensive in terms of spell usage and item usage.

I have used the scripts to complete the game. They were tested with all of the NPCs except Ignus. The scripts appear to function well, given the limits of this version of the scripting language. While I thoroughly enjoyed playing Planescape: Torment, I probably don't plan on another run through. That being the case, unless there are any major bugs in the scripts, this will probably be the final version that I assemble. If you like the scripts and want to improve or expand upon them, the source code is included in the download, so feel free to modify them however you would like. I would just ask that you please credit Gebhard Blucher and I if you place the scripts up for public download.

The scripting language in Planescape: Torment is definitely limited in comparison to the scripting commands available in some of the more recent IE games, but the language still allows for the automation of some tasks, like spell casting, item usage, attacking, and hiding in shadows. The scripts will target the nearest enemy and attack them by whatever means they have available and deem appropriate based on experience point checks of their nearest foe.

The scripts make liberal use of ActionListEmpty(), which means that if you tell them to do something, they will do it rather than following their scripted commands. There is one exception to this rule and that is in the case where a character(s) is low in hitpoints and still under attack. In this case, they will run away from their attacker for a set period of time. If you want the character to stay in combat despite their injuries, you will need to get them healed or turn off the party AI. One other item of note is for Annah or TNO to automatically hide in shadows, they must have a Stealth skill of at least 75%; otherwise, this function will not be activated.

iSeries (Beta)

The iSeries is a set of very beta versions of my scripts for Icewind Dale II. So far the scripts only use a limited number of spells. Otherwise they appear to do most of the other things the eSeries was designed to do: Threat Level Assessment, Weapon Switching, Move to Combat, and a few other things. They're NOT going to be able to strut their stuff with a high level party. Packaging is very basic. Constructive feedback is encouraged. Use iBard for Bards, iArcher for Mages, and iFighter for Fighter types or Cleric types.

Fix Pack: Scriptable Spells

Scriptable Spells fixes several SPCLxxx and SPINxxx spells that had their spell level incorrectly defined. The incorrect level definition would cause the game to crash when the spells were cast using the trigger HaveSpell(). The spells modified by this package are able to be scripted without causing the game to crash.

This functionality is already included in the BG2 Fixpack, and is not needed for the Enhanced Editions of the game.

uScript

uScript or "Universal" Script is a Player AI script for BG2 SoA & ToB. It was created by Rich Martel. I'm supplying it here, because I don't know of any other place where it exists and some may find it useful. Please note that G3 will not be providing any support for this script or any of the other items contained in the package.

This is a Baldur's Gate II AI script for player characters that can be used with any class. Many useful ideas were borrowed from scripts and discussions in the "BioWare Scripting" group on Yahoo. Thanks to Tim, Sarkyn, C.Enders, Xyx, Jason & Quitch for help & suggestions.

Features:

  • Individual AI toggle for each character
  • Smart Targeting system
  • Move to Combat routine (no more idle characters)
  • Detect Traps, Turn Undead, and Battle Song
  • Assistance to injured
  • SoA Class Abilities
  • ToB Spells
  • ToB Class Abilities
  • Performance Saver (script cutoff)
  • TimeStop target switching
  • "Stay in melee range 1 round then run" routine for Casters, Archers, and Injured
  • Efficient healing system
  • Wand & Potion usage
  • Shapeshift abilities for druids
  • Summoning Item usage (Efreeti Bottle, Black Spider Figurine, etc.)
  • Improved Nymph, Djinni, Planetar, Deva, & Moon Dog (Cerebus) scripts
  • Dynamic Party Protection
  • Cast & Attack
  • Intellegent Simulacrums, Projected Images, & Misleads
  • Healing potion hand offs

Complete list of spells and items used by this mod

Other Projects by Cirerrek

Cirerrek's Improved Horns of Valhalla and Totemic Cernd are available. Cirerrek's IWD2 scripting information and IE Action & Trigger Research (.xls files) is available in the Tools and Resources area.