Reset value variable set by console command / Read default scalability settings from C++

Ok, I found a way to change it. This is how the order is applied to the console settings:

ECVF_SetByConstructor = 0x00000000,

ECVF_SetByScalability = 0x01000000,

ECVF_SetByGameSetting = 0x02000000,

ECVF_SetByProjectSetting = 0x03000000,

ECVF_SetByDeviceProfile = 0x04000000,

ECVF_SetBySystemSettingsIni = 0x05000000,

ECVF_SetByConsoleVariablesIni = 0x06000000,

ECVF_SetByCommandline = 0x07000000,

ECVF_SetByCode = 0x08000000,

ECVF_SetByConsole = 0x09000000,

What I was doing was using UWorld::Exec / APlayerController->ConsoleCommand, and they both use flag SetByConsole, so when I changed the Scalability settings it used the flag SetByScalability, so the specific settings I changed manually were not updated because of the priority.

What I ended doing was setting the value manually using the flag SetByGameSetting. Here the example for MotionBlur:

// That sets specifically the motion blur
static auto CVar = IConsoleManager::Get().FindConsoleVariable(“r.MotionBlurQuality”);
CVar->Set(value, ECVF_SetByGameSetting);

If instead of r.MotionBlurQuality you use sg.PostProcessQuality you change all the settings (including motion blur).

I hope this could help to someone.

1 Like