G3

tSeries

A Gibberlings Three Mod
Author:
Eric Kerr (aka Cirerrek)
On the web:
Home page and discussion forum

Version 2
Languages: English
Platforms: Windows, Mac OS X, Linux

Overview

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.

Compatibility

This mod is designed to work with Planescape: Torment. While the mod has been updated for the Enhanced Edition, it still uses the original PsT scripting and could be further optimized.

Bug Reporting

If you should encounter any bugs, please report them to the authors at Cirerrek's AI Scripts forum.

Installation

Enhanced Editions Note
The Enhanced Editions are actively supported games. Please note that every patch update will wipe your current mod setup! If in the middle of a modded game you might want to delay the patch update (if possible) as even after reinstalling the mods, you might not be able to continue with your old savegames. Alternatively, copy the whole game's folder into a new one that can be modded and will stay untouched by game patches. For BG2:EE it is important that you install the mod to the language version you are playing the game in. Otherwise, the dialogues of the mod will not show but give error messages.

Windows
tSeries for Windows is distributed as a self-extracting archive and includes a WeiDU installer. To install, simply double-click the archive and follow the instructions on screen.

Alternatively, the files can be extracted into your game directory using 7zip or WinRAR. When properly extracted, your game directory will contain setup-tseries.exe and the folder tseries. To install, double-click setup-tseries.exe and follow the instructions on screen.

You can run setup-tseries.exe in your game folder to reinstall, uninstall or otherwise change components.

Mac OS X
tSeries for Mac OS X is distributed as a compressed tarball and includes a WeiDU installer.

First, extract the files from the tarball into your game directory. When properly extracted, your game directory will contain setup-tseries, setup-tseries.command, and the folder tseries. To install, double-click setup-tseries.command and follow the instructions on screen.

You can run setup-tseries.command in your game folder to reinstall, uninstall or otherwise change components.

Linux
tSeries for Linux is distributed as a compressed tarball and does not include a WeiDU installer.

Extract the contents of the mod to the folder of the game you wish to modify.

Download the latest version of WeiDU for Linux from WeiDU.org and copy WeiDU and WeInstall to /usr/bin. Following that, open a terminal, cd to your game installation directory, run tolower and answer Y to both queries. You can avoid running the second option (linux.ini) if you've already ran it once in the same directory. To save time, the archive is already tolowered, so there's no need to run the first option (lowercasing file names) either if you've extracted only this mod since the last time you lowercased file names. If you're unsure, running tolower and choosing both options is the safe bet.

To install, run WeInstall tseries in your game folder. Then run wine BGMain.exe and start playing.

Note for Complete Uninstallation
In addition to the methods above for removing individual components, you can completely uninstall the mod using setup-tseries --uninstall at the command line to remove all components without wading through prompts. .

Contents

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.

The pack contains both the .baf and the .bcs files for the scripts, as follows:

  • PCANNAH
  • PCDAKKON
  • PCGRACE
  • PCIGNUS
  • PCMORTE
  • PCNAME
  • PCNORDOM
  • PCVHAIL
  • 0110CUT1 - this is a fix file created by Gebhard Blucher which properly assigns Annah's script upon her joining the party

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 me if you place the scripts up for public download.

Known Issues:

  1. For some reason, The Nameless One (TNO) appears to 'space out' from time to time and I have not been able to determine why. The 'spacing out' does not affect any of the other NPCs, which is part of the reason the problem has me baffled, as his script isn't really all that much more complicated than the scripts for the other NPCs.
  2. TNO is a rather unique character in that he can change classes during the course of the game. This causes a problem with the scripts in that TNO can still cast spells that he has memorized as a mage, even when he is currently not a mage. Some may find this a rather nifty loophole and others might be adverse to allowing TNO to continue to cast spells even while not a mage. Currently I have left it so that he can cast spells no matter his class. If there are enough calls for the feature, I believe I can use Class(Myself, MAGE) checks to prevent TNO from spell casting while not a Mage.

