Repository navigation
User Manual
In this manual you will find all the necessary information about how to handle Undermaker to:
- Create the game menu.
- Overworld rooms.
- Events in overworld.
- NPC interactions.
- Create battles.
- The available functions to do various stuff
- And more!
Each feature will be explained in detail in its corresponding page, this manual serves as a reference to access them all so you know what this engine is capable of by default and where to find them.
If a specific feature that you're looking for is not found in this manual, most likely the engine doesn't support it, you will have to edit the source code of it to implement the features that you want to add into your Undertale fangame, more information on how to do that is in the Programmer Manual page.
As a user on the engine you will mainly only work with the Custom Stuff section found in the Scripts group in the resource tree of Game Maker Studio 2 of the Undermaker engine.
You will also be working a little bit with some of the objects, mainly to know what properties they have and what is configurable in them to do various stuff.
The only reason you'd change the objects would be to make inheritance off of them, so that you can use it as a preconfigured preset of an object that you can change for your specific needs, more of that will be explained in the Objects section.
Note
If at any point in the game the player's HP reaches 0, you die and a Game Over sequence plays out, no matter where you are, if in the middle of a dialog or not, battle or not, you die, keep that in mind when handling the player's health.
Objects are the core of any Game Maker Studio 2 project, without them there's no game, these are the main sources where the code is executed and interactions happen, understanding their purpose and use is important in the making of your own Undertale fangames.
You'll be mainly using these objects in the Undermaker Engine, the ones you need to worry about the most are:
- obj_collision
- obj_entity
- obj_interaction
- obj_spawn_point
- obj_trigger
- obj_renderer
- obj_player_overworld
As these are the generic objects that will give shape to everything in the overworld rooms (obj_renderer specially works in battles too).
Children from the obj_entity, these object provide basic funcionality on the overworld rooms:
In battles the objects:
Are the ones that do a lot of interactions when the player is doging an enemy attack, even the buttons have their own way of interacting.
DO NOT TOUCH obj_game UNDER ANY CIRCUMSTANCE IF YOU DON'T KNOW WHAT YOU'RE DOING, obj_game is the core of the Undermaker engine, the one that coordinates all events in game menus, overworld and battles.
Scripts are the place to make helper functions and/or constructors, these doing diverse actions throughout the engine, separated in two sections, the Custom Stuff section is the one you will manage, for more advanced stuff and modifying the engine see the Programmer Manual page as you will be interacting with the Engine section to know the ins and outs of the Undermaker engine.
A brief explanation and detail on what the scripts contain and how you should use them is detailed in their corresponding section, just click on the script page you want to know more about.
Battle scripts:
- scr_battle_backgrounds
- scr_random_encounter
- scr_enemies
- scr_enemie_attacks
- scr_enemie_bullets
- scr_menu_attacks
- scr_flee_events
- scr_player_attacks
Overworld scripts:
Utility scripts (Scripts that are useful anywhere on the game, overworld or battle):
General scripts (Settings, data of the game and helper functions):
- scr_game_constants
- scr_game_menu
- scr_game_settings
- scr_get_texts_functions
- scr_initial_save_file_data
- scr_language_texts
- scr_room_border_ids
- scr_room_music_ids
Functions although not part of fancy objects that you can drag and drop on rooms or nice looking visuals, are the source of important features the engine can handle like events, battle sequences, random encounter settings and much more.
There's a lot of functions used in different parts of the game, some of them only work on battles, others on overworld and others anywhere and change the settings of the game or trigger stuff.
Caution
It is important that you avoid executing functions where they are not meant to be executed, keep overworld functions only when the player is on an overworld room and battle functions only when the player is in battle, not doing so will cause bugs, crashes or worse.
A list of all functions and their intended way of be used can be found in the User Functions page
Warning
Before starting, it is important that in the very first room the game starts on, you place the obj_game, otherwise the engine will not function properly, the engine runs heavily its logic on that object, it's the core of it besides the several scripts's functions it relies on.
These are constants and variables that you define to setup the game's initial settings, game window size in which resolution will be calculated, and more settings that define some aspects of the game.
Note
While the settings and configurations may not be many, it is important to name what they do and how these impact the game.
Important
In this area you will find some settings corresponding to using different languages in your game, you can find more information about them in the Languages Script section
Game configuration and settings
Every game needs a game (or main) menu, so that you can change your settings on the get-go, things like fullscreen, window size, volume, borders, etc.
Making a game menu for your fangame is essential, as it's the first thing players will see in your game and the one that will lead you towards the game itself, learn how to make a simple menu with all the necessary settings for your users to have the best experience in whatever fangame you create.
If you don't want to make a menu yet, you have to at least make a simple one so you can access the game and test out stuff that you want to see in your game, or check out how to test your rooms and game without a game menu once you have learned how to make a game menu!
You will be working mainly in the script scr_game_menu for all the stuff that can be done with a game menu.
- Basics of how to make a game menu
- Making a simple game menu
- Setting up submenus for settings or more
- Making an achievement menu system
- Testing rooms without a game menu (Skipping the game menu)
Tip
Before proceeding, it is recommended you have finished the Game Menu section as the game menu sends you to the overworld usually, so you understand the flow of the game.
The overworld is the part players traverse, interact and play with the world you craft, with several interactions, and triggers to various events that flesh out and shape the story you want to tell.
The overworld is mostly object oriented, so it is recommended you understand the properties and usages of the overworld objects in the Objects section.
Warning
In the overworld there always has to be an obj_player_overworld instance present, even in battles too (although it's invisible there), mostly because most interactions and events depend on the player, so make sure the player is always present and never removed, if you need the player removed and such, set its alpha to 0 and make it not collidable by setting its can_collide property to false.
- Basics of overworld rooms
- Properties of the player object
- Managing interactions in objects (pushing, state manipulation, moving)
- Room transitions
- Event management and triggering
- Music and dynamic borders in overworld
Whenever the player is in their menu, they can see their stats, items in the inventory and use their cellphone to do actions like calling other characters or accessing dimentional boxes, but it could be something more.
So the Cell functions are just functions that execute when the player selects the CELL and selects an option of many, they are found in the scr_cell_functions.
Important
The CELL options's UI text is located in the ui text function of the scr_language_texts script, the system requires it to be there, make sure you use that as well as using the dialogues function from the same script for your dialogues too for easy on translation.
The dialogues system is an entire separate thing that doesn't depend on Overworld or Battle scenarios, you can trigger a dialog anywhere anytime on the game, to say stuff and whatnot.
Important
This is not really mandatory but it is recommended that for any dialogues you use in the game, you fetch them from the dialogues function from the scr_language_texts script which should contain all the dialogues you will use in your game, this is so you can easily translate stuff in your game later on without having dialog scattered around in several parts of your code.
To create different dialogues and trigger different events while a dialog is playing, as well as other features the dialog system has included in them, dialogues use a variety of commands enclosed in squared brackets [] with specific words and data in them to make the text have different effects and trigger other functions of the game.
- How to create dialog instances anywhere in the game
- Commands of the dialog system
- Usage and manipulation of the dialog system through its exposed functions
Note
The dialogues used in the whole engine use this system, so anywhere where you the engine asks for a dialogue, you can use the commands and dialog functions as long as you use the correct reference of the dialog system, which is the obj_game.dialog variable.
Items are also an important part of Undertale, giving you stats as equippable armor and weapons as well as mainly healing up the HP you lose through battles or other events.

Caution
It is mandatory that for any dialogues, item name, info and more you use in your items, you add them in the item pool function of the scr_language_texts script which should contain all the text you will use for your items, this is so you can easily translate stuff in your game later on without having dialog scattered around in several parts of your code and also because the engine demands it there.
You'll mainly change the script scr_item_functions, changing existing code to customize the behavior for the items that you define in the item pool function from the scr_language_texts script.
- Basics of item properties and creation
- Defining item dialogues and types
- Triggering events with items
Progress in games need to have a way to be saved so players can take breaks and come back where they left the game last time, managing and saving said progress correctly and properly is important for any game for that reason.
Saving data of the game and settings are handled differently with specific functions and objects, including a little interface for the player to select if they want to save and some stats of the game being shown to the player.
Note
By default the engine itself only handles one save file, there are not multiple save files, if you want to add support to multiple save files, check out the Programmer Manual page for it.
While not necessary, the Languages Script, Sprites and Fonts for different languages are used in the engine to give an easy way to access text (either written or on the sprites themselves) used in the game for translation purposes, all dialogs, UI texts are packed in functions inside this script so it is not scattered around in the game's code and can easily be translated (or exchanged with other sprites in the case of sprites).
Tip
Depending on your target language, the fonts may not support the character the language contains, like japenese or russian, so make sure the fonts you use for specific languages are included in the project's resources, you can assign each font to its corresponding language, you don't have to find a font that supports all characters of your target languages.
- Basics of the languages script
- UI text language function
- Dialogues and Item language functions
- Setting up Sprites and Fonts for different languages
Battles are the main mechanic of most RPGs, Undertale is not an exception, battles in Undertale are more complex than your typical RPG, so let's take a dive in and see how to handle the different parts of the battle!
Battles have various parts that can move all at once during specific moments, it's quite an extensive topic to cover, so it will be covered in their corresponding subsections.
Note
There are two types of battles that you can start/create, the main battles which contains enemies and turn based combat, requiring defining all parts of a battle, and the one where the player just dodges one single attack and then goes back to the overworld, which require at least one enemy attack to be defined and optionally a background.
Battles in general follow this cycle:
- A battle is triggered to start (either with enemies or just an attack to dodge).
- An animation plays out and you enter the battle room/interface.
- If it's just an attack you dodge and go back to the overworld, otherwise you stay and get a turn to select your action in the buttons (unless the state is changed with an initial function that executes when triggering the battle).
- You take your turn performing an action (either ACTing, FIGHTing, FLEEing, etc.)
- An event corresponding to the action you perform executes and may involve a minigame, dialog or animation to trigger.
- Your turn ends, the enemy gets to say a dialog, if none then the enemy's or enemies' attack starts.
- You dodge and the attack finishes, if the enemy has a dialog it says it and you get your turn back, if not it goes to your turn immediatelly.
- If an enemy has a menu attack defined, it triggers it and you are dodging a menu attack while it's your turn now and since it's your turn again the cycle repeats!
- The battle cycles through the steps 4 to 8 until either the player dies, flees or the enemies are defeated (by killing them or sparing them), if you're alive you get rewards depending on how many and how you defeated the enemies and go back to the overworld.
This cycle implies many features that you can configure like the minigames used for the player attacking a monster, the dialog result from ACTing with an enemy, when the player attempts to FLEE playing an animation succeding or not, the attacks of the enemies, flavor text, etc.
It's a lot to cover, more than the overworld, but nonetheless the core of Undertale fangames, every single one of these aspects will be covered in this section, so keep reading!
There cannot be battles without enemies! Here you will learn how to use the functions and properties of enemies to create diverse enemies, select their dialogues, flavour texts and attacks they select for players to dodge.

You will be working mainly with the script scr_enemies for all your enemy creation stuff, other scripts manage specific parts of enemies like the attacks and bullets they use, but that's covered in the Enemy Attacks and Bullets section.
- Basics of enemy properties
- Position and animation of enemies
- Flavor text dialog flow control and manipulation
- Dialog and Attack selection of enemies
- ACT commands on enemies
An enemie poses no threat without attacks! The attacks may vary in many aspects, from very simple normal attack, to complex mind bending ones, even ones that can mess with the UI and battle box, etc.
To teach you how to make attacks since there's several functions on how you manipulate and handle bullets as well as the dodging area, alongside the many modes the player's soul can have, there will be sections dedicated to each and every single one of those features.
You will be working with the scripts scr_enemie_bullets and scr_enemie_attacks for all your enemy bullets and attack creation stuff.
Note
If you want to create more player soul modes, you will have to mess around with the engine a little bit, check out the Programmer Manual page for that.
- Basics of attack creation properties
- Menu attacks vs Normal attacks (properties)
- Bullet properties and manipulation
- Battle box properties and manipulation (Polygonal box)
- Player soul properties and manipulation (Soul modes)
- Toggling player status effects
Player attacks are the little mini games that are used to determinate how potent your attack towards the enemy will be, you are able to create your own custom attacks to spice up your game with how the different weapons play out in battle.
You will be working with the script scr_player_attacks for all your player attack related stuff.
- Basics of player attack properties
- Creating a player attack
- Handling damage UI animations and enemy function execution
Whenver the player attempts to FLEE from the MERCY menu, an event is triggered, which creates an instance of an animation to define its behavior and if you actually succeed or not in escaping a battle.
By default a chance is being handled and given to you to define if you actually did manage to flee or not, you can change that autcome in the FLEE event, and play out animations to give life on how you are exactly FLEEing a battle.
- Basics of FLEE event properties
- FLEE chance management and overriding outcome
- FLEE event selection in battles
Battles come with background to flesh out the ambience in which they are happening and give life to battles, or just have something more entertaining to look at than a plain dark background.
While making background is not necessary, it's quite easy to make and some functions to start the battle give you a way to start a battle with you defined background.
While not necessary for you to setup (in case you want to make a full on somewhat of a story telling story without battles, akin to a visual novel), you can define specific settings and options to make random encounters, specifying a specific combination of enemies, some specific combination of enemies that cannot appear, number of steps to trigger, maximum number of enemies, minimum number of them, etc.
Tip
It is recommended you have a solid understanding on how Enemies are created and managed as well as Battle Backgrounds since we need enemies to trigger a random battle encounter and a background to give it more life (although background is not mandatory), if you're triggering a battle sequence to just dodge one single attack, then you don't necessarilly need enemies, but you do need an Enemy Attack at least.
- Configuring and setting up the random encounters
- Triggering battles without the random encounter system
- Triggering attack only battles in events
Sometimes in battle you want to change the order the player selects the buttons and change the layout to make the buttons be on top of others and you want to bind up and down key presses to move around the new structure of buttons, well that's totally doable with this engine with the use of some special functions, there's just small considerations that you have to take in mind when handling with them.