TF2/Modifying the Mission Briefing: Difference between revisions

From Valve Developer Community
< TF2
Jump to navigation Jump to search
(Fixed glaring spelling errors, added spanish to list, note regarding "tchinese" and "schinese")
m (Unicodifying, replaced: See Also → See also, [[image: → [[File:)
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{cleanup}}
{{lang|TF2/Modifying the Mission Briefing}}
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.
{{Tutorial Skill Level | skill=4}}
 
The mission briefing, shown to players before they enter the match, is set automatically for basic Capture the Flag and Control Point maps, just by putting the right goal entities on the map. However, you may need to write a custom one. To do this, you must create a custom briefing file.
__TOC__
__TOC__


== Writing a briefing ==
== Writing a briefing ==
Your map's briefing should follow the style of the official maps. Some default briefings are listed below.


In the directory where your .bsp is:
;Capture the Flag:
  ''"..\Program Files\Valve\Steam\SteamApps\_Username_\Team Fortress 2\tf\maps\"''
: Objective:
Create the localised map .txt briefing files. You can also extract them from the '''TF2 .gcf''' with [http://nemesis.thewavelength.net/index.php?p=25 GCFScape] and rename them for your map. So the maps directory should look like this:
: To win a point, steal the enemy's intelligence briefcase and return it to your base.
:
: Other Notes:
: Players drop the intelligence when they die. Dropped intelligence returns to its Base after 60 seconds.


  mapname.bsp
;Special Delivery:
  mapname_danish.txt
: Objective:
  mapname_dutch.txt
: Deliver the Australium to the rocket warhead to win the round.
  mapname_english.txt
:
  mapname_finnish.txt
: Other Notes:
  mapname_french.txt
: Players drop the Australium when they die. Dropped Australium returns to its home after 15 seconds.
  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|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.}}
;Standard Control Points:
: Objective:
: To win each team must own all five Control Points.
:
: Other Notes:
: Control Points cannot be captured while they are locked.


For example: If your map is named ''cp_factory'', then your ''.txt'' files shuld appear like this:
;Attack/Defend Control Points:
: Objective:
: RED team wins by defending their Control Points. BLU team wins by capturing all control points before the time runs out.
:  
: Other Notes:
: Control Points cannot be captured while they are locked. RED team cannot regain control of a point once BLU has captured it.


cp_factory_english.txt
;KOTH:
: Objective:
: Capture the Control Point and defend it until your team's timer runs out.
:
: Other Notes:
: The Control Point cannot be captured while locked.
:
: If the enemy team captures the Control Point, your team's timer will pause until you recapture the point.


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.
;Payload:
: Objective:
: Escort the payload to the enemy base. Stand near the payload to make it move.
:
: Other Notes:
: Enemies can block the payload by getting close to it.


== Adding Custom Map Images ==
;Payload Race:
: Objective:
: Escort your payload cart to the finish line before the opposing team can deliver theirs. Stand near the cart to make it move.
:
: Other Notes:
: Enemies can block the cart by getting close to it.


In order for your custom map to have 2 working Menu Photos it needs 2 files in following directory: <br />
;Mann vs. Machine:
C:\Program Files\Steam\steamapps\''<account_name>''\team fortress 2\tf\materials\vgui\maps
: Objective:
: Defend against the invading robots.
: Complete all waves for victory!


These 2 files are:
== Adding the briefing ==
*menu_photos_mapname.vtf
*menu_photos_mapname.vmt


=== Creating the VTF file ===
In the directory where your .bsp is: 
==== Making a TGA image ====
  "..\SteamApps\common\Team Fortress 2\tf\maps\"
Create the localised map .txt briefing files. Your directory should look like this:
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 // Simplified Chinese
mapname_spanish.txt
mapname_swedish.txt
mapname_tchinese.txt // Traditional Chinese
{{note|You do not have to create one for each language.}}


# Take a few screenshots of your map depending on how many you want to show. Make sure they look good in a 512x512 resolution.
# 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'''.
# 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 ====
For example: If your map is named <code>cp_factory</code>, then your files should be named like this:
We will create a vtf from the tga using vtex.exe. Let's take some time to set it up.


# 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
cp_factory_english.txt
# 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


After placing the files, run your map to make sure your briefing works and appears as intended.


== Adding Custom Map Images ==
[[File:Menu_photos_ctf_2fort.vtf.png|thumb|right|The VTF texture of the 2fort menu photos.]]
In order for your custom map to have 2 working Menu Photos it needs 2 files in following directory:
..\SteamApps\common\Team Fortress 2\tf\materials\vgui\maps\


==== Converting the TGA to VTF ====
These 2 files are:
*<code>menu_photos_[mapname].vtf</code>
*<code>menu_photos_[mapname].vmt</code>


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 VTF file ===
{{note|This tutorial uses [[VTFEdit]]. Other tools should be similar.}}


# Take a few screenshots of your map depending on how many you want to show.
# Use [[GCFScape]] to extract one of the existing menu photos from <code>tf2_textures_dir.vpk</code> to use as a template for your VTF. You can find them in <code>materials\vgui\maps\menu_photos_[mapname].vtf</code>.
# Choose one of the textures with "menu_photos_" in its name.
# Open the VTF of your choice with VTFEdit and export it as a PNG image.
# Open your PNG and your two screenshots with an image editor.
# Scale and rotate your screenshots so they fit perfectly on the existing thumbnails.
# Save your new image and export it to a VTF file again using VTFEdit. Save it as <code>menu_photos_[mapname].vtf</code>.


=== Creating the VMT file ===
=== Creating the VMT file ===


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


  "UnlitGeneric"
  "UnlitGeneric"
Line 78: Line 128:
  }  
  }  


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
Replace 'mapname' in <code>"$basetexture" "vgui\maps\menu_photos_mapname"</code> with the name of your custom map. For example, if your map is named <code>cp_factory</code>, then it should read
"$basetexture" "vgui\maps\menu_photos_ctf_2fort"
  "$basetexture" "vgui\maps\menu_photos_cp_factory"


