Skip to content

2.1 advanced AI character scripts - spellcasting

SardocSardoc 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.
Post edited by Sardoc on

Comments

  • BillyYankBillyYank Member Posts: 2,768
    That's strange about the armor spell. When I had Dynaheir set to cast defensive spells, she cast armor immediately after every rest.
  • [Deleted User][Deleted User] Posts: 0
    edited April 2016
    The user and all related content has been deleted.
  • SardocSardoc Member Posts: 16

    I'm not sure "automating a complex process makes it less effective than when a human being performs it" counts as a bug...

    Spell choice and tactics are one of the most complicated and satisfying ways the player can exercise agency in these games. You can turn on the AI and just sit back and watch everything unfold like a movie, instead of a game... but you can't reasonably expect that to look similar to when a player is playing.

    Yes absolutely, but that's not the point I wanted to make. I don't want the AI to be smarter than me, I'd like it to be more consistent.

    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.
    BillyYank said:

    That's strange about the armor spell. When I had Dynaheir set to cast defensive spells, she cast armor immediately after every rest.

    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.
  • JumboWheat01JumboWheat01 Member Posts: 1,028
    I've discovered issues with the characters in the last too slots even following their "Advance AI" settings at all. Where is your Cleric/Mage on your party roster? Try moving them up and see if that helps any.
  • SardocSardoc Member Posts: 16

    I've discovered issues with the characters in the last too slots even following their "Advance AI" settings at all. Where is your Cleric/Mage on your party roster? Try moving them up and see if that helps any.

    Oh ok. She was the 6th character. I'll try having her as a single character and see what happens.
  • SardocSardoc Member Posts: 16
    No difference regardless where she is on the roster. Even if she's the only character in the party, nothing changes.
  • JumboWheat01JumboWheat01 Member Posts: 1,028
    I suggest a bug report then, or trying one of the other scripts, seeing if she actually does anything with them.
  • SardocSardoc Member Posts: 16
    I checked Xzar, and he was indeed casting Armor spell while my character wasn't. But then again, he had his default script, which was different to the custom advanced AI script. Also, my character started healing people and herself when their HP was critically low. It's slightly below my usual healing comfort zone, but it is working after all.

    More stuff that worked: Command, works after all. Also Hold spell, she paralysed hobgoblins fine. Seems like damage spells are iffy at the moment.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    edited April 2016
    I've been testing the AI since the beta. Things that I've noticed:

    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 :)
    Post edited by mlnevese on
  • bob_vengbob_veng Member Posts: 2,308
    avenger offensive casting of arcane spells doens't work. ai doesn't seem to acknowledge them.
  • SardocSardoc Member Posts: 16
    Ok. Let's test all we can and create a massive report.
  • SardocSardoc Member Posts: 16
    Done some more research and edited the opening post to show what I have so far. Please feel welcome to report the behaviour of other characters and other spells.
  • Gate70Gate70 Member, Developer Posts: 3,871
    Hi
    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
Sign In or Register to comment.