Well, I flagged this as a guide but it really isn't one ... yet.
I hope that I becomes a guide about the general usage of mages with the help of players more experienced than me.
It is mostly aimed away from setting up good scripts towards understanding the other mechanics that influence spell casting and strategic setup.
I think when you have your mages ready and know what you are facing it is pretty obvious what to script, also the AI will retain some level of control, even controlling everything after round 5, so generally it's more important to understand how to allocate your resources.
I've added some things that I think I know and asked the questions I deem important.
If you have an answer or addition to this or want to correct me, please do so.
1.) Gem Usage
Gem usage is controlled by the AI - if the AI does not deem the enemy army a thread it won't use gems. But now it gets complicated - how does the AI determine if the enemy is a thread (hp on the field, number of guys, or is there some real estimation of the enemies strength considering things like attack/defense/magical factor - a short sidenote: the coolest thing would be if the battle was played without gem usage first. If that is lost or casualties are high the battle is redone but now with gems.
)?
Also I think there are other factors taken into consideration. For example I'd like to use pairs of mages to get nice spell combinations going. However this doesn't work always, the first mages uses his gems, the second does not completely screwing the strategy. Maybe these are just my mistakes but it has happened to me several times and I've been double checking that all requirements are met. I'm really at a loss here.
Friendly fire? Or is the enemy no longer considered dangerous after the first spell? Does the AI prevent the last mage from going unconsicious?
Lastly what should the gems be used for?
I think as there are only three types of battlefield spells (summons, buffs, large area) requiring gems the answers are easily given.
Summons should mostly be used when facing thugs. Large area spells obviously waste their potential. Nature and death seem to be best to tie the thugs up while your mages deal the damage with cheap spells (or make them sleep). Elementals are best used when you can expect them to deal damage. If you can't it probably means your mages can't as well unless they have other paths.
Against armies it's the other way round, 4 fire elementals will be cut down before they deal the same damage as a Flame Storm. If you need to tie the enemy up nature summons are good, though.
Buffs are used when you have a large army present.
What you use is mostly situational.
2.) Resistance
Another thing is that the AI will check for is resistance (if I'm not mistaken). If you are facing an army consisting of poison resistant units only your mages won't cast poison spells.
However this seems to be more or less an all or none thing - in my tests just adding a single unresistant unit to a 100%cr army made the mages cast the scripted niefel flames.
This should be kept in mind when surprising an enemy with resistant troops. Don't go all imune against your enemy's attacks because then the AI will just take over and use something that can hurt you. Sprinkle some units that are not immune into your army and laugh as the 30 AOE 200 fatigue spell kills only the bait.
3.) After the script is done
It's easy to test how a given spell works but it's nigh impossible to simulate any long realistic battles if you don't have the devotion to play against yourself.
So here I, and maybe other newbies as well, are at a loss how to plan battles that go into the twentieth round or longer.
It all comes down to this - how will the AI select spells?
Is fatigue taken into consideration?
Which is the preference for buffs, summons, self-buffs and damage spells?
4.) Targetting
How does the AI select suitable targets?
I've seen the AI act quite weird here sometimes.
Mages buffing themselves with weapons of sharpness is one example. Wtf, why? How to avoid this?
Other things are:
Are low damage big area spell directed at troops with high hp or with low hp given the same troop density?
Are cloud spells directed at slow troops?
What about 100 precision spells?
I'd want my "snipers" to target enemy commanders, but this seems often not to happen. From what I've seen I think they target closer units first?
Also is there a chance that they are aiming at a guy but hit someone else in the same square like missile weapons?
5.) Paths
The important question here is which loopholes do the paths have on the battlefield and how can they be closed in the lab if possible.