YEP Battle A.I. Core for Actors with Auto-Battle flag Extension

This an extension plugin for Yanfly's Battle A.I. Core script


This will give Actors with the Auto-Battle flag the same A.I. capabilities Yanfly's script gives to enemies.


Flag Actor requires:


9OlrXri.png



Bear in mind, the actor must have learned the skill specified on the AI Priority notes in order for it to be able to be used.


Script is plug and play. Place below YEP_BattleAICore.


Link to script.


Btw, if you want the AI Priority to be strictly followed, just comment out the following line:

Code:
if ((random > this.aiLevel()) && (i != this.actor().aiPattern.length - 1)) continue;
Thanks for posting this script. Did you write it? It works great but it seems to lock my game up for a few seconds whenever an actor with even just a couple of ai lines acts in battle.
Thanks for posting this script. Did you write it? It works great but it seems to lock my game up for a few seconds whenever an actor with even just a couple of ai lines acts in battle.



Yup, I wrote it.


Are you using v1.07 of Yanfly's Battle AI script? I believe 1.08 broke compatibility.
Yup, I wrote it.


Are you using v1.07 of Yanfly's Battle AI script? I believe 1.08 broke compatibility.

Thanks for responding. Yes, I'm using the new version, not v1.07. I'm looking for v1.07 to install now.
Are you planning to write a 1.08 compatable version?
Are you planning to write a 1.08 compatable version?



Unfortunately not soon.


Here's the link to v1.07 for now:


https://dl.dropboxusercontent.com/u/46654731/YEP_BattleAICore.js
Link is dead 😢
Link is dead 😢

Fixed. Sorry about that 🙂
Hi, im trying to use your plugin to control 2 Solders, but i cant get what code to use. What a need is them able to use a revive item (lets call it Item12). I think that the code as to be something like this, but i dont understand JS enough to complete. Any suggestion?

<AI Priority>
Party Dead Members > 1 +++ Item12 >1: Use item12
</AI Priority>
Link is broken again, I'd really like this!
Hi, im trying to use your plugin to control 2 Solders, but i cant get what code to use. What a need is them able to use a revive item (lets call it Item12). I think that the code as to be something like this, but i dont understand JS enough to complete. Any suggestion?

<AI Priority>
Party Dead Members > 1 +++ Item12 >1: Use item12
</AI Priority>

Hmmm, maybe try this?
<AI Priority>
Party Dead Members >= 1 +++ Eval $gameParty.numItems($dataItems[12]) >= 1: SKILL X
</AI Priority>

Link is broken again, I'd really like this!

Fixed on main post 🙂

Also, I believe the script should be compatible with newer versions of Yanfly's Battle AI Core script. If someone else could confirm that would be great!
Your main post redirects me to Yanfly's page with v 1.12. Also, the error that keeps popping up is "Cannot read property 'isPassive' of undefined".

Edit: Got it working, conflict with a passive skill script. Thanks!
I confirm that it's compatible and works again with the latest version.
This is a very useful script, thank you!
Question: is there any way to put the <AI Priority> tags on classes so different actors will do different things depending on their class?
I'm having an odd issue with this plugin where with it ON, the conditional branch checks to see if an actor knows a skill will ALWAYS return false regardless of them actually knowing that skill.

I've isolated the problem to be something to do with this script.

Does anyone have an explanation or a fix for this? I'd really like to use this, since it's giving me no problems in its intended use.

Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/yep-battle-a-i-core-for-actors-with-auto-battle-flag-extension.68148/