How do I deal with Project Settings during gameplay?

Godot Version

4.4.stable

Question

I’ve been working on a settings menu for my game. I initially had a script that used ProjectSettings.set_setting() to set settings within Godot’s Project Settings, but most of them are only read at project start. Is there any standardized way to change these settings during gameplay, or should I just rely on figuring it out? And is every setting only read at project start, or only some?

Most settings are only read on project start, you can read more about each setting in the documentation with F1, or by right clicking the setting in your project settings and picking “Open Documentation”, the docs will usually point you in the direction of the actual setting that is changed.

1 Like

I think ProjectSettings is meant to be used only on the editor, not for actual game settings stuff (like BGM volume). That’s up to you to implement. My approach was to have a SaveDataManager to load game settings and progress as an object and to save them as a single json file in the user data folder. I was OK with the user modifying that file, so I didn’t implement any anticheat measures. If you want to take a look at that code, check my Github: portobello/autoloads/save_data_manager.gd at main · pyramid-seph/portobello · GitHub

2 Likes

Got it! I’d imagine I should still use ProjectSettings to adjust the things that can’t otherwise be adjusted though? Otherwise I think I will do thing myself then.

Thanks for the tip, I see some of them specify what they change, but not all. Any idea how to find out what they do if they don’t specify in the description?

Tough to say without examples. Such as the Window Borderless option doesn’t have a good description in the docs, so I would use F1 to search for borderless since I know it’s not a common term, and it does pop up as a Window property.

I’ll use that technique for now, thanks! I think a concise shortcut at least would be nice, perhaps I’ll make an issue for it.