MV Plugin To Allow Enemy To Start Battle With A Random State From A Specified Array

As the title says: I need to be able to run into an enemy and as the battle starts it immediately has a random state.
Ideally, I can specify the array in the enemy note tags E.G: <Random State: 4, 5, 6, 7, 8, 9> or <Random State: 5 - 15>.
Then, the enemy will have a random state picked from those numbers.

EDIT: I'll pay, by the way.
this is usually done without plugins by troop event - just make a troop event conditioned to run on turn 0 (which is before battle) with control variable to get a random number followed by a sequence of conditional branch and add state.

EDIT: I'll pay, by the way.
you're not allowed to - this is for free requests, and the paid requests (classified forum) will only be available to you after gaining veteran status at 30 posts.
this is usually done without plugins by troop event - just make a troop event conditioned to run on turn 0 (which is before battle) with control variable to get a random number followed by a sequence of conditional branch and add state.


you're not allowed to - this is for free requests, and the paid requests (classified forum) will only be available to you after gaining veteran status at 30 posts.
Ah, I see - I'll try that.
And, my bad.
this is usually done without plugins by troop event - just make a troop event conditioned to run on turn 0 (which is before battle) with control variable to get a random number followed by a sequence of conditional branch and add state.


you're not allowed to - this is for free requests, and the paid requests (classified forum) will only be available to you after gaining veteran status at 30 posts.
So it'd be something like:
Control variables: #0100 = (set) Random 5 - 10
Conditional:
If (#100 = 6) {
Set State X
}

EDIT: Would the span be turn, battle, or moment?
you can run that on turn 0 or use run the common event where you
set it up.

if this counts for EACH enemy, it can be a bit more complex, depending
on the amount of enemies, states and what they exactly does.

a plugin with a notetag on the enemy can makes things easier,
specially if each enemy has a different pool, the above condition can
work, but you need to set it in a way for EACH enemy that doesn't have
1 or 2 stats, so it can be complicated.
Would the span be turn, battle, or moment?
the span determines how often the troop event can run:
once per battle, once per turn, once per moment/action

so once per battle is best for this type of events

Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-allow-enemy-to-start-battle-with-a-random-state-from-a-specified-array.143564/