I'm writing this because I frequently see the same questions being asked in the main TF2Items thread and IRC channel. This post is intended to provide quick answers to the most frequently asked questions.
To install TF2Items on your TF2 server, you must first have SourceMod and by extension MetaMod installed. After installing SM and MM and verifying they are running, download the TF2Items binaries from the Main Thread. Extract the zip file and upload the folders to your server's sourcemod directory. Modify the config file to do what you want. Details on this below.
You can tell the tf2items_manager what items to modify using the tf2items.weapons.txt config file. Items will be modified when they are equipped. The included tf2items.weapons.example.txt includes some example syntax, but is non-functional. Create your own config file. All attributes that can be used are found in the tf/scripts/items/items_game.txt file on your server. You may also view attributes in other ways, such as by adding ?d=1 to the end of a tf2items.com backpack link. OPTF2 has a very nice attributes list, here: http://optf2.com/440/attributes Click here for an image showing most of the components of the config: TF2Items config explained As said above, all the items and attributes in the game are listed in the items_game.txt file. Here is an example to show you how to read it: (I have added comments to the important lines) Spoiler PHP Code: "307" //The item index you would use in your config { //Item name (not always consistent with the name ingame) "name" "The Ullapool Caber" // more lines here that have been removed for the example "attributes" //attributes the item has, if any { "crit mod disabled" { "attribute_class" "mult_crit_chance" "value" "0" } } } Attributes listed in items_game look like this: Spoiler PHP Code: "88" { "name" "max pipebombs increased" "attribute_class" "add_max_pipebombs" "attribute_name" "Minor max pipebomb increase" "min_value" "2" "max_value" "3" "group" "only_on_unique" "description_string" "#Attrib_MaxPipebombs_Increased" "description_format" "value_is_additive" "hidden" "0" "effect_type" "positive" "stored_as_integer" "0" } "89" { "name" "max pipebombs decreased" "attribute_class" "add_max_pipebombs" "attribute_name" "Minor max pipebomb decrease" "min_value" "-2" "max_value" "-4" "group" "only_on_unique" "description_string" "#Attrib_MaxPipebombs_Decreased" "description_format" "value_is_additive" "hidden" "0" "effect_type" "negative" "stored_as_integer" "0" } The "88" and "89" shown above are the attribute index you would use in your config. What are valid values? The best way to find out is to try them yourself. To make testing values for the configs easier, I have written a plugin that allows you to give or edit an item by command. This allows you to make quick changes without having to edit/upload/reload your config: [TF2Items] Item Designer. Note on wildcarding:You can use wildcards to apply a set of attributes to all items or all players using an asterisk (*) in place of a steamid or item index. However, it should be noted that the plugin will stop when it finds the first applicable attribute set. Because of this, any configs added below a wildcard will not be used since the wildcard handles the request before a more specific config is read. By the same token, a specific config entry will override a wildcard if the former is higher in the config file then the latter. It should also be noted that there is no way to wildcard only hats/wearables or only weapons using the base plugin. Such functionality is possible, but would require a custom plugin.
"307" //The item index you would use in your config { //Item name (not always consistent with the name ingame) "name" "The Ullapool Caber" // more lines here that have been removed for the example "attributes" //attributes the item has, if any { "crit mod disabled" { "attribute_class" "mult_crit_chance" "value" "0" } } }
"88" { "name" "max pipebombs increased" "attribute_class" "add_max_pipebombs" "attribute_name" "Minor max pipebomb increase" "min_value" "2" "max_value" "3" "group" "only_on_unique" "description_string" "#Attrib_MaxPipebombs_Increased" "description_format" "value_is_additive" "hidden" "0" "effect_type" "positive" "stored_as_integer" "0" } "89" { "name" "max pipebombs decreased" "attribute_class" "add_max_pipebombs" "attribute_name" "Minor max pipebomb decrease" "min_value" "-2" "max_value" "-4" "group" "only_on_unique" "description_string" "#Attrib_MaxPipebombs_Decreased" "description_format" "value_is_additive" "hidden" "0" "effect_type" "negative" "stored_as_integer" "0" }
You can use wildcards to apply a set of attributes to all items or all players using an asterisk (*) in place of a steamid or item index. However, it should be noted that the plugin will stop when it finds the first applicable attribute set. Because of this, any configs added below a wildcard will not be used since the wildcard handles the request before a more specific config is read. By the same token, a specific config entry will override a wildcard if the former is higher in the config file then the latter. It should also be noted that there is no way to wildcard only hats/wearables or only weapons using the base plugin. Such functionality is possible, but would require a custom plugin.
~