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 9: Line 9:
= Getting Started =
= Getting Started =
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.
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 ==
== Creating the custom item schema ==
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.
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 ==
== Setting up the custom item schema ==
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.
Line 27: Line 29:
{{code|preset=3|"attributes"}}
{{code|preset=3|"attributes"}}
: The parameter that contains attributes, which will also be explained later.
: The parameter that contains attributes, which will also be explained later.
= Creating your first weapon =
= Creating your first weapon =
== 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 under the {{code|preset=3|"items"}} parameter, with the exact indentation shown in the upcoming template.
Line 97: Line 101:
{{code|preset=3|"drop_sound"}}
{{code|preset=3|"drop_sound"}}
: The sound to play when the item is selected in a class' loadout screen.
: The sound to play when the item is selected in a class' loadout screen.
=== 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. Give copying and modifying this a go to get a feel for making items. If you're trying to find 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 ++].
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. Give copying and modifying this a go to get a feel for making items. If you're trying to find 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 ++].
Line 105: Line 110:


[[File:example_04_backpack.png]]
[[File:example_04_backpack.png]]


== Adding attributes ==
== Adding attributes ==
TEMPTEXT
TEMPTEXT
== Changing the model(s) and sounds ==
== Changing the model(s) and sounds ==
TEMPTEXT
TEMPTEXT
== Testing the weapon ==
== Testing the weapon ==
TEMPTEXT
TEMPTEXT
= Advanced weapon creation =
= Advanced weapon creation =
== Creating custom models, effects and sounds ==
== Creating custom models, effects and sounds ==
TEMPTEXT
TEMPTEXT
== Making custom attributes ==
== Making custom attributes ==
TEMPTEXT
TEMPTEXT
== VScript ==
== VScript ==
TEMPTEXT Link to a separate VScript page
TEMPTEXT Link to a separate VScript page