From HLSW Wiki
Jump to: navigation, search


The Games.cfg file contains information about every game hlsw supports. The information are stored in the ['Games'] variable. Every game is identified by a acronym that must be unique.

At the current version it is not possible to add a new game because hlsw only accepts a hardcoded list of game. This constrained will be changed in near future.


['Games'] = {
	['HL'] = {
		<-- Game Information -->

	['BF2'] = {
		<-- Game Information -->


In this case HL and BF2 are the identifiers for Half-Life and Battlefield 2.

Game Information

The game information consists of the following keys. Grey keys are used only in special cases and are unimportant.

The long name of the game. e.g. "Half-Life".
This is the link, which opens up in your browser, when you click on the game name in the server details window.
An array of registry keys that is scanned on HLSW startup to check if the specified game is installed. It is only scanned if no gaming directory is set. Each registry key contains the installation path of the game. Depending on which registry key is found a different file name can be set.that contains the installation path of the game.
Registry key that is scanned on startup containing the installation directory.
File name that is used if the registry keys is found.
The game is only detected if the file or directory specified by this parameter exists in the game directory found in registry. This is especially useful for steam based games. See HL, HL2 or L4d for example. This parameter is optional and has been added in HLSW v1.3.0.8.
The acronym that is used in the registry to save the game information. If not specified the standard acronym is used. This parameter is only useful if the acronym changes but the registry settings should be kept.
The name of the executable file of the multiplayer part of the game (some games have different exe files for single and multiplayer).
This value specifies the sub directory in which the game executable is located. It is mainly used for Unreal Engine based games. There is the exe file in the system directory and not in the root game directory located.
You can specifiy an additional file filter for the game settings of one game. There you can browse for the exe file and on the browser dialog you can select per default *.exe and the default file name e.g. hl.exe. If you like an extra option to be shown there, specify this parameter. Atm it is only used by HL, because there exists a special Counter-Strike version that uses cstrike.exe instead of hl.exe.
Specifies if the game is managed by a special software. Atm the only manager known by HLSW is Steam.
The ConnectType specifies how HLSW must launch the game. It is one of these values:
ConnectType Description
Parameter This is the default ConnectType. The parameter specified in the ['Parameter'] key are passed to the exe file.
UT Use this connect type for games based on the Unreal Engine. The ['Parameter']['DisplayType'] is used as one parameter that is passed to the exe. The password and player name is optionally added to this parameter.
HL This connect type is used by HL and HL2. It is nearly the same like Parameter but deals with some special charactaristica of Half-Life.
BF On Battlefield and similar games the parameters must be passed in a special order differing from the order used by Parameter.
This parameter is only important for Steam based games. It specifies the exe file name of the game that is started by Steam and is needed for the connecting process.
The Parameter key contains a block of keys that specify the connect parameters. In connection with the ConnectType HLSW knows how to start a game.
The ['Parameter']['Display'] key specifies the command line parameter that are displayed in the HLSW settings. If it does not exists it is generated by the other values.
These key contain in each case a vector of strings that specifies connect parameters that are passed to the exe file. The Connect part is always used. The Password part is only used if the game server is password protected. The Name part is only used if a player name is enter in HLSW and the Game part is only used if a mod is running on the game server.
If specified it contains a list of mods. Each mod is identified through a special string identifier e.g. cstrike for Counter-Strike. An empty string identifies the game itself when no mod is activated.
Long name of the mod that is displayed in HLSW
Mod acronym
Specifies a URL that is used if someone clicks on the mod's name.
Some mod identifieres contain a mods version number. In that case several mod description share the same Name and the ModVersion parameter contains the version of the mod.
['Icon'] / ['IconName']
Specifies an icon that is displayed if the mod is activated. These parameter works exactly like the game Icon/IconName parameters.

The MapList block contains information about how HLSW get the information that a specific map is on the client installed or not.
The extension of the map files e.g. bsp on Half-Life or map on Quake 4.
The type describes if the map files can be found in a sort of archive. Possible values:
Type Used by
'PAK' Quake 2
'PK3' Quake 3 Engine
'VL2' Archive file used by Tribes 2
'GCF' Steam
'PK4' Doom 3 Engine
'IWD' Call of Duty 2
AddOns is connected to the AddOn Block in the AddOns.cfg file. HLSW uses the AddOns list to detect and display the correct Name/URL of the addons of one game.
TeamColor contains key/value pairs that specifies the team color for different teams. All player names belonging to one team is dipslayed in that color. One team is identified by its team name. Valid color values are Red, Blue, Green and Yellow.
Specifies some information how HLSW can detect the current used player name. The information is extracted one game config file.
The file name containing the player name.
Type specifies the search method that is used to find the player name in the file. Param is a parameter for the search method that has different meaning for each search method. Valid search methods are:
Type Description
'2Param' Searches a line with two parameters. The first parameter must match the Param value. The second parameter is the player name. E.g. ['Type'] = '2Param'; ['Param'] = '_cl_name'; would find "_cl_name PLAYERNAME".
'3Param' Searches a line with three parameters. The first and second parameter must match the Param value. The Param contains two space seperated values. The third parameter is the player name. E.g. ['Type'] = '3Param'; ['Param'] = 'set name'; would find "set name PLAYERNAME".
'Begin' The beginning of the line must match the Param value. The remaining part is the player name. E.g. ['Type'] = 'Begin'; ['Param'] = 'Name='; would find "Name=PLAYERNAME".
'HL' Half-Life specific.

The Query block contains all game information that are related with querying the game server.
RconData is connected to the RconData Block in the Rcon.cfg file.
The LAN block contains all information that are neccessary for LAN queryies.
This is the query port of the game that is set per default when you start a lan server. On LAN Search HLSW queries alle port between DefaultQueryPort-1 and DefaultQueryPort+9 to find a game server of this game.
The protocol that is used to search this game on LAN. Possible values:
Protocol Description
'HL' Half-Life Protocol
'HL2' Half-Life 2 Protocol
'Q2' Quake 2 Protocol
'Q3' Quake 3 Protocol
'GS' GameSpy Protocol
'UT2003' UT2 Protocol
'Tribes 2' Tribes 2 Protocol
'Savage' Savage Protocol
'D3' Doom 3 Protocol
This parameter contains an array of protocols that are used to query a game server. One game server can have more than one protocol, e.g. UT2004 implements the native UT2004 protocol and gamespy protocol. The problem with the native protocol is that the player information are only updated every 15 seconds and the problem with the gamespy protocol is that it does not provide the mutator information. So HLSW uses both protocols. You can deactivate any protocol in the UT2004 ini so HLSW has also to deal with the case that only one protocol is available.
The protocol used to query the server. Possible values:
Protocol Description
'HL' Half-Life Protocol
'Q3' Quake 3 Protocol
'GS' GameSpy Protocol
'GS_NOSPLIT' GameSpy Protocol (used for some broken GS protocol implementations)
'GS2' GameSpy II Protocol
'Tribes 2' Tribes 2 Protocol
'UT2003' UT2 Protocol (also for UT2004)
'MoHAA' MoHAA Protocol
'Quake' Quake Protocol (with "status" request)
'Q2b' Quake Protocol (with "getinfo" request)
'D3' Doom 3 Protocol
'OGP' Open Game Protocol
'Savage' Savage Protocol
'HL2' Half-Life 2 Protocol
'Ventrilo' Ventrilo Protocol
The condition that must be met that HLSW uses the protocol. Possible values:
Condition Description
None Always use this protocol
1Port The query port is equal to the connect port.
2Port The query port differs form the connect port.
2PortDiffMore1 The query port differs form the connect port and the difference is greater than 1.
Each flag is set, if it is stated.
		['Flags'] = set('Connect', 'GamersSearch');
sets the flags Connect and GamersSearch.
A list of flags and their meaning:
Flag Description
Connect Connection button in HLSW is enabled
GamersSearch This game is supported by gamers search
SimpleExec On connection only start the program and do nothing else like minizing hlsw, changing icq status, etc. This is used by Ventrilo.
The hardcoded icon id for this game in HLSW.
The ['Icon'] is not set HLSW tries to open the game icon from "/ico/<IconName>.ico"