Difference between revisions of "Help:Accessing the game files"

From Team Fortress Wiki
Jump to: navigation, search
m
(Overhaul)
Line 3: Line 3:
 
{{Help navbar}}
 
{{Help navbar}}
  
'''Accessing the game files''' can be done by anyone who downloads ''Team Fortress 2''. The accessible files consist of textures (for [[Backpack|backpack icons]], [[HUD]] elements, decals, etc.), [[Responses|voice lines]] (for [[Classes|all classes]], the [[Administrator]], [[Halloween boss responses|Halloween bosses]], etc.), models (for props, [[Weapons|weapons]], classes, etc.), and other miscellaneous files. These files are all contained in {{code|[[vdc:VPK|.vpk]]}} ('''V'''alve '''P'''ac'''k''' File, also shortened to simply '''Pack''') files, which require special programs to open. Note that any files used on community-created [[List of maps|maps]] are contained within the {{code|.bsp}} file instead. All content should be licensed under the {{tl|ExtractTF2}} license, unless mentioned otherwise.
+
'''Accessing the game files''' can be done by anyone who downloads ''Team Fortress 2''. The accessible files consist of textures (for [[Backpack|backpack icons]], [[HUD]] elements, decals, etc.), [[Responses|voice lines]] (for [[Classes|all classes]], the [[Administrator]], [[Halloween boss responses|Halloween bosses]], etc.), models (for props, [[Weapons|weapons]], classes, etc.), and other miscellaneous files. These files are all contained in {{code|[[vdc:VPK|.vpk]]}} ('''V'''alve '''P'''a'''k''', also shortened to simply '''Pak''') files. Note that any files used on community-created [[List of maps|maps]] are contained within the {{code|.bsp}} file instead.
  
 
== Accessing the files ==
 
