settings.scr and user.scr Last edited 11 months ago2023-11-27 09:02:58 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
The files settings.scr and user.scr define graphical user interfaces for cvars that otherwise needs the console to change. The file to GUI panel mapping is as follows:
File GUI location Description
settings.scr Create Server > Game dialog Multiplayer server settings
user.scr Options > Advanced or Options > Multiplayer > Advanced tab User settings
Similarly-named files are also used on Source games, located in cfg/ (may be packed in a .vpk)
Multiplayer Advanced dialog with a custom `user.scr`Multiplayer Advanced dialog with a custom user.scr

Format

The following section is from the comments inside these files, copied verbatim.
Format:
 Version [float]
 Options description followed by
 Options defaults

Option description syntax:
 "cvar" { "Prompt" { type [ type info ] } { default } }

 type =
  BOOL   (a yes/no toggle)
  STRING
  NUMBER
  LIST

type info:
BOOL                 no type info
NUMBER       min max range, use -1 -1 for no limits
STRING       no type info
LIST          delimited list of options value pairs


default depends on type
BOOL is "0" or "1"
NUMBER is "value"
STRING is "value"
LIST is "index", where index "0" is the first element of the list

Usage

You can use these files to give players access to cvars, either those provided by the base SDK or those you added with custom game code.

Comments

You must log in to post a comment. You can login or register a new account.