friendly skills ai

i cant make any skill work if its between enemies (monsters mainly in this case)

do i need to add some particular tag for them or its just ai not able to cast such things?

i just tried to port easy things like heal or stoneskin for example

10,672 views 15 replies
Reply #1 Top

im still struggling here, anyone has a clue?

Reply #2 Top

Make sure you set a high AI priority, that seems to help. But there are no guarantees in making the AI do anything.

If you are giving a spell to a monster, make sure it is an ability like so <IsSpecialAbility>1</IsSpecialAbility>. Monsters don't seem able to cast those without.

Edit: Oh, I see what you mean. You want monsters to buff each other in battle? I have no idea how to accomplish that.

Reply #3 Top

yes thats what i want

buff or heal or whatever stuff that has for target a friendly (for monster) unit

 

ok alternative (not much elegant)

is it possible to cast a global with conditions?

 

like we talked in the other thread could i make a global heal that heals only who has "is summoned" ?

 

 

 

 

 

 

 

 

Reply #4 Top

In tactical battle? Yes. Target all friendly units and calculate a positive value based on that unitstat.

Btw, I have seen the AI cast single-target buff spells in combat, but only on AI champions, never anything else. They use mass spells a lot though, those that target their entire team.

Reply #5 Top

uhm ok

but can i also tweak ai to not cast when those guys are not in play ?

for example a wolf mom and wolf children

i make mom cast "heal children" that heals 10 hp x (is children)

its ok

but what happens when all children are dead? i dont want ofc mom to keep casting it

what could happen if i add istargetworthy to some multitarget spell?

i suppose ai is not ready for such things eh

Reply #6 Top

Not yet, see the istargetworthy thread. Fb has some comments there.

Reply #7 Top

    <SpellDef InternalName="healchildrenability">
        <DisplayName>heal children</DisplayName>
        <Description> </Description>
        <Image>T_Stoneskin_Painting.png</Image>
        <IconFG>T_Diamondskin_Icon.png</IconFG>
        <IconColor>250,215,183</IconColor>
        <Cooldown>2</Cooldown>
        <SpellBookSortCategory>Unit</SpellBookSortCategory>
        <SpellBookSortSubCategory>heal</SpellBookSortSubCategory>
        <SpellType>Tactical</SpellType>
        <SpellClass>Defensive</SpellClass>
        <SpellSubClass>heal</SpellSubClass>
        <SpellTargetType>AllFriendlyUnits</SpellTargetType>
        <IsSpecialAbility>1</IsSpecialAbility>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>CurHealth</Attribute>
        <value>10</value>
            </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>88</AIPriority>
        </AIData>
        <HitSoundFX>Spell_ManaShield_01</HitSoundFX>
        <SpellDefEffect>
            <EffectName>S_ManaShield_Particle</EffectName>
            <LocalPosition>0,0,0</LocalPosition>
            <EffectScale>0.6</EffectScale>
            <EffectDelay>0</EffectDelay>
            <SnapToTerrain>1</SnapToTerrain>
        </SpellDefEffect>
    </SpellDef>

 

tried this but doesnt look like its working at all

 

Reply #8 Top

Try adding <IsCastable>0</IsCastable>

That makes it so that you don't have to click on the screen to cast it. This might be tripping up the AI.

Switch Subclass to "Buff."

Reply #9 Top

nothing i give up

i tried by brute force so many combination of spell type and subclasses but nothing seems to work

 

did you happen to add one of your modded new skills to creatures instead of champions and see if they work?

 

Reply #10 Top

No. Monster AI kind of sucks. I just give them tons of Hp and Moves so they don't trip over their own feet and die. 

Reply #11 Top

My suggestion is to use passives instead of stuff you have to activate. Allmost all of Stormworld assumes the AI can't play for shit, everything is just move forward and attack. And if you have to make a spell, copy an existing one you've seen the AI use and give it super-high priority.

Reply #12 Top

offensive spells work np

but the fights arent interesting if everything just cast a green or black fireball :P

 

what make fights interesting is the interaction between the same faction, if you have played wow you understand what i mean

thats why i need monsters to do some stuff to each other to make more complex fights

 

anyway yes i thought a bit and few things can be done with passives

 

for example thinking about wolf mom and children i though a way to make mom enrage if children are dead but its quite complicated

i make a hidden stat on children buffing every other friend stat "is alive"

then i make passive aura for mom buffing stats if "is alive" is 0

eventually i could add a bonus to some active skills like a bite or something

 

still its not enough, when everything is passive its less fun imo  

Reply #13 Top

last update seemed to make many more skills work

howl from wolves, some guy casting wellspring

maybe it was improved someway?

Reply #14 Top

Yes, Frogboy did mention in a thread that he had access to some new functions to determine spellcasting for monsters.

There's a quest with a missing dog where a big wolf boosts all the other wolves in battle for example

Reply #15 Top

yeah its cool ill try again to make some stuff and see if it works now