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 29: Line 29:
= Creating your first weapon =
= Creating your first weapon =
== The basics ==
== The basics ==
Shown below is a template item entry that contains the essential parameters for most custom weapons. Please not it won't work if you copy everything literally. Anything in {{code|<>}} brackets should be replaced by a suitable value.
To function, item entries must be placed under the {{code|preset=3|"items"}} parameter, with the exact indentation shown in the upcoming template.


Shown below is a template item entry that contains the essential parameters for most custom weapons. Values in {{code|<>}} brackets are placeholder values that should be replaced by suitable ones.


[[File:example_03_bns.png]]
=== Explanation ===
{{code|preset=3|"<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.
{{code|preset=3|"name"}}
: The unique internal identifier used by the weapon. Like {{code|preset=3|"<item id>"}}, the custom item schema will fail to load if it's shared with another entry.
{{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.
{{code|preset=3|"item_type_name"}}
: The item's type, which is displayed under the name in the description.


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