Settings¶
System · Settings · server and client scripts
Settings reads the player's keybinds and device settings from the client settings menu, and reports when the core menu opens or closes. To read keys, mouse buttons and the cursor, use Input.
The Diagnostics setting shows the FPS, draws, ping and network card in the bottom right corner. It is off for a player who never chose it. Studio and the playtest clients it starts show it unless settings.cfg has a saved show_fps. A client saves show_fps only after the player changes the setting, so a default is never written to settings.cfg.
Device¶
Quality¶
Quality is the graphics quality level from 1 to 10.
Default 5
Errors (1)
| Error | When |
|---|---|
Quality can only be written from a client script |
Written from a server script. |
Fullscreen¶
Fullscreen is true when the client window runs in fullscreen mode.
Default false
Errors (1)
| Error | When |
|---|---|
Fullscreen can only be written from a client script |
Written from a server script. |
VerticalSync¶
VerticalSync is true when vertical synchronization is active.
Default true
Errors (1)
| Error | When |
|---|---|
VerticalSync can only be written from a client script |
Written from a server script. |
FieldOfView¶
FieldOfView is the vertical camera field of view in degrees.
Default 70
Errors (1)
| Error | When |
|---|---|
FieldOfView can only be written from a client script |
Written from a server script. |
Sensitivity¶
Sensitivity is the player's camera look multiplier where 1 is 100 percent.
Default 1
Errors (1)
| Error | When |
|---|---|
Sensitivity can only be written from a client script |
Written from a server script. |
ShiftLock¶
ShiftLock is whether the player allows shift-lock in the settings menu. The engine does not lock the cursor itself; a control script checks this setting before locking the cursor.
Default false
Example
Errors (1)
| Error | When |
|---|---|
ShiftLock can only be written from a client script |
Written from a server script. |
UiScale¶
UiScale is the interface scaling multiplier chosen by the player.
Default 1
Errors (1)
| Error | When |
|---|---|
UiScale can only be written from a client script |
Written from a server script. |
Diagnostics¶
Diagnostics is true when the performance and network diagnostics overlay is visible.
Default false
Errors (1)
| Error | When |
|---|---|
Diagnostics can only be written from a client script |
Written from a server script. |
AaMethod¶
AaMethod is the active anti-aliasing method: "Off", "SMAA", or "MSAA".
Default "SMAA"
Errors (1)
| Error | When |
|---|---|
AaMethod can only be written from a client script |
Written from a server script. |
AaQuality¶
AaQuality is the anti-aliasing quality tier or sample count: "Low", "Medium", "High", "Ultra", "2x", "4x", or "8x".
Default "High"
Errors (1)
| Error | When |
|---|---|
AaQuality can only be written from a client script |
Written from a server script. |
Bloom¶
Bloom is true when post-processing bloom is turned on.
Default true
Errors (1)
| Error | When |
|---|---|
Bloom can only be written from a client script |
Written from a server script. |
Saturation¶
Saturation is the post-processing color saturation multiplier.
Default 1
Errors (1)
| Error | When |
|---|---|
Saturation can only be written from a client script |
Written from a server script. |
Nametags¶
Nametags is true when player nametags are shown overhead.
Default true
Errors (1)
| Error | When |
|---|---|
Nametags can only be written from a client script |
Written from a server script. |
FrameLimit¶
FrameLimit is the frame rate cap in frames per second, or nil when uncapped.
Default nil
Errors (1)
| Error | When |
|---|---|
FrameLimit can only be written from a client script |
Written from a server script. |
RenderScale¶
RenderScale is the internal render resolution multiplier from 0.5 to 1.
Default 1
Errors (1)
| Error | When |
|---|---|
RenderScale can only be written from a client script |
Written from a server script. |
Shadows¶
Shadows is the shadow rendering tier: "Off", "Hard", or "Soft".
Default "Soft"
Errors (1)
| Error | When |
|---|---|
Shadows can only be written from a client script |
Written from a server script. |
Textures¶
Textures is the texture detail tier: "Low", "Medium", "High", or "Ultra".
Default "High"
Errors (1)
| Error | When |
|---|---|
Textures can only be written from a client script |
Written from a server script. |
GraphicsPreset¶
GraphicsPreset is the active graphics preset: "Low", "Medium", "High", "Ultra", or "Custom".
Default "High"
Errors (1)
| Error | When |
|---|---|
GraphicsPreset can only be written from a client script |
Written from a server script. |
InvertLook¶
InvertLook is true when vertical camera look input is inverted.
Default false
Errors (1)
| Error | When |
|---|---|
InvertLook can only be written from a client script |
Written from a server script. |
CameraMode¶
CameraMode is the camera follow behavior chosen by the player: "Classic" or "SmoothFollow".
Default "Classic"
Errors (1)
| Error | When |
|---|---|
CameraMode can only be written from a client script |
Written from a server script. |
Changed¶
Changed fires with the setting name whenever any public client setting changes.
Example
Errors (1)
| Error | When |
|---|---|
Changed can only be written from a client script |
Written from a server script. |
Keybinds¶
Keybind¶
Keybind returns the input name bound to action, or nil when unbound.
Example
Errors (1)
| Error | When |
|---|---|
Keybind can only be called from a client script |
Called from a server script. |
KeybindLabel¶
KeybindLabel returns the display label of the key bound to action, such as "Space" or "Mouse 4", or nil when unbound.
Example
Errors (1)
| Error | When |
|---|---|
KeybindLabel can only be called from a client script |
Called from a server script. |
KeybindPressed¶
KeybindPressed returns true on the frame the key bound to an action goes down. While the core menu is open, it returns false outside the core menu's own scripts.
Example
Errors (1)
| Error | When |
|---|---|
KeybindPressed can only be called from a client script |
Called from a server script. |
KeybindChanged¶
KeybindChanged fires with a KeybindChange table when a player keybind changes.
Errors (1)
| Error | When |
|---|---|
KeybindChanged can only be written from a client script |
Written from a server script. |
Menu¶
MenuOpen¶
MenuOpen is whether the core menu is open. While it is open, Input reads no keys or buttons.
Default false
Example
Errors (1)
| Error | When |
|---|---|
MenuOpen can only be written from a client script |
Written from a server script. |
MenuOpenChanged¶
MenuOpenChanged fires with true when the core menu opens and false when it closes.
Example
Errors (1)
| Error | When |
|---|---|
MenuOpenChanged can only be written from a client script |
Written from a server script. |