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: Difference between revisions

From TF2 Classified Wiki
mNo edit summary
mNo edit summary
 
(11 intermediate revisions by the same user not shown)
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.
== 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 ==
Shown below are the essentials, which should ideally be included in every single item schema. Copy this exactly into your {{code|custom_items_game.txt}} file.


= Ideal final list of contents =
[[File:example_02_emptyschema.png]]
* Getting started
 
** Creating a custom item schema
=== Explanation ===
** Setting up the schema
{{code|preset=3|base "items_game.txt"}}
* Creating your first weapon
: 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.
** Defining important stuff
{{code|preset=3|"items_game"}}
** Attributes
: The parameter that contains everything unique to the item schema. Whilst not particularly interesting, it's vital for the item schema to run.
** Models and sounds
{{code|preset=3|"items"}}
** Using the weapon in-game
: The parameter that contains items. They must be defined here in order for them to appear in game.
* Advanced weapon creation
{{code|preset=3|"prefabs"}}
** Custom models and sounds / soundscripts
: The parameter that contains prefabs, which will be explained later.
** Customising visual effects
{{code|preset=3|"attributes"}}
** Making custom attributes
: The parameter that contains attributes, which will also be explained later.
** Link to a separate VScript page to keep this one nice and tidy
= Creating your first weapon =
* WIP
== The essentials ==
TEMPTEXT
== Adding attributes ==
TEMPTEXT
== Changing the model(s) and sounds ==
TEMPTEXT
== Testing the weapon ==
TEMPTEXT
= Advanced weapon creation =
== Creating custom models, effects and sounds ==
TEMPTEXT
== Making custom attributes ==
TEMPTEXT
== VScript ==
TEMPTEXT Link to a separate VScript page
 
= See also =
* [[List of TF2C item attributes]]
* [[List of TF2C item classes]]
* [[List of TF2C conditions]]
 
[[Category:Guides]]


= Misc info to be added to the finished sections (TEMP!)=
= Misc info to be added to the finished sections (TEMP!)=
Line 57: Line 82:
** Quite a few weapon attributes have interesting behavior if set to additive mode
** Quite a few weapon attributes have interesting behavior if set to additive mode


= See also =
= Important note! =
* [[List of Item Attributes]]
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.
* [[List of Item Classes]]
* [[List of Conditions]]
 
[[Category:Guides]]