Creating custom weapons - basics: Difference between revisions

From TF2 Classified Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{stub}}
{{stub}}
{{todo|Complete every current section and add new ones if applicable.}}
{{todo|Complete every current section and add new ones if applicable.


Adjust image sizes and potentially add captions.


'''This guide is currently incomplete, but it should suffice if you just need the basics!
Demonstrate using a c_model with attach_to_hands 2 and possibly a v_model with attach_to hands 1.


If you're here, chances are you're looking to create your own weapons for ''TF2 Classified''. Whether for use against bots or other players, this guide should hopefully cover the majority of your questions regarding custom weapon creation. If it doesn't, ask for help in the '''#modding-discussion''' channel in the [https://discord.gg/tf2classified official TF2C Discord].
Adjust the positions of the examples and text to look less messy.


= Getting Started =
If you're going to add information, put it in [[Creating custom weapons#Creating your first weapon|Creating your first weapon]] only if it's '''very''' important to creating weapons, and otherwise put it in [[Creating custom weapons - advanced]]. Do NOT overwhelm beginners!
Before going over how to create custom weapons, we first need a functional custom item schema to put them into. The item schema is basically a big list that you append all of your weapons into, and is arguably the single most important file for that reason. It uses [https://developer.valvesoftware.com/wiki/VDF VDF], which is the standard format for storing game-related metadata in Source. If you don't know '''VDF''', don't worry - it won't take long to understand the syntax.


== Creating the custom item schema ==
Don't try to fix the wonky indentation in the examples. It's inconsequential and fixing it here will make it look bad in Notepad ++, so it's best to leave it as is. Yeah, I'm annoyed by it too lol}}
To begin, create a file named {{code|custom_items_game.txt}} in the {{code|<SteamUserDir>\Team Fortress 2 Classified\tf2classified\custom\<Mod Name>\scripts}} directory. This is the file that will contain all of the information regarding your custom weapons. Please note that you cannot have multiple ''custom_items_game.txt'' files loaded simultaneously, so any other mod folders that contain them should be placed in {{code|tf2classified\custom\disabled}} to allow the new custom item schema to load.


== Setting up the custom item schema ==
 
'''This guide is currently incomplete, but it should suffice if you just need the very basics!'''
 
If you're here, chances are you're looking to create your own weapons for ''TF2 Classified''. Whether for use against bots or other players, this guide should hopefully help you to start out with creating custom weapons. If it doesn't, consider asking for help in the '''#modding-discussion''' channel in the [https://discord.gg/tf2classified official TF2C Discord].
 
= Creating a custom item schema =
Before going over how to create custom weapons, we first need a functional custom item schema to put them into. The item schema is basically a big list that you add all of your items into, and is responsible for defining everything about them. It uses [https://developer.valvesoftware.com/wiki/VDF VDF], which is the standard format for storing game-related metadata in Source. If you don't know '''VDF''', don't worry - it won't take long to understand the syntax.
 
== custom_items_game.txt ==
To begin, create a file named {{code|custom_items_game.txt}} in the {{code|<SteamUserDir>\Team Fortress 2 Classified\tf2classified\custom\<Mod Name>\scripts\items}} directory. This is the file that contains all the information regarding your custom weapons. Please note that you cannot have multiple {{code|custom_items_game.txt}} files loaded simultaneously, so any other mod folders that contain them should be placed in {{code|tf2classified\custom\disabled}} to allow the new custom item schema to load.
 
It should be noted that the {{code|custom_items_game.txt}} method is the simplest and objectively best option for defining custom weapons, as it automatically inherits data from the newest version of the vanilla {{code|items_game.txt}} file. It is possible to override the vanilla item schema with one that contains custom weapons, but this method is not recommended as the overriding file must be manually updated each patch for parity with the vanilla {{code|items_game.txt}} file. For you and your players' sake, use the {{code|custom_items_game.txt}} method ''only''.
 
== Setting up parameters ==
Shown below are the main parameters that should ideally be included in every single item schema. Copy this exactly into your {{code|custom_items_game.txt}} file.
Shown below are the main parameters that should ideally be included in every single item schema. Copy this exactly into your {{code|custom_items_game.txt}} file.


[[File:example_02_emptyschema.png]]
<pre>
#base "items_game.txt"
 
"items_game"
{
"items"
{
}
"prefabs"
{
}
"attributes"
{
}
}
</pre>


=== Explanation ===
=== Explanation ===
{{code|preset=3|base "items_game.txt"}}
{{code|preset=3|base "items_game.txt"}}
: This line is responsible for merging the data from the custom item schema into TF2C's main item schema. Without this, none of TF2C's items, prefabs or attributes will load, which isn't very ideal.
: This line is responsible for merging the data from the custom item schema into TF2C's main item schema. Without this, TF2C's items, prefabs and attributes will fail to load.
{{code|preset=3|"items_game"}}
{{code|preset=3|"items_game"}}
: The parameter that contains everything unique to the item schema. Whilst not particularly interesting, it's vital for the item schema to run.
: The parameter that contains everything unique to the item schema. Whilst not particularly interesting, it's vital for the item schema to run.
Line 33: Line 60:


== The basics ==
== The basics ==
To function, item entries must be placed under the {{code|preset=3|"items"}} parameter, with the exact indentation shown in the upcoming template.
To function, item entries must be placed in the {{code|preset=3|"items"}} parameter.
 
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.
 
<pre>
"items_game"
{
"items"
{
"<item id>"
{
"name" "<internal name>"
"item_name" "<item name>"
"item_type_name" "<item type name>"
"item_quality" "<item name colour>"
"item_logname" "<dev console name>"
"item_iconname" "<icon name>"
"item_class" "<item class>"
"item_slot" "<backpack slot>"
"anim_slot" "<player model and c_model animations>"
 
"bucket" "<inventory slot override>"
"bucket_position" "<inventory subslot override>"
"model_player" "<view model>"
"model_world" "<world model>"
"image_inventory" "<backpack icon>"
"attach_to_hands" "<view model animation type>"
 
"used_by_classes"
{
"<class>" "<backpack slot>"
}


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.
"attributes"
{
"<attribute name>"
{
"attribute_class" "<attribute class>"
"value" "<value>"
}
}
"static_attrs"
{
"<attribute class>" "<value>"
}
"visuals"
{
"<parameter>" "value"
}


[[File:example_03_bns.png]]
"mouse_pressed_sound" "<backpack select sound>"
"drop_sound" "<backpack deselect sound>"
}
}
}
</pre>


=== Explanation ===
=== Explanation ===
{{code|"<item id>"}}
{{code|"<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.
: The unique ID used by the weapon. This can be any integer from 0 to 65535. Be careful: if shared with another item entry, the custom item schema will fail to load. Try to use random high values (ideally >= 10000) to prevent clashes with vanilla item entries.
{{code|preset=3|"name"}}
{{code|preset=3|"name"}}
: The unique internal identifier used by the weapon. Like {{code|"<item id>"}}, the custom item schema will fail to load if it's shared with another entry.
: The unique internal identifier used by the weapon. Like {{code|"<item id>"}}, the custom item schema will fail to load if it's shared with another entry.
Line 56: Line 140:
{{code|preset=3|"item_slot"}}
{{code|preset=3|"item_slot"}}
: The loadout slot that the weapon is located in. Below is a list of functional {{code|preset=3|"item_slot"}} values:
: The loadout slot that the weapon is located in. Below is a list of functional {{code|preset=3|"item_slot"}} values:
:: {{code|primary}}
<pre>
:: {{code|secondary}}
primary
:: {{code|melee}}
secondary
:: {{code|pda}}
melee
:: {{code|pda2}}
pda
:: {{code|building}}
pda2
:: {{code|action}} {{note|Not visible in the loadout menu}}
building
:: {{code|utility}} {{note|Not visible in the loadout menu}}
action
utility
</pre>
{{code|preset=3|"anim_slot"}}
{{code|preset=3|"anim_slot"}}
: The third-person and (if applicable) c_model animations to use. If absent, the item will use the default animations for its class. Below is a list of functional {{code|preset=3|"anim_slot"}} values:
: The third-person and (if applicable) c_model animations to use. If absent, the item will use the default animations for its class. Below is a list of functional {{code|preset=3|"anim_slot"}} values:
:: {{code|primary}}
<pre>
:: {{code|primary2}}
primary
:: {{code|secondary}}
primary2
:: {{code|secondary2}}
secondary
:: {{code|melee}}
secondary2
:: {{code|melee_allclass}}
melee
:: {{code|pda}}
melee_allclass
:: {{code|pda2}}
pda
:: {{code|building}}
pda2
:: {{code|item1}}
building
:: {{code|item2}}
item1
:: {{code|item3}}
item2
:: {{code|item4}}
item3
:: {{code|passtime_ball}}
item4
:: {{code|force_not_used}}
passtime_ball
force_not_used
</pre>
{{code|preset=3|"model_player"}}
{{code|preset=3|"model_player"}}
: The model used in first person.
: The model used in first person.
Line 94: Line 182:
: 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 '''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"}}.
{{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 103: Line 191:


=== Example ===
=== 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. Copy it and try modifying it to get a feel for making items. If you're looking for 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 ++], or look at item entries in TF2 and TF2C's item schemas.
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. Copy it and give modifying it a go to get a feel for making items. If you're looking for 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 ++], or look at item entries in TF2 and TF2C's item schemas.


[[File:example_04_custompistol.png]]
<pre>
"items_game"
{
"items"
{
"10000" // Custom Pistol
// You can add comments to your item schema with double slashes!
{
"name" "CUSTOM_PISTOL_TEST"
"item_name" "Custom Pistol"
"item_type_name" "#TF_Weapon_Pistol"
"item_logname" "pistol_test"
"item_iconname" "pistol"
"item_class" "tf_weapon_pistol"
"item_slot" "secondary"
"anim_slot" "secondary"
"model_player" "models/weapons/v_models/v_pistol_scout.mdl"
"model_world" "models/weapons/w_models/w_pistol.mdl"
"image_inventory" "backpack/weapons/w_models/w_pistol"
"attach_to_hands" "2"


"used_by_classes"
{
"scout" "1"
}
"attributes"
{
"clip size bonus"
{
"attribute_class" "mult_clipsize"
"value" "2"
}
"damage penalty"
{
"attribute_class" "mult_dmg"
"value" "0.67"
}
}
"static_attrs"
{
"min_viewmodel_offset" "10 0 -10"
}
"visuals"
{
"sound_single_shot" "Weapon_Winger.Single"
"sound_burst" "Weapon_Winger.SingleCrit"
}
"mouse_pressed_sound" "ui/item_light_gun_pickup.wav"
"drop_sound" "ui/item_light_gun_drop.wav"
}
}
}
</pre>


Here's how the description looks in game:
Here's how the description looks in game:
Line 113: Line 259:


== Attributes ==
== Attributes ==
=== Adding / adjusting item attributes ===
=== Adding item attributes ===
As mentioned above, the Custom Pistol has two attributes: a clip size bonus and a damage penalty, which gives it a clip size of 24 and a base damage of 10. It's a bit boring, so how about we spice things up a bit?
As mentioned above, the Custom Pistol has two attributes: a clip size bonus and a damage penalty, which gives it a clip size of 24 and a base damage of 10. It's a bit boring, so how about we spice things up a bit?


[[File:example_07_canheadshot.png]]
<pre>
 
"items_game
{
"items"
{
"<item ID>"
{
<...>
"attributes"
{
"damage bonus"
{
"attribute_class" "mult_dmg"
"value" "1.33"
}
"clip size penalty"
{
"attribute_class" "mult_clipsize"
"value" "0.5"
}
"can headshot"
{
"attribute_class" "can_headshot"
"value" "1"
}
}
<...>
}
}
}
</pre>


Now, the Custom Pistol instead has a damage bonus and a clip size penalty, resulting in 20 base damage and a clip size of 6. More importantly though, the {{code|"can headshot"}} attribute has given it the ability to deal crits on headshot. Pretty cool, eh?
Now, the Custom Pistol instead has a damage bonus and a clip size penalty, resulting in 20 base damage and a clip size of 6. More importantly though, the {{code|"can headshot"}} attribute has given it the ability to deal crits on headshot. Pretty cool, eh?
Line 130: Line 305:
Remember the {{code|preset=3|"attributes"}} parameter explained [[Creating custom weapons#Setting up the custom item schema|here]]? Well, it's time to put it to good use!
Remember the {{code|preset=3|"attributes"}} parameter explained [[Creating custom weapons#Setting up the custom item schema|here]]? Well, it's time to put it to good use!


[[File:example_08_headshotvisible.png]]
<pre>
"items_game"
{
<...>
"attributes"
{
"40000"
{
"name" "can headshot VISIBLE"
"attribute_class" "can_headshot"
"description_format" "value_is_additive"
"stored_as_integer" "1"


"description_string" "#Attrib_RevolverUseHitLocations"
}
}
}
</pre>


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 a copy of the {{code|"can headshot"}} attribute that's been simplified for this tutorial.
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), paste the above attribute. This is a copy of the {{code|"can headshot"}} attribute that's been simplified for this tutorial.


The {{code|"description_string"}} parameter is responsible for the stats displayed in an item's description. Here, it's been set to the plaintext "Crits on headshot", which means that it won't be affected by language. Thankfully, in this instance, there's a suitable localised string that can be used instead to ensure that it's understandable to a wider range of people.
The {{code|"description_string"}} parameter is responsible for the stats displayed in an item's description. Here, it's been set to the plaintext "Crits on headshot", which means that it won't be affected by language. Thankfully, in this instance, there's a suitable localised string that can be used instead to ensure that it's understandable to a wider range of people.
Line 146: Line 337:
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.


== Changing the model(s) ==
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.
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?
 
<pre>
"items_game"
{
"items"
{
"<item ID>"
{
<...>
"attributes"
{
"can headshot VISIBLE"
{
"attribute_class" "can_headshot"
"value" "1"
}
"damage bonus"
{
"attribute_class" "mult_dmg"
"value" "1.33"
}
"clip size penalty"
{
"attribute_class" "mult_clipsize"
"value" "0.5"
}
}
<...>
}
}
}
</pre>
 
By moving the {{code|"can headshot VISIBLE"}} attribute to the top, it also moves it to the top of the item's description.


Here, the parameters have been adjusted to compensate for the new model, which is the Winger's c_model for this demonstration. Now that {{code|preset=3|"attach_to_hands"}} is set to 1, the Custom Pistol will use the c_arms animations that TF2 uses.
[[File:example_09_backpack.png]]


[[File:example_05_wingermodel.png]]


The second problem is the text colour. Crits on headshot is undeniably an upside, so it should be coloured blue to reflect that.


Here's how it looks in game:
<pre>
"items_game"
{
<...>
"attributes"
{
"40000"
{
"name" "can headshot VISIBLE"
"attribute_class" "can_headshot"
"description_format" "value_is_additive"
"stored_as_integer" "1"
"description_string" "#Attrib_RevolverUseHitLocations"
"effect_type" "positive"
}
}
}
</pre>
 
By adding {{code|"effect_type" "positive"}} to the {{code|"can headshot VISIBLE"}} attribute, we can set the colour to the same blue as other positive attributes. If you want an attribute to be displayed as negative, simply replace {{code|"positive"}} with {{code|"negative"}}. The same goes for neutral attributes - replace {{code|"positive"}} with {{code|"neutral"}}.
 
Here's the result:
 
[[File:example_10_backpack.png]]
 
== Models ==
=== c_models ===
What's that? You want to change the model too? Well, with the base selection of models in Classified, 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?
 
<pre>
"items_game"
{
"items"
{
"<item ID>"
{
<...>
"item_logname" "pistol_test"
"item_iconname" "winger"


[[File:example_05_world.jpg|540px]]
"item_class" "tf_weapon_pistol"


"item_slot" "secondary"
"anim_slot" "secondary"


You might've noticed that the Engineer was added to {{code|preset=3|"used_by_classes"}}. Due to the way c_models work, you don't need to set different models for each class for the animations to work properly. However, v_models have the animations baked into the models themselves, so how do you get them to change between classes?
"model_player" "models/workshop/weapons/c_models/c_winger_pistol/c_winger_pistol.mdl"
"image_inventory" "backpack/workshop/weapons/c_models/c_winger_pistol/c_winger_pistol"


The answer lies with the {{code|preset=3|"model_player_per_class"}} parameter.
"attach_to_hands" "1"


[[File:example_06_modelperclass.png]]
"used_by_classes"
{
"scout" "1"
"engineer" "1"
}
<...>
}
}
}
</pre>


By adding this to the first version of the Custom Pistol, you can change the v_model used by each class, allowing you to have the weapon on both Scout and Engineer without making them share animations.
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.


== Testing the weapon ==
Here's how it looks in game:
TEMPTEXT


= Advanced weapon creation =
[[File:example_05_world.jpg|540px]]


== Creating custom models, effects and sounds ==
TEMPTEXT


== Making custom attributes ==
=== Class-specific v_models ===
TEMPTEXT
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?


== VScript ==
The answer lies with the {{code|preset=3|"model_player_per_class"}} parameter.
TEMPTEXT Link to a separate VScript page


= See also =
<pre>
* [[List of TF2C item attributes]]
"items_game"
* [[List of TF2C item classes]]
{
* [[List of TF2C conditions]]
"items"
{
"<item ID>"
{
<...>
"model_player_per_class"
{
"engineer" "models/weapons/v_models/v_pistol_engineer.mdl"
"scout" "models/weapons/v_models/v_pistol_scout.mdl"
}
<...>
}
}
}
</pre>


[[Category:Guides]]
By adding this to the first version of the Custom Pistol, you can change the v_model used by each class, allowing you to have the weapon on both Scout and Engineer without making them share animations.


= Misc info to be added to the finished sections (TEMP!)=
== Testing ==
* It should be noted that custom weapons don't currently show up in the loadout on the main menu. To view them, you need to load into a map first.{{note|rei note! if using a items_game instead of a custom_items_game they will load on the main menu. however this means you are more prone to schema breakage between game versions and you gotta constantly update your copy anytime they update the item schema}}
=== Loading into a map ===
To get the custom item schema to load, boot up any map. Once you do, the weapon should appear in the loadout grid.


* It's a good idea to go over the basic parameters that most weapons should have. Failing to include these can either break the weapon in some way or completely prevent the whole pack from loading.
=== Making changes ===
If you make changes to the custom item schema, use the command {{code|cl_reload_item_schema}} to show the changes in game. {{code|sv_reload_item_schema}} can also be used to update the custom item schema for the whole server in multiplayer.


* Duplicate {{code|name}} parameters in a single weapon entry will prevent the custom item schema from loading. Same goes for duplicate entry IDs.
= Modifying vanilla weapons =
''This section will potentially include a different method for editing vanilla weapons that isn't widely used. In the meantime, please do '''not''' write any other methods here, and use this method with caution if you plan on editing vanilla weapons.''


* Duplicating certain parameters, {{code|attributes}} for example, does work, but it's advised not to do this to keep your weapon entries tidy.
To modify vanilla items, you can include blank item entries in your custom schema with the same IDs as the ones you want to edit. From there, simply add new parameters, and they will merge with the original item's in game. If the same parameter or attribute is in both the vanilla item entry and the copy, then the copy's version will take priority.


* Prefab info
When attempting to override a item entry with the {{code|preset=3|baseitem}} parameter, you may have noticed that every other item with it disappears. To counteract this, include a blank copy of any base item you haven't modified in your custom item schema. It should be noted that any base items added to the vanilla item schema in updates must also be added to your custom schema, otherwise they will fail to appear in game. However, this is a rare occurrence, so constant maintenance won't be necessary.
** 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.
** Prefabs cannot have spaces in the name. This is because spaces are used as a delimiter to apply multiple prefabs. (eg, {{code|prefab "prefab1 prefab2"}} will make the weapon inherit the parameters from both {{code|prefab1}} and {{code|prefab2}})


* {{code|item_name}}, {{code|item_type_name}}, {{code|item_description}} and {{code|description_string}} support localized strings.
Below is an example {{code|custom_items_game.txt}} file that contains empty copies of every item with the {{code|preset=3|baseitem}} parameter as of [[3.0.0]].


* {{code|item_name_color}} and {{code|custom_color}} allow weapon names and attributes respectively to be coloured with RGB values.
<pre>
#base "items_game.txt"


* {{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!
"items_game"
{
"items"
{
"0" // Bat
{
}
"1" // Bottle
{
}
"2" // Fire Axe
{
}
"3" // Kukri
{
}
"4" // Knife
{
}
"5" // Fists
{
}
"6" // Shovel
{
}
"7" // Wrench
{
}
"8" // Bonesaw
{
}
"9" // Shotgun (Engineer)
{
}
"10" // Shotgun (Soldier)
{
}
"11" // Shotgun (Heavy)
{
}
"12" // Shotgun (Pyro)
{
}
"13" // Scattergun
{
}
"14" // Sniper Rifle
{
}
"15" // Minigun
{
}
"16" // SMG
{
}
"17" // Syringe Gun
{
}
"18" // Rocket Launcher
{
}
"19" // Grenade Launcher
{
}
"20" // Stickybomb Launcher
{
}
"21" // Flame Thrower
{
}
"22" // Pistol (Engineer)
{
}
"23" // Pistol (Scout)
{
}
"24" // Revolver
{
}
"25" // PDA: Teleporter (Construction PDA)
{
}
"26" // Destruction PDA
{
}
"27" // Disguise Kit
{
}
"28" // Builder (Toolbox)
{
}
"29" // Medi Gun
{
}
"30" // Invis Watch
{
}
"735" // Sapper
{
}
"1132" // Spellbook Magazine (Halloween)
{
}
"1152" // Grappling Hook (Mannpower)
{
}
"1155" // PASS Time Jack (PASS Time)
{
}
"2000" // Umbrella
{
}
}
}
</pre>


* Localization strings in {{code|tf2c_english.txt}}
= List of useful attributes =
The table below lists generally useful attributes from [[List of TF2C item attributes|this page]].


* {{code|baseitem}} sets an item as the default in its slot. Rather finicky, so avoid using.
<div style="max-width: 100%; overflow-x: scroll;">
{| class="wikitable sortable grid"
! class="header" style="font-size: 16px;background-color: #583a31;color: white;" | ID
! class="header" style="font-size: 16px;background-color: #583a31;color: white;" | Name
! class="header" style="font-size: 16px;background-color: #583a31;color: white;" | Description
! class="header" style="font-size: 16px;background-color: #583a31;color: white;" | Value Type
! class="header" style="font-size: 16px;background-color: #583a31;color: white;" | Class
! class="header" style="font-size: 16px;background-color: #583a31;color: white;" | Notes
|-
| 43 || scattergun no reload single || Attrib_Scattergun_NoReloadSingle || additive || set_scattergun_no_reload_single || Hidden
|-
| 128 || provide on active || When weapon is active || additive || provide_on_active ||
|-
| 280 || override projectile type || || additive || set_scattergun_no_reload_single || Hidden
Changes the projectile type of the weapon
|-
| 298 || mod ammo per shot || Per Shot: -%''s1'' ammo || additive || mod_ammo_per_shot ||
|-
| 303 || mod max primary clip override ||  || additive || mod_max_primary_clip_override || Hidden
|-
| 551 || special taunt ||  || additive || special_taunt || Hidden
|-
| 674 || class select override vcd || Attrib_Class_Select_Override_VCD || additive || class_select_override_vcd || Hidden
|-
| 675 || custom projectile model ||  || additive || custom_projectile_model || Hidden
Supports Rockets, Pipes, Stickies and Tranquillizer Darts
|-
| 796 || min_viewmodel_offset || || additive || min_viewmodel_offset || Hidden
Used for "tf_use_min_viewmodels 1" to shift the viewmodel's position
|-
| 2029 || allowed in medieval mode ||  ||  || allowed_in_medieval_mode || Hidden
|-
| 2058 || meter_label ||  ||  || meter_label || Hidden
|-
| 5011 || extra wearable bodygroup toggle active || || additive || extra_wearable_bodygroup_toggle_active || Hidden
|-
| 5048 || custom hand viewmodel || || additive || custom_hand_viewmodel ||
Hidden <br>
Uses a string
|-
| 5129 || mod burstfire || Sentry Gun turns +%s'''1'''% faster || additive || mod_burstfire || Note: Uses Wrong Localization string
|-
| 5135 || hidden separator || || || hidden_separator || All attributes in a weapon after this one will be hidden from the tooltip.
|-
| 5157 || passive reload holstered || Passively reloads ammo while holstered || additive || passive_reload_holstered ||
|-
| 5194 || hide ammo hud || || additive || hide_ammo_hud || Hidden
|-
| 5199 || banned in medieval mode || || additive || banned_in_medieval_mode || Hidden
|-       
| 5201 || custom disguise sound || || additive || custom_disguise_sound || Hidden
|-
| 5228 || mod ammo per reload || || additive || mod_ammo_per_reload || Hidden
|-
| 5229 || set reload single || || additive || set_reload_single ||
|-
| 5230 || Reload time start || || inverted percentage || mult_reload_time_start ||
|-
| 5231 || Reload time refill || || inverted percentage || mult_reload_time_refill ||
|-
| 5249 || mod use custom ammo type || || additive || mod_use_custom_ammo_type ||
Hidden <br>
Modes: <br>
1 = Primary Ammo <br>
2 = Secondary Ammo <br>
3 = Metal <br>
4 = Grenades1 <br>
5 = Grenades2
|-
| 5252 || set sentry bullet || || additive || set_sentry_bullet ||
Hidden <br>
Value is the projectile index from "override_projectile_type"
|-
| 5253 || set sentry rocket || || additive || set_sentry_rocket ||
Hidden <br>
Value is the projectile index from "override_projectile_type"
|-
| 5254 || weapon exclusive to holiday || || additive || weapon_exclusive_to_holiday ||
Hidden <br>
Modes: <br>
1 = TF Birthday <br>
2 = Halloween <br>
3 = Christmas <br>
4 = End of the Line <br>
5 = Invasion <br>
6 = Valentines <br>
7 = Pyromania <br>
8 = Full Moon <br>
9 = Halloween OR Full Moon <br>
10 = Halloween OR Full Moon OR Valentines <br>
11 = April Fools <br>
12 = Soldier Day (Rick May Passing) <br>
13 = Summer
|-
| 5256 || mod projectiles per shot || || additive || mod_projectiles_per_shot ||
|-
| 5263 || mod set banner flag model || || additive || mod_set_banner_flag_model || Hidden
|-
| 5264 || custom banner sound || || additive || custom_banner_sound || Hidden
|-
| 5268 || auto jumping || Wearer can automatically jump by holding the jump button || additive || auto_jumping ||
|-
| 5270 || always draw tracer || || additive || mod_always_draw_tracer_effect ||
Hidden <br>
Value is frequency, 1 being always
|-
| 5271 || never draw tracer || || additive || mod_never_draw_tracer_effect || Hidden
|-
| 5272 || duck jumping || Wearer can jump while crouching || additive || duck_jumping ||
|-
| ??? || N/A || N/A || N/A || custom_magazine_model || Requires custom attribute
|}


* Attribute info
= See also =
** Weapon attributes are set in the {{code|attributes}} and rarely {{code|static_attrs}} parameters.
* [[Creating custom weapons - advanced]]
** Attributes are defined in the attributes section of the schema using a similar system to item entries.
* [[Creating custom weapons - VScript]]
** 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. {{note|rei note! certain attributes HATE being customized and will ONLY work if the attribute is specifically the original one by name?? certain parts of the code specifically check for attribute name and not attribute class}}
* [[List of TF2C item attributes]]
** Quite a few weapon attributes have interesting behavior if set to additive mode
* [[List of TF2C item classes]]
* [[List of TF2C weapon assets]]
* [[List of TF2C conditions]]
* [[List of TF2C projectile IDs]]


= Important note! =
[[Category:Guides]]
Aside from parameter or model/sound/etc names, please don't allow people to directly copy and paste things from here into their schemas. It's important that people actually take the time to understand how the schema works rather than just copying and pasting things and having no clue of what individual bits do.

Latest revision as of 12:36, 27 October 2026


This guide is currently incomplete, but it should suffice if you just need the very basics!

If you're here, chances are you're looking to create your own weapons for TF2 Classified. Whether for use against bots or other players, this guide should hopefully help you to start out with creating custom weapons. If it doesn't, consider asking for help in the #modding-discussion channel in the official TF2C Discord.

Creating a custom item schema

Before going over how to create custom weapons, we first need a functional custom item schema to put them into. The item schema is basically a big list that you add all of your items into, and is responsible for defining everything about them. It uses VDF, which is the standard format for storing game-related metadata in Source. If you don't know VDF, don't worry - it won't take long to understand the syntax.

custom_items_game.txt

To begin, create a file named custom_items_game.txt in the <SteamUserDir>\Team Fortress 2 Classified\tf2classified\custom\<Mod Name>\scripts\items directory. This is the file that contains all the information regarding your custom weapons. Please note that you cannot have multiple custom_items_game.txt files loaded simultaneously, so any other mod folders that contain them should be placed in tf2classified\custom\disabled to allow the new custom item schema to load.

It should be noted that the custom_items_game.txt method is the simplest and objectively best option for defining custom weapons, as it automatically inherits data from the newest version of the vanilla items_game.txt file. It is possible to override the vanilla item schema with one that contains custom weapons, but this method is not recommended as the overriding file must be manually updated each patch for parity with the vanilla items_game.txt file. For you and your players' sake, use the custom_items_game.txt method only.

Setting up parameters

Shown below are the main parameters that should ideally be included in every single item schema. Copy this exactly into your custom_items_game.txt file.

#base "items_game.txt"

"items_game"
{
	"items"
	{
	}
	"prefabs"
	{
	}
	"attributes"
	{
	}
}

Explanation

base "items_game.txt"

This line is responsible for merging the data from the custom item schema into TF2C's main item schema. Without this, TF2C's items, prefabs and attributes will fail to load.

"items_game"

The parameter that contains everything unique to the item schema. Whilst not particularly interesting, it's vital for the item schema to run.

"items"

The parameter that contains items. They must be defined here in order for them to appear in game.

"prefabs"

The parameter that contains prefabs, which will be explained later.

"attributes"

The parameter that contains attributes, which will also be explained later.

Creating your first weapon

The basics

To function, item entries must be placed in the "items" parameter.

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

"items_game"
{
	"items"
	{
		"<item id>"
		{
			"name"				"<internal name>"
			"item_name"			"<item name>"
			"item_type_name"	"<item type name>"
	
			"item_quality"		"<item name colour>"
	
			"item_logname"		"<dev console name>"
			"item_iconname"		"<icon name>"
	
			"item_class"		"<item class>"
	
			"item_slot"			"<backpack slot>"
			"anim_slot"			"<player model and c_model animations>"

			"bucket"				"<inventory slot override>"
			"bucket_position"		"<inventory subslot override>"
	
			"model_player"			"<view model>"
			"model_world"			"<world model>"
			"image_inventory"		"<backpack icon>"
	
			"attach_to_hands"		"<view model animation type>"

			"used_by_classes"
			{
				"<class>"			"<backpack slot>"
			}

			"attributes"
			{
				"<attribute name>"
				{
					"attribute_class"		"<attribute class>"
					"value"					"<value>"
				}
			}
			"static_attrs"
			{
				"<attribute class>"		"<value>"
			}
			"visuals"
			{
				"<parameter>"			"value"
			}

			"mouse_pressed_sound"		"<backpack select sound>"
			"drop_sound"				"<backpack deselect sound>"
		}
	}
}

Explanation

"<item id>"

The unique ID used by the weapon. This can be any integer from 0 to 65535. Be careful: if shared with another item entry, the custom item schema will fail to load. Try to use random high values (ideally >= 10000) to prevent clashes with vanilla item entries.

"name"

The unique internal identifier used by the weapon. Like "<item id>", the custom item schema will fail to load if it's shared with another entry.

"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 "propername" parameter to the item entry and set the value to 1.

"item_type_name"

The item's type, which is displayed under the name in the description.

"item_logname"

The name used by the weapon when reported in the developer console.

"item_iconname"

The name of the weapon's main killicon. If an invalid icon is pointed to, then the default skull icon will be used instead. Supports SVG icons in resource\svgs\deathnotice and VTF icons defined in scripts\mod_textures.txt and scripts\mod_textures_tf2c.txt.

"item_class"

The item class to be used as a base for your weapon. A list of available item classes can be found here.

"item_slot"

The loadout slot that the weapon is located in. Below is a list of functional "item_slot" values:
primary
secondary
melee
pda
pda2
building
action
utility

"anim_slot"

The third-person and (if applicable) c_model animations to use. If absent, the item will use the default animations for its class. Below is a list of functional "anim_slot" values:
primary
primary2
secondary
secondary2
melee
melee_allclass
pda
pda2
building
item1
item2
item3
item4
passtime_ball
force_not_used

"model_player"

The model used in first person.

"model_world"

The model used in third person. If this parameter is absent from the item entry, the game will automatically use the model defined in the "model_player" parameter.

"image_inventory"

The icon used in the loadout menu and bucket.

"attach_to_hands"

This parameter controls what model's animations are used. If set to 1, the class' c_arms will be used for the animations. If set to 2, the item model's animations will be used instead.

"used_by_classes"

This controls which classes can use the item. Set to 1 to use the loadout slot defined under "item_slot", or set it to a specific loadout slot to get it to appear in that slot for a specific class.

"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 "hidden separator" and "provide on active" that are repeated often. A list of item attributes can be found here.

"static_attrs"

A variant of "attributes" that should only be used for attributes like "min_viewmodel_offset".

"visuals"

This parameter allows you to change the item's effects, like sounds and tracers. This will be explained in more detail later.

"mouse_pressed_sound"

The sound to play when the item is selected in a loadout grid.

"drop_sound"

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 Winger's fire sounds. Copy it and give modifying it a go to get a feel for making items. If you're looking for models and soundscripts, try using HLMV++ and/or Hammer ++, or look at item entries in TF2 and TF2C's item schemas.

"items_game"
{
	"items"
	{
		"10000"	// Custom Pistol
		// You can add comments to your item schema with double slashes!
		{
			"name"				"CUSTOM_PISTOL_TEST"
			"item_name"			"Custom Pistol"
			"item_type_name"	"#TF_Weapon_Pistol"
	
			"item_logname"		"pistol_test"
			"item_iconname"		"pistol"
	
			"item_class"		"tf_weapon_pistol"
	
			"item_slot"			"secondary"
			"anim_slot"			"secondary"
	
			"model_player"		"models/weapons/v_models/v_pistol_scout.mdl"
			"model_world"		"models/weapons/w_models/w_pistol.mdl"
			"image_inventory"	"backpack/weapons/w_models/w_pistol"
	
			"attach_to_hands"	"2"

			"used_by_classes"
			{
				"scout"			"1"
			}

			"attributes"
			{
				"clip size bonus"
				{
					"attribute_class"	"mult_clipsize"
					"value"				"2"
				}
				"damage penalty"
				{
					"attribute_class"	"mult_dmg"
					"value"				"0.67"
				}
			}
			"static_attrs"
			{
				"min_viewmodel_offset"	"10 0 -10"
			}
			"visuals"
			{
				"sound_single_shot"		"Weapon_Winger.Single"
				"sound_burst"			"Weapon_Winger.SingleCrit"
			}

			"mouse_pressed_sound"		"ui/item_light_gun_pickup.wav"
			"drop_sound"				"ui/item_light_gun_drop.wav"
		}
	}
}

Here's how the description looks in game:

Attributes

Adding item attributes

As mentioned above, the Custom Pistol has two attributes: a clip size bonus and a damage penalty, which gives it a clip size of 24 and a base damage of 10. It's a bit boring, so how about we spice things up a bit?

"items_game
{
	"items"
	{
		"<item ID>"
		{
			<...>
			"attributes"
			{
				"damage bonus"
				{
					"attribute_class"	"mult_dmg"
					"value"				"1.33"
				}
				"clip size penalty"
				{
					"attribute_class"	"mult_clipsize"
					"value"				"0.5"
				}
				"can headshot"
				{
					"attribute_class"	"can_headshot"
					"value"				"1"
				}
			}
			<...>
		}
	}
}

Now, the Custom Pistol instead has a damage bonus and a clip size penalty, resulting in 20 base damage and a clip size of 6. More importantly though, the "can headshot" attribute has given it the ability to deal crits on headshot. Pretty cool, eh?

Let's see how the description looks in game:

Making custom attributes

Oh dear. It seems the "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?

Remember the "attributes" parameter explained here? Well, it's time to put it to good use!

"items_game"
{
	<...>
	"attributes"
	{
		"40000"
		{
			"name"					"can headshot VISIBLE"
			"attribute_class"		"can_headshot"
			"description_format"	"value_is_additive"
			"stored_as_integer"		"1"

			"description_string"	"#Attrib_RevolverUseHitLocations"
		}
	}
}

In your "attributes" parameter (the one with the same indentation as "items" and "prefabs" - I know, it's confusing), paste the above attribute. This is a copy of the "can headshot" attribute that's been simplified for this tutorial.

The "description_string" parameter is responsible for the stats displayed in an item's description. Here, it's been set to the plaintext "Crits on headshot", which means that it won't be affected by language. Thankfully, in this instance, there's a suitable localised string that can be used instead to ensure that it's understandable to a wider range of people.

By setting the value to #Attrib_RevolverUseHitLocations (the localised string used by the Ambassador's headshot attribute), the same text will be displayed, but will now also be localised to the user's language.

After replacing the Custom Pistol's "can headshot" attribute with the newly created "can headshot VISIBLE", here's how it should look in game:


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.

"items_game"
{
	"items"
	{
		"<item ID>"
		{
			<...>
			"attributes"
			{
				"can headshot VISIBLE"
				{
					"attribute_class"	"can_headshot"
					"value"				"1"
				}
				"damage bonus"
				{
					"attribute_class"	"mult_dmg"
					"value"				"1.33"
				}
				"clip size penalty"
				{
					"attribute_class"	"mult_clipsize"
					"value"				"0.5"
				}
			}
			<...>
		}
	}
}

By moving the "can headshot VISIBLE" attribute to the top, it also moves it to the top of the item's description.


The second problem is the text colour. Crits on headshot is undeniably an upside, so it should be coloured blue to reflect that.

"items_game"
{
	<...>
	"attributes"
	{
		"40000"
		{
			"name"					"can headshot VISIBLE"
			"attribute_class"		"can_headshot"
			"description_format"	"value_is_additive"
			"stored_as_integer"		"1"
			
			"description_string"	"#Attrib_RevolverUseHitLocations"
			"effect_type"			"positive"
		}
	}
}

By adding "effect_type" "positive" to the "can headshot VISIBLE" attribute, we can set the colour to the same blue as other positive attributes. If you want an attribute to be displayed as negative, simply replace "positive" with "negative". The same goes for neutral attributes - replace "positive" with "neutral".

Here's the result:

Models

c_models

What's that? You want to change the model too? Well, with the base selection of models in Classified, there's only one that works with "attach_to_hands" "2" - the Pistol model that we're currently using. However, what about TF2's c_models?

"items_game"
{
	"items"
	{
		"<item ID>"
		{
			<...>
			"item_logname"		"pistol_test"
			"item_iconname"		"winger"

			"item_class"		"tf_weapon_pistol"

			"item_slot"			"secondary"
			"anim_slot"			"secondary"

			"model_player"		"models/workshop/weapons/c_models/c_winger_pistol/c_winger_pistol.mdl"
			"image_inventory"	"backpack/workshop/weapons/c_models/c_winger_pistol/c_winger_pistol"

			"attach_to_hands"	"1"

			"used_by_classes"
			{
				"scout"			"1"
				"engineer"		"1"
			}
			<...>
		}
	}
}

Here, the parameters have been adjusted for c_model animations. With "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 Winger's to be used without visual bugs.

Here's how it looks in game:


Class-specific v_models

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 "model_player_per_class" parameter.

"items_game"
{
	"items"
	{
		"<item ID>"
		{
			<...>
			"model_player_per_class"
			{
				"engineer"	"models/weapons/v_models/v_pistol_engineer.mdl"
				"scout"		"models/weapons/v_models/v_pistol_scout.mdl"
			}
			<...>
		}
	}
}

By adding this to the first version of the Custom Pistol, you can change the v_model used by each class, allowing you to have the weapon on both Scout and Engineer without making them share animations.

Testing

Loading into a map

To get the custom item schema to load, boot up any map. Once you do, the weapon should appear in the loadout grid.

Making changes

If you make changes to the custom item schema, use the command cl_reload_item_schema to show the changes in game. sv_reload_item_schema can also be used to update the custom item schema for the whole server in multiplayer.

Modifying vanilla weapons

This section will potentially include a different method for editing vanilla weapons that isn't widely used. In the meantime, please do not write any other methods here, and use this method with caution if you plan on editing vanilla weapons.

To modify vanilla items, you can include blank item entries in your custom schema with the same IDs as the ones you want to edit. From there, simply add new parameters, and they will merge with the original item's in game. If the same parameter or attribute is in both the vanilla item entry and the copy, then the copy's version will take priority.

When attempting to override a item entry with the baseitem parameter, you may have noticed that every other item with it disappears. To counteract this, include a blank copy of any base item you haven't modified in your custom item schema. It should be noted that any base items added to the vanilla item schema in updates must also be added to your custom schema, otherwise they will fail to appear in game. However, this is a rare occurrence, so constant maintenance won't be necessary.

Below is an example custom_items_game.txt file that contains empty copies of every item with the baseitem parameter as of 3.0.0.

#base "items_game.txt"

"items_game"
{
	"items"
	{
		"0" // Bat
		{
		}
		"1" // Bottle
		{
		}
		"2" // Fire Axe
		{
		}
		"3" // Kukri
		{
		}
		"4" // Knife
		{
		}
		"5" // Fists
		{
		}
		"6" // Shovel
		{
		}
		"7" // Wrench
		{
		}
		"8" // Bonesaw
		{
		}
		"9" // Shotgun (Engineer)
		{
		}
		"10" // Shotgun (Soldier)
		{
		}
		"11" // Shotgun (Heavy)
		{
		}
		"12" // Shotgun (Pyro)
		{
		}
		"13" // Scattergun
		{
		}
		"14" // Sniper Rifle
		{
		}
		"15" // Minigun
		{
		}
		"16" // SMG
		{
		}
		"17" // Syringe Gun
		{
		}
		"18" // Rocket Launcher
		{
		}
		"19" // Grenade Launcher
		{
		}
		"20" // Stickybomb Launcher
		{
		}
		"21" // Flame Thrower
		{
		}
		"22" // Pistol (Engineer)
		{
		}
		"23" // Pistol (Scout)
		{
		}
		"24" // Revolver
		{
		}
		"25" // PDA: Teleporter (Construction PDA)
		{
		}
		"26" // Destruction PDA
		{
		}
		"27" // Disguise Kit
		{
		}
		"28" // Builder (Toolbox)
		{
		}
		"29" // Medi Gun
		{
		}
		"30" // Invis Watch
		{
		}
		"735" // Sapper
		{
		}
		"1132" // Spellbook Magazine (Halloween)
		{
		}
		"1152" // Grappling Hook (Mannpower)
		{
		}
		"1155" // PASS Time Jack (PASS Time)
		{
		}
		"2000" // Umbrella
		{
		}
	}
}

List of useful attributes

The table below lists generally useful attributes from this page.

ID Name Description Value Type Class Notes
43 scattergun no reload single Attrib_Scattergun_NoReloadSingle additive set_scattergun_no_reload_single Hidden
128 provide on active When weapon is active additive provide_on_active
280 override projectile type additive set_scattergun_no_reload_single Hidden

Changes the projectile type of the weapon

298 mod ammo per shot Per Shot: -%s1 ammo additive mod_ammo_per_shot
303 mod max primary clip override additive mod_max_primary_clip_override Hidden
551 special taunt additive special_taunt Hidden
674 class select override vcd Attrib_Class_Select_Override_VCD additive class_select_override_vcd Hidden
675 custom projectile model additive custom_projectile_model Hidden

Supports Rockets, Pipes, Stickies and Tranquillizer Darts

796 min_viewmodel_offset additive min_viewmodel_offset Hidden

Used for "tf_use_min_viewmodels 1" to shift the viewmodel's position

2029 allowed in medieval mode allowed_in_medieval_mode Hidden
2058 meter_label meter_label Hidden
5011 extra wearable bodygroup toggle active additive extra_wearable_bodygroup_toggle_active Hidden
5048 custom hand viewmodel additive custom_hand_viewmodel

Hidden
Uses a string

5129 mod burstfire Sentry Gun turns +%s1% faster additive mod_burstfire Note: Uses Wrong Localization string
5135 hidden separator hidden_separator All attributes in a weapon after this one will be hidden from the tooltip.
5157 passive reload holstered Passively reloads ammo while holstered additive passive_reload_holstered
5194 hide ammo hud additive hide_ammo_hud Hidden
5199 banned in medieval mode additive banned_in_medieval_mode Hidden
5201 custom disguise sound additive custom_disguise_sound Hidden
5228 mod ammo per reload additive mod_ammo_per_reload Hidden
5229 set reload single additive set_reload_single
5230 Reload time start inverted percentage mult_reload_time_start
5231 Reload time refill inverted percentage mult_reload_time_refill
5249 mod use custom ammo type additive mod_use_custom_ammo_type

Hidden
Modes:
1 = Primary Ammo
2 = Secondary Ammo
3 = Metal
4 = Grenades1
5 = Grenades2

5252 set sentry bullet additive set_sentry_bullet

Hidden
Value is the projectile index from "override_projectile_type"

5253 set sentry rocket additive set_sentry_rocket

Hidden
Value is the projectile index from "override_projectile_type"

5254 weapon exclusive to holiday additive weapon_exclusive_to_holiday

Hidden
Modes:
1 = TF Birthday
2 = Halloween
3 = Christmas
4 = End of the Line
5 = Invasion
6 = Valentines
7 = Pyromania
8 = Full Moon
9 = Halloween OR Full Moon
10 = Halloween OR Full Moon OR Valentines
11 = April Fools
12 = Soldier Day (Rick May Passing)
13 = Summer

5256 mod projectiles per shot additive mod_projectiles_per_shot
5263 mod set banner flag model additive mod_set_banner_flag_model Hidden
5264 custom banner sound additive custom_banner_sound Hidden
5268 auto jumping Wearer can automatically jump by holding the jump button additive auto_jumping
5270 always draw tracer additive mod_always_draw_tracer_effect

Hidden
Value is frequency, 1 being always

5271 never draw tracer additive mod_never_draw_tracer_effect Hidden
5272 duck jumping Wearer can jump while crouching additive duck_jumping
??? N/A N/A N/A custom_magazine_model Requires custom attribute

See also