Does anyone know if there is a way to make timed buffs? For exams, you are in the overworld and cast a buff that lasts 15 minutes real time. That buff will stay on you in the overworld and in combat, and once 15 minutes is up the buff will expire.
Timed buffs.
RPG Maker MV SupportUnless you have a plugin that runs a realtime clock already, there's no way for a buff or debuff to last a set amount of time.
Even if you had a realtime clock, that plugin would then also have to include the ability to make timed buffs/debuffs as well, or you'd need a second plugin to allow buffs/debuffs to base their expiration on the realtime clock.
I am not aware of any plugin for timed buffs/debuffs. I think there is a realtime clock plugin or two kicking around somewhere, but I'm not sure who made them, or what they'd be called.
Even if you had a realtime clock, that plugin would then also have to include the ability to make timed buffs/debuffs as well, or you'd need a second plugin to allow buffs/debuffs to base their expiration on the realtime clock.
I am not aware of any plugin for timed buffs/debuffs. I think there is a realtime clock plugin or two kicking around somewhere, but I'm not sure who made them, or what they'd be called.
I actually have an idea for this using common events and a variable that ticks down, but I'd want to test if I can make it count down during battles too.
Are you using the default battle system?
EDIT:
Okay, turns out this was easier than expected, you just need to use the Set Timer function upon casting said buff, as well as turning on a switch to run a common event that checks to see if the Timer is at 1 second or below, at which point it cures you of the buff and removes the timer.
You also have to put this timer check into troop event pages too, I believe.
Are you using the default battle system?
EDIT:
Okay, turns out this was easier than expected, you just need to use the Set Timer function upon casting said buff, as well as turning on a switch to run a common event that checks to see if the Timer is at 1 second or below, at which point it cures you of the buff and removes the timer.
You also have to put this timer check into troop event pages too, I believe.
Three things needed.
One, the state
Two, the skill that will apply it, also runs a common event to turn a switch on.
Three a Parallel Common event turned on by the switch that increments a variable by one, then waits for 60 frames (1 sec), then checks if the counter has reached 9000 (15 min* 60 sec/min) then removes the state if it has and turn the switch off again.
Well, that would work for a party wide buff.
The advatage to this instead of using a timer is that you can have multiples of these running for different states.
One, the state
Two, the skill that will apply it, also runs a common event to turn a switch on.
Three a Parallel Common event turned on by the switch that increments a variable by one, then waits for 60 frames (1 sec), then checks if the counter has reached 9000 (15 min* 60 sec/min) then removes the state if it has and turn the switch off again.
Well, that would work for a party wide buff.
The advatage to this instead of using a timer is that you can have multiples of these running for different states.
The problem with that one however, is that if you're using the default battle system, then background common events that increment variables don't seem to do anything during battle - You could fight a 10 minute long battle, return to the overworld and only then will the variable begin incrementing again.
Also, trying to make in battle events that increment variables in the same way are a bit weird, and either only do it once or just cause the battle to hang indefinitely.
Also, trying to make in battle events that increment variables in the same way are a bit weird, and either only do it once or just cause the battle to hang indefinitely.
Ah, this seems like itt'l work, gonna try it when I get home. Thanks for the help~
Original thread: https://forums.rpgmakerweb.com/threads/timed-buffs.134812/