Yanfly's Battle AI Core is all messed up for me. ALL OF IT.

FIRST. Why does it not do anything for some reason?

For example what happens most with the KINDA WORKING one is, it goes below 50%, it DOES NOTHING. TWICE. Then uses double attack WHY!? WTF WHY!? 24 Hours trying to play around with this. Its cringe worthy now.

I can even say 1+1 is 2 and it will say its 4.

HP% Param < 50% "&& HP% Param >=25%" Having two && params never work.

Original:

<AI Level :100>

<AI Priority>

HP% Param >= 50% : Attack

HP% Param < 50% && HP% Param >=25% : Dual Attack

HP% Param < 25% : Triple Attack

</AI Priority>

Kinda Working🙁Works 60% of the times)[EDIT:50% NEVER ATTACKS AT THE FIRST GO(DEACTIVATED ALL SCRIPTS EXCEPT USED ONES STILL DOENST WORK)]

<AI Level :100>

<AI Priority>

HP% Param >= 50% : Attack

HP% Param <= 25% : Triple Attack

HP% Param < 50% : Double Attack

</AI Priority>

Another example🙁Works again 60% of the times like it should. BUT sometimes it doesn't attack on the start sometimes when he should do the skill 6 he doesnt do anything, and does on the next turn for some reason whatsoever. )

<AI Level :100>

<AI Priority>

HP% Param <= 35%: Skill 6, First

Always: Attack, First

</AI Priority>
I think I know where the problem is.

Just to clarify:

You have a monster with three attacks:

Attack, Double Attack, and Triple Attack.

The monster should use one of those attacks based on the monsters HP, right?

That's not how the HP% Parameter works.

When you write

HP% Param >= 50% : Attack

the plugin is checking all valid targets of your attack skill's target scope.

Attack's target scope are foes, so the foes of the enemy [your party] is the targeted scope.

If one of the targets has more than 50% HP, the monster uses Attack.

You have to use the Battle Event section of that Troop for the desired effect like this:

5d8c8f8260.jpg


f524165aa7.jpg
I don't have it in front of me, but you could also run an eval for the monster's hp instead of doing a silly force action. I'll try to help you when I get home from work; I've used AI Core a lot with no issues.


Your big issue, as kiriseo said, was that the front part of the AI Core lines are based on the skill's potential targets -- so it's checking the enemy party's HP%.
I don't have it in front of me, but you could also run an eval for the monster's hp instead of doing a silly force action. I'll try to help you when I get home from work; I've used AI Core a lot with no issues.

Your big issue, as kiriseo said, was that the front part of the AI Core lines are based on the skill's potential targets -- so it's checking the enemy party's HP%.
Right, I forgot about eval.

You can try something like this:

<AI Priority>

Eval user.hp() >= user.hp() * 0.5 : Attack

Eval user.hp() <= user.hp() * 0.25 : Triple Attack

Eval user.hp() < user.hp() * 0.5 : Double Attack

</AI Priority>
I wanted it to get stronger the weaker the user(player) gets, thanks for giving me tips onto getting it if it was the monsters hp(will use it later on) but its the players hp that is going down, and its with all commands with more than one that causes a huge problem(first attack not actually performing) sorry for the amount of rage on the first post but im around the AI for hours and hours....
So the monster gets stronger the weaker the player gets?

Ok, I'm playing around in MV for a bit and edit this post later.

/EDIT:

Okay, I've tested it.

If you use the tags below, the enemy uses Attack until one of the party members hp is 50% or lower.

Then he starts using Double Attack on any player until again one of the party members hp are 25% or lower.

ef65b16f5e.png


That worked five out of five times I've testet it.

Note that I only used YEP_CoreEngine, YEP_BattleEngineCore, and YEP_BattleAICore as plugins
I did exactly like that, the first time i tested, i guarded with the player, and the monster did nothing XDD

(The first round that is, on the second he attacked as usual)

Resuming.

A plugin is making the Frick up on the first attack.

Yet for me, battle core AI is pure unresponsive for me.

It literally doesnt work half of the time. RIP 2 Months of work ayyyyy, i had to leave the battles to the end didnt i jesus christ.

Tell me what the Frick is wrong here:
 

<AI Priority>

HP% Param <= 35%: Skill 6, First

Always: Attack, First

</AI Priority>

