-
Notifications
You must be signed in to change notification settings - Fork 44
Config JSON
ModLoader supports config files in the JSON format.
Custom configs can be added by users, to a folder named configs (res://configs).
They are named by the mod ID (eg. AuthorName-ModName.json).
See get_mod_config in API Methods for usage in the code.
Mod developers can include default settings in a mod's manifest.json file, via extra.godot.config_defaults.
If a mod uses get_mod_config when no custom JSON file exists, that mod's default settings will be used instead (returned as data). This works whether you're using key or not.
{
"extra": {
"godot": {
"config_defaults": {
"foo": "bar"
}
}
}
}A user's custom config file can use these special settings, in addition to a mod's own settings.
If specified, their config is loaded from the specified file, instead of the file named after the mod ID.
The load_from JSON file should be in the same directory, and include the file extension, eg:
{
"load_from": "my-special-config.json"
}This allows users to multiple config files for a single mod and switch between them quickly. This settings is ignord if the filename matches the mod ID, or is empty.
Warning
This documentation has moved!
You can find it here: https://wiki.godotmodding.com/
- Home
- Getting Started
- ModLoader API
- Reference
- Guides
- Versions & Releases