MV How to get Yanfly AI Core to check target's actor ID?

Hey all,

This one seems like it would be easy, but I can't seem to call the right thing. I have a skill that I want the AI to target everyone BUT the main character. Since the main character's name can be changed, I figured I would target via the actor ID.

I've tried a few things I thought would work, but no luck so far. Here's the last thing I tried as an example:

<AI Priority> Eval target.actorId() != 1: Skill 114, Random </AI Priority>
As far as I know, the eval condition in AI_Core does not allow for referencing the target.
Don't ask me why though.

I have two possible solutions:



#1 Instead of the eval condition, use a state condition like this:

<AI Priority>
State !== State X: Skill 114, Random
</AI Priority>

Just create an invisible state and give it to the main character at the start of battle or have it persist between battles.
Then replace the X in the command above with the state ID



#2 There is a plugin extension written by DreamX, which allows you to use eval conditions with targets.

If you install the plugin, put it directly below AI_Core.
Then you can use this command:

<AI Priority>
AIManager.targetCondition("target.actorId() != 1"): Skill 114, Random
</AI Priority>



Hope this helps!
As far as I know, the eval condition in AI_Core does not allow for referencing the target.
Don't ask me why though.
How strange! Well, at least it's not my fault for once, heh. Glad I asked! I tried out the plugin, and that seems to work (had to move it to just underneath AI core). Wasn't sure about states since I use a lot of those for various systems, and I'm not sure if there's a limit. But I've done a similar idea like that a few times with other systems, so I can go to that if I have issues with this plugin.

Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-yanfly-ai-core-to-check-targets-actor-id.147179/