Allow overriding autoload order via override.cfg (to make modding for Godot games better) #6137
Replies: 2 comments 1 reply
-
If we can come to a conclusion on how to implement it, I am completely willing to give it a try myself, even though i've never done something like this before - but that's just experience waiting to be gathered, right? ;) |
Beta Was this translation helpful? Give feedback.
-
Assigning an autoload to null and assigning it again allows you to change it's order, e.g. [autoload]
Auto1=null
MyAuto="*res://myauto.gd"
Auto1="*res://auto1.gd" This won't work if you're using a ConfigFile, though because setting to null removes the key instead of creating a null entry. |
Beta Was this translation helpful? Give feedback.
-
As mentioned in this issue #71589 in the main repo
Recap:
Overriding autoloads with an override.cfg ignores the order set in the override. Newly defined autoloads are always loaded last.
Why does this matter? I'm trying to (co-)create a mod loader that works with any Godot game. The loader itself is an autoload. Using the override.cfg, we can 'install' it into a game without having to touch or modify its source code. The loader always being last limits the capabilities for extending existing autoloads heavily.
The details of the issue were very well explained by @akien-mga, including an idea
A change like this will probably be the easiest to implement, but other ways of "inserting" an autoload (or any script that can run before everything starts) into an existing game would be greatly appreciated.
Let me know what you think
Beta Was this translation helpful? Give feedback.
All reactions