It's a well know fact that the mage AI in Arcanum is horribly done. None of them seem to use their spells effectively... except for Arbalah. He has, at least, Stun and Harm and seems to use to them correctly and efficiently, Stunning both Virgil and myself and bringing down our health using Harm, though we eventually brought him down. Why is he different than the rest of the mages in Arcanum?
There's nothing special about him (just as there's nothing special about casting harm or stun). He has the generic AI packet though, i.e. he doesn't keep a distance of 5 tiles in combat like most of mages do.
Early in the game, when you're at about the mages' level, they can be quite dangerous if you let them cast some spells. Even if reluctant to do so, they can spam harm and fireflash. At later levels it's more of an annyance then a true threat. Then again, at higher levels mages tend to use the body of fire (or water/earth) spell - quite a scare for most non-fighter characters. Still, the worst thing I recall about the mage AI is how often mages summon minions that tend to be useless - altough that's mostly a problem with necromancers, or reather one particular necromencer that features some nice voice acting. I wonder, would it be possible to make mages use their defensive spells when retreating ? I mean the wall of force / the equivalent fire spell (I think there is one) or unseen force ? I mean the keeping a 5 square distance thing, can this behaviour be extended ?
There's a parameter in AI packets that controls a chance of throwing a defensive spell (as opposed to offensive) in combat, but I'm not sure if that's what you want. Anyway, the spells you listed won't do. The wall spells are too complex to be handled correctly by AI, and Unseen Force is obviously an offensive spell.
It's mostly a matter of casting them on the ground right where the mage npc was at the beggining of the turn, after moving 1 tile. Of course, I've no idea how the ai is scripted in the game, so I don't know how does this look form the progrmmer's perspective. I'm just saying it _should_ be simple.
The spells that can be casted by AI have special parameters which determine their use: AI_Resurrect AI_FatigueRecover AI_CurePoison AI_HealingHeavy AI_HealingMedium AI_HealingLight AI_Offensive AI_Defensive AI_Summon AI_Flee There are spells that don't have any AI settings specified (such as the walls spells), thus they can't be casted by an NPC. You can of course modify the spell scripts, but they will have to use AI settings from this list, so you won't get the desired behavior. And adding new spellcasting parameters and such will be very difficult without the source code.
I see, so the AI scripts are simply too general in nature to implement any complex behaviour that's not hard-coded. Too bad. Thanks for explaining this tho.