691th ??? Look, I know it's a bit off topic but may I ask how do you use them ? I planned to use 20 or so.
There's a similar amount of switches too. I'm nowhere near finished yet
😉
You'll surprise yourself at how often you use them if you intend to have a quest system of some sort, or puzzles, or even branching dialogue.
You can't plan the amount you use - the number will creep up as you develop.
For example, you might think:
Talk to an NPC. Get a quest. Use a switch to determine whether that quest is in progress or not, so when you talk to the same NPC again you can put different dialogue depending on the state of the switch.
If switch is ON, "Hey, finish my quest!"
Otherwise "Hey, I have a quest for you".
But what if the quest has multiple stages? So you scrap the switch and make a variable.
So, variable <1, "Hey, I have a quest for you".
<2 "You've been to the forest, but haven't found the cave?"
etc. So when the player talks to the NPC again, their response makes sense.
Or, you're tracking information for achievements and stats. That's going to be one variable each. (My game has 88 achievements, 20 tracked stats, and over 100 trackable challenges. That's over 200 variables just for those).
What if you have to pull four levers to open a gate, spread across an environment which covers multiple maps? You either use four switches, or a variable which counts up with each lever pulled.
Using a bestiary which shows how many of each enemy you've killed? Got a hundred different enemy variations in your game? That's another 100 variables there, and one for the total kills.
Anything you wish to check at any given time in game, a variable is useful.
There are eventing tools built in for things like number of steps taken, whether you're carrying an item or not, etc.
But if it's something you're making, you'll need to track it yourself.
Want to keep track of how much gold you've donated to the church roof fund? Variable.
How many monsters you've fought in an arena? Variable.
Of course, everyone's development is different, and everyone's games are different. It all depends on how much stuff you want to track in your game.
But they pop up all over the shop, even for one-time uses, especially switches. For example, if you use a door on a building, you might want to reference a switch which determines whether that person is home or not. Maybe you want to have dialogue and choices affect gameplay - that's a switch for each choice, so you can correctly recall what happened further down the line.
There can be cool hidden things too:
Imagine you're fighting a werewolf, and your character gets wounded. It seems like just another normal fight, but you could use a variable which tracks the number of steps taken from that point forward, and have the character start to feel strange 10,000 steps down the line, many saved games and much time later, so they can't save scum.
The game Undertale (not RPG Maker) uses switches and variables in a very, very cool way: It stores them in a secondary part of the game save, a part which is NOT reset by loading a saved game. So, if you decide to kill loads of stuff and then reload your save afterwards, the people will be back alive and the story position reset to your save point, but when you talk to them they'll REMEMBER you killed them before reloading to undo what you did, and react accordingly! How awesome is that!?