== Accessing the files ==
{{code|.vpk}} files require a special program to open, some examples of programs that can open them:
+
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 each of these filetypes. To find the {{code|.vpk}} files for ''Team Fortress 2'', navigate to {{code|steamapps\common\Team Fortress 2\tf}}. There are many Pak files, but the {{code|_dir}} files will contain everything. There are 4 different types, {{code|tf2_misc_dir.vpk}}, {{code|tf2_sound_misc_dir.vpk}}, {{code|tf2_textures_dir.vpk}}, and {{code|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).
* [[vdc:GCFScape|GCFScape]] (also supports opening {{code|[[vdc:BSP (Source)|.bsp]]}} files)
 
* [[vdc:VPKEdit|VPKEdit]]
 
* [[vdc:Gibbeds VPK Extractor|Gibbeds VPK Extractor]]
 
  
These programs open the vpk files and show the contents, but may not be able to open the files contained within. To find the {{code|.vpk}} files for ''Team Fortress 2'', navigate to {{code|steamapps\common\Team Fortress 2\tf}}. There are many files, but the {{code|_dir}} files will contain everything that is in the other files too. There are 4 different types, {{code|tf2_misc_dir.vpk}}, {{code|tf2_sound_misc_dir.vpk}}, {{code|tf2_textures_dir.vpk}}, and {{code|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).
+
* {{code|.vpk}} and {{code|[[vdc:BSP (Source)|.bsp]]}} (map files)
 +
** [[vdc:GCFScape|GCFScape]] (also supports opening {{code|[[vdc:BSP (Source)|.bsp]]}} files)
 +
** [[vdc:VPKEdit|VPKEdit]]
 +
** [[vdc:Gibbeds VPK Extractor|Gibbeds VPK Extractor]]
 +
* {{code|[[vdc:VTF (Valve Texture Format)|.vtf]]}} and {{code|[[vdc:VMT|.vmt]]}}
 +
** [[vdc:VTF Explorer|VTF Explorer]]
 +
** [[vdc:VTFEdit|VTFEdit]]
 +
* {{code|.nut}} and {{code|.cfg}}
 +
** Any text editor or [[w:Integrated development environment|IDE]]
 +
* {{code|.zip}}
 +
** [https://www.win-rar.com/ WinRAR]
 +
** [https://www.7-zip.org/ 7zip]
  
== Texture files ==
+
== List of files ==
Texture files are stored in {{code|[[vdc:VTF (Valve Texture Format)|.vtf]]}} files, some examples of programs that can open them:
+
{| class="wikitable grid"
* [[vdc:VTF Explorer|VTF Explorer]]
+
! class="header" | Type
* [[vdc:VTFEdit|VTFEdit]]
+
! class="header" | Where
 
+
! class="header" | Wiki usage
The texture Pack files contain textures for most things in the game, such as the classes, [[Main menu#Gallery|background images]], HUD elements, backpack icons, etc. Certain HUD elements using team colours or other colours may appear in black and white instead of their coloured variant. Kill icons are all contained in the same few files together (with the name {{code|dneg_images}} or {{code|d_images}}).
+
! class="header" | Notes
 
+
|-
=== Wiki usage ===
+
| [[File:Tobor.png|100px]]
Artwork images (such as those used on the Casual menu) should be licensed under the {{tl|ArtworkTF2}} license. Other textures should be licensed under the {{tl|ExtractTF2}} license.
+
| rowspan=2 | {{code|tf2_misc_dir.vpk}}<br>Stored in {{code|.vtf}} format.
* [[Strange Filter]] images
+
| rowspan=2 |
* [[Map Stamp]] images
+
[[Strange Filter]] images<br>
* Backpack icon images
+
[[Map Stamp]] images<br>
* [[Kill icon]]s
+
Backpack icon images<br>
* [[HUD]] images
+
[[Kill icon]]s<br>
 
+
[[HUD]] images
== Sound files ==
+
| rowspan=2 | Use the {{tl|ExtractTF2}} license<br>If it is artwork, such as the Quickplay art, it uses {{tl|ArtworkTF2}}.<br>Textures for community maps are stored in their {{code|.bsp}} files.
Most sound files are stored in {{code|.mp3}} or {{code|.wav}} files. These files can be opened using most programs that play sound files. There are 2 different Packs with different sound files, the "vo" (voice over) sound files and the "sound misc" sound files.
+
|-
 
+
| class="nameplate" align="center" | {{Font colour|white|Textures}}
As the name suggests, "vo" contains voice lines such as the Responses, [[Voice commands|commands]], and other voice lines (note that [[community announcers]] are contained within their own map files). This Pack will contain only one language's voice lines, the in-game setting (Options > Audio > Audio (spoken) language. Only supports English, Russian, Spanish, French, and German) must be changed in order for that language's {{code|.vpk}} file to appear.
+
|-
 
+
| [[File:Speaker Icon.png|100px]]
The "sound misc" files contains the rest of the sounds, such as [[audio cues]], environmental ambience, footstep noises, [[Team Fortress 2 Official Soundtrack|main menu startup music]], etc.  
+
| rowspan=2 | {{code|tf2_sound_misc_dir.vpk}}<br>Mostly stored in {{code|.mp3}} or {{code|.wav}} format.
 
+
| rowspan=2 |
=== Wiki usage ===
+
[[Audio cue]]s<br>
Audio files should be licensed with the {{tl|AudioTF2}} license.
+
[[Weapon]] and [[Building]] sounds
* [[Audio cue]]s
+
| rowspan=2 | Uses the {{tl|AudioTF2}} license.
* [[Voice commands]] and [[Voice responses|voice responses]]
+
|-
* [[Weapon]] and [[Building]] sounds
+
| class="nameplate" align="center" | {{Font colour|white|Sounds}}
 
+
|-
== Miscellaneous files ==
+
| [[File:Leaderboard class administrator.png|100px]]
The miscellaneous files Pack contains several different types of files, such as models ({{code|.mdl}}), config ({{code|.cfg}}) files, facial expression presets, [[vdc:VMT|material files]], and many more. These files share a similar file structure to the {{code|/tf/}} folder.
+
| rowspan=2 | {{code|tf2_sound_vo_[lang].vpk}}<br>Mostly stored in {{code|.mp3}} or {{code|.wav}} format.
 
+
| rowspan=2 |
=== Wiki usage ===
+
[[Voice commands]]<br>
* Files for [[Help:Cosmetic images|cosmetic image renders]] (see also: [[Help:Model Viewer|Model Viewer]])
+
[[Voice responses]]
 
+
| rowspan=2 | Uses the {{tl|AudioTF2}} license.<br>Name of the {{code|.vpk}} file changes based on game language (Options > Audio > Audio (spoken) language).<br>Supports English, Russian, Spanish, French, and German.
== Map files ==
+
|-
The aforementioned GCFScape can be used to open up {{code|.bsp}} files, however, extracting the files does not work. Every map file contains a {{code|.zip}} file, which can be extracted from the map file, then unzipped in a desired location to obtain all the map files. Map files usually include textures, models, materials, [[VScript]] scripts, and anything else the map needs.
+
| class="nameplate" align="center" | {{Font colour|white|Voice lines}}
 
+
|-
=== Wiki usage ===
+
| [[File:TF2 crosshair.png|100px]]
* Community-made [[List of posters|posters]]
+
| rowspan=2 | {{code|tf2_misc_dir.vpk}}
* Map-specific announcer voice lines
+
| rowspan=2 | Not used on Wiki itself, but can aid in editing:<br>
* Loading menu photos
+
Config ({{code|.cfg}}) files<br>
 
+
Model ({{code|.mdl}}) files for [[Help:Cosmetic images|cosmetic image renders]] in [[Help:Model Viewer|HLMV]]<br>
== VScript files ==
+
Material ({{code|.vmt}}) files
As mentioned before VScript files are contained in the map's file, they come in the {{code|.nut}} format (associated with the ''[[w:Squirrel (programming language)|Squirrel programming language]]'', for documentation see [http://squirrel-lang.org/#documentation this website]). VScript files can be opened using programs such as Notepad++ or other text editors. Values found in VScript should always be referenced in the following format: {{code|vscripts\folder\file.nut:L1-10}}, replacing {{code|folder}} and {{code|file}} with the folder and file name respectively, and the relevant line numbers after the colon. Function names/specific values are not required, but can be added for extra clarity. Example reference: {{code|vscripts\infection\infection.nut:L525-526}}. If a page has a VScript reference, add {{tl|VScript refnote}} at the top of the references section.
+
| rowspan=2 | This {{code|.vpk}} shares a similar file structure to the {{code|/tf/}} folder.
 
+
|-
=== Wiki usage ===
+
| class="nameplate" align="center" | {{Font colour|white|Miscellaneous files}}
* Figuring out specific values (such as [[Zombie Infection]] abilities, or [[Versus Saxton Hale]] specifics).
+
|-
 +
| [[File:Ctf 2fort bridge ss.png|100px]]
 +
| rowspan=2 | {{code|steamapps\common\Team Fortress 2\tf\maps}}<br>Stored outside of {{code|.vpk}} files.
 +
| rowspan=2 | Accessing map-specific assets:<br>
 +
Community-made [[List of posters|posters]]<br>
 +
Map-specific announcer voice lines<br>
 +
Loading menu photos
 +
| rowspan=2 | Files cannot be extracted from {{code|.bsp}} files, rather the {{code|.zip}} file needs to be extracted then unpacked.
 +
|-
 +
| class="nameplate" align="center" | {{Font colour|white|Map files}}
 +
|-
 +
| [[File:Edit icon.png|100px]]
 +
| rowspan=2 | Stored in the map's {{code|.bsp}} file.<br>Stored in {{code|.nut}} format.
 +
| rowspan=2 |
 +
[[Template:Zombie Infection abilities|Zombie infection abilities]]<br>
 +
[[Template:Carrier health table|Carrier health table]]<br>
 +
[[Versus Saxton Hale#Gameplay changes|Figuring out gameplay changes in Versus Saxton Hale]]
 +
| rowspan=2 | Written in ''[[w:Squirrel (programming language)|Squirrel]]'' ([http://squirrel-lang.org/#documentation documentation]).<br>If a page has a VScript reference, add {{tl|VScript refnote}} at the top of the references section.<br>Values found in VScript should always be referenced in the following format: {{code|vscripts\folder\file.nut:L1-10}}<br>Example reference: {{code|vscripts\infection\infection.nut:L525-526}}.<br>Function names/specific values are not required, but can be added for extra clarity.
 +
|-
 +
| class="nameplate" align="center" | {{Font colour|white|VScript}}
 +
|}

Revision as of 19:23, 10 March 2024

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 each of these filetypes. 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

Type Where Wiki usage Notes
Tobor.png tf2_misc_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
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