Ko/TF2/Modifying the Mission Briefing

From Valve Developer Community
< Ko‎ | TF2
Revision as of 00:42, 2 July 2014 by Tuna (talk | contribs)
Jump to navigation Jump to search
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

The mission briefing, shown to players before they enter the match, is set automatically for Basic Capture the Flag and Control Point games, just by putting the right goal entities on the map. Custom ones can be done, but how? It is not possible to do so via a tool such as Hammer, but you can edit the localized texts in the directory where you map is in.

브리핑 파일 만들기

당신의 .bsp 파일 경로:

 "..\Program Files\Valve\Steam\SteamApps\_Username_\Team Fortress 2\tf\maps\"

맵 이름.txt의 브리핑 파일을 만드세요. 또한 당신은 GCFScapeTF2 .gcf를 추출할수도 있습니다. 그리고 당신의 맵 이름으로 바꾸어주세요. 그리고 당신의 맵 경로의 모습은 이렇게 되어야 합니다:

 mapname.bsp
 mapname_danish.txt
 mapname_dutch.txt
 mapname_english.txt
 mapname_finnish.txt
 mapname_french.txt
 mapname_german.txt
 mapname_italian.txt
 mapname_japanese.txt
 mapname_korean.txt
 mapname_norwegian.txt
 mapname_polish.txt
 mapname_portuguese.txt
 mapname_russian.txt
 mapname_schinese.txt
 mapname_spanish.txt
 mapname_swedish.txt
 mapname_tchinese.txt
Note.png메모:It is not a typographical error: there are two variations of the files for Chinese, one for "traditional" and the other for "simplified" language encodings.

For example: If your map is named cp_factory, then your .txt files shuld appear like this:

cp_factory_english.txt

In each of those, is the briefing text displayed for your map, in the named language. While the above is listed, you won't have to make a .txt file for each language.

Adding Custom Map Images

In order for your custom map to have 2 working Menu Photos it needs 2 files in following directory:
C:\Program Files\Steam\steamapps\<account_name>\team fortress 2\tf\materials\vgui\maps

These 2 files are:

  • menu_photos_mapname.vtf
  • menu_photos_mapname.vmt

Creating the VTF file

Making a TGA image

  1. Take a few screenshots of your map depending on how many you want to show. Make sure they look good in a 512x512 resolution.
  2. Create a 512x512 pixels TGA with a black blackground, then paste your screenshots into it. Edit the alpha channel of the image so it hides the black background. Note that you will require an advanced image editor to do this, such as Adobe Photoshop. Save the file as menu_photos_mapname.tga in 32 bit and uncompressed.
  3. Copy and paste your "menu_photos_mapname.tga" in following directory: C:\Program Files\Steam\steamapps\<account_name>\team fortress 2\tf\materialsrc

Preparing VTEX

We will create a vtf from the tga using vtex.exe. Let's take some time to set it up.

  1. Go to the following directory and create a desktop shortcut of the vtex.exe: C:\Program Files\Steam\steamapps\<account_name>\sourcesdk\bin\orangebox\bin
  2. Go Properties on the vtex.exe shortcut and append the following parameters to the text in the Target field:
-game "C:\Program Files\Steam\steamapps\<account_name>\team fortress 2\tf"  -nop4


Converting the TGA to VTF

Drag your tga you created onto the vtex.exe desktop shortcut. The vtex.exe will create a menu_photos_mapname.vtf in the following directory: C:\Program Files\Steam\steamapps\<account_name>\team fortress 2\tf\materials


Creating the VMT file

Open notepad and paste the following lines of code into it.

"UnlitGeneric"
{
 "$basetexture" "vgui\maps\menu_photos_mapname"
 "$translucent" 1
 "$ignorez" 1
 "$vertexcolor" 1
} 

Replace 'mapname' in "$basetexture" "vgui\maps\menu_photos_mapname" with the name of your custom map. For example, if your map is called ctf_2fort, then it should read

"$basetexture" "vgui\maps\menu_photos_ctf_2fort"

Save the file as "menu_photos_mapname.vmt".

Place your files in the proper directory

Move your "menu_photos_mapname.vtf" and "menu_photos_mapname.vmt" to the following directory:

C:\Program Files\Steam\steamapps\<account_name>\team fortress 2\tf\materials\vgui\maps

If you correctly edited the Alpha Channel of your tga and did all the other steps like mentioned, your 2 map screens will be displayed on the Objective Screen on Map Start!

Conclusion

It is advised to pack the files into your map using BSPZip, PackBSP, Pakrat or a similar program, otherwise, your files won't be downloaded while connecting to a server running the map, hence your briefing will not appear on other clients.

See Also