MV SOLVED Using State Counters in AI Priority List

Can state counters be used as part of a condition in Yanfly's Battle AI Core? I have a boss based around increasing stacks of a state to its max, and then using a powerful attack that deals more damage the more stacks that the target has. I want the boss to be able to know how many stacks a given target has so that it can know when its reached the max stacks on a given target.

I was using the following in the AI Priority list, but it gave me an error:
Code:
State === State 29 +++ Eval target.getStateCounter(29) < 3: Skill 23, Highest ATK

I assume it was my use of "target.getStateCounter(29)," but I'm not certain what I could use outside of some loop that checks each individual party member for the state. Any suggestions?
Can state counters be used as part of a condition in Yanfly's Battle AI Core?
Of course 🙂

I was using the following in the AI Priority list, but it gave me an error:
Any time you get an error, press F8, go to the Console tab, and provide a screenshot. Just saying you got an error tells us nothing.

Code:
State === State 29 +++ Eval target.getStateCounter(29) < 3: Skill 23, Highest ATK

I assume it was my use of "target.getStateCounter(29)," but I'm not certain what I could use outside of some loop that checks each individual party member for the state. Any suggestions?
That's correct. The snippets thread linked in my signature provides an alteration to Yanfly's plugin that allows you to use target in the eval condition.
It works now! Thank you!

Of course 🙂


Any time you get an error, press F8, go to the Console tab, and provide a screenshot. Just saying you got an error tells us nothing.


That's correct. The snippets thread linked in my signature provides an alteration to Yanfly's plugin that allows you to use target in the eval condition.
It works now! Thank you!
This thread is closed due to being marked as solved. If you need it reopened, report the thread to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/solved-using-state-counters-in-ai-priority-list.173501/