The 3D Step Dungeon Maze Kit is available as optional DLC. This page explains some of the core functionality present inside this template.
Please do note that this DLC is currently in Early Access. Thus some information here, as well as in the actual project template, may be incomplete.
Creating a New Maze
Step 1) Loading the maze builder interface
To design a new maze you will first need to load the “Map Editor Grid” Interface. You can do that either by selecting to “Play” or “Test” the Interface (not to be confused with Testing the entire game).
The Interface is fairly straightforward to use. Initially the Map is going to be filled with “Wall” blocks, and you can begin painting on it by selecting any of the other existing blocks on the right side with your left click and then left clicking anywhere on the grid to place it (for most blocks you can also hold left click and drag to paint quicker). It is also possible to right click any of the existing blocks on the grid to “pick” that to your cursor.
It should be noted that while the grid’s coordinates go from 1 to 32, the actual Map the player will navigate in is going to be a size of 96. That is because each tile for this project translates to 3 whole tiles in the engine. Coincidentally, the player also moves 3 whole tiles every time you walk in this grid-based system.
Step 2) Exporting the new maze
After designing your maze you can then export it by clicking on the “Export Map” button located at the bottom-right corner of the Interface. This will generate a .txt file in “\Documents\001\Games\[Your project’s name]”.
Step 3) Importing the new maze
To import your newly created maze you need to close the Map editor and head over to where your project’s Tables are located. Identify the “MazeMaps” Table and click “Edit”. On the window’s top-left corner click “Data”, select “Import Data…” and then look for your generated .txt file to import. And you’re done!
NOTE: If your newly imported maze was added to a new floor, in other words if you increased the Table’s Z size, then you will also need to make sure that change is reflected on the “MazeMapsFog” Table too in order for everything to function properly. If the new maze also contains signs, chests and enemies, then the same thing will need to be done for the “Signs_Maze”, “Loot” and “Enemy_Spawn” Tables respectively.
Step 4) Setting up the new maze
Technically speaking, the “MazeMaps” Table is where all your mazes are going to be located in. You can have as many floors (Z layers) as you’d like and make use of maze themes – or in other words, different Tile-Sets – to give the player the illusion that there are multiple different mazes. To have the player load into a maze, edit the script located in the “Activated” trigger of an “Items Choice x” Field by changing the value of the “MazeTable” “HUD” Interface Variable which will determine what Z plane of the “MazeMaps” Table the player will load into. There you can also determine the look of the maze by changing the value of the “Maze_ID” “HUD” Interface Variable which will determine what Tile-Set will be used to build the maze.
It is also important that in order to avoid jumping from one maze to another via staircases you should edit the “Activated” trigger script of the “ContextButton” located in the “HUD” Interface to prevent that (unless of course that is desired, in which case you can leave it as is). If your “MazeMaps” Table has 17 Z planes and 3 mazes which are set up like this: Maze A Floor 1-5, Maze B Floor 6-9, Maze C Floor 10-17 — then you can utilize branches to first determine what maze the player is in by checking the floor they’re in, and then deciding whether to allow a descent or ascent to a lower or higher floor respectively.
Loading an Existing Maze for Editing
To edit an existing maze you will have to load the “Map Editor Grid” Interface. You can do that either by selecting to “Play” or “Test” the Interface (not to be confused with Testing the entire game). Additionally, you need to make sure to check the “Launch with game debugger” tick-box in the Testing Options window.
With the editor Interface now loaded, open the Variables window from the Debugger window and double click the “Maze_Base” Table to open it, then click “Data” on the window’s top left corner and select “Import Data…”.
After locating your file and importing it, simply click the “Update Grid” button located at the bottom-right corner of the Interface and the grid will be updated to reflect the changes.
Setting Up Enemy Spawn Tables
Setting up enemy spawns can be done in the “Enemy_Spawn” Table.
That Table is composed of 2 cells per Z plane, where:
Y: 1 = “Weak enemy” (“E.Weak” in “Map Editor Grid” Interface), and
Y: 2 = “Strong enemy” (“E.Strong” in “Map Editor Grid” Interface).
The Z dimension is used to represent the different floors. By writing in the cells the names of desired Actor Template entries, you can have them spawn as enemies in a maze.
Setting up Chest Loot Tables
Similar to enemy spawn Tables, you can set up loot Tables in the “Loot” Table.
The Table’s Y size can be changed to whatever you might like, and it represents the list of Items that can be randomly awarded to the player whenever they open a chest. The Z dimension is used to determine what floor number of the maze these Items can be found in. By writing in the cells the names of the desired Items, you can have them be awarded to the player whenever they open a chest.
TIP: Since Items are randomly picked from that list, it is possible to set different percentile chances by having the same Item take up multiple spots.
For example: if you have 4 cells in total and they are of this composition:
“Potion”, “Potion”, “Potion”, “Elixir”… it means that the player will have a 75% chance of getting a “Potion”, and a 25% chance of getting an “Elixir”.
If you want the chest to also have a chance of containing nothing, then you will need to alter the script, since putting nothing as a value in a cell will simply have it re-pick from the list.
To do that, inside the “Talked to / Activated” trigger of the “Chest” Actor Template cut the 1st branch of the 2nd Comparison Branch Event.
“Map Editor Grid” Interface Legend
A: A 32 by 32 editable maze grid. Can be painted on by picking a block from the list (D) with the left mouse click, or by picking a block from the grid itself with the right mouse click.
B: The coordinates that the cursor is pointing at.
C: Information on the block’s tag, as well as its name.
D: A list of existing blocks that can be placed on the grid.
E: A list of commands that execute different actions. You can see their description by hovering the cursor over them.
Included Block Tags Legend
Name | Tag | Description |
---|---|---|
Floor | 0 | Generic passable block. |
Wall | X | Generic stationary Wall block (impassable). |
Variation 1 | x | Generic variation of a stationary Wall block (impassable). |
Variation 2 | W | Generic variation of a stationary Wall block (impassable). |
Variation 3 | w | Generic variation of a stationary Wall block (impassable). |
Pillar | P | Generic Pillar block (impassable). |
Arch | a | A generic archway for decorative purposes (passable). |
Upstairs (Entrance) | / | Takes the player to a higher floor. Is also where the player will spawn upon first entering a maze, so it is a mandatory tag. |
Downstairs (Exit) | \ | Takes the player to a lower floor. |
Torch (Lit) | T | Emits Light. Will be turned off after being interacted with. |
Torch (Unlit) | t | Does not emit any Light. Will be turned on after being interacted with. |
Loot | L | After opened, the tag will turn into a lowercase “l” to be marked empty. |
Sign Wall | S[x] | The letter “S” will be followed by an ID number that ties to the Y cell of the “Signs_Maze” Table. There can be a maximum of 99 Sign blocks in each maze. |
Lever/Gate | 1[x]/2[x] | The number is followed by a letter of the English alphabet, meaning there can be a maximum of 26 pairs of Levers/Gates in each maze. The number of Levers and Gates should be equal. After opened, the letter in the tag will turn lowercase to reflect that change. |
Health Fount | F0 | After being used, the “F” in the tag will turn lowercase to be marked empty. |
Mana Fount | F1 | After being used, the “F” in the tag will turn lowercase to be marked empty. |
E. Strong | E | A Strong Enemy that is determined by what’s specified in the Y=2 cell of the “Enemy_Spawn” Table. There can be a maximum of 99 enemies in each maze (including both Weak & Strong). |
E. Weak | e | A Weak Enemy that is determined by what’s specified in the Y=1 cell of the “Enemy_Spawn” Table. There can be a maximum of 99 enemies in each maze (including both Weak & Strong). |
Rotator | @ | Passable block that turns the player 180 degrees when stepped on. |
Spike Trap | ^ | Passable block (trap) that will cause emerging spikes to hurt the player when stepped on. |
Fireball Trap | *[A-Z] | The asterisk (*) will be followed by a letter of the English alphabet, meaning there can be a maximum of 26 Fireball Traps (Arrow Traps included too) in each maze. |
Arrow Trap | ![A-Z] | The exclamation mark (!) will be followed by a letter of the English alphabet, meaning there can be a maximum of 26 Arrow Traps (Fireball Traps included too) in each maze. |
Pressure Plates | p[A-Z] | The letter “p” will be followed by another capital letter of the English alphabet, meaning there can be a maximum of 26 pairs of Pressure plates & Fireball/Arrow Traps in each maze (regardless which Trap they are tied to). |
Variable Definitions
Switches
Name | Description |
---|---|
Descending | Returns True if the player is descending. |
Maze_Generating | Returns True if a maze is currently being generated. |
Collections
Name | Description |
---|---|
List_Wall_Tags | A list containing all of the tags which are wall tiles. |
List_Floor_Tags | A list containing all of the tags which are floor tiles. |
Letters_Uppercase | A list containing all of the Uppercase letters of the alphabet. |
Letters_Lowercase | A list containing all of the lowercase letters of the alphabet in ASCII values. |
List_Wall_Traps | A list of wall trap tags. |
List_Floor_Traps | A list of floor trap tags. |
List_Blocking_Floors | A list of all floor tags which are also impassable. |
Available_Levers | A list of all lever tags available for use while creating a maze. |
Available_Doors | A list of all door tags available for use while creating a maze. |
Available_Traps | A list of all trap tags available for use while creating a maze. |
Current_Levers | A list of all currently loaded levers in a maze. |
Current_Doors | A list of all currently loaded doors in a maze. |
Tables
Name | Description |
---|---|
MazeMaps | All the maze floors of the game are stored here. The Z coordinate represents the number of floors. |
MazeCurrent | Contains data on where the player can or cannot move in currently loaded maze. Passable tiles are represented as a “0” and impassable ones as an “X”. |
MazeMapsFog | Used to determine how much of a maze the player has explored areas on the mini-map (marked with a “0”). As the player explores more of the maze, the 0s will turn into 1s and the “fog” will be lifted. |
Enemy_Spawn | Determines what enemies the player can face on each floor. The Z coordinate reflects the maze floor (the Z coordinate of the “MazeMaps” Table), while the Y coordinate the “Weak Enemy” that will spawn (Y=1) or the “Strong Enemy” (Y=2). |
Signs_Maze | Holds information on the signs’ message in a maze. The Z coordinate reflects the maze floor (the Z coordinate of the “MazeMaps” Table), while the Y coordinate the sign’s ID in that floor. |
Maze_Base | Reflects the maze that is used in the “Map Editor Grid” Interface during the editing process. Is also the one being exported to a .txt file. Filled with the “X” (Wall) tag by default. |
Loot | Determines what Items the player can receive from chests. The Z coordinate reflects the maze floor (the Z coordinate of the “MazeMaps” Table), while the Y coordinate the Items that can be randomly awarded. |
“HUD” Interface Variables
Name | Description |
---|---|
Player_Direction | The direction the player is currently facing. N (North), S (South), E (East), or W (West). |
Maze_ID | Determines the maze theme (Tile-Set) that will be used to generate the Map. |
Player_X_Position | The player’s X Position on the current maze’s floor. |
Player_Y_Position | The player’s Y Position on the current maze’s floor. |
Player_Stepping | Returns 0 if the player is stationary, 1 if in the middle of taking a step. |
MazeTable | The floor number the player is in. Reflects the Z Coordinate of the “MazeMaps” Table. |
Action_Text | Holds information on text that will appear at the bottom part of the script during various interactions. |
Step_Taken | Returns what kind of step the player took last (Front, Back, Left, Right, LTurn, RTurn). |
Maze_Ceiling | Returns 0 if nothing will be placed on top of the maze, 1 if the maze will have a ceiling. |
Button_Held | Returns 1 if a directional button is held, 0 if it is not. |
Front_Cell | Stores the tag of the cell that is right in front of the player. |
Footstep | Stores the floor material to decide what footstep Sound effect to play. |