Save the file as "menu_photos_mapname.vmt".
Save the file as <code>menu_photos_mapname.vmt</code>.


=== Place your files in the proper directory ===
=== Place your files in the proper directory ===


Move your "menu_photos_mapname.vtf" and "menu_photos_mapname.vmt" to the following directory:
Move your <code>menu_photos_mapname.vtf</code> and <code>menu_photos_mapname.vmt</code> to the following directory:
  "..\SteamApps\common\Team Fortress 2\tf\materials\vgui\maps"


C:\Program Files\Steam\steamapps\''<account_name>''\team fortress 2\tf\materials\vgui\maps
Run your map to make sure your images appear.
 
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 ==
== Conclusion ==
It is advised to pack the files into your map using [[Bspzip|BSPZip]], [[Pakrat|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.
When your map is ready for release, you should pack your localized briefing files and map images into the .bsp using a tool such as [[Pakrat]]. Otherwise, servers will not have the files and other players won't see them.
 


== See Also ==
== See also ==
*[[Material Creation]]
*[[Material Creation]]
*[[Team Fortress 2 Level Creation]]
*[[Team Fortress 2 Level Creation]]


[[Category:Team Fortress 2]]
[[Category:Team Fortress 2|Modifying]]

Latest revision as of 00:16, 7 January 2024

English (en)한국어 (ko)Русский (ru)Translate (Translate)
Skill Level

This tutorial expects you to have this amount of knowledge within the topic to follow along smoothly.

Novice Familiar Competent Proficient Expert


The mission briefing, shown to players before they enter the match, is set automatically for basic Capture the Flag and Control Point maps, just by putting the right goal entities on the map. However, you may need to write a custom one. To do this, you must create a custom briefing file.

Writing a briefing

Your map's briefing should follow the style of the official maps. Some default briefings are listed below.

Capture the Flag
Objective:
To win a point, steal the enemy's intelligence briefcase and return it to your base.
Other Notes:
Players drop the intelligence when they die. Dropped intelligence returns to its Base after 60 seconds.
Special Delivery
Objective:
Deliver the Australium to the rocket warhead to win the round.
Other Notes:
Players drop the Australium when they die. Dropped Australium returns to its home after 15 seconds.
Standard Control Points
Objective:
To win each team must own all five Control Points.
Other Notes:
Control Points cannot be captured while they are locked.
Attack/Defend Control Points
Objective:
RED team wins by defending their Control Points. BLU team wins by capturing all control points before the time runs out.
Other Notes:
Control Points cannot be captured while they are locked. RED team cannot regain control of a point once BLU has captured it.
KOTH
Objective:
Capture the Control Point and defend it until your team's timer runs out.
Other Notes:
The Control Point cannot be captured while locked.
If the enemy team captures the Control Point, your team's timer will pause until you recapture the point.
Payload
Objective:
Escort the payload to the enemy base. Stand near the payload to make it move.
Other Notes:
Enemies can block the payload by getting close to it.
Payload Race
Objective:
Escort your payload cart to the finish line before the opposing team can deliver theirs. Stand near the cart to make it move.
Other Notes:
Enemies can block the cart by getting close to it.
Mann vs. Machine
Objective:
Defend against the invading robots.
Complete all waves for victory!

Adding the briefing

In the directory where your .bsp is:

 "..\SteamApps\common\Team Fortress 2\tf\maps\"

Create the localised map .txt briefing files. Your directory should look like this:

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 // Simplified Chinese
mapname_spanish.txt
mapname_swedish.txt
mapname_tchinese.txt // Traditional Chinese
Note.pngNote:You do not have to create one for each language.


For example: If your map is named cp_factory, then your files should be named like this:

cp_factory_english.txt

After placing the files, run your map to make sure your briefing works and appears as intended.

Adding Custom Map Images

The VTF texture of the 2fort menu photos.

In order for your custom map to have 2 working Menu Photos it needs 2 files in following directory:

..\SteamApps\common\Team Fortress 2\tf\materials\vgui\maps\

These 2 files are:

  • menu_photos_[mapname].vtf
  • menu_photos_[mapname].vmt

Creating the VTF file

Note.pngNote:This tutorial uses VTFEdit. Other tools should be similar.
  1. Take a few screenshots of your map depending on how many you want to show.
  2. Use GCFScape to extract one of the existing menu photos from tf2_textures_dir.vpk to use as a template for your VTF. You can find them in materials\vgui\maps\menu_photos_[mapname].vtf.
  3. Choose one of the textures with "menu_photos_" in its name.
  4. Open the VTF of your choice with VTFEdit and export it as a PNG image.
  5. Open your PNG and your two screenshots with an image editor.
  6. Scale and rotate your screenshots so they fit perfectly on the existing thumbnails.
  7. Save your new image and export it to a VTF file again using VTFEdit. Save it as menu_photos_[mapname].vtf.

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 named cp_factory, then it should read

 "$basetexture" "vgui\maps\menu_photos_cp_factory"

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:

 "..\SteamApps\common\Team Fortress 2\tf\materials\vgui\maps"

Run your map to make sure your images appear.

Conclusion

When your map is ready for release, you should pack your localized briefing files and map images into the .bsp using a tool such as Pakrat. Otherwise, servers will not have the files and other players won't see them.

See also