-
Notifications
You must be signed in to change notification settings - Fork 30
Breaking Changes
This page lists any breaking changes that occur with ModLoader releases.
Restructured the ModLoader Classes, which required renaming the functions used by modders. To make these changes more visible, deprecation has been implemented. In most cases, you should be prompted with an error message if a function you are using has been renamed.
Most notably:
- ModLoaderMod now holds all modding-relevant methods, such as install_script_extension()
.
- ModLoaderLog holds all logging methods, such as error()
and debug()
, which were previously named log_error()
and log_debug()
.
Some mods directly accessed variables and constants on ModLoader
, for example mod_data
or UNPACKED_DIR
.
This has been moved to the new ModLoaderStore
. We have introduced new methods in ModLoaderMod
to access these variables. We recommend not accessing any of the variables in ModLoaderStore
directly to prevent your mods from breaking in the future.
- Fixed a bug in the
mod_id
validation where it was possible to create amod_id
with fewer than 7 characters. - Changed the mod config directory from
res://
touser://
.
New validation may make existing mods invalid:
- #71 - Disallow leading zeros and overly long versions
-
#91 - Mod IDs listed in a mod manifest's
dependencies
andincompatibilities
are now validated
- ModLoader has been moved to the
res://addons/
directory.- The new location is autoloaded in the same way the old one was, with the same file (mod_loader.gd).
- Nothing else needs to change in your autoloads. There are other new classes, but they'll be loaded automatically.
- Logging in mods is now handled via the ModLoaderUtils class, which provides a host of new logging options. See Renamed Methods below.
-
ModLoader.mod_log
->ModLoaderUtils.log_info
-
ModLoader.dev_log
->ModLoaderUtils.log_debug
-
Old | New |
---|---|
ModLoader.mod_log |
ModLoaderUtils.log_info |
ModLoader.dev_log |
ModLoaderUtils.log_debug |
- All funcs have been converted to snake_case (see table below, and PR #32 for more info)
- meta.json is renamed to manifest.json, and its required keys have changed
- See the example manifest.json for the current structure.
- See also:
REQUIRED_MANIFEST_KEYS_ROOT
andREQUIRED_MANIFEST_KEYS_EXTRA
in mod_manifest.gd
Old | New |
---|---|
installScriptExtension |
install_script_extension |
addTranslationFromResource |
add_translation_from_resource |
appendNodeInScene |
append_node_in_scene |
saveScene |
save_scene |
- Two files have been renamed:
-
ModMain.gd
->mod_main.gd
-
_meta.json
->manifest.json
-
- The structure of the manifest JSON has changed.
- See README.md for an example.
- This file was previously named
_meta.json
Home ~ Setup ~ Mod Structure ~ Mod Files ~ API Methods ~ Logging