Script Features

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 experience scale the scripts use for spell targeting breaks down in the following manner:

  • 9th: >1800 XP
  • 8th: >1600 XP
  • 7th: >1400 XP
  • 6th: >1200 XP
  • 5th: >1000 XP
  • 4th: >800 XP
  • 3rd: >600 XP
  • 2nd: >400 XP
  • 1st: >200 XP

Melee and Missile attacks are handled on a nearest enemy basis and do not rely on the experience scale.

Finally, 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.

Wizard Spells: Offensive Wizard Spells: Defensive Wizard Spells: Healing
  • Chromatic Orb
  • Magic Missile
  • Missile of Patience
  • Blindness
  • Tongues of Flame
  • Seeking Flames
  • Vilquar's Eye
  • Reign of Anger
  • Pacify
  • Adder's Kiss
  • Black-Barbed Curse
  • Swarm Curse
  • Horror
  • Ignus' Terror
  • Infernal Orb
  • Ball Lightning
  • Elysium's Tears
  • Hold Undead
  • Tasha's Unbearable Derisive Laughter
  • Vampiric Touch
  • Ax of Torment
  • Elysium's Fires
  • Blacksphere
  • Force Missiles
  • Cloudkill
  • Cone of Cold
  • Desert Hell
  • Fire and Ice
  • Howl of Pandemonium
  • Chain Lightning Storm
  • Acid Storm
  • Blade Storm
  • Stygian Ice Storm
  • Meteor Storm Bombardment
  • Death Bolt
  • Ignus' Fury
  • Power Word, Blind
  • Mechanus' Cannon
  • Celestial Host
  • Conflagration
  • Power Word, Kill
  • Abyssal Fury
  • Shield
  • Scripture of Steel
  • Submerge the Will
  • Black Barbed Shield
  • Pain Mirror
  • Blur
  • Power of One
  • Strength
  • Zerthimon's Focus
  • Balance in All Things
  • Infernal Shield
  • Improved Strength
  • Enoll Eva's Duplication
  • Greater Embalming
  • Minor Embalming
  • Blood Bridge: Not Scripted!
Priest Spells: Offensive Priest Spell: Defensive Priest Spells: Healing
  • Call Lightning
  • Spiritual Hammer
  • Curse
  • Halo of Lesser Revelation
  • Prayer
  • Flamewalk
  • Aid
  • Blessing
  • Protection from Evil
  • Heal
  • Cure Critical Wounds
  • Cure Serious Wounds
  • Cure Moderate Wounds
  • Cure Light Wounds
Innate: Offensive Innate: Defensive Innate: Healing
  • Litany of Curses: Morte
  • Skull Mob: Morte
  • Kiss: Fall-from-Grace
   
Items: Offensive Items: Defensive Items: Healing
  • Fanged Mirror of Yehcir-Eya
  • Ring of Fallen Stars
  • Scent of the Storm
  • Shackles of Light
  • Abyssal Pipe
  • Black-Barbed Branch Wand
  • Adder's Tear
  • Corpse Fly Charm
  • Shamanic Rod
  • Thrice-Blind Charm
  • Scroll of Call Lightning
  • Sadistic Frame
  • Knot Charm
  • Bone Charm
  • Charcoal Charm
  • Whispering Flask: Dak'kon
  • Dustman Embalming Charm, Greater: TNO, Morte
  • Dustman Embalming Charm, Lesser: TNO, Morte
  • Jar of Embalming Fluid: TNO, Morte
  • Rod of Modron Might: TNO
  • Cockroach Charm
  • Heart Charm
  • Blood Charm
  • Blood Fly Charm
  • Clot Charm
  • Needle and Thread
  • Bandages

Contact Information

The basis for these scripts comes from Gebhard Blucher's Planescape: Torment Player AI Scripts. Eric Kerr (aka Cirerrek) borrowed the scripts that Gebhard Blucher created and expanded upon them so that they are a bit more comprehensive in terms of spell usage and item usage. You can visit The Gibberlings Three for information on this and any other mods on which we may be working.

Thanks and Acknowledgements

