Steam browser protocol: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 27: Line 27:
* '''steam://connect/<ip or dns name>''' This connects the user to the server specified by the ip or dns name (i.e 10.0.0.1:27015 or server.happy.com ).
* '''steam://connect/<ip or dns name>''' This connects the user to the server specified by the ip or dns name (i.e 10.0.0.1:27015 or server.happy.com ).


----
==Ability==
 
 
What can be done with these commands from a websites point of view?
What can be done with these commands from a websites point of view?
Its a pretty open and powerful system. A website link can start up steam and not only change any c_var of a user it can also execute commands like making a player join a specific server running a specific mod. It can even get the player to start up a dedicated server with a single click.
Its a pretty open and powerful system. A website link can start up steam and not only change any [[ConVar]] of a user, but it can also execute [[ConCommand]]s like making a player join a specific server running a specific mod. It can even get the player to start up a dedicated server with a single click.


Here some examples: (the wiki doesnt support them as links so copy / paste them with quotationmarks into a new browser window)
Here some examples: (the wiki doesnt support them as links so copy / paste them with quotationmarks into a new browser window)
Line 41: Line 39:
To view this browser based command system in action look at this [http://www.bgmod.com/index.php?module=servers server browser website] and click on one of the servers.
To view this browser based command system in action look at this [http://www.bgmod.com/index.php?module=servers server browser website] and click on one of the servers.


Note: If you forget the closing quote on a steam:"%c" command, you will get an assertion failed error from Steam.exe/BootStrapperApp.cpp.
{{note|If you forget the closing quote on a steam:"%c" command, you will get an assertion failed error from Steam.exe/BootStrapperApp.cpp.}}


--[[User:Black Panther|Black Panther]] 07:31, 28 Jun 2005 (PDT)
--[[User:Black Panther|Black Panther]] 07:31, 28 Jun 2005 (PDT)

Revision as of 19:45, 10 November 2005

There are several commands available that interact with steam. All of them open up steam if it is not open. They can either be typed into a command box (start-> run menu) or through your browser's addressbar.

  • steam:%c This opens Steam with command line arguments. Replace %c with command line arguments found here: Steam Command Line Options
  • steam://store/%id This opens up the store for the specified product, if no product is specified then the default one is opened. Replace %id with a product number from this page Steam Applaunch IDs.
  • steam://backup/%id This opens up Steam's backup utility. If a product id is specified then the product is checkmarked automatically. Replace %id with a product number from this page Steam Applaunch IDs.
  • steam://purchase/%id This opens a dialog box to buy a product from Steam. Since Counter-Strike: Condition Zero and the Valve Premier Pack can no longer be purchased by themselves, because they have been replace with Half-Life 2, this is useful. Replace %i with: 7 for Counter-Strike: Condition Zero, 8 for Valve Premier Pack, 9 for Half-Life 2 Bronze, 10 for Half-life 2 Silver, or 13 for Half-Life 2 Gold.
  • steam://connect/<ip or dns name> This connects the user to the server specified by the ip or dns name (i.e 10.0.0.1:27015 or server.happy.com ).

Ability

What can be done with these commands from a websites point of view? Its a pretty open and powerful system. A website link can start up steam and not only change any ConVar of a user, but it can also execute ConCommands like making a player join a specific server running a specific mod. It can even get the player to start up a dedicated server with a single click.

Here some examples: (the wiki doesnt support them as links so copy / paste them with quotationmarks into a new browser window)

steam:"-applaunch 70 -game "your_mod" +map "yourmap"" - This starts up Half-Life 1 running your_mod and loading a map called yourmap.bsp.

steam:"-applaunch 320 -game "your_mod" +connect "76.184.78.81:27015"" - This starts up Half-Life 2 DM running your_mod and joining the server with the IP 76.184.78.81 on port 27015.

To view this browser based command system in action look at this server browser website and click on one of the servers.

Note.pngNote:If you forget the closing quote on a steam:"%c" command, you will get an assertion failed error from Steam.exe/BootStrapperApp.cpp.

--Black Panther 07:31, 28 Jun 2005 (PDT) originally posted by --X2cube 05:23, 15 Nov 2004 on the hl2world wiki