Jump to content


Description and current version

1 reply to this topic

#1 Yovaneth


    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3042 posts

Posted 01 March 2006 - 07:43 AM

Current version is: 1.1


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.

I would also thank Thomas Brooks for his input after I'd started this project. We had a great deal of fun discussing the best way to get the best out of the limited scripting language and sorting out some quite sticky problems.


These scripts support spells for Baldur's Gate, Tales of the Sword Coast and the TeamBG add-on, Dark Side of the Sword Coast. 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. Although these scripts were developed using the original DSotSC mod, there is no reason why they should not support the Weidu version of the mod although I have not tested them with it.

In the case of ThreatLevel Assessment the numbers have been wound down to allow for the lower-level monsters in BG1. There are also a lot of BG1-specific additions as well as Dark Side of the Sword Coast support.


* Co-operative healing out of combat
* Healing assessment
* Immediate poison healing
* Potion passing in combat
* Threatlevel assessment
* Co-operative targeting
* Priority targeting
* Target type assessment (no using arrows on skeletons etc)
* Wand use
* Backstab for all thief classes
* Auto-hide for all thief and ranger classes
* A certain amount of self-preservation by the characters when badly hurt!
* Party-summoned monster threatlevel assessment and co-operative targeting


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.

Poison Cure

Unfortunately STATE_POISONED is broken in BG1 so I've had to create a workround using HitBy() as a starting point. HitBy() is transient; that is, it changes everytime someone gets hit. If we get the state


a local variable is set to indicate that the player is poisoned. The problem arises when we have no antidotes or potions left and we have to resort to spells. If a healer used INNATE_SLOW_POISON or CLERIC_SLOW_POISON then the poisoned flag would be reset while the character may still be taking poison damage. As there is no way of checking if the character is poisoned or not, only the CLERIC_NEUTRALIZE_POISON spell was scripted in the HealOthers section. If you wish to use either INNATE_SLOW_POISON or CLERIC_SLOW_POISON then you will have to apply them manually.


All classes that have a Hide option will attempt to hide if their hitpoints are greater than 75%. This gives the healers a chance to get to them when hurt. If you want to use a Hide'n'Detect action (DetectTraps is one of many actions broken in BG1) then hit FindTraps when the character has hidden. As soon as the character comes out of shadows they will immediately attempt to hide again; this will give you approximately eighteen seconds of invisibility and trap detecion at the same time. In the case of rangers – mostly because people tend to use Minsc as a tank - Hide is disabled by default.

All thief classes will use potions of invisibility (if they have them) when the threatlevel is 3 or above.

Dh’arlo’me’s Robe (Dark Side of the Sword Coast only)

Dh’arlo’me’s Robe in DsotSC introduced some interesting considerations. It is a Cursed item with a very high magic resistance which, along with total resistance to level one to level three spells, means that Healing spells will not work and so we need to be able to use potions out of combat. The high magic resistance also means that Remove Curse fails. Conversely, it also increases spellcasting speed as well as vastly increasing the number of available spells. Quite a handful all round, which makes an equip/not equip decision quite awkward to decide..... much kudos to whoever designed this item. All of this had to be taken into account and in the end, it became easiest to write Dh'arlo'me's Robe-only mage-class scripts and force a scriptchange if the robe is equipped. The original TeamBG robe had an interesting fault in the item parameters in that it could be worn by anyone; so anyone could get the penalties but only a mage got the pluses. This has now been fixed in the Weidu version.


Party-summoned monsters ('minions') will switch to threatlevel assessment and co-operative targeting to support the party. After many attempts to accomplish this via a script change, I gave up and modified all the summoned monster cres to place ysminion.bcs directly into their Override script slot. Party-friendly behaviour is thus now guaranteed. It may appear that monster summoning is not working correctly because they do not appear as often as you'd expect. This is down to two things:

1: To get a clear run at casting a spell, the script checks to see that there are no attacking enemies within four search squares

2: Baldur's Gate will only display in 640x480 mode and four search squares is almost the width of the screen at this resolution.

Druid Shapeshift

Shapeshifting has been overhauled to make more sense of it. Shapeshifting to bear form will now occur if the druid is less than 40 percent hitpoints and has a strength of less than 18. Shapeshifting to wolf form is reserved for running away when less than 20 percent hitpoints. Shapeshifting back to human form will happen ten seconds after the end of combat - usually just in time to start healing.

If you don’t like the idea of scripted shapeshifting then use the optional druid script.

Edited by Yovaneth, 01 March 2006 - 07:53 AM.

#2 Bad213Boy

  • Member
  • 2 posts

Posted 08 October 2010 - 06:59 PM

How about a download link?

Reply to this topic