AddOns.cfg

From HLSW Wiki

Jump to: navigation, search

AddOns.cfg is a configuration file of HLSW found in the cfg subdirectory of the HLSW dir. It contains a list of addons, plugins, anti-cheat tools and mutators that are shown e.g. in the Server Details View.

Contents

Syntax

This document is a work progress of discussions with Strimo and a bit of experimenting. The rules that the config file must abide can be found here Config_Format.

Level 0

All addons must be held within an 'AddOns' block, this can be done by doing...

['AddOns'] = {
	<-- Level 1 -->
};

Level 1

Level 1 is a block statement that contains all addons related to that key. The key is the abbreviation that is known by HLSW. A list of known games be found here -- Insert Link--

['AddOns'] = {
	['HL'] = {
		<-- Level 2 -->
	};
	['HL2'] = {
		<-- Level 2 -->
	};
};

Level 2

Level 2 contains the individual block for each plugin and is used to segregate each plugin. The key for this element can be left empty. However, if the user would like to use an integer then that is allowed.

['AddOns'] = {
	['HL'] = {
		[] = {
			<-- Level 3 -->
		};
	};
};

Level 3

Level 3 is the final level and contains just standard key = value pairs with all the required information. If a key has no value, then that key does not need to be added.

  • Type - describes where to show the AddOn in HLSW (Plugin, Anti-Cheat or Ranking)
  • Name - is the shortened name of a plugin, which will be displayed, if the serverdetails-window isn't width enough to show all Plugins Longnames.
  • Longname - The full name of the Plugin
  • ActiveRule - If set the addon/plugin is detected if the game server contains the specified cvar/rule and the value is set to '1', 'true' or 'yes'.
  • ParamRule - If set the addon/plugin is detected if the game server contains the specified cvar/rule. The value is displayed behind the plugin's name.
  • ParamFormat - Controls the format algorithm of the parameter specified by ParamRule. If not set a 'v' (for version) is put in front of the parameter. If set the '%' character within ParamFormat is replaced by the value of ParamRule e.g. "% sec" would add the word 'sec' behind the parameter.
  • URL - This is the link, which opens up in your browser, when you click on a plugins name in the server details window. It is recommended to set this link to a page in this Wiki, as Websites and domains are changing, but this Wiki and its articles stay. This way the HLSW coders don't have to change the URL in HLSW on every Release, if there was a move or something.
['AddOns'] = {
	['HL'] = {
		[] = {
			['Type'] = 'Plugin';
			['Name'] = 'AM';
			['LongName'] = 'Admin-Mod';
			['ParamRule'] = 'admin_mod_version';
			['URL'] = 'http://wiki.hlsw.org/index.php/Admin-Mod';
		};
		[] = {
			['Type'] = 'Plugin';
			['Name'] = 'CM';
			['LongName'] = 'ClanMod';
			['ParamRule'] = 'clanmod_version';
		};
	};
};

Examples

['AddOns'] = {
	['HL'] = {
		[] = {
			['Type'] = 'Plugin';
			['Name'] = 'AM';
			['LongName'] = 'Admin-Mod';
			['ParamRule'] = 'admin_mod_version';
			['URL'] = 'http://wiki.hlsw.org/index.php/Admin-Mod';
		};
		[] = {
			['Type'] = 'Plugin';
			['Name'] = 'CM';
			['LongName'] = 'ClanMod';
		};
		[5] = {
			['Type'] = 'Plugin';
			['Name'] = 'LM';
			['LongName'] = 'LogMod';
			['ParamRule'] = 'logmod_version';
			['URL'] = 'http://wiki.hlsw.org/index.php/LogMod';
		};
	};
};

New entries

Add new entries to the HLSW Config Changes

Existing entries

see Category:AddOn

Personal tools
Developer