MV Specific Battle Patterns

I've been losing my remaining hair over this.

I wanted to script an enemy so that it would follow a specific action pattern and repeat it, but I don't know anymore. Here's my Battle Event:

Code:
Control Variables: EnemyTurnTracker = 1
If : EnemyTurnTracker = 1
    Change Enemy State: Entire Troop, + Nothing
    Control Variables: EnemyTurnTracker += 1
    Change Enemy State: Entire Troop, - Nothing
: End
If : EnemyTurnTracker = 2
Change Enemy State: Entire Troop, + Prepare (1st)
Control Variables: EnemyTurnTracker += 1
Change Enemy State: Entire Troop, - Prepare (1st)
: End
If : EnemyTurnTracker = 3
Change Enemy State: Entire Troop, + Prepare (2nd)
Control Variables: EnemyTurnTracker += 1
Change Enemy State: Entire Troop, - Prepare (2nd)
: End
If : EnemyTurnTracker = 4
Change Enemy State: Entire Troop, + Sword Hit
Control Variables: EnemyTurnTracker += 1
Change Enemy State: Entire Troop, - Sword Hit
: End
If : EnemyTurnTracker = 5
Control Variables: EnemyTurnTracker = 1
: End


And the Action Patterns of the enemy:

Code:
Skill: Nothing | Condition: State Nothing | R: 9
Skill: Prepare | Condition: State Prepare (1st) | R: 9
Skill: Prepare | Condition: State Prepare (2nd) | R: 9
Skill: Sword Hit | Condition: State Sword Hit | R: 9

I tried it with states on conditions as you can see above, but that didn't work. The previous attempt I tried using Force Action... in each of the conditional branches instead of changing the enemy state, but that didn't entirely work either, so I'm kind of puzzled as to how to pull this off. There's probably a very easy way and I'm just overthinking it.
I might have a brain fart, but wouldn't you just use the turn option when adding a skill to an enemy?
1780759029001.png
And even if you want a dynamic sequence instead of a fixed sequence, this should never be done by troop event at all - you can simply have the skills cause one state after another, which each skill in the sequence in the action pattern conditioned on the previous skill's state, without anything in the troop events.

and by the way, it would be much better to use screenshots for the troop events as well - for all we could tell you simply made the mistake of letting the condition stay at "don't run" (which means "never bother with this event, it's dead ballast only")
Right, yes, sorry for that Andar.

On a semi-related note, now that I did set up the skills for the enemy:
1780768597609.png

(to which I hope Nothing & Rock Throw now has a 50/50 chance of happening when set up like this.)

And even, maybe slightly excessively, having set up states for the enemy:

1780768637143.png


How can I achieve this?
1780768654711.png


That is part of the initial issue that I had and what I tried sorting out with all the states and whatnot in my original post (specifically for the EnemyTurnTracker = 2 and EnemyTurnTracker = 3 branches).

This approach does not work, I've tried reimplementing the TurnTracker logic again but to no avail. Sorry if this is super beginner level stuff, maybe I'm not cut out for this haha. The conditions for this event page attempt are likely not right, because I was getting desperate and seeing all possible options. So my fundamental approach must've been wrong as well.
Your action patterns alone should work, with like you said a 50/50 chance of the first two skills on the first turn, then the sequence of skills and basically no skill on turn 5 (because you have no skill set to 0+5*x)

However that requires that all those skills are valid on their own. If a skill for example requires MP and the enemy does not have enough, then the sequence will fail.

So what exactly happens if you have the enemy with that sequence?
and please give screenshots of all skills and what they do to check for that.
Ah. Nothing on 0+5*x solves another issue I had, right. I'll move them all one skill down, that being a + 4 * x to make the first turn work.

The enemy with that sequence does not play out any of the dialogue options, it just goes through the attack pattern and loops.

The skills are all set to cost 0MP already, as to make them play out every single time:
1780770571709.png

1780770591826.png

1780770603346.png

1780770623363.png

1780770633088.png


The Prepare 1st state does Defense * 20% for the user (in this case, the enemy) and all other states do nothing, everything is default for them, no set removal conditions or traits.

Discovery: I just copied this to a entirely new project, and apart from a minor issue involving a conditional branch, everything worked the way it was supposed to. Eugh, headache. I'll move all skills and states a few numbers up and redo the whole enemy, maybe that's the way. What I'm confused about is that no switches or variables are affecting this, but it just simply refuses to work in this set up in the original project.
That points to a problem with the system itself, perhaps a plugin affecting this?
Can you post screenshots of your plugin manager with the entire list?
That points to a problem with the system itself, perhaps a plugin affecting this?
Can you post screenshots of your plugin manager with the entire list?
1780772492741.png

1780772511002.png


Nonetheless, moving them to different slots solved everything.
your YEP plugin are in the incorrect order, you can use the
plugin in my spoiler ALOE_YEP_PluginOrderChecker to fix this.

the new plugin also automatically reorder it automatically for you
so you don't have to do it manually.

any patches on the otherhand should (but none that I could see).

instead on number 1,2,3,4,5, you should reverse it to 5,4,3,2,1 or it could
play all in 1 swoop.
keep in mind that changing the order of plugins is enough to make older savefiles incompatible, so you need to start new playtests.

and next time, please do not crop your images - if it weren't the plugin order, info like the plugin version numbers would be helpful as well....

Original thread: https://forums.rpgmakerweb.com/threads/specific-battle-patterns.183930/