Brad Wardell's site for talking about the customization of Windows.
Published on October 4, 2013 By Frogboy In Elemental Dev Journals

image

Been working on the tactical summons code for v1.4 of Elemental: Fallen Enchantress – Legendary Heroes!

Should be some fun. 

While I was in there, I made some tweaks that should let the AI perform magic just generally better.  This is one of those things that just takes a lot of play time to master.  Knowing WHEN and WHERE and WHY to cast spells is not an “AI” thing. It’s a human judgment call that has to manifest itself in AI.

So keep those posts coming. It makes a big difference.


Comments
on Oct 04, 2013

Sounds awesome. 

Try getting some Attack vs Summon command in. (do not count summon attacks for more than 3 turns etc. and only pick summon attacks with better than 3x attack value) I think that should work fine for scaling as weapons get better. Then you could even add "summoner weapons" for tresholds, and make AI use them with mage path. 

What I mean, is that we need more items obviously, and the game will be more awesome

on Oct 04, 2013

thank you for looking at this.   A great game gets better

on Oct 05, 2013

Woohoo!  

 

Sounds great, looking forward to seeing it in action.

on Oct 05, 2013

All I have to say is great work. Looking forward for the AI to cast spells in better ways (especially summoning)

on Oct 05, 2013

Sounds tricky. I'm not pro gamer so I wouldn't know what to tell you or report back, what I will say is good luck

 

Also, make skelies a trainable unit ! I want skelie army!

on Oct 05, 2013

I somehow visualized swarms of skeletons not three... Dunno why.

on Oct 06, 2013

Im loving the game at the moment havent had it long but its awesome. Seen as we are visualizing skeletons and the like, how about a random hero undead unit, maybe gained by some sort of summon dead hero spell one only of course. Anyways keep up the good work.

 

on Oct 07, 2013

RottenBeggar

Im loving the game at the moment havent had it long but its awesome. Seen as we are visualizing skeletons and the like, how about a random hero undead unit, maybe gained by some sort of summon dead hero spell one only of course. Anyways keep up the good work.

 

There are most likely some mods floating around that include undead heroes. Or you could just make one of your own, I have an entire undead faction and 4 undead heroes in my game.

on Oct 07, 2013

Children of the Storm Mod adds tons of cool uniqueley made races such as skeletons with dif population contorl methods and stuff and Frost giants

that dont use groups but mega units , shadow race, tons of other cool ones to like 10 in all , all w/custom heroes & new weapons spells and tons of other great stuff. 

its the mother of all mods for this game a must have in my opinion. Its pretty much like a massive expansion pack and very well made i couldnt really find any bugz at all.

 

 

 

 

on Oct 07, 2013

Phillybear


Quoting RottenBeggar, reply 7
Im loving the game at the moment havent had it long but its awesome. Seen as we are visualizing skeletons and the like, how about a random hero undead unit, maybe gained by some sort of summon dead hero spell one only of course. Anyways keep up the good work.

 

There are most likely some mods floating around that include undead heroes. Or you could just make one of your own, I have an entire undead faction and 4 undead heroes in my game.

 

Note that there are at least 2 undead Champions in the base LH game (though you have to play an Empire faction to obtain them.)

 

on Oct 07, 2013

So keep those posts coming. It makes a big difference.

Hopefully you saw my previous posts in this thread: https://forums.elementalgame.com/448105/page/1/#replies where I suggested it might be possible to make a formula to compare the results of different spells. So, for example, a Mass Curse which eliminates 300 points of armour for three turns with a very low chance of resistance should almost always be a better thing to cast than Burning Blade which adds three points of attack. This could become quite complicated because there are a lot of factors, as in an ideal world you would have relative weightings for initiative, attack, defense, hitpoints, accuracy; the number of turns it takes to cast something (and the number of turns an effect lasts for) are also factors; buffs are better than negative spells because they have zero chance of being resisted.

I assume something like this must exist already for the AI to decide whether to attack or cast a spell, so if a solution can be found which doesn't make the tactical AI grind to a halt I think the principle is sound. This is essentially what I do as a player; assuming mana is not a factor then I look for the spell which has the maximum effect on the maximum number of units; if the enemy has lots of armour then Mass Curse might be a good idea; if the enemy has lots of ranged units then Guardian Wind might be a good idea (lowers accuracy by number of ranged units). Spells which cause a large number of enemy to miss a turn are very powerful, especially if they can be cast in one turn, and especially if they have a low chance of being resisted. In my current Insane game my entire strategy revolves around a high power mage casting Titan's Breath every turn (with a one turn casting reduction). It's a bit repetitive but it wins the battle every time against troops which can't resist being knocked prone. If even half the enemy army can be knocked prone it's almost certainly worth casting, because my one unit is taking out half a dozen units for a tiny mana cost. It also eliminates high enemy dodge values because hitting prone is a guaranteed hit.

A couple of other things:

1: Understanding tactical summons placement is very important. There are two main cases: a: defensive placement, where a unit is placed to protect a unit which is weak in melee, e.g. a Dark Sorcerer. In that case the simplest rule of thumb would be to place the summons next to the summoner, between the summoner and the nearest enemy. There is an argument for placing the summons further away (in some circumstances the Zone of Control might stop more units), however next to the summoner is reasonable, apart from anything else it reduces by one the number of tiles that can be used to attack the summoner. Also some summoners have quite powerful close range attacks but they don't want to be Swarmed; placing the summons next to the summoner means the summons and the summoner may be able to gang up on an attacker. b: Attacking summons: the rule of thumb is, as close as possible to the unit the summoner would choose to attack if it could attack anyone on the battlefield, as far away from other enemy units as possible. So for example it usually makes sense to try to target the opposite side of enemy ranged units. This can actually get quite complicated, because for example you may wish to keep the summons away from enemy units who could kill it before it gets a turn or before your other melee units can support, but that's a good rule of thumb.

There are then the special cases where there is some positive or negative effect from casting the spell, where the rule is very simple: cast the summons where it affects the maximum number of friendly units (for positive effects) or maximum number of enemy units (for negative effects). In all the cases I can think of the tactical effect is one of the most important reasons for casting the summons, so that probably takes precedence over other considerations. Raise Skeleton Horde can be considered a special case of this; I invariably want to cast it as close to enemy units as possible, with as few units surrounding it as possible. So in others nine empty tiles next to an enemy ranged unit is perfect.

2: In normal circumstances summons should be cast early, because that normally increases the number of turns the summoned units are in the battle. I will normally cast a powerful tactical summons within my first 1-3 actions for the caster. The main exceptions are where I caste Haste on my spellcaster or where I use a very damaging spell (e.g. a Blizzard scroll) which may have more effect on the battle if cast early and so reducing the damage the enemy can do to me. But even in that case Raise Skeleton Horde would probably be my third action. With less powerful summons I might cast them late if there's nothing better to do. For a summons orientated Mage casting Ice Elemental might be their best option after they've cast Lightbringer/Wisp/Air Elemental, for example.

Hope that's helpful.

on Oct 07, 2013

Ok cool havent played very long i noted all the mods dealing with undead today so thanks for the heads up.