AI not obeying

SnowyRain

Veteran
Veteran
Joined
Oct 24, 2015
Messages
51
Reaction score
3
First Language
English
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
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,724
Reaction score
7,848
First Language
German
Primarily Uses
RMMV
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
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
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?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,724
Reaction score
7,848
First Language
German
Primarily Uses
RMMV
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.
 

SnowyRain

Veteran
Veteran
Joined
Oct 24, 2015
Messages
51
Reaction score
3
First Language
English
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>
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
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

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

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,724
Reaction score
7,848
First Language
German
Primarily Uses
RMMV
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.
 

SnowyRain

Veteran
Veteran
Joined
Oct 24, 2015
Messages
51
Reaction score
3
First Language
English
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 
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
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?
 

SnowyRain

Veteran
Veteran
Joined
Oct 24, 2015
Messages
51
Reaction score
3
First Language
English
Yes :) i changed names tried with names with Skill 6 etc, was just for testing purposes

Why is something wrong with it?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,724
Reaction score
7,848
First Language
German
Primarily Uses
RMMV
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)
 

SnowyRain

Veteran
Veteran
Joined
Oct 24, 2015
Messages
51
Reaction score
3
First Language
English
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 :( ?
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
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.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,724
Reaction score
7,848
First Language
German
Primarily Uses
RMMV
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.
 

SnowyRain

Veteran
Veteran
Joined
Oct 24, 2015
Messages
51
Reaction score
3
First Language
English
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.
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
I've testet the plugin this morning, and it works as it should.

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

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
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.
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Well that was three hours of work down the drain, because GIMP froze and I forgot to save anything.
for who interested in a example boilerplate pixijs with snowpack , i made a branch with pixijs .
Web and Desktop, nwjs is not required.
https://github.com/nwutils/SnowPack-nw/tree/PixiJs
I definitely give up Parcel bundler !
I wonder how many amazing games from the Completed Game/Games In Development forums that I just passed only because of an uninteresting title.


Doing more paralaxing. It isn't much, but it looks a lot less blocky now :)
aww these times when you feel alone, abandonned and lack the self awareness you don't even read anymore your favorite of all forum. Sorry all!

Forum statistics

Threads
107,383
Messages
1,029,260
Members
139,479
Latest member
SauloDaniel
Top