# Advanced Graphics Settings

## Console commands

The following are some console commands that can be used to modify assorted graphical settings, e.g. to test out performance:

* `scalability [0-3]` - sets all the below `sg.*` settings (except `sg.ResolutionQuality`) to the specified quality level (0: low, 1: medium, 2: high, 3: epic)

{% hint style="info" %}
NOTE: There is a fifth quality level: `4: cinematic`, but this is not suitable for real-time game rendering, and can lead to issues. We advise never setting these settings to 4, even though it exists.
{% endhint %}

* `sg.ViewDistanceQuality [0-3]`
* `sg.AntiAliasingQuality [0-3]`
* `sg.PostProcessQuality [0-3]`
* `sg.ShadowQuality [0-3]`
* `sg.GlobalIlluminationQuality [0-3]`
* `sg.ReflectionQuality [0-3]`
* `sg.TextureQuality [0-3]`
* `sg.EffectsQuality [0-3]`
* `sg.FoliageQuality [0-3]`
* `sg.ShadingQuality [0-3]`
* `sg.ResolutionQuality [X]` - sets the resolution quality to `X`%. (100 being the max. If you go near to 0, it will look very extreme)
* `r.Vsync [0/1]` - turns vsync on/off.
* `t.MaxFPS [X]` - sets the maximum FPS to `X`. <= 0 will set it to uncapped

## User Settings

If you want to modify them per user, and have them saved in their user settings, this can be achieved with the following helper functions in the `J_GameUserSettings`:

* `Get/SetOverallScalabilityLevel` - same as the equibalent `scalability` command line: gets/sets the value of all the scalability settings at once, to one of the set scalability levels: 0: low, 1: medium, 2: high, 3: epic. (If the settings have been individually modified, the getter will return -1: custom)
* `IsVsyncEnabled/SetVsyncAndDefaultFrameLimiter` - the helper combines "vsync on/off" with the default frame limiter - when on , we use a capped frame rate controlled by the `J_GameUserSettings::DefaultFrameLimit` config value. Otherwise, it uses an uncapped framerate.
* `Set/GetViewDistanceQuality` - same as the command line
* `Set/GetAntiAliasingQuality`
* `Set/GetPostProcessingQuality`
* `Set/GetShadowQuality`
* `Set/GetGlobalIlluminationQuality`
* `Set/GetReflectionQuality`
* `Set/GetTextureQuality`
* `Set/GetVisualEffectsQuality`
* `Set/GetFoliageQuality`
* `Set/GetShadingQuality`
* `Set/GetResolutionScaleNormalize` - same as the equivalent command line, but uses a normalized value of `[0-1]` to be equivalent to `[MinScaleValue-MaxScaleValue]`

Each of these settings can be obtained using `GetGameUserSettings`, and saved using `ApplySettings`:

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-d8bcd1257aebbf825d4a77911525ec11c3093ed4%2Fimage.png?alt=media" alt=""><figcaption><p>An example of setting the "vsync and default frame limiter" setting value via a checkbox</p></figcaption></figure>
