TF2/Modifying the Mission Briefing: Difference between revisions

From Valve Developer Community
< TF2
Jump to navigation Jump to search
m (tagged for cleanup)
No edit summary
Line 1: Line 1:
{{stub}}
{{stub}}
{{cleanup}}
{{cleanup}}
== Intro ==


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.
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 mission briefings can be done, but how?
Custom mission briefings can be done, but how?
----
There is not yet an official way to do this, but you can edit the localized texts in the directory where you map is in.
There is not yet an official way to do this, but you can edit the localized texts in the directory where you map is in.
== Writing a briefing ==


In the directory where your .bsp is (_mapname_.bsp - Usually "..\Program Files\Valve\Steam\SteamApps\_Username_\Team Fortress 2\tf\maps\"), create the localised map .txt briefing files. You can also extract them from the TF2 .gcf with GCFScape and rename the for your map. So the maps directory should look like this:
In the directory where your .bsp is (_mapname_.bsp - Usually "..\Program Files\Valve\Steam\SteamApps\_Username_\Team Fortress 2\tf\maps\"), create the localised map .txt briefing files. You can also extract them from the TF2 .gcf with GCFScape and rename the for your map. So the maps directory should look like this:
Line 32: Line 35:
In each of those, is the briefing text displayed for your map, in the named language.
In each of those, is the briefing text displayed for your map, in the named language.


--------------------------------------------------------------
== Adding Custom Map Images ==
 
-- Custom Map Images
 
--------------------------------------------------------------
 
 
 
In order for your custom map to have 2 working Menu Photo'sit needs 2 files in following directory:


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


These 2 files are:
These 2 files are:
*menu_photos_mapname.vtf
*menu_photos_mapname.vmt


== Creating the VTF file ==
=== Making a TGA image ===


menu_photos_mapname.vtf
# 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


menu_photos_mapname.vmt
=== Preparing VTEX ===
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
# 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




--------------------------------------------------------------


-- How to create the .vtf
=== 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 ==


I. Making a .tga image
Open notepad and paste the following lines of code into it.


II. Vtex Preparation
"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"


III. Transforming the .tga image to a .vtf
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!


I. Making a .tga image
== Credits ==
 
[http://www.fpsbanana.com/tuts/5266 Taken from FPSBanana.com.] --[[User:XGBUKx Simple|xGBUKx Simple]] 10:19, 7 Jun 2008 (PDT)
 


Step 1:
== Conclusion ==
 
It is advised to pack the files into your map using [[BSPZip]], [[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.
Take 1, 2 or 3 screenshots of your map depending on how many you want to show.
 
Just make sure they will still look good on a 512x512 tga. (Step 2)
 
 
 
Step 2:
 
 
Photoshop: create tga:
 
* create a 512x512 pixels TGA.
 
* give it a black background
 
* resize your 2 screenshots and paste them in to make something nice.
 
(You can use one of the Menu Photo Template PSD's I made to make Menu Photo's like VALVe's maps have. Download at the bottom of this Tutorial.)
 
* edit the Alpha channel to make it hide the black background and show the pictures only
 
* Save As... menu_photos_mapname.tga (32 bit, uncompressed)
 
 
 
 
Step 3:
 
Copy and paste your "menu_photos_mapname.tga" in following directory:
 
C:\Program Files\Steam\steamapps\<player_name>\team fortress 2\tf\materialsrc
 
 
 
 
 
II. Vtex Preparation
 
We will create a vtf from the tga using vtex.exe. Let's setup the vtex.exe!
 
 
 
 
Step 4:
 
Browse to the following directory and make a desktop shortcut of the vtex.exe:
 
C:\Program Files\Steam\steamapps\<player_name>\sourcesdk\bin\ orangebox\bin
 
 
 
Step 5:
 
Go Properties on the vtex.exe shortcut:
 
Add the following 2 parameters behind the Target:
 
 
-game "C:\Program Files\Steam\steamapps\<player_name>\team fortress 2\tf"
 
-nop4
 
 
 
III. Transforming the .tga image to a .vtf
 
 
 
Step 6:
 
Now drag your tga you created (Step 3) onto the vtex.exe deskopt shortcut (Step 5). The vtex.exe will create a menu_photos_mapname.vtf in the following directory:
 
 
C:\Program Files\Steam\steamapps\<player_name>\team fortress 2\tf\materials
 
 
 
menu_photos_mapname.vtf CREATED!
 
 
 
 
 
--------------------------------------------------------------
 
-- How to create the .vmt
 
--------------------------------------------------------------
 
 
 
 
Step 1:
 
open notepad
 
 
 
Step 2:
 
paste these lines of code in it:
 
<nowiki>"UnlitGeneric"
{
"$basetexture" "vgui\maps\menu_photos_mapname"
"$translucent" 1
"$ignorez" 1
"$vertexcolor" 1
}</nowiki>
 
Each of these should be on a sperate line, aswell as having "UnlitGeneric" on the top line, with { on the next line, then "$basetexture" "vgui\maps\menu_photos_mapname" and so forth untill the entire code has been written.
 
Step 3:
 
Replace 'mapname' in "$basetexture" "vgui\maps\menu_photos_mapname" with the name of your custom map.
 
Example: "$basetexture" "vgui\maps\menu_photos_ctf_2fort"
 
 
 
Step 4:
 
 
Save As... menu_photos_mapname.vmt
 
 
 
menu_photos_mapname.vmt CREATED!
 
 
 
--------------------------------------------------------------
 
-- Place .vtf & .vmt in propper directory
 
--------------------------------------------------------------
 
 
 
 
Cut and past your "menu_photos_mapname.vtf" and "menu_photos_mapname.vmt" in following directory:
 
C:\Program Files\Steam\steamapps\<player_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!
 
[http://www.fpsbanana.com/tuts/5266 Taken from FPSBanana.com.] --[[User:XGBUKx Simple|xGBUKx Simple]] 10:19, 7 Jun 2008 (PDT)

Revision as of 22:02, 8 July 2008

Stub

This article or section is a stub. You can help by expanding it.

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.

Intro

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 mission briefings can be done, but how? There is not yet an official way to do this, but you can edit the localized texts in the directory where you map is in.

Writing a briefing

In the directory where your .bsp is (_mapname_.bsp - Usually "..\Program Files\Valve\Steam\SteamApps\_Username_\Team Fortress 2\tf\maps\"), create the localised map .txt briefing files. You can also extract them from the TF2 .gcf with GCFScape and rename the for your map. So the maps 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_korian.txt
  • mapname_norwegian.txt
  • mapname_polish.txt
  • mapname_portuguese.txt
  • mapname_russian.txt
  • mapname_schinese.txt
  • mapname_swedish.txt
  • mapname_tchinese.txt

For cp_dustbowl, replace mapname with cp_dustbowl.

In each of those, is the briefing text displayed for your map, in the named 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!

Credits

Taken from FPSBanana.com. --xGBUKx Simple 10:19, 7 Jun 2008 (PDT)

Conclusion

It is advised to pack the files into your map using BSPZip, 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.