~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Journeyman-Mage Yovaneth's Icewind Dale Scripts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Latest Updates:
18.03.2007 | v2.0.2 | Thief classes set to Detect Traps rather than Hide - see Thief Hide'n'Detect section. | |
Bard given troll-killing abilities. | |||
All cleric classes given troll-killing abilities. | |||
Removed all instances of Set Visual Range() because it was crudding up the response times. | |||
Removed upgraded summoned Phase Spider and summoned Umber Hulk because I felt it was disguised cheating. | |||
Overhauled yiMinion to make it work properly. | |||
11.04.2007 | v2.0.3 | Correct yiMinion included this time.... | |
More yiMinion and Thief information added to the readme. |
Acknowledgments
These scripts owe their origins to Sarkyn's gSeries scripts for Baldur's Gate II: Shadows Of Amn and are heavily based upon their structures. Sarkyn was the first scripter to really push what could and couldn't be done with the Infinity Engine and all subsequent scripting owes much to his pioneering work.
I am also grateful to Cirerrek for playing and feeding-back on version 1.2. Testing is easy; playing the scripts 'for real' is when you find the bugs. Based on his carefully-constructed bug- and suggestion- reports, I made so many changes that I decided a version jump to 2.0 was called for.
Introduction
These scripts support spells for Icewind Dale, Heart of Winter and Trials of the Luremaster. Not all spells have been scripted; in these cases the conditions for safe use could not be met and so I elected to leave them out. Secondly, for some reason best known to itself, the Icewind Dale Infinity Engine is VERY slow to respond to the presence of enemies. This means that on occasions both party and enemies can be almost toe-to-toe before anything happens. This is not a scripting fault; during testing I have had enemies and parties side-by-side for at least one round before either registered the presence of the other. Cirerrek has also confirmed this behaviour.
These are not fight-your-battles-for-you scripts but are best considered as 'helpers'. You can interrupt the script with a manual command at any time and that command will be carried out.
Features
|
Pause Game
The game will auto-pause if a character is poisoned or is near-death. If the GUI bars are hidden then they will be automatically recalled.
Priority Targeting
Enemy Mages and Clerics are treated as priority targets. If they are within the nearest first four of an enemy group, the entire party will concentrate exclusively on them, unless they are being attacked themselves. Between five and ten enemies away, only those of the party carrying ranged weapons will attack. This stops your melee fighters from running after the priority targets and leaving your mages and thieves exposed. The downside of this is that you must have your mages equipped with a missile weapon (darts, slings etc), otherwise they will not use distance spells (e.g. magic missile). There's nothing much I can do about this without a huge amount of additional scripting to check for every possible missile spell.
Bards
Bards will use whatever songs are available to them to the greatest effect depending on threat level and party state. They do not sing continuously through a battle so that they can attack and defend as needed. Bards will also go after downed trolls if they have the right spells (see Mages section below).
Clerics
The Icewind Dale clerics are smart enough to register when a party member is killed. When combat is over, any surviving cleric will tag any dead clerics or druids for revival first. Resurrection is the spell of choice; otherwise Raise Dead will be used. If the dead cleric is an elf or half-elf and Resurrection is not available then they will be ignored. Once any dead clerics and druids have been revived, any other dead party members will be revived in the order Player1 - Player 6. Apart from Resurrection, no character is ever deliberately completely healed (although it does happen depending on how the calls are registered) as this is considered to be wasteful of healing spells. Potion use is restricted to combat only as they are considered too precious to use otherwise. Healers will heal themselves first and then concentrate on the most injured.
Clerics will automatically go after downed trolls to kill them with Sunscorch, FlameStrike or Produce Fire. If none of these spells are available then they will use FlameBlade (if available). This is a last resort as I'm not a fan of FlameBlade because the weapon slot it takes can best be occupied by something more powerful.
Druids
Shapeshifting is triggered if the threatlevel is greater than 2. Winter Wolf is reserved for when the Druid is low on hitpoints (<25%) and is used to get away from combat as rapidly as possible. The druid will shift back after ten seconds of no combat – usually just in time to start healing. Shapeshifting will not trigger if the Druid's strength is already 18 or more.
If you don’t like the idea of scripted shapeshifting then use the Cleric script. The druid will simply ignore the TurnUndead part.
Thief Hide'n'Detect
Something is badly broken in the IWD version of the Infinity Engine; Hide() works and FindTraps() works, but as soon as you put them together in a script snippet, they both fail. The script triggers the Hide() command correctly but the Infinity Engine never carries it out - much testing by Cirerrek and myself has proven this part of the Infinity Engine to be completely shafted. Thieves will Detect Traps() automatically as this is a bit more useful than simply hiding, but will cease to Detect traps() when you trigger a manual Hide() either from the keyboard or the UI. Unfortunately it doesn't seem possible to register when the Disarm Traps (Thieving) button has been pressed, so you will need to press the H key to stop the thief detecting traps before attempting to disarm a trap. Currently he/she will display 'Find Traps' when auto-detect is turned on and 'Leaving Shadows' when auto-detect is turned off. I really need to find a better message for when auto-detect is stopped...
Mages
Mages will automatically go after downed trolls to kill them with Flame Arrow or Melf's Acid Arrow. If they have neither of these spells then they will revert to the far-less party-friendly Burning Hands and Aganazzar's Scorcher. If you want to Fireball a downed troll, you're on your own.
Minions
Party-summoned monsters ('minions') will attempt to switch to threatlevel assessment and co-operative targeting to support the party. IWD does not have Simulcrums or summoned monsters capable of wielding spells, so the minions are restricted to ranged or melee only. As a substitute for the BG2 command "LastSummonerOf()", all minions will turn to face the nearest enemy when they are summoned. If the minions stand around scratching their proverbial arses (happens rarely) then there are no enemies within 'See' range; selecting the minions and pointing them at an enemy will start the auto-targeting routines. If an NPC is calling for help, the minions will abandon the current target and move to the NPC's aid. I have seen this occasionally become an 'omg - which target do I pick?' but I chose to leave it this way as it demonstrates realistic behaviour.
Like the NPC scripts, grabbing the minions and manually selecting a target for them will override the auto-target routines.
Rangers and Paladins
The ranger/paladin script also includes cleric spell support up to level 4 as per the game.
Class Scripts
yiBard.bs | Bards and similar rogues. | |
yiCleric.bs | Cleric, Fighter-Cleric and Cleric-Ranger | |
yiClrMge.bs | Cleric-Mage and Fighter-Cleric-Mage | |
yiClrThf.bs | Cleric-Thief and Fighter-Cleric-Thief | |
yiDruid.bs | Druid and Fighter-Druid | |
yiFight.bs | Pure Fighter | |
yiMage.bs | Pure mage and Fighter-Mage | |
yiMgeThf.bs | Mage-Thief and Fighter-Mage-Thief | |
yiRgrPal.bs | Ranger and Paladin | |
yiThief.bs | Thief and Fighter-Thief |
Minion Script
yiMinion.bcs | Minion attacks |
Modifed .CREs
ms6pspi.cre | Phase spider |
Common Keypresses
You may need to reconfigure your keyboard to take advantage of the following key commands. A, B, S and W actions are also script-triggered depending on threat assessment.
A | Short-term mage armour (e.g. Globe of Invulnerability, Protection From Missiles etc) | ||||
B | Buff before battle. Loads Bless, Chant, Haste, Aid etc. Keep pressing until they stop casting | ||||
D | Disable script for the selected character | ||||
E | Enable script for the selected character | ||||
H | Enable/Disable Detect Traps for the selected thief character | ||||
S | Summon monsters. | ||||
W | Raise class-based long-duration armours e.g. Barkskin for Clerics, Stoneskin for Wizards etc | ||||
X | Force alternate selection of melee and ranged weapons for each character - cycles "Missile Weapons", "Melee", "Normal" in that order | ||||
NOTE:The FloatMessage indicates what the NPC will do at the next combat: weapon change does not occur until then |
Remember - BS is your best friend!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Yovaneth Scet, Apprentic'd at Candlekeep during the Bhaalspawn Troubles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~