Creating custom weapons

From TF2 Classified Wiki
Revision as of 22:05, 16 June 2026 by Rei1556 (talk | contribs)
Jump to navigation Jump to search


This guide is currently incomplete, so please look for a better one while this is being worked on!


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 people for help in the #modding-discussion channel in the official TF2C Discord.

Getting Started

To begin, create a file named custom_items_game.txt in the <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 tf2classified\custom\disabled to allow the new custom item schema to load.

Misc info to be added to the above sections (TEMP!)

  • 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]
  • 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.
  • Duplicate name parameters in a single weapon entry will prevent the custom item schema from loading. Same goes for duplicate entry IDs.
  • Duplicating certain parameters, attributes for example, does work, but it's advised not to do this to keep your weapon entries tidy.
  • Basically everything about prefabs.
    • 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, prefab "shotgun killspeople" will make a shotgun that also killspeople)
  • item_name, item_type_name, item_description and description_string support localized strings.
  • item_name_color and custom_color allow weapon names and attributes respectively to be coloured with RGB values.
  • 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!

See also