Black Isle Studios - For producing such an excellent RPG
Bioware - For the Infinity Engine and making such an outstanding RPG
Sarkyn (Greg Hodgson) - gSeries and gMinion
Xyx (Jochem van't Hull) - General Insight and Helpfulness
GBlucher (Gebhard Blucher) - GB-Scripts, Torment AI Scripts, Torment fixes
Rich Martel - uScript
TeamBG - Editors, Tutorials, Forums
BWScripts - Defunct but not forgotten
BGScripts - Where player AI scripting really came to life
Jon Hauglid - Near Infinity and eSeries Debugging
SimDing0 - A little of this, a little of that, and all very helpful
Max (aka Potencius) - a font of information about everything Infinity Engine
Ivann Alvarado - XpertAi (IWD)
Grog - Smart Scripts
Jessica Kerr - seriously reducing my risk of developing carpal tunnel syndrome
Platter - Torment Fixes
Cilantro - Torment Restoration Project
Göran Rimén - scripting tutorials, script segments, etc.
CamDawg - hosting, installation package, G3'ifying documentation

Tools Used in Creation

Credits and Copyright Information

Permission is granted to use and modify the contents of this mod, as long as credit is given to Cirerrek and the original authors and support is handled by the modifying party.

Version History

Version 2 - September 3, 2018

  • Compatibility updates for PsTEE

Version 1.2

  • Removed setup.bat
  • Updated to WeiDU v213

Version 1.1

  • Added WeiDU installer
  • Added OS X installer
  • Moved to The Gibberlings Three
  • Annah's script assignment bug is now fixed via patch rather than overwrite

Version 1.0

  • Auto Trap detection doesn't appear to be working properly so I commented out the uncooperative code. Thieves will still hide in shadows if their skill is high enough (Stealth >74) and they aren't overly injured (90% of Max Health)

Version Beta_v0.6

  • Added Black-Barbed Branch Wand [BBWAND] to t_Items_Offensive
  • Added Scent of the Storm [ACID] to t_Items_Offensive
  • Added Ring of the Fallen Starts [METEOR] to t_Items Offensive
  • Added Scroll of Call Lightning to t_ClericScrolls_Offensive
  • Modified XP check to be Lvl x 100 + Lvl x 100 for all spells
  • Modified XP check to be (Lvl x 100 + Lvl x 100) + 200 for all items
  • Added Greater Dustman Embalming Charm [EMBCHRM2] to t_Items_Specific
  • Added Greater Embalming to t_Mage_Defensive
  • Added Lesser Embalming to t_Mage_Defensive
  • Dropped Range to Enemy and Range to Party check for CLERIC_CALL_LIGHTNING as it was never being cast

Version Beta_v0.5

  • Added NumCreature checks to the majority of Priest Offensive & Defensive Spells
  • Added Range to Target and Range to Party Members check to Cleric Call Lightning as Fall-from-Grace kept toasting my party in the Modron Maze - need to monitor to see if the spell is still getting used occassionally... and the spell description says the spell can only be used outdoors!
  • Commented out Timers for Vilquar's Eye and Blindness and started using !StateCheck(LastSeenBy(Myself),CGAMESPRITE_STATE_BLIND) instead
  • Added Thrice-Blind Charm [TBCHRM] to t_Items_Offensive
  • Added Adder's Tear [ADDRTEAR] to t_Items_Offensive
  • Added Shackles of Light [MANACLE] to t_Items_Offensive
  • Added Fanged Mirror of Yehcir-Eya to t_Items_Offensive
  • Added Rod of Modron Might to t_Items_Defensive
  • Added Cockroach Charm to t_Items_Defensive
  • In CLERIC_CALL_LIGHTNING Changed !Range(LastSeenBy(Myself),10) to !Range(LastSeenBy(Myself),8) because it was never being cast at !Range(LastSeenBy(Myself),10). I'll try this but might just have to bite the bullet and let the other NPCs get zapped by the spell if I want it cast at all. May be the same way for all the AOE spells. WIZARD_FIRE_AND_ICE also does some collateral damage, but not a whole lot.
  • Added CheckStatLT(Myself,76,SPELLFAILUREPRIEST) to t_Heal_MostDamagedOf, t_Cleric_Offensive, t_Cleric_Defensive
  • Added CheckStatLT(Myself,76,SPELLFAILUREMAGE) to t_Mage_Offensive, t_Mage_Defensive