Difference between revisions of "Command Line Options"
m ({{note}} & {{syntax}}) |
RavuAlHemio (talk | contribs) (→Steam (Windows): Uncovered two new steam.exe commandline arguments during Episode One installation with the help of SysInternals' Process Explorer.) |
||
Line 49: | Line 49: | ||
=== Command-line parameters === | === 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. | * '''-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. | ||
+ | * '''-install %p''' - Install a product from a specified path (e.g. "D:" for the DVD-ROM drive if D: is one). | ||
+ | * '''-language %l''' - Sets the Steam language to the one specified. (Examples: "english", "german") | ||
* '''-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.) | * '''-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.) | * '''-nocache''' - This starts steam with no cache (Steam must be off for this to work properly.) | ||
Line 54: | Line 56: | ||
* '''-shutdown''' - This shuts down (exits) Steam. | * '''-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.) | * '''-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) == | == hldsupdatetool (Windows), Steam (Unix) == |
Revision as of 03:49, 6 June 2006
Contents
Source Games
These command-line parameters will work with any Source engine games (Half-Life 2, Counter-strike: Source, etc.).

<
and >
characters.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.
- -dev - Enables developer mode. Also disables the automatic loading of menu background maps and stops the quit dialog from appearing on exit.
- -condebug - Logs all console output into the
console.log
text file. - -console - Starts the game with the developer console enabled.
- -toconsole - Starts the engine directly in the console, unless a map is specified with
+map
. - -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
. - -32bit - Forces the engine to start in 32-bit mode. Only useful on 64-bit Operating Systems.
- -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 - Suppresses 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 standard background maps for speed reasons, use the
-dev
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.
- -install %p - Install a product from a specified path (e.g. "D:" for the DVD-ROM drive if D: is one).
- -language %l - Sets the Steam language to the one specified. (Examples: "english", "german")
- -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
- -allowdebug - (Same as -debug ?)
- -autoupdate - The server is searching for updates on startup.
- -console - SrcDS will run in console mode (Windows only).
- -dev - Show developer messages.
- -debug - Debug Mode.
- -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).
See also
Developer Console Template:Otherlang:en Template:Otherlang:en:jp