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

To composers out there, what are atleast 4 instruments overall I need to have to make my music not feeling empty? I'm here stuck trying to make my own battle music but it kinda sounds... Not intense?
My computer broke yesterday, so no RPG maker for at least a week until I can get it repaired. :(
Just wanted to share how my game won 1st place in a game jam for itch.io. Everyone else used Unreal, Unity, GMS2, Godot, etc but I used RPG Maker 2003 :guffaw: It just shows that you can create a good game and it doesn't matter which engine you use
Working on cutscenes~

if your game is the first (or ONLY) in a series and still has a colon in its title, you are a bad person and I hate you...... jk.

who could ever hate BETWEEN: TWO SOULS?

Forum statistics

Threads
107,405
Messages
1,029,444
Members
139,504
Latest member
lobsterknees
Top