Break Time Common Event

Hello,


so here I was trying to make that every 20 battles, the party can take a rest at campfire.


(see attachment) I attempt to reset the variable to zero and then make it count again, but then realize it always keep record on the actual Battle Count data.


After that, I thought I can put +1 variable in every Troops, but I was curious is there any simple/faster way to do this?


Without going to every single Troop page and put "battle count variable +1".


Thank you, any help much appreciated!

1484165673497.jpg
The game data "battlecount" is the count of all battles since the start of the game.


You'll need another variable to store "old battlecount", then compare that value to a variable that gets the current battlecount.


If the current battlecount is more than 20 higher than the old one, allow a rest and store the new count into the variable "old battlecount" for the next rest check.


Needs a bit of mathematics...
Nice, I try to make the variable store the "battle count" and the other "battle count +20", then make a conditional >= from it. It works!


Thank you very much, this is way more simple than going to every Troop pages.
Do you mind posting a screen of the new formulas? I'd like to see how you did this adjustment - I'm new to common events. I'd like to do something similar based on number of steps, instead of number of battles. 


Thank you both for the insight! 
@Tome571Sure do! This is the Common Event that works. I am using 2 variables here, you can


customize the math symbol to follow your needs and also change the control to step count.


Good luck! 🙂

Spoiler
1484937817250.jpg
Awesome, thanks so much for the help!

Original thread: https://forums.rpgmakerweb.com/threads/break-time-common-event.73471/