Releases: GodotModding/godot-mod-loader
Godot 4.x - v7.0.1
Godot 4.x - Major release v7.0.1
This release marks a significant milestone, as it signifies more than two years of effort to support Godot 4! Below, you will find installation instructions and a detailed overview of all merged pull requests that followed.
This release is compatible with Godot versions 4.1 through 4.3. Moving forward, we plan to provide dedicated releases for each Godot feature update. This will help reduce the need for backward compatibility trade-offs and allow us to better support each version.
Installation
Note
This release is targeted towards integration! We're actively working on improving the self-setup process,
and we are grateful for anyone willing to test the current version. Your help means a lot to us!
Godot Project Setup
Mod Loader Self Setup
Addressing class_name
With Hooks
The most glaring issue of the 4.x ModLoader is extending a file using a class_name
statement. For more info, see: #315. As a workaround, we introduce hooks—with major thanks to everyone who contributed to resolving this long-standing issue. See the fantastic PR by @KANAjetzt, @Qubus0, and @pirey0 in #408.
🚨 Breaking Changes
- Removal of
append_node_in_scene
andsave_scene
forrefresh_scene
andextend_scene
by @KANAjetzt in #378 steam_workshop_enabled
has been replaced byload_from_steam_workshop
by @KANAjetzt in #399- The
MOD_CONFIG_DIR_PATH
has been changed fromuser://configs
touser://mod_configs
by @KANAjetzt in #480 ModLoaderModManager
has been entirely removed by @KANAjetzt in #540
Key PRs
- 4.x branch update to 6.0.2 version by @MateuSai in #333
- refactor: ♻️ doc comments for all function and class descriptions by @KANAjetzt in #397
- Feat zip peeking by @Qubus0 in #416
- test: 🧪 Ported tests to 4.x @KANAjetzt in #434
- feat: ✨ support async hooks for methods using await by @KANAjetzt in #470
- refactor: ♻️ mod loading refactor by @KANAjetzt in #485
- Feat: Logging without store by @Qubus0 in #500
- refactor: ♻️ new self setup for Godot 4 by @KANAjetzt in #507
- refactor: ♻️ 4.1 support by @KANAjetzt in #508
- Doc comment standardization by @Qubus0 in #542
Enhancements
- feat: Allow both workshop and local mods to be loaded by @cgytrus in #369
- feat: ✨ added refresh_config_data() and
refresh_current_configs()
by @KANAjetzt in #374 - feat: ✨ add
has_current_config()
andhas_config()
by @KANAjetzt in #375 - feat: script extensions sorter checks load order by @KANAjetzt in #382
- feat: ✨ store the mod source in
ModData
by @KANAjetzt in #387 - feat: ✨ added
steam_id
toml_options
by @KANAjetzt in #388 - feat: ✨ added
steam_workshop_id
toModManifest
by @KANAjetzt in #393 - feat: ✨ added
is_mod_active
toModLoaderMod
by @KANAjetzt in #398 - refactor: ♻️ log the prefix on errors by @KANAjetzt in #400
- refactor: use truthy values in dictionaries used as hashsets by @Qubus0 in #422
- refactor: don't inline is_func_moddable by @Qubus0 in #423
- refactor: ♻️ updated
hook_pre_processor
reference by @KANAjetzt in #424 - style: 🔥 removed
%
from hook template string by @KANAjetzt in #428 - feat: disable hook check when not needed by @Qubus0 in #429
- feat: split off verbose hook preprocessing by @Qubus0 in #430
- test: add new gut test cases for the hook preprocessor by @Qubus0 in #432
- style: ✏️ Changed MOD_LOADER_HOOKS_START_STRING by @KANAjetzt in #433
- feat: ✨ param and return manipulation for mod hooks by @Qubus0 in #436
- feat: ✨ allow installing hooks from a file like extensions by @Qubus0 in #440
feat: ✨ param and return manipulation for mod hooks by @KANAjetzt in #469(fixes merge of #440)- fix: 🚑 remove whitespace after
_ModLoaderHooks.call_hooks
by @KANAjetzt in #474 - feat: ✨ detect and handle hooks for async methods by @Qubus0 in #475
- test: 🧪 added tests for
.process_script()
by @KANAjetzt in #476 - refactor: ♻️ use
ModLoaderOptionsProfile
instead ofDictionary
by @KANAjetzt in #532 - refactor: use GDRE for self setup by @KANAjetzt in #533
- feat: per method hooks by @Qubus0 in #534
- feat: ✨ options for game version validation by @KANAjetzt in #536
- feat: new editor-only log type for dev hints by @Qubus0 in #538
- feat: ✨ added
load_from_unpacked
option by @KANAjetzt in #541
Bug Fixes
- fix: 🐛 fixed
get_global_class_list
by @KANAjetzt in #344 - fix: non-static func call on
InheritanceSorting
by @MateuSai in #363 - fix: using static
DirAccess.get_open_error()
on null by @cgytrus in #366 - fix: dependencies not loading correctly if disabled by the user profile by @cgytrus in #367
- fix: config MD5 check by @cgytrus in #368
- fix: startup crash in log.gd by @cgytrus in #370
- fix: Fix app_id loading error by @cgytrus in #371
- fix: 🐛 fix indentation in
handle_script_extensions
by @KANAjetzt in #372 - fix: 🐛 fixed missing script parent path by @KANAjetzt in #383
- fix: 🐛 crash if no scene instance is returned by @KANAjetzt in #392
- fix: 🐛 wrong var name by @KANAjetzt in #395
- fix: broken TranslationServer when added translation fails to load by @pirey0 in #414
- fix: Use counter instead of stack in get_closing_paren_index() by @Qubus0 in #420
- fix: 🐛 fixed super fixing by @KANAjetzt in #425
- fix: proper logging of empty Array() by @Qubus0 in #431
- fix: hooks argument order, hook check by @Qubus0 in #435
- fix: 🐛 Take resource remapping into account by @KANAjetzt in #482
- fix: 🐛 fix
\
breaking function declaration by @KANAjetzt in #486 - fix: 🐛 match
\
and new line by @KANAjetzt in #492 - fix: 🐛 check if a method is already hooked by @KANAjetzt in #493
- fix: 🐛 match any character between func name and
(
by @KANAjetzt in #495 - fix: 🐛 don't remove new lines in
param_string
by @KANAjetzt in #497 - fix: 🐛 resolved parser error because of missing return value by @KANAjetzt in #498
- fix: 🐛 continue if no
func_def
is found by @KANAjetzt in #511 - fix: 🐛 return detection by @KANAjetzt in #515
- fix: 🐛 check for -> void by @KANAjetzt in #518
- fix: 🐛 moved default profile creation to
_init()
by @KANAjetzt in #530 - fix: 🐛 log spam on tool scripts by @KANAjetzt in #543
- fix: 🐛 use
reader.get_files().has()
before 4.2 by @KANAjetzt in #545
New Contributors (to the 4.x branch)
- @MateuSai made their first contribution in #333
- @cgytrus made their first contribution in #371
- @pirey0 made their first contribution in #414
Full Changelog: v6.0.2...v7.0.1
Godot 3.x - v6.3.0
Godot 3.x - Minor Release v6.3.0
Minor update to fix issues with script extension sorting, as well as potential issues with translations, configurations, and user profiles.
Installation
Godot Project Setup
Mod Loader Self Setup
Key PRs
- feat: script extensions sorter checks load order #357
- feat: log name wildcards #358
- fix: broken TranslationServer when added translation fails to load (#… #520
- feat: Add
rename_profile()
toModLoaderUserProfile
#352
Change Log
New Features
Fixes
v6.2.0 - Godot 3.5+
Minor Release v6.2.0
In this update, we introduce a new feature for game developers to set Mod Loader options in a more flexible way. The new option system allows for configurations based on feature flags, enabling different settings for the mod loader depending on the context, such as the editor or published game builds.
Pull Requests
New Features
Refactors
- refactor: ♻️ demote log messages by @KANAjetzt in #330
Full Changelog: v6.1.0...v6.2.0
v6.1.0
Minor Release v6.1.0
This update addresses a performance issue related to the new script extension sorting introduced in v6.0.0. It also includes a refactor of the mod_main.gd
initialization to no longer require the modLoader
parameter in the _init()
function.
🚨 Breaking Changes
Please note that this update may break mods that still rely on the modLoader
argument in their _init()
function. To mitigate this, a fallback and deprecation warning has been implemented that passes self
as an argument if any arguments are detected in the mod_main.gd
_init()
function.
Pull Requests
New Features
- feat: Implement a cache of script inheritence by @boardengineer in #314
Refactors
Chores
- chore: ⬆️ update version const for v6.0.3 by @KANAjetzt in #320
- chore: ⬆️ update version const for v6.1.0 by @KANAjetzt in #325
Other Changes
- ci: ♻️ no longer ignore the main branch by @KANAjetzt in #323
Full Changelog: v6.0.2...v6.1.0
v6.0.2
Patch v6.0.2
This patch addresses an issues related to the new user profiles introduced in v6.0.0. It also includes an update for the manifest validation.
See the Patch Notes v6.0.0 for a full list of changes made with the latest major update.
🚨 Breaking Changes
Additionally to the breaking changes listed for v6.0.0
It may break mods that have the same mod_id
listed in both optional_dependencies
and dependencies
or load_before
and incompatibilities
. However, since the optional_dependencies
and load_before
feature was introduced in v6.0.0, it is highly unlikely that such conflicts exist.
Pull Requests
Bug Fixes
- fix: 🐛
ModData
init and uninstall detection by @KANAjetzt in #307
Validation
- refactor: ♻️ unique ids
optional_dependencies
-dependencies
by @KANAjetzt in #308 - refactor: ♻️ unique ids
load_before
-incompatibilities
by @KANAjetzt in #312
Other Changes
- chore: ⬆️ update version const for v6.0.2 by @KANAjetzt in #309
- v6.0.2 by @KANAjetzt in #310
Full Changelog: v6.0.1...v6.0.2
v6.0.1
Patch v6.0.1
This patch addresses several critical issues related to the new user profiles introduced in v6.0.0. It also includes a deprecation warning fix, small code style improvements, and an improved README for the ModLoader repository.
See the Patch Notes v6.0.0 for a full list of changes made with the latest major update.
🚨 Breaking Changes
Additionally to the breaking changes listed for v6.0.0
Mods are now always unpacked and loaded into ModLoaderStore.mod_data
. This change can potentially break Mod Lists that rely on having only loaded mods in mod_data
. Consequently, these Mod Lists may display mods that are currently not loaded. To address this issue, authors of Mod Lists need to adapt their code to check the new is_active
flag.
Pull Requests
Bug Fixes
- 🐛 added missing
static
(#291) (0434f74) - 🐛
current_user_profile
reference touser_profiles
(#293) (3228cb2) - 🐛 check if mod zip is structured correctly (#303) (8327385)
- 🐛 Fix ModLoaderUtils log deprecation using
ModLoader.*
(#300) (54018b2)
Refactors
- ♻️ reworked disabling mods via user profile (#297) (21dea2a)
- ♻️ reworked mod uninstall detection (#298) (ee7312a)
- ♻️ lowered the log level from fatal to error (#304) (4bad0c1)
Style
Other Changes
6.0.0 - Major New Features & Breaking Reworks
Major New Features
Most notable features of this release:
Steam Workshop Support
- ModLoader now has native support for Steam Workshop!
- Special thanks to Blobfish, the developer of Brotato, for layout the groundwork for workshop support.
- Game developers might also like to try Blobfish's mod uploader, Godot Workshop Utility, which was recently updated to support tags.
- More info: #148
New Config System
- Every mod now has its own config JSON file, with a robust system behind the scenes that allows for precise data validation.
- There are lots of new methods for interacting with a mod's configs, enabling modders to create powerful GUIs to alter and save them.
- More info: #237
User Mod Profiles
- User profiles let you decide which mods you want active, letting you swap between different sets of mods as needed.
- More info: #214
Runtime Mod Disabling
- You can now enable or disable mods while running a game!
- This was one of the most requested features, and we're delighted to now support it!
- More info: #203
Inheritance Checks for Script Extensions
- Installing a script extension now follows the parent/child hierarchy correctly, which fixes a roadblock many mods have faced.
- You might never notice this, but it's a much-needed improvement that allows modders to edit a lot more scripts.
- More info: #124, #277
ModLoader Options
- A new panel in the editor lets you tweak lots of settings, to help you develop mods faster and easier. Notable options include:
- Enable/disable all mods.
- Disable certain mods (this lets you keep all your mods in a single project, without them interfering with each other).
- Change the log level to be more or less verbose.
- Override the paths to your mods.
- To edit them, open
res://addons/mod_loader/options
. From here, you can open options.tres in the Inspector, then click the resource name in the "Current Options" setting to expand it and edit the options. - These options also support multiple profiles, by dragging and dropping a profile resource file into the Current Options. Some examples are provided in the profiles directory.
- More info: #145, #160
Logging Changes
- Logs are now stored in memory, and have lots of new API methods via the new
ModLoaderLog
class. - This grants support for modders and developers to do things like creating terminals that display logged messages in-game, with the option to filter by log type (debug, success, info, warning, error).
- More info: #205
Known Issues
- When switching from a profile where a mod is inactive to a profile where the same mod is active, the active state of all other profiles is automatically set to active as well.
Breaking Changes
We've refactored the code to be easier to use, more robust, and give better indications of what's available for public use (everything in the api
directory) vs. what parts are strictly internal (everything else, plus any classes or methods that start with an underscore (_
).
In v6 we've also added new methods for deprecation (#156). This keeps existing mods working, but also provides a warnings if you're using an outdated method, with the warning telling you exactly which method to use instead.
View the Breaking Changes page on the wiki for more details on the changes needed in your mods.
Pull Requests
New Features
- #124 - (
f92b68d1
) ✨ Inheritance checks for script extensions - #137 - (
4399abf4
) ✨ Config JSON: Swap status codes 1 and 2 (closes #131) - #138 - (
01983b7c
) ✨ Config JSON: Only log notice for no custom JSON once - #139 - (
0c304075
) ✨ Addcode_note
func, and use it to show a helpful message inlog_fatal
- #142 - (
00529d01
) ✨ Config JSON: Add API methods for saving data - #143 - (
0a56d516
) ✨ Utility: Add 2 funcs for saving data to files - #145 - (
e01a5d5d
) ✨ ML Options: Add the groundwork for loading custom options - #148 - (
b4d31bcf
) ✨ Workshop Support - #149 - (
3f35b8c9
) ✨ Uncommentcode_note
code in file saving API methods - #156 - (
61132ddf
) ✨ API: Add methods for deprecation + API Folder - #160 - (
eaf52c2b
) ✨ Options: Add option to skip mods by mod ID - #162 - (
90bd4c61
) ✨ Addedget_as_dict()
function to ModManifest Class - #172 - (
4f2ea000
) ✨ ModLoaderStore: New singleton to store data - #175 - (
09cf37e9
) ✨ ModManifest - Addedto_json()
function - #185 - (
7649406a
) ✨ added load_before - #188 - (
ea7e5389
) ✨ Added optional dependencies - #194 - (
28ce51b3
) ✨ Added validation forload_before
- #195 - (
c0a5624f
) ✨ added_reset_extension
- #198 - (
f11fb718
) ✨ added_remove_extension
- #203 - (
d3c35cfe
) ✨ Mod reloading - #205 - (
a14a6325
) ✨ Store Logs + refactor: ♻️ Logging - #207 - (
f8185e05
) ✨ Option to skip deprecated fatal error - #210 - (
f64d8df5
) ✨ Addedonly_once
parameter to all log funcs - #214 - (
b9ad9a5c
) ✨ Add user profiles - #222 - (
36472bb2
) ✨ AddedModLoaderDependency
Class
Bug Fixes
- #134 - (
3c19fddf
) 🐛 Validation: Don't allow mods to include themselves as dependencies or incompatibilities - #168 - (
6f9068b8
) ✏️ Fix typo hypen -> hyphen - #176 - (
8f669f09
) ✏️ Fix typo:improt
->import
- #183 - (
40ae4f18
) 🐛 Circular dependency check - #184 - (
93e6cab4
) 🐛 Continue check if circular dep is detected - #201 - (
41b1801c
) 🐛 Self setup chicken and egg problem - #202 - (
80fea721
) 🐛 Check for min length 3 in namespace and name - #215 - (
34bcb833
) 🐛 Check if a modis_loadable
- #234 - (
a8b22394
) 🐛 WrongUNPACKED_DIR
reference - #235 - (
97eda11f
) 🐛 Fix wrong function call - #276 - (
8f030b2
) 🐛 Always use warnings for deprecations in standalone builds - #276 - (
286f296
) 🐛 Transitive Comparator for script sorting - #278 - (
90334fc
) 🐛 log stack only saved for logged_messages.all
...
v5.0.1
Features
Major
- ModLoader can now be automatically installed (see #75 and #89, and #8 for more context)
- Overwrites have a dedicated file, overwrites.gd (see #14 and #74)
Minor
- Code style overhaul: The code is now cleaner and easier to read, and follows Godot's style guide
- The mods.log file is now handled similarly to godot.log, with new versions being created and removed as needed (see #100)
- Lots of validation improvements
Breaking Changes
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
Full Change List
- Improve static typing and style #69 by @Qubus0
- upgrade semver validation to disallow leading zeros and overly long versions by @Qubus0 in #71
- Fix missing logging in mod manifest by @Qubus0 in #72
- fix mods dir path not being overridden by @Qubus0 in #76
- Self setup by @Qubus0 in #75
- Improve static typing and style by @Qubus0 in #69
- fix type inference of game_mod_folder_path by @Qubus0 in #77
- remove run.gd, as it's no longer needed by @Qubus0 in #78
- Add overwrite functionality by @KANAjetzt in #74
- Fix typo with
modloaderutils
by @ithinkandicode in #84 - Fix lint issues by @ithinkandicode in #85
- Fix typo in
_handle_missing_dependency
by @ithinkandicode in #90 - Add version constant by @ithinkandicode in #93
- Project binary injection by @KANAjetzt in #89
- Fix global class registration by @Qubus0 in #95
- Assert modloader is first autoload by @ithinkandicode in #96
- Validate dependencies and incompatibilities by @ithinkandicode in #91
- --only-setup cli arg by @KANAjetzt in #94
- store log backups and rotate them like godot by @Qubus0 in #100
- Reduce manifest.json debug log length by @ithinkandicode in #101
log_fatal
- add the missing log to file by @ithinkandicode in #102- --setup-create-override-cfg cli arg by @KANAjetzt in #99
- Utils for ModLoader autoload position by @KANAjetzt in #104
- fix: properly parse all types of command line arg values by @Qubus0 in #103
- Check modloader autoload position on setup by @KANAjetzt in #105
- Downgrade the missing
mods
dir error to a warning by @ithinkandicode in #107 - Config JSON Tweaks by @ithinkandicode in #108
- ✔ added checks for override.cfg setup by @KANAjetzt in #110
- Validate file exists for
add_translation_from_resource
by @ithinkandicode in #118 - v5.0.1 by @KANAjetzt in #123
Full Changelog: v4.1.0...v5.0.1
v4.1.0 - Fixes and minor improvements
Includes a few fixes and small improvements to the code. Major work is now being done on the develop
branch, so this might be the last major release for a little while, aside from potential bugfixes.
What's Changed
- Add counts for debug purposes by @otDan in #65
- smaller fixes for utils json as dict by @Qubus0 in #66
- add command line arg to ignore specific log names by @Qubus0 in #67
- fix validating mod dir name by @Qubus0 in #68
- fix log-ignore flag by @Qubus0 in #70
Full Changelog: v4.0.0...v4.1.0
v4.0.0 - Major Refactor
ModLoader has been refactored by @Qubus0. See PRs ##60, #62, and #63 for details.
Refactor
The refactor has split the old single file of mod_loader.gd into 4 files:
Filename | Description |
---|---|
mod_loader | Same as before: The main entry point that sets up mods. Loads mod data to the virtual filesystem, loops over them, and initialises them. |
mod_data | Stores and validates all Data required to load a mod successfully. If some of the data is invalid, [member is_loadable] will be false. |
mod_manifest | Stores and validates contents of the manifest (ie. Author-ModName/manifest.json). |
mod_loader_utils | All utility funcs have been moved to here, including logging and getting CLI args. |
Breaking Changes
- 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. The following changes will be needed in your mods:
ModLoader.mod_log
->ModLoaderUtils.log_info
ModLoader.dev_log
->ModLoaderUtils.log_debug
- See also: Breaking changes from v3.1.0
What's Changed
- README - Migrate content to wiki by @ithinkandicode in #57
- README - Fix wiki links by @ithinkandicode in #59
- Move mod_loader into an addon folder by @Qubus0 in #50
- Serialize into ModData and ModDetails by @Qubus0 in #60 (major change)
- Split off logging and utils by @Qubus0 in #62
- Move other utils by @Qubus0 in #63
- Minor fixes to
manifest
by @ithinkandicode in #64
Full Changelog: v3.1.0...v4.0.0