Page 1 of 1

AI

Posted: Sat Apr 10, 2021 10:17 am
by Pongo
What is the difference between the AI options? Basic Attacker and General Caster seem straightforward. Soft Target hunter presumably goes after squishable characters, although is that based on AC or HP? I don't have a guess about Blood Hunter or Mind Hunter.

Also, under the CastChances option - what does "Value" signify? Is it linked to the chance of the creature using the specific spell?

thanks!

Re: AI

Posted: Sat Apr 10, 2021 2:09 pm
by Dorateen
Regarding the AI behaviors, Soft Target goes after the character with the worst armor class that is within attack range. Blood Hunter goes after the character with the lowest hit points, and Mind Hunter goes after character with the highest spell points (think of targeting wizards).

I never messed around with the casting percentages.

Re: AI

Posted: Sat Apr 10, 2021 5:43 pm
by slowdive
This is the code in IBbasic which is probably similar to IB. The chance to cast is just a percent chance that the creature will cast a spell on each round versus using melee/ranged attack or moving.

Code: Select all

            //check if should cast spell or attack/move
            int castpercent = gv.sf.RandInt(100);
            if ((crt.percentChanceToCastSpell < castpercent) || (crt.isSilenced()))
            {
                //don't cast this round, instead try and attack or move
                .
                .
                .

The AI is in need of some serious work though to make the creatures act more like a player would, more tactful. Of course it would depend on their intelligence and other factors. AI improvements is on my list for IBbasic.

My guess on Karl's AI types:
Mind Hunter = go after those with SP
Blood Hunter = lowest HP
Soft Target Hunter = lowest AC

Re: AI

Posted: Sat Apr 10, 2021 5:46 pm
by Pongo
Perfect, thanks both!
Those are nice options - reckon my orcs are going to start piling on wizards on sight now...