AI

Discuss IB/IBx engine ideas, bugs, etc.
Post Reply
Pongo
Posts: 142
Joined: Fri Jan 22, 2021 8:39 am

AI

Post 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!
User avatar
Dorateen
Posts: 262
Joined: Thu Jan 16, 2020 3:03 pm

Re: AI

Post 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.
User avatar
slowdive
Site Admin
Posts: 485
Joined: Wed Jan 15, 2020 4:37 am

Re: AI

Post 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
Pongo
Posts: 142
Joined: Fri Jan 22, 2021 8:39 am

Re: AI

Post by Pongo »

Perfect, thanks both!
Those are nice options - reckon my orcs are going to start piling on wizards on sight now...
Post Reply