This article's documentation is for Source 2. Click here for more information.

Command line options (Source 2)

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
edit

Command line options (frequently command line arguments or command line parameters; launch options on Steam) are additional arguments specified before the program starts, these functionally change the behavior of the program in some way, such as launching the game and start the game with the specified map directly, or play a demo for example.

Command line arguments are traditionally prefixed with a hyphen (-), but some Windows Windows applications (especially system ones) will use a forward slash (/) instead. Quake Quake uses plus (+) as a prefix for console commands or cvars that will get executed by the game as soon as it starts, and all Valve engines inherit this syntax.

Todo: Fill this out. Confirm if launch options are Dota 2, HLA, or CS2 specific, and does it works or not.

Engine

Most of these command-line parameters will work with any Source 2 engine games (Half-Life: Alyx Half-Life: Alyx, Counter-Strike 2 Counter-Strike 2, etc.).

Syntax: cs2.exe <parameter1> <parameter2> <cvar1> <cvar2>

Usage

These options can be used with:

  • Windows shortcuts pointing to cs2.exe directly.
  • Windows shortcuts pointing to steam.exe with the proper -applaunch <AppID> specified (more on Command line options - Steam page).
  • Command-line batch script files launching these applications.
  • Game launch options from Steam's Library.
  • Linux shell scripts pointing to the application with launch options. executable -command

Examples

  • steam.exe -applaunch 730 -dev -console +map MyMap
  • cs2.exe -dev -console +map de_dust2 +buildcubemaps

Command-Line Parameters

Argument Description
-addon <addon_name> Starts the game mounting <addon_name>. (only in Half-Life: AlyxCounter-Strike 2)[confirm]
-allow_third_party_software Launches the game in "Untrusted Mode", which allow third-party programs to injecting its code into game executable. (only in Counter-Strike 2)
-allowmultiple Allows multiple Source 2 instances to run at the same time. Only works if a VPROJECT environment variable is set. (only in Half-Life: Alyx)[confirm]
-autoconfig This command lets you restore config file settings to default. (only in Counter-Strike 2)[confirm]
-console Starts the game with the developer console enabled.
-dev Starts the game with the DEV MENU enabled (only in Half-Life: Alyx)[confirm].
-forcenovsync Switches off Vsync technology. (only in Counter-Strike 2)[confirm]
-freq <refresh_rate> Change the monitor refresh rate. (only in Counter-Strike 2)[confirm]
-full The game will start in full-screen mode. (only in Counter-Strike 2)[confirm].
-fullscreen The game will start in full-screen mode. (only in Half-Life: AlyxCounter-Strike 2)[confirm].
-gpuraytracing (Confirmed with csgocfg.exe) Enable ray-tracing feature support for Hammer Editor. Without it, Hammer ray-tracing related option such as GPU Path Tracing preview and GPU Ray Tracing Visualization will be disabled and hidden. Usually enabled when launching CS2 Workshop Tools from Steam (only in Counter-Strike 2).
-h <height> or -height <height> Forces the engine to start with resolution set to <height>. Ex: -h 1920
-high Sets the game's priority to High. (only in Dota 2Counter-Strike 2)[confirm]
-hlvr_workshop Launches the Workshop Tools. (only in Half-Life: Alyx)
-insecure Starts the server without Valve Anti-Cheat.
-language <language> Interface language customization.
-limitvsconst Limits number of vertex shaders up to 256. (only in Counter-Strike 2)[confirm]
-noborder The game window won’t have edges. (only in Counter-Strike 2)[confirm].
-nohltv Switches off all GOTV and Source TV opportunities. (only in Counter-Strike 2)[confirm]
-nojoy Switching off joysticks, joystick support. (only in Counter-Strike 2)[confirm]
-nopreload Cancels models, files and textures pre-loading. (only in Counter-Strike 2)[confirm]
-nostyle Disables some custom Windows UI styling. Can be used to force the tools into light mode, when Windows is set to light mode.
-novid Intro video is disabled. (only in Counter-Strike 2)[confirm]
-novr or -vr_enable_fake_vr_test Launches the game in flat-screen mode. (only in Half-Life: Alyx)
-nowindow Disables the spectator window. (only in Half-Life: Alyx)
-perfectworld Switch to Steam China (Perfect World) servers. (only in Counter-Strike 2)
-retail Makes it so you cannot see certain items in the sdk, such as /characters/ and /econ/ (only in Half-Life: AlyxCounter-Strike 2)[confirm]
-softparticledefaultoff Rendering particles settings. (only in Counter-Strike 2)[confirm]
-steam Applied by default when launched through Steam, connects game to its 'network'. (only in Half-Life: AlyxCounter-Strike 2)[confirm]
-tools Launches the Workshop Tools (only in Half-Life: AlyxCounter-Strike 2)[confirm].
-vconsole Allows for using the VConsole program that comes with certain games like Aperture Desk Job which does not provide a way of accessing the console in-game [confirm].
-vrdebug Allows the game to run without a VR headset, by rendering the game as a side-by-side stereoscopic pair. (only in Half-Life: Alyx)[confirm]
-vulkan Forces the engine to use the Vulkan renderer.
-width <width>, -w Forces the engine to start with resolution set to <width>. Ex: -w 1080 (only in Counter-Strike 2)[confirm]
-window, -windowed, -startwindowed or -sw The game will start in the regular window.
-x <x position> Window position along the axis X (only in Counter-Strike 2)[confirm]
-y <y position> Window position along the axis Y (only in Counter-Strike 2)[confirm]

Deprecated Command-Line Parameters

Argument Description
-tickrate <tickrate> Sets the game tick interval. In Counter-Strike 2 Counter-Strike 2 at launch, Valve hardcoded the game to use 64 tickrate with subticks, so this does nothing.
Confirm:Confirm whether this does anything on old Limited Test build.