How to set defaults for scalability settings in a config file?

I have managed to get my GameUserSettings to use defaults from “DefaultGameUserSettings.ini” in the Project/Config/ folder.

For example, the frame rate limit:
[/Script/Engine.GameUserSettings]
Version=5
FrameRateLimit=60.000000

And even custom settings, like this:
[/Script/Game_Module.CustomGameUserSettings]
Version=5
CustomFrameRate=60.000000

But how do I set defaults for the scalability settings, such as ViewDistance, TextureQuality and ShadowQuality. I know these exist within this struct UGameUserSettings::FQualityLevels, but which Config file (if any) do the default values read from? And can I modify them?

The file you looking for is DefaultScalability.ini. It doesn’t present by default, so you have to get template from somewhere. Maybe from engine? Get Engine/Config/BaseScalability.ini and copy it into your project with proper name

1 Like

I did briefly look into DefaultScalability.ini, but I thought in that file you defined the different settings for each Scalability level?

In BaseScalability.ini it looks something like this:

[AntiAliasingQuality@0]
r.FXAA.Quality=0

[ViewDistanceQuality@Cine]
r.SkeletalMeshLODBias=0

I am looking for a way to define which level is used as the default. So, something like this:

[/Script/Game_Module.CustomGameUserSettings]
Scalability.ViewDistance=2
Scalability.TextureQuality=1

Something to let me configure the actual defaults the engine / game loads on startup. Is this possible? Or would I have to define my own custom variables and override whatever the engine loads?

So, after looking through how ScalabilityQuality levels are saved / loaded, I have a much clearer idea of how it actually works under the hood. Essentially these levels are loaded from different files in editor than in packaged builds.

In editor there is a temp save file somewhere along the lines of “%AppData%/UnrealEngine/VersionNumber/Config/EditorSettings.ini”. Which is then used for these settings in this menu here:

But when in a packaged build, default values are read from Project/Config/DefaultGameUserSettings.ini and can be set like this:

; These values are not used when in editor, only in packaged builds as the default values
; Our default values are currently set to High(2) for every quality setting
[ScalabilityGroups]
sg.ResolutionQuality=2
sg.ViewDistanceQuality=2
sg.AntiAliasingQuality=2
sg.ShadowQuality=2
sg.GlobalIlluminationQuality=2
sg.ReflectionQuality=2
sg.PostProcessQuality=2
sg.TextureQuality=2
sg.EffectsQuality=2
sg.FoliageQuality=2
sg.ShadingQuality=2
sg.LandscapeQuality=2

TLDR; You won’t see the default ScalabilityQuality levels loaded when testing in editor, but will see them used when creating a packaged build. Only the defaults, not any user-set values.