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 Profile Posts

Does anyone find this hard to read?

Enjoying my weekend at home to stay Covid free. How is everyone else doing?
If you enjoy speed mapping for RPG Maker MV check out my YouTube Channel. My latest video includes custom made tiles which makes a simple map look dynamic!

Check out my short game Hikari's World! : Chapter I, on itch.io/games.
An actual dwarf with an actual axe is not so fascinating as the fantasy counterpart...

Forum statistics

Threads
100,603
Messages
977,714
Members
132,212
Latest member
Ekkoni
Top