Skip to content

Allow override.cfg to add autoloads to the front of the list.#113078

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
bruvzg:proj_ov_aload_front
Dec 1, 2025
Merged

Allow override.cfg to add autoloads to the front of the list.#113078
akien-mga merged 1 commit intogodotengine:masterfrom
bruvzg:proj_ov_aload_front

Conversation

@bruvzg
Copy link
Member

@bruvzg bruvzg commented Nov 23, 2025

Necessary to support mod loader after #111909

Allows to add autoload_prepend section in the override.cfg with autoloads to load before default project autoloads.

[autoload_prepend]
AutoloadOverride="*res://autoload_override.gd"

Bugsquad edit:

@bruvzg bruvzg added this to the 4.6 milestone Nov 23, 2025
@bruvzg bruvzg requested a review from a team as a code owner November 23, 2025 13:12
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and approach make sense to me.
Before merge, we should confirm that this would be a desirable resolution for mod loader authors.

@Qubus0
Copy link

Qubus0 commented Nov 23, 2025

Yes, with the removal of --script this is the only way to get a clean entrypoint.

This even removes the need to parse the existing project settings to avoid overriding the existing ones, so it's an even cleaner solution than before, and might remove the need to use gdre for injection entirely.

Awesome 💙

closes godotengine/godot-proposals#6137

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

It's not very discoverable so this should be documented.

@akien-mga akien-mga merged commit a2df354 into godotengine:master Dec 1, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@FeldrinH
Copy link

FeldrinH commented Dec 1, 2025

Yes, with the removal of --script this is the only way to get a clean entrypoint.

Wait, is --script getting removed? Why?

@Qubus0
Copy link

Qubus0 commented Dec 1, 2025

Security ig. Check the linked #111909 . Not removed completely but you'd have to custom compile to enable it as far as I understand which is pretty much removal

@Ivorforce
Copy link
Member

Ivorforce commented Dec 1, 2025

Please note that the option is only removed for release builds / exported games. Editor builds continue to support --script.

@FeldrinH
Copy link

FeldrinH commented Dec 1, 2025

Security ig. Check the linked #111909 . Not removed completely but you'd have to custom compile to enable it as far as I understand which is pretty much removal

That didn't really clarify the motivations for me. If you can still load custom scripts using override.cfg then how does disabling --script provide extra security?

@Qubus0
Copy link

Qubus0 commented Dec 1, 2025

it doesn't. unless you also disable override.cfg on project export. and hope no one just replaces the .pck (that would have been my next approach to add modding back). and that the game doesn't use resources to save/load. but that was still the intent even if perhaps not the result.

but i have a feeling the minds were already made up on that topic, so imo it's best to salvage the modding approaches and rather run with this than nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants