Creature Caster AIs

Discuss anything in general about the IceBlink Engine + Toolset project (or anything else) here.
Post Reply
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Creature Caster AIs

Post by slowdive »

UPDATED: Aug 9, 2021
This will be where we work on Creature AIs that will be used in IBbasic and IB:

Aggressive Caster
1. starts with a personal defence spell (stoneskin, mirror image etc).
2. 90% chance that the caster moves straight into a damage spell:
- Will cast AoE spells if player character numbers equal or greater than ally numbers in the area of effect (ie if the caster can drop a fireball on
three pcs and three allies they'll do it; if they would hit three pcs and four allies they won't). They won't cast an AoE spell in an area that would hit
themselves.
- In a round where an AoE attack isn't an option, they focus on single target damage spells instead.
10% chance that instead of a damage spell the caster casts another self defence spell, as long as one is available that would apply a different
protective effect
3. Reactive round
- checks if any self defense effects remain in place, and if not casts a defense spell.
- will "counterspell" a pc debuff only if it affects the caster themself, not allies. 30% chance if they themselves are under a debuff
- If a pc is at <50% health, there is a 30% chance the caster will target them with their highest level single target damage spell, or an AoE if it would
also hit a minimum of two other pcs.
- otherwise, back to 2. (90% chance damage attack, 10% chance personal protection)

Defensive Caster
1. 75% chance casts personal defence spell (stoneskin, mirror image etc)
2. Casts buff on allies - then moves to reactive rounds.
3. Reactive round:
- checks if personal defence spell needs casting/recasting and prioritises this if so
- 80% chance of casting "counterspell" if either self or allies have been debuffed
- if ally <50% HP, 80% chance of targeting them with a heal or buff
- if none of the above trigger, 30% chance of casting aggressive damage/debuff/summons
- otherwise casts further buff

