Saving/Retaining Troop Damage/States/etc?

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
141
Reaction score
49
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
39,686
Reaction score
13,305
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,676
Reaction score
2,152
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,189
Reaction score
1,167
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
141
Reaction score
49
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
141
Reaction score
49
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,189
Reaction score
1,167
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 Profile Posts

I wanna try making my game into an app because that sounds cool but I am so lost on how to :kaocry:
I found some tutorial but they all seem to use an older android studio(2.3.3)? I think the current version is 4.0.1?
is there an updated tutorial or do I need to find a way to get 2.3.3.?
My heart goes out to the family of Cannon Hinnant. Shame on all major news networks in America for not reporting that a 5 year old was executed by a grown man. Absolutely disgusting.
I hope Turkey and Greece can settle on the resources dispute peacefully.
whos hyped for rpg maker mz :D

Forum statistics

Threads
100,820
Messages
979,897
Members
132,457
Latest member
Takacie
Top