TF2’s item economy is defined in a schema — a large data file (fetched from the Steam GC) parsed intoDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sr2echa/TF2-Source-Code/llms.txt
Use this file to discover all available pages before exploring further.
CTFItemSchema (game/shared/tf/tf_item_schema.h). The schema maps item definition indices to CEconItemDefinition records describing weapon stats, cosmetic models, attribute lists, and crafting recipes.
Schema class hierarchy
CTFItemSchema extends the base schema with TF2-specific constructs: class loadout slots, MvM tour definitions, matchmaking descriptions, and timed drop data.
CEconItemDefinition
Each item in the schema is aCEconItemDefinition:
Item qualities
Item qualities control name color and drop rarity:| Quality | Value | Color |
|---|---|---|
| Normal | 0 | Grey |
| Genuine | 1 | Dark green |
| Vintage | 3 | Blue |
| Unusual | 5 | Purple |
| Unique | 6 | Yellow (default) |
| Community | 7 | Green |
| Valve | 8 | Light blue |
| Self-Made | 9 | Green |
| Strange | 11 | Orange |
| Haunted | 13 | Green |
| Collector’s | 14 | Red |
Weapon attributes
Attributes modify weapon behavior at runtime.CEconItemAttribute stores a uint32 attribute definition index and a float value. The weapon code reads attributes via FindAttribute():
CALL_ATTRIB_HOOK_* macros, allowing the schema to override any stat without code changes.
Loadout slots
Each class has named loadout slots.CTFItemSchema::GetLoadoutSlotForClass() maps a slot name (“primary”, “secondary”, “melee”, “head”, “misc1”, etc.) to a slot index for a given TF2 class.
Weapon slots per class (example: Soldier)
Weapon slots per class (example: Soldier)
- Slot 0 (primary): Rocket Launcher
- Slot 1 (secondary): Shotgun / Buff Banner / Concheror / Battalion’s Backup
- Slot 2 (melee): Shovel and variants
- Slot 4 (action): Canteen (MvM)
Cosmetic slots
Cosmetic slots
Slots
head, misc1, misc2 hold cosmetic wearables. action holds items like the Gunboat / Mantreads effect items that have passive effects.MvM tour definitions
CTFItemSchema holds CTFMvMTourDescription entries that map MvM tours (e.g., “Operation Two Cities”) to their mission lists, badge items, and loot table definitions.
The item schema is not compiled into the game binary — it is fetched live from the Steam Game Coordinator on startup. The
CTFItemSystem (tf_item_system.h) manages schema requests, caching, and the fallback to local schema data.