Briefing
Scribbled by Sotha
Introduction
Briefing is a short introductory story start to give atmosphere and brief the player about background, what he is supposed to do, and why. It gives purpose and meaning to the formal objectives. It is very important part of every fan mission, because it tells the player what to expect and what to do.
At present, there are three ways the mapper can implement their briefings:
- Text-only Briefing
- Button Controlled Animated Briefing
- Timed Flowing Briefing
Which Briefing to Choose?
Mappers can choose any briefing they prefer. Text-only Briefing is the most easy to implement technically, but offers no possibility for images. The briefing is operated by arrows which turn briefing pages. The Timed Flowing Briefing is the most difficult one to implement due to demanding trial and error process to get the timings right. The player cannot control this briefing as it flows like a movie based on timings set by the mapper. This briefing can show beautiful briefing pictures which build up atmosphere. The Button Controlled works between the Text-only Briefing and Timed Flowing Briefing, offering eye candy and easy control. The briefing can show text and images, but is controlled by next/previous page buttons like the Text-only Briefing. No timings need to be set with Button Controlled Animated Briefing.
Text-only Briefing
To create a Text-only Briefing for your mission, create a plain text file suffixed .xd (not .txt) and put it in the xdata folder, for example briefing.xd. In the file type your briefing. It must be in the following format in this example: <mapname> must be replaced with the exact name of your map.
maps/<mapname>/mission_briefing { "num_pages": "1" "page1_body" : { " TITLE (if wanted.)" "" "I got a tip last night from..." "" "I found a map..." } "page2_body" : { "extra pages do the same way as page 1 above but then change the value in num_pages above" } }
If your page text is too long then it will truncate on the display, so test it out and see if you need to go to multiple pages. If you have multiple pages then up/down scroll arrows will automagically appear.
It doesn't matter which .xd file this xdata entry goes into, as long as the xdata entry's name matches the format specified above ("maps/<mapname>/mission_briefing"). See XData File Creation for details on .xd files.
Button Controlled Animated Briefing
To set up the Button Controlled Animated Briefing, please download this package, which contains basic .gui file and placeholder images which the mapper edits to create their own briefing. http://www.mediafire.com/?dapwqz47ygzc3co
Extract the files into your FM folder (ie. doom3/your-near-ready-FM-folder/guis). The "guis"-folder should now contain "mainmenu_briefing.gui"-file and a folder "assets" which contains tga-image files.
Now when you install you mission in TDM and run it, you will see a placeholder briefing. In simplest form, you now need to edit the mainmenu_briefing.gui and replace the tga briefing images.
Add your own briefing text in the section windowDef BriefingText1, etc. Simply replace the text with your own.
By default, this briefing goes to sixth screenful of text. It is possible the mappers briefing requires only four or five pages, so it would look bad if there was an empty page. To shorten the briefing to, for example to the fifth screen (stage), do the following: Find the previous section to the one you want to be the last. If you want the 5th stage to be the last one, go for stage 4 (find "stage 4" with your text editor search function). Find the "windowDef NextButton4" and prevent the system from revealing the stage 5 nextbutton. Simply do the following change: set "NextButton5::visible" "1"; -> set "NextButton5::visible" "0"; If you want 3rd screenful to be the last one, find stage 2 and edit Nextbutton2 and prevent it from showing NextButton3.
Editing the Briefing Images
Simply replace the /assets/briefingX images with our own images. I recommend that the images are 512x512 resolution, since the briefing shows all images in 1x1 ratio. It might be a good idea to pack your .tga files into .dds to save disk space, but it is not mandatory. Going DDS provides significant reduction in file size! Simply convert you .tga:s with The Compressonator or GIMP/photoshop plugins. See Darkmod wiki for instructions. http://modetwo.net/darkmod/wiki/index.php?title=DDS_creation.
You can easily create nice briefing images by building the scene you want to show in the briefing using DR and taking in-game screenshots. Edit your screenshots into a nice 512x512 image. And now comes an important part. See the placeholder briefing again. Look at images 1 and 2. See how image 2 fits better in the scene? Image 1 seems blocky. You can make this nice blending using alpha gradient in your image. Basically you want you image to fade into transparency from the middle. Here is how to do it:
1) get GIMP (a image processor) 2) open your image 3) layer->transparency->add alpha channel 4) Go to Layer>Mask>Add Layer mask 5) when prompted to select a type, select "Layer's Alpha channel" 6) check to make sure you're set to edit the layer mask (it should default to this) NOTE: What's going on is the "White" of your mask is the "visible", the "black" is the "invisible", and of course the greys are in between. 7) Set your foreground color to White and your Background color to Black. 8) Choose the gradient tool. 9) Set your Gradient to "FG to BG (RGB)" 10) Your White-to-black gradient is now the visible-to-invisible alpha channel gradient. You'll have to work with that to get the effect you desire. It helps if you set the gradient tool shape into radial and then play around with transition.
Timed Flowing Briefing
To set up this kind of briefing, please download this package, which contains basic .gui file and placeholder images which the mapper edits to create their own briefing. !!LINK!!
Extract the files into your FM folder (ie. doom3/your-near-ready-FM-folder/guis). The "guis"-folder should now contain "mainmenu_briefing.gui"-file and a folder "assets" which contains tga-image files.
Now when you install you mission in TDM and run it, you will see a placeholder briefing. In simplest form, you now need to edit the mainmenu_briefing.gui and replace the tga briefing images.
Replace "windowDef BriefingText1" -> "windowDef BriefingText5" with your own text. Find windowDef BriefingAnimation in your .gui file. Under this part there are many entries "onTime X". Basically you need to alter the X in each segments so that your text and images are shown in the order and timings you prefer. X is the time in milliseconds.
Editing the Briefing Images
Everything said in the Button Controlled Briefing image editing applies here.
Advanced Briefing Editing
It is quite possible you are not happy with the way the images move in both Button Controlled and Timed Flowing Briefings. This section tells you how you change the way images move around the screen.
Advanced Editing for Button Controlled Briefing
Briefing text position and other properties can be changed in sections "windowDef BriefingText1" - "WindowDef BriefingText6."
Changin image movements: In your .gui file find the different stages which control the images and text. It is easy to find them by searching the word "stage". Close to this entry there should be commented parts which say "put image x in motion." Near this text there should be something like:
//put image2 in motion set "BriefingMovingPicture2::rect" "440 -200 400 400"; transition "BriefingMovingPicture2::matcolor" "1 1 1 0" "1 1 1 .4" "4000"; transition "BriefingMovingPicture2::rect" "440 -200 400 400" "5 160 200 200" "27000"; set "BriefingMovingPicture2::visible" "1";
The first part sets the briefing picture 2 in coordinates 440, -200 (x,y) (outside the right boundary of the screen, high) and makes it into size 400x400pixels. The second part makes the image slowly change transparency towards solid (0.4) during 4000 milliseconds. The third part puts the image in the same coordinates as in the first part and then moves it towards coordinates (5, 160) and makes it shrink into 200x200 pixels and this all occurs softly during 27000 milliseconds. The fourth part makes the image visible.
Change all these sections to values you like.
Advanced Editing for Timed Flow Briefing
Briefing text position and other properties can be changed in sections "windowDef BriefingText1" - "WindowDef BriefingText6."
In the "windowDef BriefingAnimation" change the transition values to your liking. Here's an example.
// Show Picture 1 onTime 1000 { transition "BriefingMovingPicture1::matcolor" "1 1 1 0" "1 1 1 .4" "4000"; transition "BriefingMovingPicture1::rect" "0 -200 300 300" "430 500 20 20" "27000"; transition "BriefingMovingPicture1::rotate" "5" "-60" "33000"; set "BriefingMovingPicture1::visible" "1"; }
After 1000 milliseconds. First part tells the image to sink into visibility from alpha 0->0.4 during 4000 milliseconds. Second part puts the image from coords (0,-200) in size (300x300 pixels) and then moves it to 430,500 and shrinks it into 20x20 pixels during 27000 milliseconds. Third parts puts the image rotating a bit.
Conclusion
With these instructions new mappers can really easily create any kind of briefing they prefer by downloading the basic briefing creation package and editing the files to suit their needs. If you have difficulties do not hesistate to ask in our friendly forums.