Time based skills

I'm hoping this is in the right forum. I have a character who can manipulate time. I want to manifest this with skills and states.


One of my ideas was to have a skill where he could turn back time. I figure I could achieve this with a common event that would basically undo the last turn, two turns, or so on depending on his level. On the flip side, he could have a skill that would do nothing when used but have an effect a few turns later. Is it possible to achieve these skills?
The "undo" thing is a nightmare to implement - a few scripters have tried, but what they've come up with has been pretty incomplete.


The delayed effect can be managed using Remove Effects on Yanfly's Buffs & States Core.  If you're creative (and aren't trying to do anything complicated), you can even do it without scripting, for example, I once created a skill that "refills 50% of your max HP after 5 turns" by applying two States to the battler - one with +50% HRG that lasted 5 turns and one with -50% HRG that lasted 4 turns, therefore doing nothing on those first four turns.


If you really like the idea of time magic and manipulation, I recommend adding an actual element of time to your battles.  I don't necessarily mean real time, but some form of "turn points" or a CTB that dictate how often a character can act.  This opens up a new layer of strategy in battle, and giving a character the ability to break or take advantage of those rules is amazing for giving them a unique, fun battle identity.
It might be difficult to implement an ability that could turn back time 1, or 2, or even 3 turns. The variability is what I'm not sure about there. Currently, I don't know of anything that is actually tracking how things were X turns ago. Everything is updated on a single turn-by-turn basis.


However, it should be pretty doable to implement a skill that snapshots an actor's (or the party's) current HP/MP/TP rates during one turn, allowing you to revert to those rates several turns later. Turning back time, effectively. I think you might be able to do it with events, but it would be a heck of a lot easier with JS.
The "undo" thing is a nightmare to implement - a few scripters have tried, but what they've come up with has been pretty incomplete.


The delayed effect can be managed using Remove Effects on Yanfly's Buffs & States Core.  If you're creative (and aren't trying to do anything complicated), you can even do it without scripting, for example, I once created a skill that "refills 50% of your max HP after 5 turns" by applying two States to the battler - one with +50% HRG that lasted 5 turns and one with -50% HRG that lasted 4 turns, therefore doing nothing on those first four turns.


If you really like the idea of time magic and manipulation, I recommend adding an actual element of time to your battles.  I don't necessarily mean real time, but some form of "turn points" or a CTB that dictate how often a character can act.  This opens up a new layer of strategy in battle, and giving a character the ability to break or take advantage of those rules is amazing for giving them a unique, fun battle identity.



That's a pretty clever way of implementing delayed skills.


I've considered using the CTB system. I think it might actually mimic a more dynamic play style that I had originally envisioned before I discovered RMMV. Thank you for the tip.

It might be difficult to implement an ability that could turn back time 1, or 2, or even 3 turns. The variability is what I'm not sure about there. Currently, I don't know of anything that is actually tracking how things were X turns ago. Everything is updated on a single turn-by-turn basis.


However, it should be pretty doable to implement a skill that snapshots an actor's (or the party's) current HP/MP/TP rates during one turn, allowing you to revert to those rates several turns later. Turning back time, effectively. I think you might be able to do it with events, but it would be a heck of a lot easier with JS.



I would have to snapshot everything every turn so I could recall it whenever I needed to. That might be doable. I could also limit the time reversal to certain parameters to make it easier on me.


You've both helped me a lot. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/time-based-skills.68919/