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
mNo edit summary
Line 65: Line 65:


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


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


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


"attributes"
"mouse_pressed_sound" "<backpack select sound>"
{
"drop_sound" "<backpack deselect sound>"
"<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>"
}
}
</pre>
</pre>
Line 188: Line 194:


<pre>
<pre>
"10000" // Custom Pistol
"items_game"
// You can add comments to your item schema with double slashes!
{
{
"name" "CUSTOM_PISTOL_TEST"
"items"
"item_name" "Custom Pistol"
{
"item_type_name" "#TF_Weapon_Pistol"
"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_logname" "pistol_test"
"item_iconname" "pistol"
"item_iconname" "pistol"
"item_class" "tf_weapon_pistol"
"item_class" "tf_weapon_pistol"
"item_slot" "secondary"
"item_slot" "secondary"
"anim_slot" "secondary"
"anim_slot" "secondary"
"model_player" "models/weapons/v_models/v_pistol_scout.mdl"
"model_player" "models/weapons/v_models/v_pistol_scout.mdl"
"model_world" "models/weapons/w_models/w_pistol.mdl"
"model_world" "models/weapons/w_models/w_pistol.mdl"
"image_inventory" "backpack/weapons/w_models/w_pistol"
"image_inventory" "backpack/weapons/w_models/w_pistol"
"attach_to_hands" "1"
"attach_to_hands" "1"
 
"used_by_classes"
{
"scout" "1"
}


"used_by_classes"
"attributes"
{
{
"scout" "1"
"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"
}


"attributes"
"mouse_pressed_sound" "ui/item_light_gun_pickup.wav"
{
"drop_sound" "ui/item_light_gun_drop.wav"
"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>
</pre>
Line 251: Line 263:


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