Skip to content
yvt edited this page Dec 12, 2020 · 27 revisions

What are config variables?

Config variables, short for Configuration Variables, are all settings that OpenSpades uses.

Some of them may be not avaiable to change via GUI or break the game if changed incorrectly, that's why it's recommended to read this guide first before changing them.

Where are config variables stored?

Config variables are located in the file SPConfig.cfg, inside the User Resource Directory.

The SPConfig.cfg file can't be edited if there is any instance of OpenSpades running, because OpenSpades locks the file.

How to update config variables?

Config variables can be changed by 3 ways.

  • Startup Window's "Advanced" tab
  • Anytime during gameplay, by typing /VARIABLE_NAME VALUE in the chat window
    • This is an unsafe operation; some variables don't support run-time update and it might lead to an unexpected result or application crash
  • Directly editing the SPConfig.cfg file (not recommended)
    • See Directories to find it.
    • This file can't be edited if OpenSpades is running

How to reset all settings?

Since 0.1.0, there's a button to reset all settings in the Startup Window "General" tab.

In previous versions, you need to:

  1. Close any instances of OpenSpades
  2. Go to the User Resource Directory
  3. Delete SPConfig.cfg

Trivia

Each advanced setting has a prefix, which is based on the Quake 3 - Arena settings scheme.

  • r_: renderer related
  • s_: sound related
  • cg_: client game logic related
  • cl_: OpenSpades client related
  • core_: OpenSpades core code related

Source: here

Variable list (historical)

There is a historical config. variables list with much more complete information than this one has currently, if you're looking for a reliable source, try it first.

Variable list (0.1.1)

(Last update: 2017-01-26)

  • cg_Minimap_Player_Color
  • cg_alerts
  • cg_animations
  • cg_autoFocusSpeed
  • cg_blood
  • cg_centerMessage
  • cg_chatBeep
  • cg_chatHeight
  • cg_debugAim
  • cg_debugCorpse
  • cg_debugHitTest
  • cg_depthOfFieldAmount
  • cg_ejectBrass
  • cg_environmentalAudio
  • cg_fov
  • cg_hideHud
  • cg_hitIndicator
  • cg_holdAimDownSight
  • cg_invertMouseY
  • cg_keyAltAttack
  • cg_keyAttack
  • cg_keyAutoFocus
  • cg_keyCaptureColor
  • cg_keyChangeMapScale
  • cg_keyCrouch
  • cg_keyFlashlight
  • cg_keyGlobalChat
  • cg_keyJump
  • cg_keyLastTool
  • cg_keyLimbo
  • cg_keyMoveBackward
  • cg_keyMoveForward
  • cg_keyMoveLeft
  • cg_keyMoveRight
  • cg_keyReloadWeapon
  • cg_keySaveMap
  • cg_keySceneshot
  • cg_keyScoreboard
  • cg_keyScreenshot
  • cg_keySneak
  • cg_keySprint
  • cg_keyTeamChat
  • cg_keyToggleMapZoom
  • cg_keyToolBlock
  • cg_keyToolGrenade
  • cg_keyToolSpade
  • cg_keyToolWeapon
  • cg_killfeedHeight
  • cg_lastQuickConnectHost
  • cg_manualFocus
  • cg_minimapPlayerColor
  • cg_minimapPlayerIcon
  • cg_minimapSize
  • cg_mouseExpPower
  • cg_mouseSensitivity
  • cg_particles
  • cg_playerName
  • cg_playerNameIsSet
  • cg_playerNameX
  • cg_playerNameY
  • cg_playerNames
  • cg_protocolVersion
  • cg_ragdoll
  • cg_screenshotFormat
  • cg_serverAlert
  • cg_serverlistSort
  • cg_shake
  • cg_smp
  • cg_stats
  • cg_switchToolByWheel
  • cg_thirdperson
  • cg_unicode
  • cg_waterImpact
  • cg_zoomedMouseSensScale
  • cl_serverListUrl
  • cl_showStartupWindow
  • core_jpegQuality
  • core_locale
  • core_numDispatchQueueThreads
  • r_allowSoftwareRendering
  • r_blitFramebuffer
  • r_bloom
  • r_cameraBlur
  • r_colorCorrection
  • r_corpseLineCollision
  • r_debugTiming
  • r_debugTimingAverage
  • r_debugTimingFillGap
  • r_debugTimingFlush
  • r_debugTimingGPUTime
  • r_debugTimingOutputBarScale
  • r_debugTimingOutputLog
  • r_debugTimingOutputScreen
  • r_depthOfField
  • r_depthOfFieldMaxCoc
  • r_depthPrepass
  • r_dlights
  • r_exposureValue
  • r_fogShadow
  • r_fullscreen
  • r_fxaa
  • r_hdr
  • r_hdrAutoExposure
  • r_hdrGamma
  • r_highPrec
  • r_ignoreGLErrors
  • r_lens
  • r_lensFlare
  • r_lensFlareDynamic
  • r_mapSoftShadow
  • r_maxAnisotropy
  • r_modelShadows
  • r_multisamples
  • r_occlusionQuery
  • r_optimizedVoxelModel
  • r_physicalLighting
  • r_radiosity
  • r_renderer
  • r_shadowMapSize
  • r_softParticles
  • r_sparseShadowMaps
  • r_srgb
  • r_srgb2D
  • r_ssao
  • r_swNumThreads
  • r_swStatistics
  • r_swUndersampling
  • r_videoHeight
  • r_videoWidth
  • r_vsync
  • r_water
  • s_alDriver
  • s_alErrorFatal
  • s_alPreciseErrorCheck
  • s_audioDriver
  • s_eax
  • s_maxPolyphonics
  • s_ysrBufferSize
  • s_ysrDebug
  • s_ysrDriver
  • s_ysrNumThreads

