Is Godot a good engine if I want people to mod my game

I’ve been thinking about making a life sim, and obviously want people to be able to mod it.
This is important to do at the start of the creation of course.
So I was wondering if Godot is a good engine for making a game that is freely moddable.

In the docs (Exporting packs, patches, and mods — Godot Engine (3.1) documentation in English),
it gives the following as an option:

The developer uses Godot to build a GUI tool for adding their exact API content to a project. This Godot tool must either run on a tools-enabled build of the engine or have access to one (distributed alongside or perhaps in the original game’s files). The tool can then use the Godot executable to export a PCK file from the command line with OS.execute(). It makes the most sense for the game to not use a tool-build though (for security) and for the modding tools to do use a tool-enabled engine build.

Is this comparable to how Smapi activates mods for Stardew Valley?

(I’m using this as an example based on how easy it is to mod Stardew with Smapi, and I want the modding of my game to work practically the same. )

In other words, could I make a app in Godot that reads for json files and executes commands stored in them to run a mod if the game is launched with that specific app, while the content of the game remains the same as the base game if the main launcher is used?
Practically a Smapi for my own game

If so, how hard is it to make an app like this?

I want players to be able to freely mod things like textures, in game text, npc behaivior, etc…
Or add to the content itself, by adding npc’s items, or events.

The data for the main game, (like events, and dialogue) will be stored in JSON for ease of access, and moddibility. (like in Stardew)

Is Godot a good engine for this, or am I better off using another one?

1 Like

Yeah, Godot works well for modding. I haven’t built this myself, but I’ve seen it done with resources. I’d suggest splitting the app into two parts.

Make two executables: one for the main game (YourGame.exe) and another for the mod loader (ModLoader.exe), similar to SMAPI. The loader should scan the Mods/ folder for .pck files, which is Godot’s package format. Then use ProjectSettings.load_resource_pack() to load them and launch the main game.
For the main game, design it to read from JSON or resources that mods can override. That way modders can replace or extend content without touching the core game.

Godot has a few things that help with modding. pck files let players share mods as simple packages. The load_resource_pack() function can dynamically load mod content at runtime. And GDScript is pretty easy for modders to learn, so they can write scripts without too much trouble.
I haven’t tried this exact setup, but it should work. Worth experimenting with if you want to add modding support.

2 Likes

Since the docs you shared are for Godot 3, do you plan to use that instead of Godot 4?

Accidentally picked the wrong version of the docs.
the 4.5 version ( Exporting packs, patches, and mods — Godot Engine (stable) documentation in English ) suggests the same approach though.

You should do some testing before deciding the project structure, make sure you know how everything works.

If you use resource packs for mods/patches, you won’t be able to use Autoloads, since they are the first things loaded when the game starts. There’s no time to update/modify them with a resource pack, you’ll have to manually implement them or find an alternative.