Help:Accessing the game files

From Team Fortress Wiki
Jump to: navigation, search

Accessing the game files can be done by anyone who downloads Team Fortress 2. The accessible files consist of textures (for backpack icons, HUD elements, decals, etc.), voice lines (for all classes, the Administrator, Halloween bosses, etc.), models (for props, weapons, classes, etc.), and other miscellaneous files. These files are all contained in .vpk (Valve Pak, also shortened to simply Pak) files. Note that any files used on community-created maps are contained within the .bsp file instead.

Accessing the files

Most of the files Team Fortress 2 uses require special programs to open. Below is a list of programs that can be used to open and extract each of these file types. To find the .vpk files for Team Fortress 2, navigate to steamapps\common\Team Fortress 2\tf. There are many Pak files, but the _dir files will contain everything. There are 4 different types, tf2_misc_dir.vpk, tf2_sound_misc_dir.vpk, tf2_textures_dir.vpk, and tf2_sound_vo_[lang].vpk (this file depends on your in-game voice language setting. Supports English, Russian, Spanish, French, and German. Only the language you've selected will appear in your folders).

List of files

Below is a non-exhaustive list of files and their uses on the Wiki.

Type Where Wiki usage Notes
Tobor.png tf2_textures_dir.vpk
Stored in .vtf format.

Strange Filter images
Map Stamp images
Backpack icon images
Kill icons
HUD images

Use the {{ExtractTF2}} license
If it is artwork, such as the Quickplay art, it uses {{ArtworkTF2}}.
Textures for community maps are stored in their .bsp files.
Textures
Speaker Icon.png tf2_sound_misc_dir.vpk
Mostly stored in .mp3 or .wav format.

Audio cues
Weapon and Building sounds

Uses the {{AudioTF2}} license.
Sounds
Leaderboard class administrator.png tf2_sound_vo_[lang].vpk
Mostly stored in .mp3 or .wav format.

Voice commands
Voice responses

Uses the {{AudioTF2}} license.
Name of the .vpk file changes based on game language (Options > Audio > Audio (spoken) language).
Supports English, Russian, Spanish, French, and German.
Voice lines
TF2 crosshair.png tf2_misc_dir.vpk Not used on Wiki itself, but can aid in editing:

Config (.cfg) files
Model (.mdl) files for cosmetic image renders in HLMV
Material (.vmt) files

This .vpk shares a similar file structure to the /tf/ folder.
Miscellaneous files
Heavybot blu.png tf2_misc_dir.vpk
Population (.pop) files in tf\scripts\population
Used on Robot articles to determine attributes.
Used on mission pages to determine which Robots show up on a wave.
This .vpk shares a similar file structure to the /tf/ folder.
Split up into two different types:
Mission files, containing information about waves (which Robots spawn, credit drops, etc.).
Robot template files, stores information about Robots like weapons, name, health, skill, attributes, etc. for use in mission files.
Mann vs. Machine Robot files
Ctf 2fort bridge ss.png steamapps\common\Team Fortress 2\tf\maps
Stored outside of .vpk files.
Accessing map-specific assets:

Community-made posters
Map-specific announcer voice lines
Loading menu photos

Files cannot be extracted from .bsp files, rather the .zip file needs to be extracted then unpacked.
Map files
Edit icon.png Stored in the map's .bsp file.
Stored in .nut format.

Zombie infection abilities
Carrier health table
Figuring out gameplay changes in Versus Saxton Hale

Written in Squirrel (documentation).
If a page has a VScript reference, add {{VScript refnote}} at the top of the references section.
Values found in VScript should always be referenced in the following format: vscripts\folder\file.nut:L1-10
Example reference: vscripts\infection\infection.nut:L525-526.
Function names/specific values are not required, but can be added for extra clarity.
VScript