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

masterlobo

Veteran
Veteran
Joined
Mar 14, 2012
Messages
147
Reaction score
77
Primarily Uses
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:





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;
 

Attachments

Last edited:

alcreator440

Veteran
Veteran
Joined
Mar 26, 2014
Messages
256
Reaction score
141
First Language
English
Primarily Uses
RMMV
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.
 

masterlobo

Veteran
Veteran
Joined
Mar 14, 2012
Messages
147
Reaction score
77
Primarily Uses
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.
 

alcreator440

Veteran
Veteran
Joined
Mar 26, 2014
Messages
256
Reaction score
141
First Language
English
Primarily Uses
RMMV
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.
 

wrigty12

Veteran
Veteran
Joined
Jan 11, 2014
Messages
533
Reaction score
77
First Language
English
Primarily Uses
Are you planning to write a 1.08 compatable version?
 

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
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>
 

masterlobo

Veteran
Veteran
Joined
Mar 14, 2012
Messages
147
Reaction score
77
Primarily Uses
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!
 

kerykeion

Villager
Member
Joined
Sep 26, 2013
Messages
11
Reaction score
2
First Language
English
Primarily Uses
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!
 
Last edited:

SarahYagami

Warper
Member
Joined
May 2, 2018
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMMV
I confirm that it's compatible and works again with the latest version.
This is a very useful script, thank you!
 
Last edited:

oToToToToTo

Veteran
Veteran
Joined
Jul 13, 2015
Messages
46
Reaction score
9
First Language
English
Primarily Uses
Question: is there any way to put the <AI Priority> tags on classes so different actors will do different things depending on their class?
 

SunAero

Warper
Member
Joined
Feb 3, 2018
Messages
2
Reaction score
2
First Language
English
Primarily Uses
RMMV
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Hi, there.
I'm Creta Park, as Software engineer and Indie game developer.

Profile : creft.me/cretapark
GitHub : github.com/creta5164
Blog : creta5164.tumblr.com


My stuff

Who shares/sells their scripts/plugins on itch.io? Can I pick your brain?
If you ever need fantasy names and you're bored, make a fictional alphabet. Switch around the letters and see what you get :p
I JUST GOT PROMOTED TO 9TH GRADE BOIS!

Forum statistics

Threads
98,168
Messages
949,923
Members
129,455
Latest member
DeathByPiercing
Top