Command line options: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) |
(formatting, reorganized by importance level) |
||
Line 1: | Line 1: | ||
== | [[Category:Steam]] | ||
== Source Games == | |||
These command-line parameters will work with any [[Source]] engine games (Half-Life 2, Counter-strike: Source, etc.). | |||
'''Syntax:''' <code>hl2.exe <parameter1> <parameter2> <cvar1> <cvar2></code> | |||
* '''-applaunch | === Usage === | ||
* '''- | These options can be used with: | ||
* '''- | * Hammer editor [[Hammer_Run_Map_Normal|Run Map]] dialog. | ||
* '''- | * Windows shortcuts pointing to <code>hl2.exe</code> directly. | ||
* '''- | * Windows shortcuts pointing to <code>steam.exe</code> with the proper <code>-applaunch <AppID></code> specified (see '''Steam''' section below). | ||
* '''- | * Command-line batch script files launching these applications. | ||
=== Examples === | |||
* <code>steam.exe -applaunch 280 -dev -console -sw +sv_lan 1 +map MyMap</code> | |||
* <code>hl2.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust</code> | |||
=== Command-line parameters === | |||
* '''-autoconfig''' - Restores video and performance settings to default for the current hardware detected. Ignores settings inside any .cfg files until this parameter is removed. | |||
* '''-condebug''' - Logs all console output into the <code>console.log</code> text file. | |||
* '''-console''' - Starts the game with the console. | |||
* '''-toconsole''' - Starts the engine directly in the console, unless a map is specified with <code>+map</code>. Also useful to bypass loading of the background maps that appear behind the game menu. | |||
* '''-dxlevel <level>''' - Forces a specific [[DirectX_Versions|DirectX version]] when launching the engine. This is useful if your graphics card is DirectX 9 capable, but a lot faster using only DirectX 8 (e.g. NVidia GeForce FX 5200). Multiply the desired DirectX version to use with ten. E.g. for DirectX 8.0 you would use <code>-dxlevel 80</code>. | |||
* '''-fullscreen''' - Forces the engine to start in fullscreen mode. | |||
* '''-windowed''' or '''-sw''' - Forces the engine to start in windowed mode. | |||
* '''-w <width>''' - Forces the engine to start with resolution set to <code><width></code>. | |||
* '''-h <height>''' - Forces the engine to start with resolution set to <code><height></code>. | |||
* '''-refresh <rate>''' - Force a specific refresh rate. | |||
* '''-heapsize <kilobytes>''' - Specifies the heapsize (in kilobyte) the game will use. | |||
* '''-nocrashdialog''' - Supresses some 'memory could not be read' unhandled errors. | |||
* '''-novid''' or '''-novideo''' - When loading a game with this parameter, the intro Valve video will not play. | |||
=== Console variables === | |||
* '''+<console variable> <arg>''' - Sets the Cvar (or [[:Category:Console_Variables|console variable]]) to the specified setting. | |||
==== Some useful console variables ==== | |||
* '''+map <map name>''' - Loads the map specified after the engine starts. '''Note:''' the .BSP extension is not needed. | |||
* '''+map_background <map name>''' - Forces a specified background map to be used. Useful for testing custom background maps. To avoid loading background maps entirely for speed reasons, use the <code>-toconsole</code> command-line parameter. | |||
* '''+sv_lan <0/1>''' - When set to 1, launches the game in LAN mode. Useful to stop players from joining your game from the Internet. | |||
* '''+sv_cheats <0/1>''' -- When set to 1, starts the game with cheats enabled. | |||
== Steam (Windows) == | |||
These command-line parameters work when launching the Steam application (<code>steam.exe</code>) under Windows. | |||
=== Command-line parameters === | |||
* '''-applaunch %id %c''' - This launches an Game or Application through Steam. Replace the %id with the [[Steam_Application_IDs|Game/Application ID number]] that you want to open up, replace %c with the command line parameters for the game as listed in the '''Source Games''' section above. | |||
* '''-login %u %p''' - This logs into Steam with the specified Username and Password combination. Replace %u with the username, and %p with the password you want to login with (Steam must be off for this to work.) | |||
* '''-nocache''' - This starts steam with no cache (Steam must be off for this to work properly.) | |||
* '''-script %s''' - This runs a Steam script. Replace %s with the script filename. All scripts must be in a subdirectory of the Steam folder called test scripts (Steam must be off for this to work.) | |||
* '''-shutdown''' - This shuts down (exits) Steam. | |||
* '''-silent''' - This suppresses the dialog box that opens when you start steam. It is used when you have Steam set to auto-start when your computer turns on. (Steam must be off for this to work.) | |||
== hldsupdatetool (Windows), Steam (Unix) == | |||
'''Syntax:''' <code>hldsupdatetool -command <command> [parameters] [flags]</code> | |||
=== Commands === | |||
*'''- | *'''-command update''' - Install or update HLDS. | ||
*'''- | *'''-command version''' - View installed versions. | ||
*'''-command list''' - View available games. | |||
=== Parameters === | |||
*'''-game [[Game Name Abbreviations|<game>]]''' - Mod game directory name. | |||
*'''-dir <installdir>''' - HLDS Install directory (if dir not specified, will use value from last run of tool). | |||
=== Flags === | |||
*'''-verify_all''' - Verify all HLDS files are up to date | *'''-verify_all''' - Verify all HLDS files are up to date. | ||
*'''-retry''' - Automatically retry every 30 seconds if the Steam Network is busy | *'''-retry''' - Automatically retry every 30 seconds if the Steam Network is busy. | ||
*'''-remember_password''' - Remember password (if a username is supplied) | *'''-remember_password''' - Remember password (if a username is supplied). | ||
=== Optional parameters === | |||
These are only needed to access limited content. | |||
*'''-username <username>''' - Steam account username | *'''-username <username>''' - Steam account username | ||
Line 36: | Line 80: | ||
== | == Source Dedicated Server == | ||
Command-line arguments for the Source Dedicated Server executable (<code>srcds.exe</code>, <code>srcds_run</code>) | |||
* '''-autoupdate''' - The server is searching for updates on startup | === Command-line parameters === | ||
* '''-console''' - | * '''-autoupdate''' - The server is searching for updates on startup. | ||
* '''-game [[Game Name Abbreviations|<game>]]''' - Specifies which game/mod to run | * '''-console''' - SrcDS will run in console mode (Windows only). | ||
* '''-insecure''' - | * '''-game [[Game Name Abbreviations|<game>]]''' - Specifies which game/mod to run. | ||
* '''- | * '''-insecure''' - Will start the server without Valve Anti-Cheat technology. | ||
* '''-nobots''' - Disable bots. | |||
* '''-tickrate <number>''' - Specifies Server-Tickrate (for more info see [[Source Multiplayer Networking]]). | |||
* '''-verify_all''' - Will check that each file in the install matches the latest Steam version. | |||
< | === Console variables === | ||
* '''+<console variable> <arg>''' - Sets the Cvar (or [[:Category:Console_Variables|console variable]]) to the specified setting. | |||
==== Some useful console variables ==== | |||
* '''+hostname "Server Name"''' - Specifies the name of the server. | |||
* '''+ip''' - Specifies the IP when multiple network cards are installed. | |||
* '''+map <map>''' - Specifies which map to start. | |||
* '''+maxplayers <number>''' - Specifies how many player slots the server can contain. | |||
** '''+ | * '''+hostport <port>''' - Specifies the host port (can someone explain this?) | ||
* '''+clientport <port>''' - Specifies the client port (can someone explain this?) | |||
* '''+sv_lan <0/1>''' - If set to 1, server is only available in Local Area Network (LAN). | |||
== | == Half-Life Dedicated Server == | ||
These command-line parameters are used with <code>hlds.exe</code> for [[Goldsource]] (Half-Life) games. | |||
< | === Command-line parameters === | ||
* '''-autoupdate''' - The server is searching for updates on startup. | |||
* '''-console''' - HLDS will run in console mode (Windows only). | |||
* '''-game [[Game Name Abbreviations|<game>]]''' - Specifies which game/mod to run. | |||
* '''-insecure''' - Disables Valve Anti-Cheat technology. | |||
* '''-sport <port>''' - Specifies the VAC2 port the server should use. | |||
* '''+< | === Console variables === | ||
* '''+<console variable> <arg>''' - Sets the Cvar (or [[:Category:Console_Variables|console variable]]) to the specified setting. | |||
== | ==== Some useful console variables ==== | ||
* '''+hostname "Server Name"''' - Specifies the name of the server. | |||
* '''+ip''' - Specifies the IP when multiple network cards are installed. | |||
* '''+map <map>''' - Specifies which map to start. | |||
* '''+maxplayers <number>''' - Specifies how many player slots the server can contain. | |||
* '''+port <port>''' - Specifies which port to use. | |||
* '''+sv_lan <0/1>''' - If set to 1, server is only available in Local Area Network (LAN). | |||
== See also == | |||
[[ | [[Developer Console]] | ||
{{otherlang:en}} {{otherlang:en:jp|Command Line Options:jp}} | {{otherlang:en}} {{otherlang:en:jp|Command Line Options:jp}} |
Revision as of 21:55, 2 January 2006
Source Games
These command-line parameters will work with any Source engine games (Half-Life 2, Counter-strike: Source, etc.).
Syntax: hl2.exe <parameter1> <parameter2> <cvar1> <cvar2>
Usage
These options can be used with:
- Hammer editor Run Map dialog.
- Windows shortcuts pointing to
hl2.exe
directly. - Windows shortcuts pointing to
steam.exe
with the proper-applaunch <AppID>
specified (see Steam section below). - Command-line batch script files launching these applications.
Examples
steam.exe -applaunch 280 -dev -console -sw +sv_lan 1 +map MyMap
hl2.exe -game cstrike -dev -console -fullscreen +sv_lan 1 +map de_dust
Command-line parameters
- -autoconfig - Restores video and performance settings to default for the current hardware detected. Ignores settings inside any .cfg files until this parameter is removed.
- -condebug - Logs all console output into the
console.log
text file. - -console - Starts the game with the console.
- -toconsole - Starts the engine directly in the console, unless a map is specified with
+map
. Also useful to bypass loading of the background maps that appear behind the game menu. - -dxlevel <level> - Forces a specific DirectX version when launching the engine. This is useful if your graphics card is DirectX 9 capable, but a lot faster using only DirectX 8 (e.g. NVidia GeForce FX 5200). Multiply the desired DirectX version to use with ten. E.g. for DirectX 8.0 you would use
-dxlevel 80
. - -fullscreen - Forces the engine to start in fullscreen mode.
- -windowed or -sw - Forces the engine to start in windowed mode.
- -w <width> - Forces the engine to start with resolution set to
<width>
. - -h <height> - Forces the engine to start with resolution set to
<height>
. - -refresh <rate> - Force a specific refresh rate.
- -heapsize <kilobytes> - Specifies the heapsize (in kilobyte) the game will use.
- -nocrashdialog - Supresses some 'memory could not be read' unhandled errors.
- -novid or -novideo - When loading a game with this parameter, the intro Valve video will not play.
Console variables
- +<console variable> <arg> - Sets the Cvar (or console variable) to the specified setting.
Some useful console variables
- +map <map name> - Loads the map specified after the engine starts. Note: the .BSP extension is not needed.
- +map_background <map name> - Forces a specified background map to be used. Useful for testing custom background maps. To avoid loading background maps entirely for speed reasons, use the
-toconsole
command-line parameter. - +sv_lan <0/1> - When set to 1, launches the game in LAN mode. Useful to stop players from joining your game from the Internet.
- +sv_cheats <0/1> -- When set to 1, starts the game with cheats enabled.
Steam (Windows)
These command-line parameters work when launching the Steam application (steam.exe
) under Windows.
Command-line parameters
- -applaunch %id %c - This launches an Game or Application through Steam. Replace the %id with the Game/Application ID number that you want to open up, replace %c with the command line parameters for the game as listed in the Source Games section above.
- -login %u %p - This logs into Steam with the specified Username and Password combination. Replace %u with the username, and %p with the password you want to login with (Steam must be off for this to work.)
- -nocache - This starts steam with no cache (Steam must be off for this to work properly.)
- -script %s - This runs a Steam script. Replace %s with the script filename. All scripts must be in a subdirectory of the Steam folder called test scripts (Steam must be off for this to work.)
- -shutdown - This shuts down (exits) Steam.
- -silent - This suppresses the dialog box that opens when you start steam. It is used when you have Steam set to auto-start when your computer turns on. (Steam must be off for this to work.)
hldsupdatetool (Windows), Steam (Unix)
Syntax: hldsupdatetool -command <command> [parameters] [flags]
Commands
- -command update - Install or update HLDS.
- -command version - View installed versions.
- -command list - View available games.
Parameters
- -game <game> - Mod game directory name.
- -dir <installdir> - HLDS Install directory (if dir not specified, will use value from last run of tool).
Flags
- -verify_all - Verify all HLDS files are up to date.
- -retry - Automatically retry every 30 seconds if the Steam Network is busy.
- -remember_password - Remember password (if a username is supplied).
Optional parameters
These are only needed to access limited content.
- -username <username> - Steam account username
- -password <password> - Steam account password
Source Dedicated Server
Command-line arguments for the Source Dedicated Server executable (srcds.exe
, srcds_run
)
Command-line parameters
- -autoupdate - The server is searching for updates on startup.
- -console - SrcDS will run in console mode (Windows only).
- -game <game> - Specifies which game/mod to run.
- -insecure - Will start the server without Valve Anti-Cheat technology.
- -nobots - Disable bots.
- -tickrate <number> - Specifies Server-Tickrate (for more info see Source Multiplayer Networking).
- -verify_all - Will check that each file in the install matches the latest Steam version.
Console variables
- +<console variable> <arg> - Sets the Cvar (or console variable) to the specified setting.
Some useful console variables
- +hostname "Server Name" - Specifies the name of the server.
- +ip - Specifies the IP when multiple network cards are installed.
- +map <map> - Specifies which map to start.
- +maxplayers <number> - Specifies how many player slots the server can contain.
- +hostport <port> - Specifies the host port (can someone explain this?)
- +clientport <port> - Specifies the client port (can someone explain this?)
- +sv_lan <0/1> - If set to 1, server is only available in Local Area Network (LAN).
Half-Life Dedicated Server
These command-line parameters are used with hlds.exe
for Goldsource (Half-Life) games.
Command-line parameters
- -autoupdate - The server is searching for updates on startup.
- -console - HLDS will run in console mode (Windows only).
- -game <game> - Specifies which game/mod to run.
- -insecure - Disables Valve Anti-Cheat technology.
- -sport <port> - Specifies the VAC2 port the server should use.
Console variables
- +<console variable> <arg> - Sets the Cvar (or console variable) to the specified setting.
Some useful console variables
- +hostname "Server Name" - Specifies the name of the server.
- +ip - Specifies the IP when multiple network cards are installed.
- +map <map> - Specifies which map to start.
- +maxplayers <number> - Specifies how many player slots the server can contain.
- +port <port> - Specifies which port to use.
- +sv_lan <0/1> - If set to 1, server is only available in Local Area Network (LAN).