Creating custom weapons - basics: Difference between revisions
From TF2 Classified Wiki
More actions
No edit summary |
No edit summary |
||
| Line 94: | Line 94: | ||
: 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]]. | : 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 | : A variant of {{code|preset=3|"attributes"}} that should ''only'' be used for attributes like {{code|"min_viewmodel_offset"}}. | ||
{{code|preset=3|"visuals"}} | {{code|preset=3|"visuals"}} | ||
: This parameter allows you to change the item's effects, like sounds and tracers. This will be explained in more detail later. | : This parameter allows you to change the item's effects, like sounds and tracers. This will be explained in more detail later. | ||
| Line 145: | Line 145: | ||
Now we're getting somewhere! There's still a couple of issues that we need to fix though, so let's go through how to do that. | Now we're getting somewhere! There's still a couple of issues that we need to fix though, so let's go through how to do that. | ||
The first problem is the position of the attribute in the description. In order from top to bottom, item descriptions should always list neutral (white) stats first, then positive (blue) stats, and finally negative (red) stats, with informational text like "This weapon will reload when not active" and "Can be defused by the Wrench" being positioned at the very end. | |||
'''IMAGE GOES HERE''' | |||
By moving the {{code|"can headshot VISIBLE"}} attribute to the top, it also moves it to the top of the item's description. | |||
== Changing the model(s) == | == Changing the model(s) == | ||
What's that? You want to change the model too? Well, with the base selection, there's only one that works with {{code|preset=3|"attach_to_hands" "2"}} - the Pistol model that we're currently using. However, what about TF2's c_models? | What's that? You want to change the model too? Well, with the base selection, there's only one that works with {{code|preset=3|"attach_to_hands" "2"}} - the Pistol model that we're currently using. However, what about TF2's c_models? | ||
[[File:example_05_wingermodel.png]] | |||
Here, the parameters have been adjusted for c_model animations. With {{code|preset=3|"attach_to_hands"}} set to 1, the Custom Pistol will use the secondary animations from the class' c_arms - in this case, the Scout's pistol animations. This allows for pistol c_models like the [[tf:Winger|Winger]]'s to be used without visual bugs. | |||
Here's how it looks in game: | Here's how it looks in game: | ||
| Line 159: | Line 166: | ||
If your item is multi-class and uses the c_models system, you don't need to worry about changing the model between classes. However, if the item uses the v_models system, you should change the model used between classes so that the animations don't look off. The question is: how ''do'' you get them to change between classes? | |||
The answer lies with the {{code|preset=3|"model_player_per_class"}} parameter. | The answer lies with the {{code|preset=3|"model_player_per_class"}} parameter. | ||