Thread: TF2Items FAQ
View Single Post
Author Message
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 02-28-2012 , 20:08   TF2Items FAQ
Reply With Quote #1

TF2Items FAQ
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~


Intro:
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.

Installing:
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.

Setting up your config:
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


Attributes listed in items_game look like this:

Spoiler


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.
Q & A:
  • Question: Does TF2Items "give" me items?
    Answer: No. No plugin can give you items in the sense that they exist in your backpack.
    The bundled tf2items_manager plugin can edit items you have. The [TF2Items] Give Weapon plugin will allow you to equip weapons you do not have (although only you will be able to see them).
  • Question: How can I edit item names (like nametags do)?
    Answer: You can't.
  • Question: Where can I find a list of item qualities?
    Answer: They are listed at the top of the items_game.txt file, under "qualities". See also: http://wiki.teamfortress.com/wiki/Item_qualities.
  • Question: I see min_value and max_value in items_game.txt... Can I set a value higher/lower than the min/max?
    Answer: Yes you can!

Notes:
~

__________________

Last edited by DarthNinja; 03-08-2014 at 02:51. Reason: OPTF2
DarthNinja is offline