Skip to content
Doink Oink edited this page Sep 10, 2025 · 19 revisions

Initial Mod Setup

First create your script file that be used to create and manage your config files. In this example we will name it ExampleModConfig.gd

  • While you can do this in your Main.gd script I recommend creating a separate file to keep it clutter free
  • Make sure to place extends Node at the top of the script

ExampleModConfig.gd

extends Node

func _ready():
    pass

mod.txt Autoload

Add your config file to the mod.txt file under the [Autoload] section. This allows the script to be ran as the game first loads so your config file can be created/loaded before anything accesses it.

  • Make sure the path has the correct folder structure to point to the script just like your Main.gd script

mod.txt

[Autoload]
ExampleConfig="res://ModConfigruationMenu/ExampleModConfig.gd"

MCM_Helper File

MCM_Helper.gd is the main file you as a mod author will be using to register your config file with MCM.

Referencing the MCM_Helper resource

In order for you to register your mod with MCM you must load the MCM_Helpers.tres file. To do this place this line at the top of your script below the extends Node line: var McmHelpers = preload("res://ModConfigurationMenu/Scripts/Doink Oink/MCM_Helpers.tres")

ExampleModConfig.gd should now look like this

extends Node

var McmHelpers = preload("res://ModConfigurationMenu/Scripts/Doink Oink/MCM_Helpers.tres")

func _ready():
    pass

Class variables

Creating your config file in the _ready() method

The available config values

Saving your config file

Registering your mod and associated config files with MCM

Handling configuration updates by the player

Clone this wiki locally