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

From Team Fortress Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
{{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.
+
'''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 files ==
 
== Accessing the files ==
Line 18: Line 18:
 
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}}).
 
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}}).
  
=== Notable Wiki uses ===
+
=== 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.
 
* [[Strange Filter]] images
 
* [[Strange Filter]] images
 
* [[Map Stamp]] images
 
* [[Map Stamp]] images
Line 32: Line 33:
 
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.  
 
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.  
  
=== Notable Wiki uses ===
+
=== Wiki usage ===
 +
Audio files should be licensed with the {{tl|AudioTF2}} license.
 
* [[Audio cue]]s
 
* [[Audio cue]]s
 
* [[Voice commands]] and [[Voice responses|voice responses]]
 
* [[Voice commands]] and [[Voice responses|voice responses]]
Line 40: Line 42:
 
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.
 
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.
  
=== Notable Wiki uses ===
+
=== Wiki usage ===
 
* Files for [[Help:Cosmetic images|cosmetic image renders]] (see also: [[Help:Model Viewer|Model Viewer]])
 
* Files for [[Help:Cosmetic images|cosmetic image renders]] (see also: [[Help:Model Viewer|Model Viewer]])
  
Line 46: Line 48:
 
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.
 
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.
  
=== Notable Wiki uses ===
+
=== Wiki usage ===
* [[List of posters|Posters]]
+
* Community-made [[List of posters|posters]]
 
* Map-specific announcer voice lines
 
* Map-specific announcer voice lines
 
* Loading menu photos
 
* Loading menu photos
  
 
== VScript files ==
 
== VScript 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.
+
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 used. Example reference: {{code|vscripts\infection\infection.nut:L525-526}}.
  
=== Notable Wiki uses ===
+
=== Wiki usage ===
 
* Figuring out specific values (such as [[Zombie Infection]] abilities, or [[Versus Saxton Hale]] specifics).
 
* Figuring out specific values (such as [[Zombie Infection]] abilities, or [[Versus Saxton Hale]] specifics).
 
== Licensing extracted content ==
 
Most extracted content uses the {{tl|ExtractTF2}} license, regardless of whether or not it's Valve-made or community-made. For any kind of audio, the {{tl|AudioTF2}} license should be used, and any kind of artwork (excluding posters and signs) should use {{tl|ArtworkTF2}}.
 

Revision as of 20:18, 2 January 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 Pack File, also shortened to simply Pack) files, which require special programs to open. Note that any files used on community-created maps are contained within the .bsp file instead. All content should be licensed under the {{ExtractTF2}} license, unless mentioned otherwise.

Accessing the files

.vpk files require a special program to open, some examples of programs that can open them:

These programs open the vpk files and show the contents, but may not be able to open the files contained within. To find the .vpk files for Team Fortress 2, navigate to steamapps\common\Team Fortress 2\tf. There are many files, but the _dir files will contain everything that is in the other files too. 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).

Texture files

Texture files are stored in .vtf files, some examples of programs that can open them:

The texture Pack files contain textures for most things in the game, such as the classes, 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 dneg_images or d_images).

Wiki usage

Artwork images (such as those used on the Casual menu) should be licensed under the {{ArtworkTF2}} license. Other textures should be licensed under the {{ExtractTF2}} license.

Sound files

Most sound files are stored in .mp3 or .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.

As the name suggests, "vo" contains voice lines such as the Responses, 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 .vpk file to appear.

The "sound misc" files contains the rest of the sounds, such as audio cues, environmental ambience, footstep noises, main menu startup music, etc.

Wiki usage

Audio files should be licensed with the {{AudioTF2}} license.

Miscellaneous files

The miscellaneous files Pack contains several different types of files, such as models (.mdl), config (.cfg) files, facial expression presets, material files, and many more. These files share a similar file structure to the /tf/ folder.

Wiki usage

Map files

The aforementioned GCFScape can be used to open up .bsp files, however, extracting the files does not work. Every map file contains a .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.

Wiki usage

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

VScript files

As mentioned before VScript files are contained in the map's file, they come in the .nut format (associated with the Squirrel programming language, for documentation see 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: vscripts\folder\file.nut:L1-10, replacing folder and 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 used. Example reference: vscripts\infection\infection.nut:L525-526.

Wiki usage