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

From Team Fortress Wiki
Jump to: navigation, search
m
(Added pop files)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ToDo|
 
* Style more like [[User:I-ghost/Help:GCF]]}}
 
 
{{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 and extract each of these file types. 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}}, {{code|.cfg}}, and {{code|.pop}}
 +
** 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:
+
Below is a non-exhaustive list of files and their uses on the Wiki.
* [[vdc:VTF Explorer|VTF Explorer]]
+
{| class="wikitable grid"
* [[vdc:VTFEdit|VTFEdit]]
+
! class="header" | Type
 
+
! class="header" | Where
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" | Wiki usage
 
+
! class="header" | Notes
=== Wiki usage ===
+
|-
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.
+
| [[File:Tobor.png|100px]]
* [[Strange Filter]] images
+
| rowspan=2 | {{code|tf2_textures_dir.vpk}}<br>Stored in {{code|.vtf}} format.
* [[Map Stamp]] images
+
| rowspan=2 |
* Backpack icon images
+
[[Strange Filter]] images<br>
* [[Kill icon]]s
+
[[Map Stamp]] images<br>
* [[HUD]] images
+
Backpack icon images<br>
 
+
[[Kill icon]]s<br>
== Sound files ==
+
[[HUD]] images
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.
+
| 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.
 
+
|-
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.
+
| class="nameplate" align="center" | {{Font colour|white|Textures}}
 
+
|-
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.  
+
| [[File:Speaker Icon.png|100px]]
 
+
| rowspan=2 | {{code|tf2_sound_misc_dir.vpk}}<br>Mostly stored in {{code|.mp3}} or {{code|.wav}} format.
=== Wiki usage ===
+
| rowspan=2 |
Audio files should be licensed with the {{tl|AudioTF2}} license.
+
[[Audio cue]]s<br>
* [[Audio cue]]s
+
[[Weapon]] and [[Building]] sounds
* [[Voice commands]] and [[Voice responses|voice responses]]
+
| rowspan=2 | Uses the {{tl|AudioTF2}} license.
* [[Weapon]] and [[Building]] sounds
+
|-
 
+
| class="nameplate" align="center" | {{Font colour|white|Sounds}}
== Miscellaneous files ==
+
|-
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.
+
| [[File:Leaderboard class administrator.png|100px]]
 
+
| rowspan=2 | {{code|tf2_sound_vo_[lang].vpk}}<br>Mostly stored in {{code|.mp3}} or {{code|.wav}} format.
=== Wiki usage ===
+
| rowspan=2 |
* Files for [[Help:Cosmetic images|cosmetic image renders]] (see also: [[Help:Model Viewer|Model Viewer]])
+
[[Voice commands]]<br>
 
+
[[Voice responses]]
== Map files ==
+
| 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.
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 ===
+
|-
* Community-made [[List of posters|posters]]
+
| [[File:TF2 crosshair.png|100px]]
* Map-specific announcer voice lines
+
| rowspan=2 | {{code|tf2_misc_dir.vpk}}
* Loading menu photos
+
| rowspan=2 | Not used on Wiki itself, but can aid in editing:<br>
 
+
Config ({{code|.cfg}}) files<br>
== VScript files ==
+
Model ({{code|.mdl}}) files for [[Help:Cosmetic images|cosmetic image renders]] in [[Help:Model Viewer|HLMV]]<br>
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.
+
Material ({{code|.vmt}}) files
 
+
| rowspan=2 | This {{code|.vpk}} shares a similar file structure to the {{code|/tf/}} folder.
=== Wiki usage ===
+
|-
* Figuring out specific values (such as [[Zombie Infection]] abilities, or [[Versus Saxton Hale]] specifics).
+
| class="nameplate" align="center" | {{Font colour|white|Miscellaneous files}}
 +
|-
 +
| [[File:Heavybot blu.png|100px]]
 +
| rowspan=2 | {{code|tf2_misc_dir.vpk}}<br>Population ({{code|.pop}}) files in {{code|tf\scripts\population}}
 +
| rowspan=2 | Used on [[Robots|Robot]] articles to determine attributes.<br>Used on [[Mann vs. Machine mission|mission]] pages to determine which Robots show up on a wave.
 +
| rowspan=2 | This {{code|.vpk}} shares a similar file structure to the {{code|/tf/}} folder.<br>Split up into two different types:<br>Mission files, containing information about waves (which Robots spawn, credit drops, etc.).<br>Robot template files, stores information about Robots like weapons, name, health, skill, attributes, etc. for use in mission files.
 +
|-
 +
| class="nameplate" align="center" | {{Font colour|white|Mann vs. Machine Robot files}}
 +
|-
 +
| [[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}}
 +
|}

Latest revision as of 11:18, 9 May 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 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