Resetting a turn during battle

Unfurl

Villager
Member
Joined
Jan 4, 2016
Messages
18
Reaction score
1
First Language
English
SHORT VERSION:

Is it possible to "reset the turn" (I assume using the script command) during the player's turn, as if the player hit the back button to undo all their actions until they are back to their first actor again.


LONG VERSION:

I'm currently working on making a Odometer/Rolling HP meter using events and the help of this amazing script.
This mechanic was used in Earthbound/Mother series (seen below) and has been highly requested by people online for an MV version plugin however after hours of looking around, I found a sneaky way to do it.



Now it is pretty gross as you need to have a common event, switch and number variable for each actor you will have in your party at any time. But that's not the point, it works.

Here is the problem though. RPG maker isn't really built to handle KOs during your turn. If someones health drops to 0 while you are having your turn, sometimes the command window (displaying attack, magic etc etc) will disappear which softlocks the game.

I am thinking of a way to fix this and currently I can only think of resetting the players turn entirely if someone dies during your turn. Is it possible to "reset the turn" (I assume using the script command) as if the player hit the back button to undo all their actions until they are back to their first actor again.

Or if someone has a better idea of how to handle this softlock that would be good too.
Here a picture showing how the Common Event works (requires the plugin I linked at the top to make parallel events to run during battle).


Then all I do is change the formula for the enemies attacks to:
Code:
if (b.constructor == Game_Actor)
{
    targ = b;
    $gameVariables.setValue (targ.actorId(), $gameVariables.value(1) - 50);
    $gameSwitches.setValue(targ.actorId(), true)
}
else
{
    a.atk * 4 - b.def * 2
}
I found this code on this post here:
Which basically changes the target actor's "Change HP" variable to be in the negative and turns on the switch to start reducing health. Healing works the same way but in the opposite. Healing also resets the damaging ticking on the actor to 0 and begins healing them again.

Sorry for the wall of text. I''ll consider posting a tutorial on this as a dirty work around for Earthbound/Mother3's Odometer system while we wait for someone more knowledgeable than I in JS to create it as a plugin.
 

Unfurl

Villager
Member
Joined
Jan 4, 2016
Messages
18
Reaction score
1
First Language
English
Does anyone have any idea on how to to this? I'm kind of stumped
 

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

Latest Threads

Latest Posts

Latest Profile Posts

If you'll mind a bit, ElfKisser is the polar opposite of GoblinSlayer.
"Bury me as much as you want in this pain, I'll still rise to hug you again!"

Hero or masochist?

Lol these new tiles are looking cute. :B
Made with Country Woods (Available on the Store) and Country Woods II (w.i.p)
Turns out 4 layers is A LOT.
I noticed random Japanese dialogue in the FF7 remake while playing in English. More than once. Just now I saved a vid where Tifa spoke Japanese after a battle. We all make mistakes lol, this is kinda funny though

Forum statistics

Threads
99,631
Messages
967,478
Members
131,298
Latest member
PasalReturning36
Top