Saving/Retaining Troop Damage/States/etc?

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,704
Reaction score
2,208
First Language
English
Primarily Uses
RMMV
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.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
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.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
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!
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
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?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top