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
Rei1556 (talk | contribs)
No edit summary
Added some attribute info
Line 20: Line 20:
* Duplicating certain parameters, {{code|attributes}} for example, does work, but it's advised not to do this to keep your weapon entries tidy.
* Duplicating certain parameters, {{code|attributes}} for example, does work, but it's advised not to do this to keep your weapon entries tidy.


* Basically everything about prefabs.
* Prefab info
** Prefabs work as templates. Load order is important; Prefab at the top means you want to overwrite the prefab, Prefab at the bottom means you want prefab to overwrite you
** Prefabs work as templates. Load order is important; Prefab at the top means you want to overwrite the prefab, Prefab at the bottom means you want prefab to overwrite you
** List based parameters (like visuals and static attrs) will get merged. Single value parameters (like bucket or attach to hands) will get overwritten.
** List based parameters (like visuals and static attrs) will get merged. Single value parameters (like bucket or attach to hands) will get overwritten.
Line 31: Line 31:
* {{code|custom_level_sounds.txt}} can be used to create custom soundscripts for weapons. Please correct this if there's a better way of doing this!
* {{code|custom_level_sounds.txt}} can be used to create custom soundscripts for weapons. Please correct this if there's a better way of doing this!


* localization strings in {{code|tf2c_english.txt}}
* Localization strings in {{code|tf2c_english.txt}}
 
* {{code|baseitem}} sets an item as the default in its slot. Rather finicky, so avoid using.
 
* Attribute info
** Weapon attributes are set in the {{code|attributes}} and rarely {{code|static_attrs}} parameters.
** Attributes are defined in the attributes section of the schema using a similar system to item entries.
** Though attributes with custom code aren't possible without VScript (correct this if wrong), variants of existing attributes can be created by making a new attribute with the same attribute class.


= See also =
= See also =