how to stop auto victory if all enemies "appear mid battle"

the direct problem: all enemies in a troop are set to "appear mid battle" which is causing the battle to be auto-victorious before it runs the conditions on the troop event page, which are randomizing what enemies will appear. Is it possible to get the battle to run the conditions to spawn the enemies?

more detail: through conditions i'd like to randomize where enemies are in a troop so that they appear to be somewhat unique encounters, and so that i dont have to make as many troops to generate the "randomness". i have all of the visustella cores enabled.

right now i have every enemy set to appear mid battle, then a condition else/branch will roll a variable and dependent on the outcome of the roll either enemy A or B will appear. i have it roll more times afterwards to spawn more enemies.

i have already tried setting all enemies to immortal at the top of the page, the battle will still be auto-victorious.
Invisible enemies aren't considered alive by the base code, which is why the battle ends.

That being said, why are you so against multiple troops?

I haven't messed with troop/encounter design too much myself—but it seems to me that it would be a lot easier to set up and troubleshoot the randomization of 3 separate troops versus a single troop with a dozen enemies stacked on top of each other, most of which are configured to be invisible.

Even from the perspective of doing a custom plugin to address this, it's probably easier (and would make more sense) to randomize between X specific troops than it is to code around the engine's default enemy visibility handling to try and do it via some sort of ad hoc method as you are describing.
Invisible enemies aren't considered alive by the base code, which is why the battle ends.

That being said, why are you so against multiple troops?

I haven't messed with troop/encounter design too much myself—but it seems to me that it would be a lot easier to set up and troubleshoot the randomization of 3 separate troops versus a single troop with a dozen enemies stacked on top of each other, most of which are configured to be invisible.

Even from the perspective of doing a custom plugin to address this, it's probably easier (and would make more sense) to randomize between X specific troops than it is to code around the engine's default enemy visibility handling to try and do it via some sort of ad hoc method as you are describing.

You are right. I am a bit inexperienced with this and was hopeful there was a solution that I just wasn't privy to, but if it is hardcoded into the engine then i have no interest in addressing it when multiple troops will be a fine workaround.

But to answer that question, I have a forest surrounding a city that has a few different monster types to encounter (snakes, foxes, wasps, bears, skeletons), and within each monster type I want troop variations of 1-3 monsters, in addition to variations that put them in different locations and variations that mix monster types with one another with varying numbers. At that point I was looking at figuring out and tinkering with upwards of 40+ troops for the maps and it just seemed like I was doing something wrong. I found visustellas element/trait core which allowed me to input a huge amount of randomness with the variant modifiers and battler name notetags, and I found a loot table plugin that allowed me to generate loot tables instead of creating even more troops with monster duplicates just to enable all the different loot i wanted to drop. Tonight I have basically worked all of those troops down to maybe 15 per map while still giving me the functionality and variety i wanted, and i was hoping to further narrow it down by implementing random spawns thru variable rolls within the troop conditions itself, but it seems I have hit the wall, so to speak. 🙂
you only need at least one enemy in each troop to be there to start the battle, and can have the rest shuffled as you want.

To change that requirement you would have to reprogram the conditions at the battlestart by plugin, and that would have to be a custom plugin written specifically to your idea.
And additionally such a change may cause other incompatibilities depending on what other battle plugins you use.

So you'll have to decide for yourself if that mechanic is worth something to you to request a plugin like that, or if you decide to keep one base troop available outside your ideas.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-stop-auto-victory-if-all-enemies-appear-mid-battle.145273/