2.1 advanced AI character scripts - spellcasting
Sardoc
Member Posts: 16
I've had a go at the advanced AI character scripts. It seems to me like the spellcasting scripts need quite a lot of tweaking.
Since the original opening post was created, I've done some more testing, obviously this is heavy work in progress. I've updated the thread title (2.0 --> 2.1)
So far, I have tested the "advanced AI" script for the player character (bddefai) who is a Cleric/Mage, with Druid spells added using EE Keeper, and I have selected the character to use both offensive and defensive spells. I also checked these Wizard characters with their default scripts: Xan (bdxanc), Neera (bdneerac), Edwin and Xzar. Regarding Clerics and Druids, I have checked some of Jaheira's spells and Branwen.
EDIT: Just got Edwin. He casts Armor, Haste and Mirror Image alright. More spells and Dynaheir incoming soon.
EDIT 2: Dynaheir doesn't seem to want to use her sling. She stands there and does nothing. Weird.
EDIT 3: Branwen doesn't cast Cleric spell Magical Stone.
Wizard Spells which everyone casts just fine:
-Magic Missle.
Wizard Spells which no one casts regardless of script:
Larloch's Minor Drain, Chromatic Orb, Melf's Acid Arrow, Shield, Blur. If these are the only spells memorised, the characters just use their melee/ranged weapons as if there were no spells memorised.
Also, Wizard characters don't cast Sleep or Horror spells, even though they sometimes (I think I've only seen it cast once or twice, and I got to Chapter 3) cast Fireball fine. Both are AoE spells.
Wizard Spells which some characters cast, but not everyone:
Armor (only cast by Xzar and Edwin. Other characters, like Dynaheir, Neera and Xan, as well as the player character never cast it).
Wizard Spells which I'm unsure about:
Fireball: normally my character doesn't cast it, but today she did once when we were waylaid by hobgoblins, so obviously there's more testing required. Other characters don't have the spell memorised yet. Then there's also Flame Arrow, which in general I don't see being cast, though my character did cast it on very few occasions.
Also not sure about Mirror Image, only my character has it memorised.
Cleric/Druid Spells which everyone casts just fine:
(only tested the player character advanced AI, no other characters yet) Cure Light Wounds, Cure Medium Wounds, Command (though rarely), Armor of Faith, Hold Person.
Cleric/Druid Spells which no one casts regardless of script:
Magical Stone, Call Lightning, Hold Animal, Summon Insects.
Cleric/Druid Spells which some characters cast, but not everyone:
(haven't noticed anything like this yet).
Cleric/Druid Spells which I'm unsure about:
Slow Poison, also not sure about Remove Curse (I never wear cursed items).
Also not sure about Remove Paralysis. The player character didn't cast it when a party member was paralysed today (27/04/2016), but I have seen her cast this spell in the past. Also, I have seen characters cast this spell in a Let's Play of Siege of Dragonspear.
Please feel more than welcome to add anything more, like other characters (Dynaheir was mentioned, and also Clerics/Druids) and other spells.
Since the original opening post was created, I've done some more testing, obviously this is heavy work in progress. I've updated the thread title (2.0 --> 2.1)
So far, I have tested the "advanced AI" script for the player character (bddefai) who is a Cleric/Mage, with Druid spells added using EE Keeper, and I have selected the character to use both offensive and defensive spells. I also checked these Wizard characters with their default scripts: Xan (bdxanc), Neera (bdneerac), Edwin and Xzar. Regarding Clerics and Druids, I have checked some of Jaheira's spells and Branwen.
EDIT: Just got Edwin. He casts Armor, Haste and Mirror Image alright. More spells and Dynaheir incoming soon.
EDIT 2: Dynaheir doesn't seem to want to use her sling. She stands there and does nothing. Weird.
EDIT 3: Branwen doesn't cast Cleric spell Magical Stone.
Wizard Spells which everyone casts just fine:
-Magic Missle.
Wizard Spells which no one casts regardless of script:
Larloch's Minor Drain, Chromatic Orb, Melf's Acid Arrow, Shield, Blur. If these are the only spells memorised, the characters just use their melee/ranged weapons as if there were no spells memorised.
Also, Wizard characters don't cast Sleep or Horror spells, even though they sometimes (I think I've only seen it cast once or twice, and I got to Chapter 3) cast Fireball fine. Both are AoE spells.
Wizard Spells which some characters cast, but not everyone:
Armor (only cast by Xzar and Edwin. Other characters, like Dynaheir, Neera and Xan, as well as the player character never cast it).
Wizard Spells which I'm unsure about:
Fireball: normally my character doesn't cast it, but today she did once when we were waylaid by hobgoblins, so obviously there's more testing required. Other characters don't have the spell memorised yet. Then there's also Flame Arrow, which in general I don't see being cast, though my character did cast it on very few occasions.
Also not sure about Mirror Image, only my character has it memorised.
Cleric/Druid Spells which everyone casts just fine:
(only tested the player character advanced AI, no other characters yet) Cure Light Wounds, Cure Medium Wounds, Command (though rarely), Armor of Faith, Hold Person.
Cleric/Druid Spells which no one casts regardless of script:
Magical Stone, Call Lightning, Hold Animal, Summon Insects.
Cleric/Druid Spells which some characters cast, but not everyone:
(haven't noticed anything like this yet).
Cleric/Druid Spells which I'm unsure about:
Slow Poison, also not sure about Remove Curse (I never wear cursed items).
Also not sure about Remove Paralysis. The player character didn't cast it when a party member was paralysed today (27/04/2016), but I have seen her cast this spell in the past. Also, I have seen characters cast this spell in a Let's Play of Siege of Dragonspear.
Please feel more than welcome to add anything more, like other characters (Dynaheir was mentioned, and also Clerics/Druids) and other spells.
Post edited by Sardoc on
2
Comments
I listed offensive spells which shared a lot of similarities: all 3 were single target spells dealing direct damage. One of them is cast by the AI just fine, while the other two aren't at all. I see no reason for this behaviour. If the AI makes the character cast one spell correctly, why doesn't it make the same character cast very similar spells as well.
Obviously I'm not asking for the AI to reliably cast manually targeted spells like Sleep or Fireball, I'd rather handle that myself. But single target stuff, why not. Yeah I know it's strange. That's why I asked if anyone else had tried this. Thanks for the info. I'll keep testing.
More stuff that worked: Command, works after all. Also Hold spell, she paralysed hobgoblins fine. Seems like damage spells are iffy at the moment.
1) Defensive spells. The AI correctly selects and cast defensive spells. Long duration spells are cast immediately. Others are cast as needed, protection from magic weapons, for instance.
2) Buffing. The AI does a good work about buffing your party. It is nowhere near perfect but is good enough and a good guide for those learning the game.
3) Avoids wasting ammo. If your currently equipped ammo will not affect a target it will no waste it by attacking.
4) Avoids attacking a target if your weapon can't affect it. If your currently equipped weapon does no affect a target the AI does not place the character in risk by attacking automatically.
5) Healing. The AI does a good work healing your characters. Sometimes it will waste spells if you have more than one healer in your party by casting more than one powerful healing spell on a target that could be healed with only one.
6) Removing debuffs. The AI does correctly remove disease, slow poison, etc. Remove paralysis sometimes is cast against spells that are not actually affected by it.
7) Attack spells are the weak point of the AI. It will cast magic missiles, but not chromatic orb, for instance.
Overall it's an excellent tool to automatize boring tasks, such as having your caster automatically recast stoneskin when its effects are over. It's even an excellent tool to teach someone new to the game about some possibilities of the spell system. It in no way is a full substitute for the player though and that's actually a good thing
I've amended the public bug report to focus on offensive spells as I could reproduce that issue.
http://support.baldursgate.com/issues/23187 Advanced AI should use all available offensive spells
I have made further suggestions there as to what would be required to investigate the other reports here.
- Is the issue being in a version of the game started before the latest patch. If it is, can you reproduce with a new game
- When an issue is encountered, try setting the character's AI to None and returning to the game screen. Then set the AI back to the previous setting and see if the issue still happens
- Split reports into categories. e.g. Offensive casting. Defensive casting. Weapon
- Detail what AI script is involved
- Detail what Advanced AI options are enabled if that script is active
- Advise what weapons/shield are involved when weapon scripting is being reported
This should help determine the cause.Thanks