Yep Battle AI target highest TP

Hello all. I'm working on converting my Ace game to MV and require a plugin to make enemies target the actor with the highest TP.

Yanfly has an amazing AI plugin that does 99% of the work for it will target actors for pretty much any parameter except TP.

I'm no scripter, but perhaps the community could figure out how to add TP to the script. I would appreciate it very much.

Link to yanfly's battle AI

thanks in advanced!
Bump
I'd have to look at the tutorial again, but doesn't the AI plugin have a Lunatic Mode function where you can basically make an enemy target somebody based on...well...anything? I'll take a look when I have some time.

EDIT: I see what you mean now. Surprised Yanfly didn't include that. I'd say it'll be included in an update. As of right now I can't figure out a way to do this.
Thanks for taking the time to look thechancellor.
3 days
https://bitbucket.org/liquidize/anima-framework/raw/db2d7333e4885181fb003f0b79c1c5e27a65f19f/Misc/Anima_AITargetTP.js

Here you go, save it as Anima_AITargetTP.js in your plugins folder, you use it the same way you use other stats like "HIGHEST HP" except "HIGHEST TP". Make sure you place it below Battle AI Core in the plugin manager. I've also included LOWEST TP as an option.

Let me know if its not working right.
https://bitbucket.org/liquidize/anima-framework/raw/db2d7333e4885181fb003f0b79c1c5e27a65f19f/Misc/Anima_AITargetTP.js

Here you go, save it as Anima_AITargetTP.js in your plugins folder, you use it the same way you use other stats like "HIGHEST HP" except "HIGHEST TP". Make sure you place it below Battle AI Core in the plugin manager. I've also included LOWEST TP as an option.

Let me know if its not working right.

Thank you Liquidize!!

It works like a charm!!

Original thread: https://forums.rpgmakerweb.com/threads/yep-battle-ai-target-highest-tp.49987/