User-Friendly Mod Names API
How to Implement
Section titled “How to Implement”To give your mod a custom display name, simply define a public get_mod_name() function in your mod’s main script (the script that extends Node and is loaded by ModLoader).
Example (mod_main.gd)
Section titled “Example (mod_main.gd)”extends Node
# ... your existing code ...
## API: Returns the user-friendly name of this modfunc get_mod_name() -> String: return "My Awesome Mod"How it Works
Section titled “How it Works”When the “Mod Manager” tab is built:
- It iterates through all active mods.
- It attempts to find the main instance of your mod in the
ModLoadersystem. - It checks if your main instance has a method called
get_mod_name. - If found, it calls this method and uses the returned String as the display name.
- If not found, it falls back to the name defined in your
manifest.json.
Best Practices
Section titled “Best Practices”- Keep the name concise.
- You can include versioning if you want, but the list already displays the version number from the manifest automatically.
- This is purely visual and does not affect Mod IDs or dependencies.