GodotModding / GodotModding/godot-mod-loader

investigate modding preloaded resources in 4.5+

Open
#584 0 comments 0 reactions 0 assignees View on GitHub
4.5 4.x documentation investigate
Dominant language
GDScript
Stars
675
Forks
54
Avg merge
2m
Merged PRs (30d)
2

Description

this was added in 4.5

> [Troubleshooting](https://docs.godotengine.org/en/stable/tutorials/export/exporting_pcks.html#troubleshooting)
If you are loading a resource pack and are not noticing any changes, it may be due to the pack being loaded too late. This is particularly the case with menu scenes that may preload other scenes using [preload()](https://docs.godotengine.org/en/stable/classes/class_%40gdscript.html#class-gdscript-method-preload). This means that loading a pack in the menu will not affect the other scene that was already preloaded.
>
> To avoid this, you need to load the pack as early as possible. To do so, create a new [autoload](https://docs.godotengine.org/en/stable/tutorials/scripting/singletons_autoload.html#doc-singletons-autoload) script and call [ProjectSettings.load_resource_pack()](https://docs.godotengine.org/en/stable/classes/class_projectsettings.html#class-projectsettings-method-load-resource-pack) in the autoload script's _init() function, rather than _enter_tree() or _ready().

to me it sounds like this means all mods should just be able to properly replace preloaded things now. without any extra changes from our side.

just needs testing and a docs update

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.