View Full Version : Spell casting routine is seriously screwed?
konming
November 16th, 2007, 01:03 PM
In one test game, I have an E6 guy scripted to cast army of lead and an A6 guy scripted to cast fog warrior. They both have plenty of gems (I do not know how to put more than 30 on them http://forum.shrapnelgames.com/images/smilies/rolleyes.gif) and the opponent army is also huge. Well, the E6 guy casted army of gold instead and A6 guy casted arrow fend instead.
Why does this happen? What's the point of scripting commands when computer just blatantly ignores it? Of course arrow fend is not equivilant of fog warrior and army of gold certainly does not help against shadow blast.
I want to know if this is just AI sucks (as usual) or due to some mysterious reasons works as designed?
Lazy_Perfectionist
November 16th, 2007, 01:52 PM
Well, I see no reason you'd be unable to cast the spell. If its some rule you've overlooked, I can't figure out what it might be.
Casting AI does suck, but I'm still surprised it ignored these spells.
Shovah32
November 16th, 2007, 02:11 PM
I've had something similar happen recently in a multiplayer game. My pretender and a few other guys teleported/astral traveled into battle but, instead of casting will of the fates(he had plenty of astral magic and gems to do it) my pretender decided to buff himself..
lch
November 16th, 2007, 06:32 PM
Unless it's a magic/gem issue, they usually do this if they either think that the opponent's army is unworthy of said spells and go for a less gem-intensive solution or if your units wouldn't benefit as much. Turn on heavy debugging (-ddd) and rerun the battle again for their decision making process.
Sir_Dr_D
November 16th, 2007, 10:58 PM
I don't think gems so much make an impact on the decisions making process as fatigue. Often if the opponent army is small the mage will cast lower fatigue spells, but still waste all the gems you gave them.
QXel
November 19th, 2007, 01:46 PM
Yep. This IA isn't very smart ...
In an SP game I am running these days, I have my EA Arcocephale 3A 1E 3N scripted as "Eagle Eye/Lighting Orb x4/ cast spells" for some [Medieval Fantasy réplicas of Katiouchkas] casting 'breath of the Dragon' in my war against ... C'Tis !!! (at list 50% Poison resistant Lizards ...) http://forum.shrapnelgames.com/images/smilies/mad.gif
Very, very, very irritating (at most ...).
Also, as other threads allready complains, the horrible "'touch of madness' 3N mages illness" ...
The same with magic items management.
Two examples : an IA mage going into battle with a the 'research skull' (forget the name) and the biggest joke the game made to me : my Abysian fire mage with an eye of aiming picking up after killing an enemy mage ... another Eye of aiming !!! http://forum.shrapnelgames.com/images/smilies/laugh.gif http://forum.shrapnelgames.com/images/smilies/laugh.gif http://forum.shrapnelgames.com/images/smilies/laugh.gif
Well. This is not very often, so, I don't complain a lot ...
But still, a little cleaning in the routine code will be welcome ;o)
Meglobob
November 19th, 2007, 02:04 PM
I have had this a couple of times I script a battle winning spell and my mage ignores it, to cast something totally useless.
Its not just small battles, its happening in, its big decisive, war winning battles. So turns of planning fall apart because your mage ignores your scripting.
thejeff
November 19th, 2007, 02:08 PM
Lightning Orb is short range. If no targets were in range it would have to ignore the script.
autumnalcentaur
November 19th, 2007, 03:28 PM
I've had this same problem, but have generally been able to get around it by scripting one buffing spell for the mage first, and then scripting whatever I want. It seems that the mages _always_ try to cast a buffing spell if they can as the first thing they do in combat.
Edi
November 19th, 2007, 03:29 PM
If they don't have anything with the range to hit the enemy, that is.
Hadrian_II
November 19th, 2007, 05:11 PM
I think the worst with the spellcasting routine is, that she always burns all the gems a mage has, so if you are seiging a castle and the enemy makes a breakout on the turn you storm the castle your mages will waste all games to defeat the breakout, and you will have to storm the castle without real spell support.
Also fun is when a pan is supposed to cast weapons of sharpness, then he will always cast it on the maenads behind him and not on the centaurs that are fighting on the frontline.
Why mages love to spam ethereal wolves is a second riddle that would need some atention.
PyroStock
November 19th, 2007, 08:30 PM
I've also seen the AI cast Legions of Steel on groups of units without any armor, which is useless.
Nothing is perfect, but the most "seriously screwed" thing with the AI spell selection is Touch of Madness (http://www.shrapnelcommunity.com/threads/showflat.php?Cat=&Number=531840&page=&view=&sb=5&o =&fpart=all&vc=1). That should be script-only, like what was done with Breath of Winter.
K
November 19th, 2007, 09:17 PM
My games have shown that the AI doesn't want to cast spells with a final fatigue over 200. Even with spells with a final fatigue between 100-200 are sometimes not cast.
Communions, gem boosting, and just having enough levels in a Path to reduce the fatigue down are needed to get the AI to do what you want.
Also, the AI wants to cast self-buffs on turn 1, and get progressively more sketchy on turn 3 and after. Cast your big spells on Turn 0 or Turn 2 if possible.
thejeff
November 20th, 2007, 12:19 AM
That might actually be a bug. I don't think the AI realizes that Legions of Steel doesn't work on units without armor.
In Dom2 it did, right? I know Earth bless did. And some of the other armor handling changed. Maybe the spell-casting AI didn't keep up with the changes?
Sombre
November 20th, 2007, 01:20 AM
Unfortunately, there doesn't seem to be a way from stopping it casting legions of steel on unarmoured guys. It also likes to keep casting it, because since it doesn't work, the AI can't tell the units have already had it cast on them.
konming
November 20th, 2007, 02:34 AM
I would hate to have my air mage to cast arrow fend instead of fog warrior in a decisive battle.
Since this was a test game, I was able to rerun it several time. Sometimes the mage does cast army of lead but most of the time he just cast army of gold. And I do not think it is the fatigue either. Because after army of lead he only has 70 some fatigue, not exactly 200+.
What's wierder is that in one rerun, E6 mage casted army of gold and then army of lead (script: army of lead), and A6 guy casted arrow fend then fog warrior (script: fog warrior).
Due to the randomness of the result, I have to think that this is a bug. A very bad one as well.
Kristoffer O
November 20th, 2007, 01:41 PM
thejeff might be right about the legions of steel. Seems like a possible explanation.
konmig: hmm, forgot what I was thinking. I though I had an explanation for a second there.
Edi
November 20th, 2007, 01:51 PM
thejeff probably is right. Now that it's been mentioned, I remember seeing that behavior several times. I'll add it to the shortlist.
Meglobob
November 20th, 2007, 01:52 PM
In Armadillo as long as I had a A4 mage with 4A gems he cast fog warriors everytime and I cast fog warriors roughly about a million times in that game, give or take a few million... http://forum.shrapnelgames.com/images/smilies/biggrin.gif
So this arrow fend instead of fog warriors seems a little strange?
Unless it got introduced in 3.10?
Kristoffer O
November 20th, 2007, 04:32 PM
> and I cast fog warriors roughly about a million times
Yes, you did! http://forum.shrapnelgames.com/images/smilies/happy.gif
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.