Computer AI and Autocasting

I have a ship with a long cooldown charge-up AoE attack. The ability itself works fine. I can use it. However, I've been making an effort to make the AI use it only when the ship is presumably in a significant engagement (it's wasted on small targets). It's based on cleansing radiance or something like that, I think. It's a beam with AoE.

 

aiUseTime "OnlyInCombat"
aiUseTargetCondition "Any"
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.500000
useCostType "AntiMatter"

 

With these settings, presumably the ship will only autocast when the unit is below 50% health. Except the ship can be wittled down by enemy battlecruisers and completely killed or dragged into massive battles, and I've never once seen the AI use the ability despite full anti-matter availability.

Can anyone offer any insight to getting the AI to use this ability properly?

9,676 views 10 replies
Reply #1 Top

While I thought this would be tough or impossible to do in a good way it seems I was wrong. Using ZombiesRus5's entity wiki I found an ability aiUseTime named "OnlyWhenEnemyFleetWillPrevail" which might be what you need.

There also is an aiTargetCondition named "IsDifferentRoleType" where, if I remember right, you can specify which roleTypes to Target. I can't look it up right now due to a certain "accident" with my utility resoulting in my modding reference files beeing deleted (no further public information is avaible ;)).

Also it is good to see you back here again :)

Reply #2 Top

I'll give that a try and see how it goes. Getting the AI to work as best as it can is paramount.

 

An accident, eh? I had an accident this morning that almost resulted in 4 cups of ice cold water spilling directly into my open case while it was running. Ho ho! I dance on a fine line.

Reply #3 Top

Hmm. With more testing, I've still yet to see the AI cast the ability a single time. It has a strange level requirement of 3 (I think that's 4 ingame), but the majority of Zeral`Motakks were levels 6+ seeing as they're tier2 and the Anahn equivalents are only Tier1 (and they're not dedicated battlecruisers). In most instances the Undead won all major fights, but in several instances they lost some capital ships up to level 9 along with entire fleets, and they always died with max anti-matter.

I wish the AI in this game wasn't so hardcoded. That is by far Sins' weakest link.

A year past and I still can't get the AI to stop trying to move its units inside each other to "reform fleet". Argh. I wish I could disable fleets entirely for the AI, or at least get them to stop trying to hug each other.

Reply #4 Top

So, no further ideas?

 

I have an inkling suspicioun that it's because the ability is level 4 requirement that the AI is somehow breaking because of this. I don't want to make it level 6, though, since level 6 is going to be exceptionally hard to reach... blargh, decisions.

Reply #5 Top

Quoting IskatuMesk, reply 4
So, no further ideas?

 

I have an inkling suspicioun that it's because the ability is level 4 requirement that the AI is somehow breaking because of this. I don't want to make it level 6, though, since level 6 is going to be exceptionally hard to reach... blargh, decisions.
End of IskatuMesk's quote

The AI should research abilities just find. Try them on Vicious if you have diplomacy because the AI gets a research bonus. Also maybe try reducing the damage requirement to zero to give it more of a chance to use it?

Reply #6 Top

Quoting GoaFan77, reply 5



Quoting IskatuMesk,
reply 4
So, no further ideas?

 

I have an inkling suspicioun that it's because the ability is level 4 requirement that the AI is somehow breaking because of this. I don't want to make it level 6, though, since level 6 is going to be exceptionally hard to reach... blargh, decisions.


The AI should research abilities just find. Try them on Vicious if you have diplomacy because the AI gets a research bonus. Also maybe try reducing the damage requirement to zero to give it more of a chance to use it?
End of GoaFan77's quote

What does research have to do with capital ships? Unless I am the one who misunderstood it >_<. The big question is probably whether or not the AI even invest points in the ability. Maybe try to give the ability the normal level 0 requirement and see if the AI still don't use it.

Sadly if they suddenly do use it, then there most likely isn't a fix :/.

Reply #7 Top

By level 4 I mean the capital requires level 4 to have the ability.

 

I'll have to make it level 0 and see if that fixes it. If it does... I have a bit of a balancing nightmare to be had.

 

/edit

 

Yes, they use it fine with level 0 as a base requirement.

This is extremely disappointing.

Reply #8 Top

My bad, I guess it was me who got it wrong. :P

Quoting IskatuMesk, reply 7
By level 4 I mean the capital requires level 4 to have the ability.

 

I'll have to make it level 0 and see if that fixes it. If it does... I have a bit of a balancing nightmare to be had.

 

/edit

 

Yes, they use it fine with level 0 as a base requirement.

This is extremely disappointing.
End of IskatuMesk's quote

While the AI is supposed to use ultimate abilities now, I haven't seen it very often even if its well above level 6. But otherwise you might want to turn it down or tie it in to research. Or even make it cost resources if you wanted something more interesting.

Reply #9 Top

I haven't checked ultimates yet, but I was going to be redesigning the abilities. The ability is powerful enough that I didn't want it at entry-level (even though the Zeral`Motakk is tier 2 and costs 8000/2000/1000, this will be chump change in late game), but I didn't want it to be level 6, which in this mod would take a considerable amount of effort to hit...

Can I make an ability cost HP to use? That was the original intent but I haven't tried it yet. Giving it an HP cost would justify it being immediately available I suppose, since only later on would it have enough HP to use the ability at a whim. The AI will never use the abilities intelligently, but I want to prevent easily abusing stuff like this anyways.

I guess I could either do that or force it to be the ultimate and change my concept for the other abilities.

Would tying it into a research cause issues for AI ships already levelled? Would they learn the ability and just be unable to use it until researched?

Reply #10 Top

Yes it is possible by making it damage itself. Since you are most likely using ApplyTargetedBuffToSelf in the ability you can add a DoDamage instant action to the following buff.