2 Godot Mod Loader Mods
Ohthatguy43 edited this page 2026-02-19 06:18:29 +02:00

Overview

GML (or Godot Mod Loader) mods are ZIP files that modifies the game via Script Extensions, Script Hooks and overwriting vanilla files. You can modify almost every file of the game by extending its scripts or overwriting its files, being able to add your own stuff to the game too, like scripts, scenes, shaders and resources. GML is special because it allows more than one mod to be used at a time and doesn't require you to patch your game's .pck file!

NOTE: Some mods can break others due to what and how they modify a resource or object, making some mods not totally functional with each other.

SMB1R Screenshot
Example of a mod made for SMB1R using GML.

They contain a simple name structure: 'AuthorName'-'ModName', and inside these files there will always be a folder called mods-unpacked, this is essencial for the Mod Loader to find the mod.

It is highly recommended for you to check the official Godot Mod Loader wiki for more information. https://wiki.godotmodding.com/


Installing GML Mods

In order to install GML mods, do the following:

  • Download the ZIP file for the mod you want to use. Do not unzip the file!
  • If the file doesn't have the name structure like in the image below, the mod might be inside the ZIP file you downloaded.
  • Create a folder named mods in the same file path as the SMB1R.exe file.
  • Place the ZIP file for the mod you wish to use into the mods folder.

There are mods that may have additional steps. If the mod requires another GML mod, a resource pack or a custom character to work, follow the steps on how to install those.

SMB1R Screenshot
How the "mods" folder files structure should look like.

If you followed these steps correctly, a file called mod-hooks.zip may have been created in the same file path as the SMB1R.exe file. If so, you have successfully installed a GML mod and is prepared to be used next time you open the game!

The mods are loaded in alphabetical order, except if a mod asks to load some mod before it.


Uninstalling GML Mods

It can happen that you don't want to use a mod or it doesn't work for a specific version of the game. If you want to preserve the mod file in some way, move the file outside the mods folder and delete the mod-hooks.zip. This will make the mod loader not find the mod and make the game run without it.


Creating GML mods

In order to start modding the game using GML, do the following:

  • Download the game's source code through the green Code button, then, press the Download ZIP button. Now, to open the project, follow the steps in the "Importing for editing" section of the README.

  • Inside Godot, with the project opened, in the top part of the screen, you will see six tabs. The one you will use now is the Mod Tool tab.

SMB1R Screenshot
Tabs as they should look like in the editor.
  • Press Add Hooks to all Scripts, pressing it will make a window appear.

  • In this window, press Generate mod hooks, it will take a while but shouldn't give you any errors if you didn't messed with anything yet, when it finishes, press Restart Now when the window for it appears.

This will save you a lot of time when hooking scripts, as it will convert every script to hooked ones.

  • After the project reloads, press Create new Mod and fill the information it asks you.
SMB1R Screenshot
The mod creation window.

For the mod template, the default one will contain most of the information you need to know about before start modding, if you are experienced enough, you can start using the minimal template, this one will contain less things, but makes starting the job quicker.

  • After making the mod, in the res: directory in FileSystem, find a folder named mods-unpacked, this is where your mod's folder is. Open its mod_main.gd file if it isn't already open.
  • Inside the file, replace the strings in the constants MOD_DIR" and LOG_NAME: "AuthorName-ModName" by the mod's folder name, don't delete the :Main part if a string contains it.
SMB1R Screenshot
Change to look like something like this. Remember, this is just an example.

NOTE: Always open this file before making anything for the mod. This makes sure all changes appears in the script and will be ran by the Mod Loader.

  • If you are using the default template, you will need to delete the example lines inside the mod_main.gd script, because if you don't, the game will crash at start up. Follow the image:
SMB1R Screenshot
Delete the marked ones.

From here, you are all set to start modding Super Mario Bros. Remastered! Keep in mind that testing in the Godot editor and on an exported copy of the game can bring different results depending on what it will change, watch out for any uncaught errors.

Manifest.json

This file is responsable to hold all information about your mod, it can also control mods priority, dependencies and incompatibility. For right now, this file is not used in-game, but the Mod Loader possibly uses this file for mods sorting.

To edit this file, open it with a text editor, or in Mod Tool > Manifest Editor.

If you are editing in the Manifest Editor, don't forget to press Save to manifest.json. You will lose unsaved changes if you connect another mod to the Mod Tool.

Script Extensions

Script Extensions are the easiest way to modify a script, it keeps all variables, constants and methods of the original script without having to import from it, being also able to add more to it.

NOTE: As for Godot 4.x (Godot version used for the game), Script Extensions can't extend scripts with class_name, this includes Autoloads (Global, for example), only use this if you are 100% confident that it will not break anything.

  • Open the Context menu right-clicking a script file.
  • Find the option ModTool: Create Script Extension and click it.
  • Make sure the extension script path appears under the install_script_extensions method inside the mod_main.gd file.
SMB1R Screenshot
How it should appear in the "mod_main.gd" script.

For more information, please read the Godot Mod Loader wiki: https://wiki.godotmodding.com/guides/modding/script_extensions/

Script Hooks

Script Hooks are an alternative way to modify scripts, it doesn't keep anything from the original script, and it can not add anything to the script itself, and as it is a generic object, everything inside it will be reused to every node that has the same script the hook extends, unless they are resetted at the start of the methods. It is not the best, but it's efficient and can be used in any script of the game. Script Hooking works using a chain system in which goes after script extensions, because of that, you will rely on modding methods using the chain variable for everything involving the node or the SceneTree, it is always set first in all methods you're extending, using the ModLoaderHookChain class.

  • Open the Context menu right-clicking a script file.
  • Find the option ModTool: Create Mod Hook File and click it.

    If you didn't used the Add Hooks to all Scripts before, first click the ModTool: Convert script to hooked version before proceding.

  • Make sure the original script path and the script .hooks path appears under the install_script_hook_files method inside the mod_main.gd file.
SMB1R Screenshot
How it should appear in the "mod_main.gd" script.

For more information, please read the Godot Mod Loader wiki: https://wiki.godotmodding.com/guides/modding/script_hooks/

Assets Overwrite

Assets Overwrite are a powerful tool. Basically, it creates a replacement for an asset of the game, being it a .json file or an image file. In normal circunstances, overwriting is not necessary, as you can create Resource Packs to replace existing graphics of the game, but if you see any unmodifiable files, don't be afraid of using it. You can overwrite scenes and resources even if the Mod Tool says no, but it's not recommended if you want compatibility with other mods. You can't overwrite .txt files though.

  • Open the Context menu right-clicking a file that is not a scene nor a resource.
  • Find the option ModTool: Create Asset Overwrite and click it.
  • If a file called overwrites.gd was created, check if the file path is correct. Inside the vanilla_file_paths variable.
SMB1R Screenshot
How it should appear in the "overwrites.gd" script.

For more information, please read the Godot Mod Loader wiki: https://wiki.godotmodding.com/guides/modding/overwriting_game_resources/