Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Creating custom weapons - basics: Difference between revisions

From TF2 Classified Wiki
No edit summary
No edit summary
Line 88: Line 88:
: This controls which classes can use the item. Set to 1 to use the loadout slot defined under {{code|preset=3|"item_slot"}}, or set it to a specific loadout slot to get it to appear in that slot for a specific class.
: This controls which classes can use the item. Set to 1 to use the loadout slot defined under {{code|preset=3|"item_slot"}}, or set it to a specific loadout slot to get it to appear in that slot for a specific class.
{{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. A list of item attributes can be found [[List of TF2C item attributes|here]].
{{code|preset=3|"static_attrs"}}
{{code|preset=3|"static_attrs"}}
: A variant of {{code|preset=3|"attributes"}} that should '''only''' be used for attributes like {{code|"min_viewmodel_offset"}}.
: A variant of {{code|preset=3|"attributes"}} that should '''only''' be used for attributes like {{code|"min_viewmodel_offset"}}.
Line 97: Line 97:
{{code|preset=3|"drop_sound"}}
{{code|preset=3|"drop_sound"}}
: The sound to play when the item is selected in a class' loadout screen.
: The sound to play when the item is selected in a class' loadout screen.
=== Example ===
Below is an example item entry for a custom pistol with a clip size bonus, a damage penalty and the [[tf:Winger|Winger]]'s fire sounds. Give copying and modifying this a go to get a feel for making items. If you're trying to find models and soundscripts, try using [https://developer.valvesoftware.com/wiki/Half-Life_Model_Viewer%2B%2B HLMV++] and/or [https://developer.valvesoftware.com/wiki/Hammer%2B%2B Hammer ++].
[[File:example_04_custompistol.png]]
Here is how the description looks in game:
[[File:example_04_backpack.png]]


== Adding attributes ==
== Adding attributes ==