Steam Command Line Parameters: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Fixing double redirect. This action was performed by a bot.)
Tag: Redirect target changed
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Source_SDK_FAQ]]
#REDIRECT [[Command line options]]
When launching the game engine, there are a number of command-line options that can be used to change the engine environment.
 
{|
| <code>-dev</code>  || Launches the game in developer mode. Useful debugging and console information is shown.
|-
| <code>-console</code> || Launches the game directly to the developer console, and does not show the 3D background map.
|-
| <code>-sw</code>  || Starts the game in windowed mode.
|-
| <code>-fullscreen</code> || Starts the game in fullscreen mode.
|-
| <code>-w <size></code> ||  Sets the screen width to <size> in pixels, i.e. <code>-w 1024</code>
|-
| <code>-h <size></code> || Sets the screen height to <size> in pixels, i.e. <code>-h 768</code>
|-
| <code>-condebug</code> || Logs the contents of the developer console to <code><game directory>\console.log</code>
|-
| <code>+sv_lan 1</code> || Launches the game in LAN mode. Useful to stop players from joining your game from the Internet.
|-
| <code>+map <mapname></code> || Launches the game, then loads the map called <code><mapname>.bsp</code>
|-
| <code>-applaunch <AppID></code> || Launches the game with using the specified <code>SteamAppID</code>
|}
 
Parameters using the "+" symbol are developer console commands that are executed after the engine is launched.
 
For example, some typical settings:
 
<pre>
<code>Steam.exe -applaunch 280 -dev -console -sw +sv_lan 1 +map MyMap </code>
</pre>
 
This would start a Half-Life 2: Deathmatch game in developer mode, activate the developer console, in windowed mode, and in LAN multiplayer mode, then load <code>MyMap.bsp</code>.

Latest revision as of 14:54, 21 January 2024