Creating custom weapons - basics: Difference between revisions
From TF2 Classified Wiki
More actions
No edit summary |
No edit summary |
||
| Line 36: | Line 36: | ||
=== Explanation === | === Explanation === | ||
{{code | {{code|"<item id>"}} | ||
: The unique ID used by the weapon. Be careful: if shared with another item entry, the custom item schema will fail to load. Try to use high values (ideally >= 10000) to prevent clashes with vanilla item entries. | : The unique ID used by the weapon. Be careful: if shared with another item entry, the custom item schema will fail to load. Try to use high values (ideally >= 10000) to prevent clashes with vanilla item entries. | ||
{{code|preset=3|"name"}} | {{code|preset=3|"name"}} | ||
: The unique internal identifier used by the weapon. Like {{code | : The unique internal identifier used by the weapon. Like {{code|"<item id>"}}, the custom item schema will fail to load if it's shared with another entry. | ||
{{code|preset=3|"item_name"}} | {{code|preset=3|"item_name"}} | ||
: The displayed name of the item, which can either be plaintext or a localised string (e.g. #TF_Weapon_Pistol). If you want to add "''The''" to the beginning of the name, add the {{code|preset=3|"propername"}} parameter to the item entry and set the value to 1. | : The displayed name of the item, which can either be plaintext or a localised string (e.g. #TF_Weapon_Pistol). If you want to add "''The''" to the beginning of the name, add the {{code|preset=3|"propername"}} parameter to the item entry and set the value to 1. | ||
| Line 61: | Line 61: | ||
:: {{code|utility}} {{note|Not visible in the loadout menu}} | :: {{code|utility}} {{note|Not visible in the loadout menu}} | ||
{{code|preset=3|"anim_slot"}} | {{code|preset=3|"anim_slot"}} | ||
: The third-person and (if applicable) c_model animations to use. If absent, the item will use the default animations for its class. Below is a list of functional anim_slot values: | : The third-person and (if applicable) c_model animations to use. If absent, the item will use the default animations for its class. Below is a list of functional {{code|preset=3|"anim_slot"}} values: | ||
:: {{code|primary}} | :: {{code|primary}} | ||
:: {{code|primary2}} | :: {{code|primary2}} | ||
| Line 86: | Line 86: | ||
: This parameter controls what model's animations are used. If set to 1, the class' c_arms will be used for the animations. If set to 2, the item model's animations will be used instead. | : This parameter controls what model's animations are used. If set to 1, the class' c_arms will be used for the animations. If set to 2, the item model's animations will be used instead. | ||
{{code|preset=3|"used_by_classes"}} | {{code|preset=3|"used_by_classes"}} | ||
: This controls which classes can use the item. {{code | : This controls which classes can use the item. {{code|<backpack slot>}} can be set to 1 to use the loadout slot defined under {{code|preset=3|"item_slot"}}, or can be set to a specific loadout slot. | ||
{{code|preset=3|"attributes"}} | {{code|preset=3|"attributes"}} | ||
: The list of attributes that modify the weapon's behaviour. You can add as many attributes as you'd like, just as long as the attribute class isn't repeated. Some attributes can be condensed into a single line if you wish (e.g. <attribute name> "<value>"), which is helpful for meta-attributes like {{code|"hidden separator"}} and {{code|"provide on active"}} that are repeated often. | : The list of attributes that modify the weapon's behaviour. You can add as many attributes as you'd like, just as long as the attribute class isn't repeated. Some attributes can be condensed into a single line if you wish (e.g. <attribute name> "<value>"), which is helpful for meta-attributes like {{code|"hidden separator"}} and {{code|"provide on active"}} that are repeated often. | ||