Astfgl66

Regular
Regular
Joined
Jan 5, 2016
Messages
764
Reaction score
637
First Language
French
Primarily Uses
Astfgl's YBAICExtension: Buffs

Hi everyone!
This small plugin is an addon for Yanfly's battle AI core.

I make pretty extensive use of it for my current project, and noticed the ability to check the target for buffs or debuffs was missing, thus this plugin was born.

Features:
  • Allows buffs/debuffs/neutral condition checks for enemy AI.
  • Allow prioritizing Highest buffed target or Lowest debuffed Target
Requirements:
  • Yanfly's Battle AI Core.
Download on pastebin: here

Instructions:
Plug and play, name doesn't matter. Just place it below battle AI core.

Code:
Allows to check the target for buffs
use: Buff >=0 Buff [paramId] to check if target has a buff or neutral
use: Buff <=0 Buff [paramId] to check it target has a debuff or neutral
use: Buff <0 Buff [paramId] to check if target strictly has debuff
use: Buff >0 Buff [paramId] to check if target strictly has buff
use: Buff ===0 Buff [paramId] to check if target is strictly neutral
to check for buffs on the user use Eval (user._buffs[paramId] [condition])
Replace paramId with 0 -> MHP, 1 -> MMP, 2 -> ATK, 3 -> DEF, 4 -> MATK
5 -> MDF, 6 -> AGI, 7 -> LUK.


Ex: Buff >0 Buff 0: Skill 1
Will make the enemy target only actors that are max hp buffed.

IMPORTANT: there is a space between Buff and the parameter id here.

Also allows to use Buff condition for targeting:
Lowest Buff[parameterId]
Highest Buff[parameterId]

Replace [parameterId] with the parameter id as described above.
Ex: Buff0 : check for MHP, Buff1: check for MMP, Buff2: check for ATK

IMPORTANT: There is no space here between buff and the parameter id here.

Examples:
Code:
Ex: Buff <0 Buff 0: Skill 1, Lowest Buff0
Enemy will use skill 1 only on mhp debuffed actors, targeting the most
debuffed actor first.

Ex: Buff >0 Buff 2: Skill 1, Highest Buff2
Enemy will use skill 1 only on atk buffed actors, targeting the most buffed
actor first.

Ex: Buff ===0 Buff 3: Skill 1, Highest Def
Enemy will use skill 1 only on actors that aren't defense buffed or debuffed
targeting the highest defense actor first.

Terms of use:
They are inclulded in the script file for reference; pasted here:
Code:
Yanfly's terms of use apply, please credit me with any of the following
Astfgl66/Pierre MATEO/Pierre MATEO (Astfgl66).

Have a nice day, and happy making!
 
Last edited:

Roult

Regular
Regular
Joined
Oct 25, 2015
Messages
46
Reaction score
5
Hi, thanks for this plugin, its great.
I have a question, its possible to add a update for use:

use: Buff >=1 Buff [paramId]
use: Buff <=1 Buff [paramId]
...

For example: I have a monster who add a buff of ATK
"Buff <=0 Buff 2 +++ Random 55%: Skill 134"

I want to he use a skill buff when he has one buff on atk or less (not neutral or less).

so "Buff <=1 Buff 2 +++ Random 55%: Skill 134"

Thanks.
 

Moon_Haven

Regular
Regular
Joined
May 5, 2020
Messages
191
Reaction score
93
First Language
French
Primarily Uses
RMMV
Bonjour! :)

I know it's been a while, but is this plugin still working with latest MV version? Trying all kind of variations and the skills are just not triggering. Is it perhaps because I'm working on the autobattle for Actors and not the monsters?
 

DRG

Orange juice lover, Sunny D Hater.
Regular
Joined
Apr 23, 2018
Messages
143
Reaction score
56
First Language
english
Primarily Uses
RMMV
When I enter a battle I get this error:
Capture.PNG

Yes the plugin was below battle ai, despite that I put it at the bottom of the list anyways just to see if that would fix it and it didn't, I disabled the only plugin I could think of that could possibly cause a compatibility issue ( that being DreamX_ITB ) and that changed nothing.

I don't think there's been an MV update since July so I don't see what could cause this.
 
Last edited:

hoboayoyo

Regular
Regular
Joined
Oct 29, 2016
Messages
106
Reaction score
23
Primarily Uses
Incase anybody runs into the same issue I had.
It seems that targeting (highest hp, lowest atk ect.) does not work with the plugin and in fact makes targeting with the standard enemy ai not work at all.
A solution to this is to not use the add on plugin and instead use eval for having the AI select targets.
In the example below I'm checking If any targets have a def buff of 0 or above and targeting the highest hp target.

<AI Priority>
Eval user._buffs[3] >= 0: Skill 21, Highest HP
</AI Priority>
 

Latest Threads

Latest Posts

Latest Profile Posts

My next update is going to amazing! There's been major additions and things I've wanted to do in previous versions that weren't possible until now. It's not ready yet, but will be soon!
made an RTP edit to try to save on work, found out I was editing the wrong tilesheet of cliffs.
It's fine... I'm fine... I'm sure fixing this won't take too long
Proud of the work done.
Probably gonna toss out some cameos.
-Message sponsored by the β Gang.
"I WAN BOOZY EGGY-NOG!"
"I WAN BOOZY EGGY-NOG!"
"For the love of the cosmos TarTar, you shouldn't drink spiked eggnog."
"I WAN BOOZY EGGY-NOG"
Boozy-Eggy-Nog.png

Forum statistics

Threads
136,904
Messages
1,271,300
Members
180,691
Latest member
Xhavyedge
Top