AI not obeying

Hello, i've created a skill that an enemy is using, but he ends up never using it.

I made so an tutorial battle he would use it to finish off the main character for example at 30%HP or below that.

He never uses it, The battle event where they talk at 30%HP or less happens, where he says for the player to guard, but he then uses attack instead of Skill 6...

https://i.gyazo.com/32c45732943f6554c8b39b863b340f23.png
I've moved this thread to Plugin support. Please be sure to post your threads in the correct forum next time. Thank you.


Please provide a link to the plugin you're using
Hello, i've created a skill that an enemy is using, but he ends up never using it.

I made so an tutorial battle he would use it to finish off the main character for example at 30%HP or below that.

He never uses it, The battle event where they talk at 30%HP or less happens, where he says for the player to guard, but he then uses attack instead of Skill 6...

https://i.gyazo.com/32c45732943f6554c8b39b863b340f23.png
Just to get it right.

Your enemy should use "Dagger's Light" when the main character's HP is 30% or lower?
Yes correctly, using when its 30 or lower, but it never happens anything he just keeps using attack :/

Its battle AI core, place here:

https://gyazo.com/63c97a8ce3a09565ad890513efbad08c
I didn't ask for a picture of your plugin manager - I asked you to provide a link to yanfly's website with the instruction for the plugin and it's latest updates - especially to check if that plugin had been updated since it was included in the launch package, and to check if you used the correct notetags and so on.
http://yanfly.moe/2015/10/19/yep-16-battle-a-i-core/

It hasn't been updated after launch

Notetags are correct, i have checked a billion times the notetags and changed around them a bit still ends up not working :S

https://gyazo.com/74724affa78b7880c0a735046e380938
I found it! But i still need help!

The HP% Param is checking for himself only!(The enemy that is, so this means only when the enemy is bellow 35% is when he will do the attack!)

How do i make him check the user for the hp!?
 

HP% param is for himself only :s

<AI Priority>

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

Always: Attack , Lowest HP%

</AI Priority>
I found it! But i still need help!

The HP% Param is checking for himself only!(The enemy that is, so this means only when the enemy is bellow 35% is when he will do the attack!)
If I read the conditions on Yanfly's site correctly, it checks the parameter from the scope of the skill.

If you're using an attack skill, it should use the parameters of the target (i.e. your party).

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

stat PARAM eval

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Replace ‘stat’ with either ‘atk’, ‘def’, ‘mat’, ‘mdf’, ‘agi’, ‘luk’, ‘maxhp’, ‘maxmp’, ‘hp’, ‘mp’, ‘hp%’, ‘mp%’, or ‘level’ to run it in a condition check again to see if the action gets passed.

The group that it checks will be based on the skill’s scope. If the skill targets foes, then all foes will take a check to see if they fulfill the conditions. Likewise for party members if the skill is for allies. The valid targets will be those who pass the condition check.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Example: HP% param <= 50%: Heal, Lowest HP%

MP param > 90: Mana Drain, Highest MP

ATK param > user.atk: Power Break, Highest ATK

LEVEL param > 10 && target.notState(5): Blind, Random

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
SnowyRain, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you want to add something and the last post is your own, simply edit it.

The HP% Param is checking for himself only!(The enemy that is, so this means only when the enemy is bellow 35% is when he will do the attack!)
That is what I imagined from the very beginning that it would happen.
However, if you read the description of the plugin, you'll see that it is NOT automatically the enemy that gets checked, it's the scope target that gets checked.


Which means we need a screenshot of your skill to continue searching for the solution.
Im sorry andar :s Didn't knew! Thanks 🙂

This is how one of the skills is set up, ignore the formula,as its just for testing purposes xD

https://gyazo.com/6621eff3ae15b9e304d0e420e12c729e

I tried playing with the scope already, ally , 1 enemy all enemies :s 

I saw that at yanfly's website but i ignored it since he scope was already set to enemies 
Im sorry andar :s Didn't knew! Thanks 🙂

This is how one of the skills is set up, ignore the formula,as its just for testing purposes xD

https://gyazo.com/6621eff3ae15b9e304d0e420e12c729e

I tried playing with the scope already, ally , 1 enemy all enemies :s 

I saw that at yanfly's website but i ignored it since he scope was already set to enemies 
Is this the skill with the id 6 that you used in your first screenshot?
Yes 🙂 i changed names tried with names with Skill 6 etc, was just for testing purposes

Why is something wrong with it?
What is your default AI level in the plugin?


And please, do not cut off parts of the window when making screenshots - that only causes us to ask additional questions (like if that is skill 6 or not)
Im so sorry ;_;

It is the default i never changed it, in this case 80.

PS: Changed it too 100 and it didnt work either.

Is it impossible to make 🙁 ?
I may know what's wrong.

Does your enemy have enough resources ( TP in this case ) for the skill?

Because skill costs apply to enemies as well.
That's most probably it - maxTP is 100 and usually TP starts with a random number between 1-25 at the beginning.


And your skill requires the enemy to pay 45TP, so it can only be used after several turns of gaining TP unless you're using a TP-Plugin to change the values.
Well, it now works but he just uses it when he wants, he's not following any notetag :S

Most of the times right away :/

He just doesn't follow any of the notetags he just does what he wants.... Starting to annoy me been hours around this problem....

A battle event, where he teaches the player where is attack, then those fill up TP, so he can use more powerfull skills. [Teacher is unbeatable btw], Teacher will only use attacks, when the player goes bellow 100HP(35% out of 285HP) he tells player about guard, then he uses that attack TEST. Either guarding or not it will defeat the player. That's all i want. This isn't really hard on paper so its kind of pissing me off.
I've testet the plugin this morning, and it works as it should.

Post a complete screenshot of the enemy page and your event.
Here,

Skill:

https://gyazo.com/edf4a94828c51cace4e9017e9378315e

Enemy:

https://gyazo.com/cb901a980aa942b32fb417911c5c9f55

Battle Event🙁Only 2 of those 4 tabs are active 2 are Dont Run. So its the beginning of the battle he gives a tiny speech then when he is below 35% he should use TEST. )
https://gyazo.com/8e549d4f0c14790fb574abcb2f69d455
I know what the problem is.

It lies within the order of the commands in the AI Property tag

The plugin starts from top and only if that condition is not met it will check the next.

The first one is "Always" so he does that one everytime and the second will never be used.

Switch those two and he should use the skill.

Original thread: https://forums.rpgmakerweb.com/threads/ai-not-obeying.49647/