Creating a Random Maze with Unlockable Events in a Talent Tree Style

This is a guest article by the community member Devil Narrator.

In this tutorial, we’ll show you how to create a random maze with unlockable events blocking the player’s path. Think of it like a talent tree system where players unlock pathways to progress.

We’ll cover the following key concepts:

  • Using Events in Asset Maps
  • Setting Minimum and Maximum Variables
  • Targeting Regions

Step 1: Create the Basic Maps

Talent Map

  • Create a map and name it „Talent Map“ (or any name you prefer).
  • Inside it, create another map called „Snippets.“
  • Set the Width and Height to 17×17. This ensures a 3×3 grid of Snippets fits properly.

Design the Snippets Map

Design the map like this:

  • Use white tiles for passable paths (O).
  • Use black tiles for impassable areas (X).

Add Region IDs

  • Place Region ID 51 in the middle of each Snippet.
  • Use Region ID 52 for „Dead Ends“ Snippets.
  • Assign Region ID 5 to the + Snippet for the spawn and exit points.

Assets Map

  • Create another map inside „Talent Map“ and name it „Assets.“
  • Adjust the map’s Width and Height depending on the number of events you plan to use.

Set the following regions and events in the number and order. The number of events and how the look is up to you. Just make sure that Region ID 5 has 6 and 5 inside the +.

Step 2: Configure the Plugin

  • Open the MK_RNGMaps_WithSnippets Plugin in the editor.

Create a new Tamplate

  • Copy an existing Template and rename it „Talent“ (or your preferred name).
  • Set the Width and Height to 15×15.
  • Configure the settings:
    • Base Algorithm: Maze
    • Open When: Classic Maze
    • Cut Off Dead Ends: 10-20
    • Additional Tunnels: 5-8
    • Exit Mode: None

Multiply Width and Height (15×15 = 225). This number is crucial for setting variables later.

Step 3: Define Assets

Entrance

  • Set Region ID 5 (spawn/exit)
  • Mark it as Important: True.

Abilities Asset (Class 1)

  • Use Region ID 54 to target Region ID 51.
  • Assign Minimum and Maximum Variables to control placement.
  • Mark as Important: True.

Priority Asset

  • Use Region ID 51 targeting Region ID 51.
  • Assign variables.
  • Mark as Important: False.

Secondary Asset

  • Use Region ID 52 targeting Region ID 51.
  • Assign different variables.
  • Mark as Important: False.

Special Asset

  • Use Region ID 53 targeting Region ID 52 (Dead Ends).
  • Assign variables.
  • Mark as Important: False.

General Asset

  • Use Region ID 50 targeting Region ID 51.
  • This is a filler for empty spots.
  • Assign variables to ensure all 225 spots are filled.
  • Mark as Important: False.

Step 4: Create the Talent Tree Event

  • Set up a new event where players can enter the Talent Tree.
  • Adjust the variables to match your setup (total should exceed 225 for the 15×15 map).
  • Add memory settings if you want to access the Talent Tree from a menu.
  • Variable ID 8 is your randomizer for this map. (Assign it to what you prefer).
RandomMaps.generate({
  mapId: 5,
  useSnippets: true,
  templateName: 'Talent',
  seedVariableIds: [8],
  roomLayout: 'Single Room',
  exits: ['bottom'],
  enterFrom: 'bottom',
});

With these steps, your random maze with unlockable events is complete! Test it out to ensure all variables and assets align correctly.

Trouble Shooting

If the map does not load, check the following:

  • Ensure that in the Asset map Region ID 5 and 6 is placed within the Region ID 5 area.
  • Ensure that the Snippet + has Region ID 5 placed.
  • Ensure that within the plugin Parameter Asset “Entrance” is correct.
  • Ensure that the script is set to bottom.

If no events show up, check the following:

  • Ensure the Minimum and Maximum Variables are set to a number above 1.
  • Ensure that within the plugin parament the Minimum and Maximum Variables are assigned to the correct Variable.

If there are gaps in the path where there is supposed to be an event.

  • Ensure that the Minimum and Maximum Variables are all equal above 225. (or the amount of your width and height. 5×5=25, 10×10=100, 15×15=225, etc)

How do I make this a working talent tree?

  • There are many ways to set up a talent system using only events, use this topic but make the events block the player and use self-switches. Tutorial-Blog – Eventing a Skill Tree | RPG Maker Forums. Or use some of Yanfly plugins along with other plugins to create something completely different.