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 127: Line 127:
Oh dear. It seems the {{code|"can headshot"}} attribute lacks a description string, and is therefore hidden. This, of course, isn't ideal for stat clarity, so how exactly do we go about fixing this?
Oh dear. It seems the {{code|"can headshot"}} attribute lacks a description string, and is therefore hidden. This, of course, isn't ideal for stat clarity, so how exactly do we go about fixing this?


Well, remember the {{code|preset=3|"attributes"}} explained [[Creating custom weapons#Explanation|here]]?
Remember the {{code|preset=3|"attributes"}} parameter explained [[Creating custom weapons#Explanation|here]]? Well, it's time to put it to good use!
 
x
 
 
In your {{code|preset=3|"attributes"}} parameter (the one with the same indentation as {{code|preset=3|"items"}} and {{code|preset=3|"prefabs"}} - I know, it's confusing), copy the above attribute. This is an exact copy of the {{code|"can headshot"}} attribute with 3 key differences: the ID is different to avoid clashing with the original; the {{code|"name"}} is different for the same reason; and, most importantly, a {{code|"description_string"}} parameter has been added. This parameter is responsible for the coloured text displayed in an item's description. Here, it's been set to the plaintext "Crits on headshot"


== Changing the model(s) ==
== Changing the model(s) ==