Switch&Variable Management

By default, RPG Maker knows about Switches&Variables, which are globally available, and Self-Switches, which are bound to Events.

In some cases, however, you may need something in between. Game information that is neither globally nor bound to an Event but instead to a specific dungeon, or even smaller, to a single room (in the dungeon). In practice, you could have a Switch that determines whether the whole dungeon was solved by the player or not. Furthermore, you could have a list of Events in a generated room (=map) that require Switches and Variables to build a puzzle, but you want those game data to live only on this particular spot.

RandomMaps will automatically manage Self-Switches for you, so you don’t need to worry about them.

Before you start, make sure those 2 plugin parameters are set:

const name = arguments[0];

return name.startsWith('?') && !name.startsWith('??');
const name = arguments[0];

return name.startsWith('??');

Setting up the dungeon or room-wide Switches&Variables is rather simple to do. By default, you need to append…

  • ? before a Switch/Variable name to make it dungeon-wide
  • ?? before a Switch/Variable name to make it room/map-wide

That’s all you need to do.

Example