Energy Regen Timer

Hi everyone, i'm working on a game that uses energy each mission, but I've come across an issue. I want the energy to regenerate by 1 every 5 minutes, until fully restored but i cannot seem to figure out how I can keep track of that time globally throughout every map without it starting the count over.

So can anyone help making a plugin for this.
-Where it can display a timer as soon as the energy is below max
-Timer font size should be editable in params
-Timer can be place anywhere based on X & Y param functions
-Timer can be tied to variable or script call in order to have the energy be tracked through every map
-Timer resets the countdown after regenerating 1 energy continuously until energy is full
-Timer stays current through every map
-plugin command to hide timer
-plugin command to show timer

This next one isn't a must but would be great if it can be implemented.
-Can work with a real time tracking system such as orange overlays time system.
This way even if player isn't playing energy will regenerate accordingly based on time passed.
variable bar used for energy is do able, you have different methodes to accomplish this.

(personal way looks around this)
Galv_Variablebar to make the energy visible (unless you have a different way)

you can add SRD_WaitOptions to use "Wait 5 minutes", but you can also use
variable times in an event like:

(common event) and use parallel switch
wait: 1
variable 4 [5min countdown] -= 1
if variable4[ 5min countdown] < 0
variable 4 = 0
Turn SWITCH OFF here
end

where the variable resets, can be variable 4 = 300 (if its 5 min)
and turn on the switch to run the common event.this can be 30 frames
to turn off selfswitch.

if you want a time on screen, there are serveral plugins for that if you want
to change locations of it.

but this is only 1 methode out of 6 other ones, but can be much more.
each in thier own way 🙂
I'll give this a try and see which of this works for me. Thanks. Hopefully one of them does the job

Edit. No luck. I cannot get it to remain with continues countdown till energy is regenerated while switching between maps without it restarting count.

Original thread: https://forums.rpgmakerweb.com/threads/energy-regen-timer.123487/