Summoner
1. 60% chance casts personal defence spell (stoneskin, mirror image etc), otherwise goes straight to 2.
2. Casts summon spell.
3. Casts buff on summoned creatures.
4. Checks how many total allies remain.
- If three or fewer, casts summon spell; then follows with a buff etc as above.
- If four or more, spends a round being reactive, and then repeats the check on how many allies remain, etc.
5. Reactive rounds
- Checks if personal defense spell needs casting/recasting, if so prioritises this.
- 30% chance of casting "counterspell" if self or allies are under a negative effect
- 30% will cast damage or debuff spell on pcs (AoE if can hit pcs only - won't hit allies)
- otherwise casts another buff spell on allies

General Caster
1. 50% chance personal defence spell (stoneskin, mirror image etc) if no current defence effect in place (or runs out, is dispelled etc). If defence
effect in place, will not cast a second defense spell.
2. Generally an equal chance of buff, debuff, damage, or summons spells.
- Will only cast AoE spells if can hit two or more pcs and one or fewer allies. Won't cast an AoE spell in an area that would hit themselves.
3. Medium responsive caster
- 30% chance will "counterspell" a pc debuff if it affects the caster or its allies
- If ally is at <50% health, there is a 40% chance the caster will target them with a buff or healing.
- if two or fewer allies remaining, 40% chance of casting a summoning spell

Melee Caster (eg cleric)
- Same as general caster but if pc is next to caster, and casting a spell would trigger an AoO, the caster attacks with its melee weapon instead.
- In the reactive round there is a 50% chance the caster will actively move closer to the PCs to engage in melee combat instead of casting a spell.

Squishy Caster
- Same as general caster, but if the PCs are within two tiles of the caster it will retreat to a safer location before casting its next spell.
- if PC occupies a tile next to the squishy caster, the caster checks whether it needs a self protection effect and prioritises that immediately before
casting further spells

Reckless Caster (similar to aggressive, but will not be too concerned with harming its own allies, it just wants max impact to the PCs at any cost)


Frugal Caster (will use its normal ranged/melee almost as much as spells, may conserve SP just in case it needs it later, not that there will be a later if we beat them :lol: )



Any additions, suggest them in this thread and I'll edit this top post
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

Great stuff!

Some further thoughts on the aggressive caster ai (I'll think about the others as well - reckless caster sounds like total carnage fun!)

Aggressive caster

1. starts with a personal defence spell (stoneskin, mirror image etc).

2. 90% chance that the caster moves straight into a damage spell:
- Will cast AoE spells if player character numbers equal or greater than ally numbers in the area of effect (ie if the caster can drop a fireball on three pcs and three allies they'll do it; if they would hit three pcs and four allies they won't). They won't cast an AoE spell in an area that would hit themselves.
- In a round where an AoE attack isn't an option, they focus on single target damage spells instead.
10% chance that instead of a damage spell the caster casts another self defence spell, as long as one is available that would apply a different protective effect

3. Reactive round
- checks if any self defense effects remain in place, and if not casts a defense spell.
- will "counterspell" a pc debuff only if it affects the caster themself, not allies. 30% chance if they themselves are under a debuff
- If a pc is at <50% health, there is a 30% chance the caster will target them with their highest level single target damage spell, or an AoE if it would also hit a minimum of two other pcs.
- otherwise, back to 2. (90% chance damage attack, 10% chance personal protection)
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

General caster

1. 50% chance personal defence spell (stoneskin, mirror image etc) if no current defence effect in place (or runs out, is dispelled etc). If defence effect in place, will not cast a second defense spell.

2. Generally an equal chance of buff, debuff, damage, or summons spells.
- Will only cast AoE spells if can hit two or more pcs and one or fewer allies. Won't cast an AoE spell in an area that would hit themselves.


3. Medium responsive caster
- 30% chance will "counterspell" a pc debuff if it affects the caster or its allies
- If ally is at <50% health, there is a 40% chance the caster will target them with a buff or healing.
- if two or fewer allies remaining, 40% chance of casting a summoning spell


(I'm seeing the %s as a process - eg, if an ally is at <50% AND two or fewer allies remaining, the 40% chance of heal or debuff is checked first, then 40% summons, and if neither happen the caster goes to a random spell)
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

Summoner

1. 60% chance casts personal defence spell (stoneskin, mirror image etc), otherwise goes straight to 2.

2. Casts summon spell.

3. Casts buff on summoned creatures.

4. Checks how many total allies remain.
- If three or fewer, casts summon spell; then follows with a buff etc as above.
- If four or more, spends a round being reactive, and then repeats the check on how many allies remain, etc.

5. Reactive rounds
- Checks if personal defense spell needs casting/recasting, if so prioritises this.
- 30% chance of casting "counterspell" if self or allies are under a negative effect
- 30% will cast damage or debuff spell on pcs (AoE if can hit pcs only - won't hit allies)
- otherwise casts another buff spell on allies
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

Defensive Caster

1. 75% chance casts personal defence spell (stoneskin, mirror image etc)

2. Casts buff on allies - then moves to reactive rounds.

3. Reactive round:
- checks if personal defence spell needs casting/recasting and prioritises this if so
- 80% chance of casting "counterspell" if either self or allies have been debuffed
- if ally <50% HP, 80% chance of targeting them with a heal or buff
- if none of the above trigger, 30% chance of casting aggressive damage/debuff/summons
- otherwise casts further buff
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

Melee Caster (eg cleric)
- Same as general caster but if pc is next to caster, and casting a spell would trigger an AoO, the caster attacks with its melee weapon instead.
- In the reactive round there is a 50% chance the caster will actively move closer to the PCs to engage in melee combat instead of casting a spell.

Squishy Caster
- Same as general caster, but if the PCs are within two tiles of the caster it will retreat to a safer location before casting its next spell.
- if PC occupies a tile next to the squishy caster, the caster checks whether it needs a self protection effect and prioritises that immediately before casting further spells

(I wonder if all casters not considered melee should follow these rules? Maybe we need to differentiate melee casters and squishies in all the AIs?)
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

These are great Pongo! Added them to the top post.

I started working on some of the utility functions for checking existing effects:

Code: Select all

        public bool hasDefenceEffectCurrentlyActive(Creature crt)
        {
            foreach (Effect ef in crt.cr_effectsList)
            {
                if (ef.acModifier > 0)
                {
                    return true;
                }
                else if (ef.modifyDex > 0)
                {
                    return true;
                }
                else if (ef.numberOfHitPointDamageAbsorptionLeft > 0)
                {
                    return true;
                }
                else if (ef.numberOfMirrorImagesLeft > 0)
                {
                    return true;
                }
            }
            return false;
        }
        public bool hasMirrorImageOrDamageAbsorptionEffectCurrentlyActive(Creature crt)
        {
            foreach (Effect ef in crt.cr_effectsList)
            {
                if (ef.numberOfHitPointDamageAbsorptionLeft > 0)
                {
                    return true;
                }
                else if (ef.numberOfMirrorImagesLeft > 0)
                {
                    return true;
                }
            }
            return false;
        }
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

I was reflecting on how to determine which spell the caster chooses to use.

In a Vancian system I guess you just start with the highest level spells and work your way down to lower level spells as they run out (I think this is how Baldurs Gate does it). I don't think that translates well to a SP system though.

I guess the aim should be for casters to lead with and generally choose their most powerful spells, but with an element of unpredictability built in that means they don't get totally stuck on spamming fireballs until their SP runs out.

Perhaps:
- when at >50% SP, the caster chooses highest level spell of the type (buff, debuff etc) called by the AI;
- when at <50% SP, the caster has a 50% chance of choosing the highest level available spell and a 50% chance of choosing a random lower level spell of the called type;
- if the caster no longer has sufficient SP to cast the spell chosen, it looks for a spell at the next level down.

So for example:
A Summoner with access to Level 5 spells starts combat.
Round 1: casts his highest level personal defence spell, which happens to be a level 4 spell;
Round 2: casts his highest level summons spell at level 5;
Round 3: casts highest level buff, level 5 - at this point, the caster drops below 50% SP;
Round 4: there are 5 allies remaining, and the AI calls for a damage spell this round. The caster has level 4, 3 and 2 spells available. There is a 50% chance it will pick a level 4 damage spell, and a 50% chance it will randomly pick a damage spell from levels 3 and 2;
Round 5: number of allies has now dropped to 3, so the AI requires the caster to cast a summons spell. It has summons spells at levels 1-5. There is a 50% chance it will pick a level 5 summons spell, or 50% that it will randomly pick a spell from levels 1-4. It chooses a level 4 spell, but the caster doesn't have enough SP - it therefore checks whether the caster could instead cast a level 3 summons spell.

What do you think?
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I think that sounds like a great approach. I'll have a bunch of helper functions checking for all the types of situations, available spells and SP, and current status effects. Then in the if-then code we can call on these functions to help with the decision making like you have laid out. Each caster type will have their own routine/function with the decision tree we come up with. We'll have a few memory variables for keeping track of previous decisions that should apply to future decisions. for example, if the caster decides to cast a fireball, but needs to move a few squares to get to that optimal location, we can store the decision that we are going to cast fireball at a specific location after we finish moving to a square. The moving part happens in a seperate part of the code and when we come back to the AI part again we can recall this previous decision to cast a fireball.
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

That sounds brilliant - and the fireball example is a really good one. Combat is going to be a lot of fun with these ai casters causing problems!
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I've been doing some reading/research on game AI and there are some really complex structures that could be used, but I think I will stick with the more simple method of decision trees. I started detailing out a bit of the General Caster:

Code: Select all

            //if rand(100) > 30 and not silenced then cast spell
            //   if rand(100) > 30 use defense spell
            //      if does not have a defense effect active
            //         if has a major defense spell available to use then use that
            //         else if has a minor defense spell available to use then use that
            //      else don't use a defense spell and move on to next
            //   if rand(100) > 30 use a responsive spell
            //      if some allies (maybe 1/3) have a debuff effect and caster has the counter spell, then 50% chance to remove the debuff
            //      else if an ally have low HP (<50%) and caster has a heal spell, then 50% chance to heal them
            //   pick random spell
            //      if heal spell, but no one needs healing then try again
            //      if buff spell, but allies (maybe 1/3) already have a similar buff then try again
            //      if debuff spell, but PCs already have the debuff effect or are immune (after learned) then try again
            //      if damage spell, but not enough PC can be hit then try again 
            //   or rank each spell available based on how effective it would be on this round (need a weighting system)
            //else attack/move
I am not sure about whether to use the 'pick random spell' (the current system used) or a 'ranking' system for the fall back option (no defense or responsive spell used this round). I kind of like the idea of going through each spell that is still available to the caster and ranking them based on how effective they may be on that round. I would using weighting systems to make that determination. Could be randomized a bit by selecting one of the top three ranked spells instead of the top spell each time. Thoughts?
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

Yes, I like the idea of a weighted system with randomisation on the last three options. It's a good balance and will keep things unpredictable but with a degree of intelligence.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

Here is what I have so far for scoring a damage type spell with weighting. I still think I could add different weighting for for PCs with high HP vs. low HP. I removed some code for easier reading here.

Code: Select all

public int ScoreOfDamageSpell(Creature crt, Spell spl, int casterWeight, int crtWeight, int pcWeight)
        {
            //test numbers below, remove once this method is used somewhere
            casterWeight = -4;
            crtWeight = -1;
            pcWeight = 2;
            
            for (int y = spl.range; y > -spl.range; y--)
            {
                for (int x = spl.range; x > -spl.range; x--)
                {
                    utility = 0; //reset utility for each point tested
                    selectedPoint = new Coordinate(crt.combatLocX + x, crt.combatLocY + y);

                    //check if selected point is a valid location on combat map
                    if (!isSquareOnCombatMap(selectedPoint.X, selectedPoint.Y))
                    //if ((selectedPoint.X < 0) || (selectedPoint.X > gv.mod.currentEncounter.MapSizeX - 1) || (selectedPoint.Y < 0) || (selectedPoint.Y > gv.mod.currentEncounter.MapSizeY - 1))
                    {
                        continue;
                    }

                    //check if selected point is in LoS, if not skip this point
                    if (!isVisibleLineOfSight(new Coordinate(endX, endY), new Coordinate(startX, startY)))
                    {
                        continue;
                    }

                    if (selectedPoint == new Coordinate(crt.combatLocX, crt.combatLocY))
                    {
                        utility += casterWeight; //the creature at least attempts to avoid hurting itself, but if surrounded might fireball itself!
                        if (crt.hp <= crt.hpMax / 4) //caster is wounded, definately avoids itself.
                        {
                            utility += casterWeight;
                        }
                    }
                    foreach (Creature crtr in gv.mod.currentEncounter.encounterCreatureList) //if its allies are in the burst subtract a point, or half depending on how evil it is.
                    {
                        if (this.CalcDistance(crtr, crtr.combatLocX, crtr.combatLocY, selectedPoint.X, selectedPoint.Y) <= spl.aoeRadius) //if friendly creatures are in the AOE burst, count how many, subtract 0.5 for each, evil is evil
                        {
                            utility += crtWeight;
                        }
                    }
                    foreach (Player tgt_pc in gv.mod.playerList)
                    {
                        if ((this.CalcDistance(null, tgt_pc.combatLocX, tgt_pc.combatLocY, selectedPoint.X, selectedPoint.Y) <= spl.aoeRadius) && (tgt_pc.hp > 0)) //if players are in the AOE burst, count how many, total count is utility  //&& sf.GetLocalInt(tgt_pc.Tag, "StealthModeOn") != 1  <-throws an annoying message if not found!!
                        {
                            utility += pcWeight;
                            if (utility > optimalUtil)
                            {
                                //optimal found, choose this point
                                optimalUtil = utility;
                            }
                        }
                    }                    
                }
            }
            if (gv.mod.debugMode)
            {
                gv.cc.addLogText("<yl>" + spl.name + ":" + optimalUtil + "</yl><BR>");
            }

            return optimalUtil;
        }
cartons
Posts: 73
Joined: Mon Jan 11, 2021 5:38 pm

Re: Creature Caster AIs

Post by cartons »

Hey life stuff has been keeping me occupied for awhile, but checking in and seeing this thread is very cool! Even replaying some IB classics with these mods will be really fun.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

cartons wrote: Fri Aug 27, 2021 7:50 pm Hey life stuff has been keeping me occupied for awhile, but checking in and seeing this thread is very cool! Even replaying some IB classics with these mods will be really fun.
I agree, it will definitely make the casters more challenging and threatening. Leveling up, spell selection, party configuration will be even more critical. Some of the original modules may become too difficult :lol: . I'll have a basic General Caster AI that will be slightly more intelligent than the one before (and will be the default for the older modules) and more other AIs that will be very intelligent and deadly.
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

slowdive wrote: Sat Aug 28, 2021 12:06 am I agree, it will definitely make the casters more challenging and threatening.
A good reason to use the new Silence spell!
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

More progress on the General Caster AI. I have the first two parts completed, the Defensive and Responsive options. Next up is the last option, the Random option.

Code: Select all

            //if rand(100) > 30 and not silenced then cast spell
            //    if rand(100) > 30 use Defense spell
            //        if does not have a defense spell active
            //            if has a major defense spell available to use then use that
            //            else if has a minor defense spell available to use then use that
            //        else don't use a defense spell and move on to next option (Responsive)
            //    if rand(100) > 30 use a Responsive spell
            //        if an ally has a hold effect, and the caster has counter spell, then use that
            //        else if some allies(maybe 1/3) have a debuff effect and caster has the counter spell, then remove the debuff
            //        else if many allies have low HP and caster has a mass heal spell, then use that
            //        else if an ally has low HP(<50%) and caster has a heal spell, then heal them
            //        else, didn't find an appropriate responsive spell so go to the next option (Random)
            //    pick Random spell rand(4)
            //        1 -if has heal spell, but no one needs healing then try again, else use most effective heal spell available (try from major list first)
            //        2 -if has buff spell, but allies(maybe 1 / 3) already have a similar buff then try again, else use most effective buff spell available (try 
                            from major list first)
            //        3 -if has debuff spell, but PCs already have the debuff effect or are immune(after learned) then try again, else use most effective 
                           debuff spell available (try from major list first)
            //        4 -if has damage spell, but not enough PC can be hit then try again, else use most effective damage spell available (try from major list 
                           first)
            //else attack/move
            
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

Small request, slowdive. If you have time, could you look into the Dimension Door spell that you have packaged with Proving Grounds, and how it works for enemy casters? I gave it to a magic using monster, and it did cast the spell, but the effect did not apply. He did not move to the new point location. The spell does work flawlessly for player characters.

It could be a matter of logistics, the way moving a creature works. Maybe because of the code, it would require a separate spell for enemy casters. However, if it does work, this is a possible way to have teleporting opponents, or phasing out to different places on the battlefield.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I'm not sure if dimension door is working or even setup properly for creatures. I'll look into that.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I have three of the four parts of the Random option completed. I just have the debuff part left to do. I am hopeful that I will have that completed this weekend and can start setting up the test encounter(s) to debug the new code.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I finished all the code parts for the new General Caster AI. I still need to add a few more features like moving first if needed to cast to the optimal square (that will require some decision memory tricks). Now I'm testing it out in the Proving Grounds module. I created a test wizard that has a lot of spells to choose from (almost all of them). Found a few bugs already and some issues with not showing mirror images for creatures. More testing to follow.
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

Excited to see these new intelligent, and deadlier spellcasters.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

After some more testing, it looks like the AI is working as expected. I added in some more randomness to the spell selection from within a category (heal, damage, buff, debuff) and within a major and minor group. The AI also looks at trying an AoE spell first (only uses it if enough targets are in the best AoE location) and then a single target spell next. I still want to add the moving before casting feature to optimize the use of the best spell on each round. This will take some time, but I think it will be worth the effort.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I made a short video to show where I am at with the new General Caster AI. I walk through the basics of the code first and then do a demonstration of the code in action with the combat test module:

https://youtu.be/tVlhczrD0LY

What do you think so far? I'll make more videos as the code progresses.
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

I just had a chance to watch the video, interesting stuff. The most satisfying thing to me is seeing a variety of spells, and less repeating castings of the same buff. Makes magic using enemies so much more dangerous. Also, I think a key to an engaging battle is one where the player has to react to events on the field. The web, hold and high damage fireballs creates a lot of conditions to deal with, in order to win such a fight.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I was able to get the move before casting working. Now the caster will find the best possible location/target for the selected spell and move to the closest location that will work to cast from. It still has a few weird moves every once in awhile that I'll have to figure out, but for the most part it is fairly brutal. I'll do some more play testing and then try adding it to IB for v204. I'll also make another video once everything seems to be working as intended.
Pongo
Posts: 156
Joined: Fri Jan 22, 2021 8:39 am

Re: Creature Caster AIs

Post by Pongo »

"fairly brutal" sounds like what we were aiming for! Good work, look forward to the vid.
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

Now I really need to add that Silence spell before 204 drops.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

I made a short video to show the addition of the "move before casting" feature. There are still some anomalies that need tweaking and some better decision making that needs to be added in, but I think it is going well so far. What do you think?

https://youtu.be/yRNDzVile60
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

Hey, slowdive, video looks good. Very cool to see casters move and then take an action.

Just a head's up, I don't think the Silence spell I copied over from Proving Grounds is working properly. I tested on an enemy creature, and it showed the Silence effect, but she still was able to cast a spell. I am going to check the effects data, so see if there is a property that needs to be applied to prevent spell casting.

edit: Ah, under the status type, it says Silenced. But then in the descriptive box at the bottom, indicates Silenced has not been implemented.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

Yeah, I think I still need to add the check for isSilenced in the part where they try to cast a spell. That should be in v204.
User avatar
slowdive
Site Admin
Posts: 511
Joined: Wed Jan 15, 2020 4:37 am

Re: Creature Caster AIs

Post by slowdive »

Poll Question:

Would you prefer that I make the new "GeneralCaster" AI to automatically replace the existing GeneralCaster AI or would you prefer that the new AI be called GeneralCaster2 and the builder would need to manually change caster AI setting to point to the new AI if they want to use it. I could leave the old AI in as "GeneralCasterOld" and builders could point to that as well. I'm fine either way, but if everyone wants to automatically move over to the new AI, it would be easier for the builder to not have to manually change a bunch of AI settings to point to the new AI.

Thoughts?
User avatar
Dorateen
Posts: 326
Joined: Thu Jan 16, 2020 3:03 pm

Re: Creature Caster AIs

Post by Dorateen »

I'm excited to use the new caster AI, so count me in on wanting to replace the old general caster AI with the new version.
Post Reply