For me to go to 85 HP, out of 285(35% IS 99 HP.)

And he uses ATTACK then he uses SKILL 6.

Here after 2 tries got it again

https://gyazo.com/5a5d6ecc091bb812e05258f4e9552b36

inb4 i give up (I'd like to use the battle AI since its a SCRIPT FOR EXACTLY THIS. And not battle events. Don't want to be doing battle events for every single mob i have i just want a working mob.)
Do you have the plugin updated?

http://yanfly.moe/yep/changelog/

There was an issue before (don't remember when) that I resolved with singular parameter checks not being met properly. If it's updated and your skills aren't being used, there's a number of things that can be happening:

1. the AI level didn't get passed (ala the the enemy's AI level is too low and didn't meet the RNG to attempt the line).

2. the enemy doesn't fulfill the conditions to perform the skill (ie not enough MP, skill is on cooldown, warmup, etc.).

3. there's no valid targets for the enemy to consider using the skill against.

If the problem still persists, I'd like for you to recreate the problem in an empty project, upload it online (don't deploy it) and send me a private message with the link and I'll check it out.
I didn't expect yanfly himself/herself to come here! ._.

I just had some rough things going on on my life and i honestly apologize to be bursting out everything here, but you know girl problems ;-;

Im updating every single one, will test on my project and then on an empty one!
After Yanfly mentioned to update the plugins I looked up the version I've used.

I used YEP_BattleAICore V1.00 on my first test.

I updated it to V1.02 and it still works. Maybe you have a version in between the two.

765cb55282.jpg


2a08d34f58.jpg
Okay i know what the problem is. But i have no idea what it is. You read that well.

First it skips one move. wether double triple quadra etc. why? I dont know.

I have a empty project that does EXACTLY that. Play the fight all you want. Pay attention on how sometimes after you attack him HE DOESNT ATTACK BACK. He in fact isn't skipping any of the codes(because he does the right attack afterwards) BUT he just does nothing for 1 round.

You'll have to go the database(F9) Troops and FIGHT the MINOTAUR

Editing soon for empty demo with battle for you guys 2 see

Just spam attack it will have a time where it will bug out and he wont attack(minotaur)

Be sure to go to troops and select the MINOTAUR

https://www.dropbox.com/sh/zfd0pkb79awwu38/AABnOhwOSz2Q3nVbu3YxJNbVa?dl=0
Okay, first things first.

Your battle event displays the message when actor.hp <= 35% where your Double Attack gets executed at 25% or below 😎

Next is:

I did five fights and almost all had bugs.

So I looked at the tags. Your note box looks like this:

<AI Level :100>

<AI Priority>

HP% Param <= 25% : Triple Attack

HP% Param <= 50% : Dual Attack

Always: Attack

</AI Priority>

After I changed it to this

<AI Level: 100>

<AI Priority>

HP% Param <= 25%: Triple Attack

HP% Param <= 50%: Dual Attack

Always: Attack

</AI Priority>

I did another ten fights without a single bug.

You have to look out for the white spaces.

For example your <AI Level> tag. There needs to be a white space after ":".

Without it, the plugin uses the default AI level of 80.

That's why your Minotaurus sometimes did nothing
Oh really!?!?!?!? ;_; i feel so bad now ;-;

I've been a real jerk then :/

Will try and check everything!

Thanks again kiriseo for using your time to help solve this :s!!

Tested 25 times both of them... The bottom of this was that i had never seen coding in my life... i didnt knew there couldn't be any spaces etc...

And again im sorry for being rude! 🙁 (

Thanks Yanfly and Kiriseo! :* Owe you a ton :x!
Right, I forgot about eval.

You can try something like this:

<AI Priority>

Eval user.hp() >= user.hp() * 0.5 : Attack

Eval user.hp() <= user.hp() * 0.25 : Triple Attack

Eval user.hp() < user.hp() * 0.5 : Double Attack

</AI Priority>
Hey, I am tryin to make my monster use stronger attacks as it gets weaker, but I have trouble using these commands. I always get this error:
Can you help pls.
Necro-post notice: Phoenixx98

@Phoenix, please make your own topic instead of hijacking a topic from someone else. In that topic, include not only the console screenshot but also a screenshot of the notetag you're using and a link to the plugin page.
Moderator note: closing this

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-battle-ai-core-is-all-messed-up-for-me-all-of-it.51983/