Chronobreak Skill

Heyho, this is a rather extraordinary request.

I would like to implement a skill, which can reverse time in battle.

After activation, everything is like before X ticks(turns).

On a sidenote, I am using Yanfly's ATB system(which will make the case even more complicated, I fear^^)

Now an example:

Actor A, B, C, D all have full life, the enemie is on 70% HP.

Now the player messes up, the next turn, actor A gets killed, B and C are wounded, D is inflicted with the state "sleep" and the enemie somehow heals itself to 100% HP.

At this moment actor B uses "Chronobreak", which resets all the actions done in the previous turn, now actor A, B, C, D all have full life again, D is cured from "sleep", and the enemie is back on 70% HP.

Is something like this even possible?

I suspect that this will be to much work for a small additional skill, tho.
Basically, a timeline storing all snapshots taken at all the instances where "Chronobreak" can go back to will need to be stored sequentially, so the desired snapshots can be loaded to do what "Chronobreak" wants. How many such snapshots needs to be stored before they can be discarded depends on how "far" the "Chronobreak" can go back to(it's possible to tell which snapshot will be used as it can use any of those within the time range of "Chronobreak"), unless the it always goes back to something like "x turns before the present" where x is fixed(In this case only 1 snapshot will be necessary).

If the battle system were the default battle system, it'd be certainly possible.

As you're using Yanfly's ATB, if the "Chronobreak" could only go back to the start of a turn, or when the player just become able to input actions for their actors(or, the atb just become wait), it'd be possible too.

But if the "Chronobreak" can go back to any frame, then you better just forget your request already, as it'd mean different snapshots would need to be taken per frame(the atb value of any battler can change at any frame as long as the atb wait conditions aren't met), so there would be simply too many snapshots to be taken(there are typically 60 frames per second in the default RMMV settings).
Basically, a timeline storing all snapshots taken at all the instances where "Chronobreak" can go back to will need to be stored sequentially, so the desired snapshots can be loaded to do what "Chronobreak" wants. How many such snapshots needs to be stored before they can be discarded depends on how "far" the "Chronobreak" can go back to(it's possible to tell which snapshot will be used as it can use any of those within the time range of "Chronobreak"), unless the it always goes back to something like "x turns before the present" where x is fixed(In this case only 1 snapshot will be necessary).


If the battle system were the default battle system, it'd be certainly possible.


As you're using Yanfly's ATB, if the "Chronobreak" could only go back to the start of a turn, or when the player just become able to input actions for their actors(or, the atb just become wait), it'd be possible too.


But if the "Chronobreak" can go back to any frame, then you better just forget your request already, as it'd mean different snapshots would need to be taken per frame(the atb value of any battler can change at any frame as long as the atb wait conditions aren't met), so there would be simply too many snapshots to be taken(there are typically 60 frames per second in the default RMMV settings).
Well, that's if you want to write a plugin that would be compatible with everything in the world.


Ideally, you would write a framework that provides "reversing" logic, and then you would then provide instructions for other plugins to implement "reversing" logic as well.


Then, when your reverse logic is called, all other objects will invoke their reversing as well.


Objects may need to keep track of data used for reversing, but I would prefer that instead of taking snapshots of the battlefield at every point in time.


Of course, if you only need to go back to the previous turn, then yes, snapshots would be fine.
Well, that's if you want to write a plugin that would be compatible with everything in the world.

Ideally, you would write a framework that provides "reversing" logic, and then you would then provide instructions for other plugins to implement "reversing" logic as well.

Then, when your reverse logic is called, all other objects will invoke their reversing as well.

Objects may need to keep track of data used for reversing, but I would prefer that instead of taking snapshots of the battlefield at every point in time.

Of course, if you only need to go back to the previous turn, then yes, snapshots would be fine.
Yeah, it highly depends on what the OP really wants("Chronobreak" back to any possible frame versus to some specific timing) and what other custom plugins he/she's using(I think it's so hard that it's better for the "Chronobreak" mechanics to be specifically built for this use case only) 🙂
Thanks for the quick replies!

Ideally I wanted to create 2 skills, one that travels back to the last turn of the user(but scips it) and one that travels back a fixed amount, regardless of how fast/slow the user is, lets say 200 ticks.

But I see this will not be easy.

Since I'm using many Plugins, which modify the battle mechanics(my objective is to accomplish as much diversity of classes as possible), I guess I will cancel the request, if I'm the only one who would love that feature.

That would've only be used for a time traveling actor and a boss, so definitely not worth so much work, since I've got enough other ideas for awesome mechanics.

However, if I inspired someone, that he/she needs this for his/her own game, feel free to share it 😉
Thanks for the quick replies!

Ideally I wanted to create 2 skills, one that travels back to the last turn of the user(but scips it) and one that travels back a fixed amount, regardless of how fast/slow the user is, lets say 200 ticks.

But I see this will not be easy.

Since I'm using many Plugins, which modify the battle mechanics(my objective is to accomplish as much diversity of classes as possible), I guess I will cancel the request, if I'm the only one who would love that feature.

That would've only be used for a time traveling actor and a boss, so definitely not worth so much work, since I've got enough other ideas for awesome mechanics.

However, if I inspired someone, that he/she needs this for his/her own game, feel free to share it 😉
Just found that someone has written a similar(if not just the same)script in RMVXA. He/she might write a RMMV counterpart too 🙂

Original thread: https://forums.rpgmakerweb.com/threads/chronobreak-skill.51520/