Note: Information below might be outdated, incomplete or incorrect.

cg_alerts

Shows up an alert box below the crosshair when you run out of ammo/grenades or when you try to place a block on a invalid place.

Possible values:

  • Disabled: 0
  • Enabled: 1

cg_blood

Enables blood particles when you hit an enemy.

Values:

  • Disabled: 0
  • Enabled: 1

cg_chatBeep

Sounds a beep every time someone sends a message.

Values:

  • Disabled: 0
  • Enabled: 1

cg_chatHeight

Modifies where the chat box is located.

Values (any number):

  • Default: 30

cg_centerMessage

Shows up the text You killed [player]

Values:

  • Disabled: 0, 1
  • Enabled (Default): 2

cg_debug[something]

Debugging tools

cg_debugAim : renders a box around the crosshair, shows the maximum bullet spread area. cg_debugCorpse : renders a grid in the player body, every square in the grid is one voxel on a .kv6 fiel. cg_debugHitTest : generates 512x512 screenshots in .tga file. The red cross in the center is the point aimed and the yellow with red square is where the bullet hit. All debugging files are located in \AppData\Roaming\OpenSpades\Resources\HitTestDebugger


cg_depthOfFieldAmount

Adjusts the intensity of the depth-of-field effect. Requires r_depthOfField be enabled to work.

Values (any number)

  • Default: 1

cg_ejectBrass

Ejects bullet casings.

Values:

  • Disabled: 0
  • Enabled: 1

Nomenclature: Brass refers to the material often used in a cartridge case.


cg_environmentalAudio

Generates reverb on spacious places.

Values:

  • Disabled: 0
  • Enabled: 1

cg_fov

Changes the field of view (FOV).

Values:

  • Minimum: 45
  • Default: 60
  • Maximum: 90

cg_hideHud

Hides the game HUD when enabled.

Values:

  • Disabled: 0
  • Enabled: 1

cg_hitFeedbackSoundGain

Changes the volume of hit sounds.

Values (any number):

  • Default: 0.2

cg_hitIndicator

Displays the hit indicator when enabled.

Values:

  • Disabled: 0
  • Enabled: 1

cg_holdAimDownSight

Values:

  • Disabled (each right-mouse-button click toggles ADS): 0
  • Enabled (hold the right mouse button to maintain ADS): 1

cg_Minimap_Player_Color

If enabled, assigns a unique color to every player.

The colors can be seen in the scoreboard and in the map.

Currently, it's only possible to enable this setting using the Startup Window "Advanced" tab.

Possible values:

  • Disabled: 0
  • Enabled: 1

Default value is unknown.

Related pull request: #339


cg_manualFocus (0.1.0 and later)

Enables the realistic depth of field mode. Not suitable for the normal gameplay.

The default operation of this mode is "autofocus". The focal distance can be controlled via mouse wheel. Press the mouse wheel to turn it back to the autofocus mode.


cg_playerNames

(not to be confused with cg_playerName)

(stub)


core_numDispatchQueueThreads

Controls the maximum number of parallelism for background tasks including:

  • Environmental lighting (radiosity and ambient occlusion)
  • Ragdoll physics
  • Ocean water simulation
  • Software rendering?

It accepts a non-zero integer or auto, which indicates (stub).

Default value is auto.


r_blitFramebuffer

Uses GL_EXT_framebuffer_blit for possibly faster post-processing.


r_colorBits

Not implemented


r_corpseLineCollision

Enables more accurate ragdoll physics sacrificing some CPU time.


r_debugTiming

(stub)


r_depthPrepass

Enables depth prepass. Reduces overdraw at cost of draw calls.


r_hdrAutoExposure

(stub)


r_hdrGamma

(stub)


r_highPrec

  • 0: 24-bit color framebuffers are used as render targets.
  • 1 (default): 30-bit color framebuffers are used as render targets for smoother gradients. Not supported by some older video cards.

Ignored if r_hdr is not zero, in which case 48-bit FP color framebuffers are always used.


r_ignoreGLErrors

Skips OpenGL error detection. Setting this to 1 may improve performance.


r_radiosity

  • 0: Cheap ambient lighting.
  • 1: Enables global illumination (environmental lighting). Requires more than 256MB of VRAM.
  • 2: Enables global illumination with extra precision. Requires more than 512MB of VRAM.

r_shadowMapSize

Specifies the size of shadow maps. Must be a power of two.

Clone this wiki locally