Saving/Retaining Troop Damage/States/etc?

Hey all! I've been searching around with no luck, but I'm wondering if there is any way to possibly retain any damage/effects done to a enemy troop, so after a loss or an escape, the player could return to said troop with the damage/effects still in place?

I'm toying around with a enemy-wave type system(where the player is sending out the waves) that would allow for the enemy to attempt to break through the players defenses until they reached the "boss." It's just sort of awkward that after each trial, the enemy party is basically 100% back to full health.

I've also considered just using condition events and making a number of enemy Troops that meet those conditions. The only issue is that with parties of 4 it would mean I'd need to create 16 different troops for each possible outcome. Which would make for really long conditional branches....

Anyone know if it's possible some other way or if it's just too complicated to do without plugn?
You could probably do it with variables, but it'd be messy.

Use one variable for each enemy, for each stat, and set them to the full amount prior to the first battle.

In the troop event, have a page that runs right at the start of the battle to change all the enemy stats to what they should be (you'd also want to remove any enemies that had already been defeated).

Then have a page that runs after each turn, putting the current stats for each enemy into those variables.

Depending on how many variables you want to keep track of and how many enemies are in the troop, you might be better off requesting a plugin.
This might be more easily accomplished with Yanfly's Self Variables. That way, you can attach your variables to the event itself. You could run into issues if the player fights one Troop, then a different one and then fights the original again.
Do self variables exist once you are in the battle scene?
Do self variables exist once you are in the battle scene?

That's a good question. One that I don't really know the answer to.
Use one variable for each enemy, for each stat, and set them to the full amount prior to the first battle.

or, store everything in one variable as an array......
...you know... that type of variable that lets you store a script entry?

with a small loop in a common event, it shouldn't be hard to drive the whole process through one event.
Lot's of interesting ways to execute this guys! I'm super thankful! The next chance I get to mess around, I'll definitely be busy!
or, store everything in one variable as an array......
...you know... that type of variable that lets you store a script entry?

with a small loop in a common event, it shouldn't be hard to drive the whole process through one event.
Wouldn't this option still only be able to input one variable anyway? If I think I understand what your saying, the script option for variables can't do more than one number at once, correct? Like it wouldn't be possible to use a scripted variable to grab both speed and max hp and retain them both. Unless it could?
doodling in the air here, but theoretically, you can take whatever you want from a battler (of which, the States lot is an independent object, filled up with State objects) and store it somewhere else, if you call up the right script call, using a Script type variable.
you'd be grabbing the entire thing, regardless of what it is, and store it as a lot, which you can then use somewhere else, with a more complex structure involving an iterator that goes through all the individual objects of that lot object.

I don't have MV up right now, I'm speaking from memory.... but, *that*?, that is just basic programming,.... it holds true for whatever language you work with.

many people get confused by the ability to grab an entire object through the variables system, because they can't read them or operate with them through the GUI editor, on the ingame inspector.
but, you can.... it's all plain code.

Original thread: https://forums.rpgmakerweb.com/threads/saving-retaining-troop-damage-states-etc.94242/