RMMV Issue with Action Speed using Yanfly AI Core

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
167
Reaction score
64
First Language
French
Primarily Uses
RMMV
Hello!

I'm stumped and out of ideas. Wondering if anyone encountered this behavior before...

I'm using Yanfly AI Core to control battlers.

I've set the action speed this way, so to simulate battle phases:
* Guarding (+2000)
* Healing Skills (+1500)
* Buff / Debuff (+1000)
* Attack skills (+500)
* Base Attack (0)

The actors seem to follow the invocation speed, but some of the enemies simply ignore the invocation speed and can start attacking right at the beginning of the turn, before anyone guarding or casting.

I thought that there was perhaps a bug with the game, so I've removed the action speed value and added the notetag <speed: +xx> for each skill. That didn't fix it.

So I thought maybe it because I've turned ON the Dynamic Action, but turning that to FALSE did not work either.

I have cleaned up pretty much all of the Enemy's notebox, and they can still attack before anyone else, so I do not think it's something to do with the coding of my AI. I'll provide it here below just in case.

Any help, ideas or pointers would be appreciated.

Code:
<Sideview Battler: mh_yyrsh_warrior>
<Weapon Image: Axe2>
<Weapon Motion: swing>
<AOE Hitbox Width: 1>
<AOE Hitbox Height: 1>
<Default Row: 1>

// DROPS
<Conditional Health Potion Drop>
    Variable 41 > 0: +20%
</Conditional Health Potion Drop>
<Conditional Energy Potion Drop>
    Variable 42 > 0: +10%
</Conditional Energy Potion Drop>
<Conditional Rejuvenation Potion Drop>
    Variable 43 > 0: +5%
</Conditional Rejuvenation Potion Drop>

<AI Consider Taunt>
<AI Priority>

    // Throw everything at target under Marked for Death
    State === Mark: Brutality, Highest MaxHP
    State === Mark: Rage, Highest MaxHP
    State === Mark: Attack, Highest MaxHP

    // Potions
    User HP% param <= 25%: Rejuvenation Potion, User
    User HP% param <= 50%: Health Potion, User
    User MP param < 5: Energy Potion, User

    // Rejuvenation
    User HP% param <= 40% +++ User MP param < 10: Rejuvenation Potion, User

    // No more potion, guard to regain MP
    User MP param < 5: Guard, User

    // Buff
    Random 40% +++ State !== Endure: Endure, User

    // Random Attack
    Random 50%: Brutality
    Always: Rage

    // Attack
    Always: Brutality
    Always: Rage
    Always: Attack

</AI Priority>
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
167
Reaction score
64
First Language
French
Primarily Uses
RMMV
I did some pretty extensive testing and, contrary to my initial belief, I found out that the two following lines in the enemy notebox are the ones causing the weird attack-before-anyone-else behavior:

// Buff
Random 40% +++ State !== Endure: Endure, User

// Random Attack
Random 50%: Brutality

The common denominator here seems to be the parameter "Random". If I was a betting man, I would say that this is probably the reason.

I will do more testing and report back.
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
167
Reaction score
64
First Language
French
Primarily Uses
RMMV
[EDIT] Seems the problem persists even though I thought I had found all the triggering causes. Will keep digging...
 
Last edited:

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
167
Reaction score
64
First Language
French
Primarily Uses
RMMV
Extensive testing shows that there's a lot of factors triggering this problematic behavior. That being said, switching Dynamic Action in Battle AI Core seems to be the proper solution.

This thread can be closed.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,088
Members
137,585
Latest member
Reversinator
Top