Author Topic: Spellcaster AI Recommendations  (Read 628 times)

Legacy_Wensleydale

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Spellcaster AI Recommendations
« on: November 27, 2011, 08:58:20 pm »


               I'd like my spellcasters to actually cast spells, rather than shuffle about aimlessly or try to club me in the head with their quarterstaves.

Can anyone recommend a robust, relatively up-to-date AI system that handles spellcasting intelligently? I've done some research, but most of what I've found seems to be horribly antiquated and likely to cause more problems than it solves.

Thanks in advance.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Spellcaster AI Recommendations
« Reply #1 on: November 27, 2011, 10:06:42 pm »


               I dont know custom AI that meets your prereqs however I would stop at the issue you describing. Spellcasters should cast spells properly under default AI. If they are not you are probably another victim of the Horse Menu issue or you screwed default scripts somehow.

Try to install my unofficial patch, it should solve the issue and it will improve AI behavior mainly for casters greatly.
               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
Spellcaster AI Recommendations
« Reply #2 on: November 28, 2011, 03:36:15 pm »


               1) Create a custom OnSpawn script for your casters and enable fast buffing in it.

2) Avoid any invisibilty spells, although giving them the monster ability invisibilty is fine (under special abilities)

3) Give casters only a melee weapon for close defense.

4) Hand pick the casters spells after creating them. The Bioware Wizard often loads them with things they are unlikely to use.

5) If a higher level caster needs or you desire them to use improved invisibilty or another concealment effect, add it as a scripted effect in your custom OnSpawn.

Following the above can make for some pretty effective and versatile casters even when using the default scripts.
               
               

               
            

Legacy_JediMindTrix

  • Sr. Member
  • ****
  • Posts: 383
  • Karma: +0/-0
Spellcaster AI Recommendations
« Reply #3 on: May 28, 2012, 11:43:52 pm »


               Not to be that guy who bumps a 6 month old thread, but why should invisibility spells be avoided?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Spellcaster AI Recommendations
« Reply #4 on: May 29, 2012, 12:58:47 am »


               From documentation to Patch 1.70:
- Invisible casters switch back to offensive if their target suddenly can sees them.

I dont know about anything else related to invisibility spells with AI. And neither this is very critical issue. Thing is that default AI doesnt check whether PC can see them or not. So you start mage duel, npc cast invisibility (and in this point she start casting defensively resulting in casting buff spells) but you cast true seeing and NPC mage still wasting defensive spells when you can already attack him.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Spellcaster AI Recommendations
« Reply #5 on: May 29, 2012, 01:16:05 am »


               Since many builders still has issues with their mages not casting well or at all here is few tips from me:

1) install community patch 1.70/1.71beta
While many peoples disagree with certain fixes/changes/balances (whatever you call it) in spells or feats, the fixes in AI are very important. Alternatively you may rip the AI fixes from Patch, its easy to do as I always include all includes/spellscripts with every release, but in this case please think about yourself - would you do this if it were oficial?

this improves caster's AI a lot, here's a list:
1.70:
  • At very high difficulty, creatures are using auras instantly.
  • Confused creatures will now attack only those they can see or hear.
  • Creatures in any disabled state (confused, frightened, turned) won't attack when spell is cast on them anymore.
  • Creatures will spam knockdown feat a little less often.
  • Creatures will never ignore the Greature Sanctuary effect anymore. This fixes the "inv+GS" issue however only for a monsters. Player characters will still be able to attack you.
  • Creatures now won't waste smites on wrong (neutral) targets.
  • Creatures now won't use rapid shot feat with melee weapon (which resulted in doing nothing).
  • Spellcasters won't attack melee earlier than they cast everything what works.
  • Creatures inside (multiple) AOEs won't stop attacking. Also they won't teleport to the caster once he leave the current area.
  • Clever creatures will ignore or immediately dispell the Black Blade of Disaster. (a creature's AI Level must be set to AI_LEVEL_HIGH or HIGHER - see Special scripts for builders below)
  • Fixed turning undeads used by NPCs on vermins.
  • NPCs won't try to turn undead anymore, if their turning level (was character level) is not high enough.
  • Invisible casters switch back to offensive if their target suddenly can sees them.
  • Casters with HIPS won't attack melee anymore but rather HIPS-cast.
  • Creatures won't waste full-heal talents if they are not wounded badly.
  • Undead creatures are now able to use Harm and lesser inflict

    spells, and even custom potions with these spells to heal themselves.
  • Creatures won't move towards target when casting Time Stop spell.
  • Creatures won't recast true seeing/see invisible spells if they still have old spell's effects on them.
  • Creatures will use level draining bolt or pulse despite their target is drained already.
  • Creatures will ignore AOEs they are inside, if they are immune to that AOEs effects.
  • Creatures will substitute a negative energy talent with best healing talent if they are dealing with undead opponent.
  • and many minor improvements in AI (removed some immunity checks so

    creatures will try certain spells even when target is immune, better

    code to handle HP limit in Power Word: Death spell, creatures with true

    seeing itemproperty may cast darkness, and mainly improved efficiency)
  • Shadow's special AI rewritten to make his attack more effective and to fix an issue when shadow stopped attacking.
1.71beta:
-  arcane casters with Automatic still spell III will be able to cast spells with armor/shield normally

2) always check caster ability for given class:
- for bard, sorcerrer, check if NPC has charisma high enough
- for wizard, check intelligence
- for druid and cleric check wisdom
- (not sure about spells under special ability tab, think they do not need any ability above 10, yet their save is computed from charisma)
- in other aspects, you do not have to care about number of spellcaster levels your creature has and also you might ignore toolset warning that creature has too many spells of lvl X - AI will handle that without problems

3) always give your caster combat casting feat
- without this he might decide to attack melee when threaten in melee

4) do not give your arcane caster NPC an armor!
- default AI do not support automatic still spell in this regard and will always attack melee (patch 1.71beta fixes this)
  • (not sure but I think that spells set with still metamagic in toolset will be cast normally)

    5) set your arcane spellcaster to Wizard class rather than Sorcerer
    - you cant set sorcerer creature exact number of one spell, while this is great in sense that sorcerer will cast more randomly, the default AI (and community patch didn't changed this) doesn't handle sorcerrers well and it might result in casting the same spell over and over.
    - with wizard you can specifically set number of his spells which allow builder to insure the creature wont cast FoD more than once etc. etc.

               
               

               


                     Modifié par ShaDoOoW, 29 mai 2012 - 12:20 .
                     
                  


            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Spellcaster AI Recommendations
« Reply #6 on: May 29, 2012, 06:01:24 am »


               nw_c2_default... the x2_def seemed to be borked, or perhaps it's just JAI for us.

What has worked for us though is making a caster script template from one of the default caster spawns (bandit mage for example), which has all nw_c2_default_XYZ scripts. And replacing all x2_def scripts on casters with these. Hope that helps.