Briefing

From The DarkMod Wiki
Jump to navigationJump to search

Scribbled by Sotha

Introduction

A briefing is a short introduction to your mission to brief the player about what he is supposed to do, and why. It gives purpose and meaning to the formal objectives. It is a very important part of every fan mission, because it tells the player what to expect.

Briefings should:

  • introduce any important background information (where am I?)
  • introduce any significant characters
  • give the character valid motivations (why am I doing this?)
  • set the tone of the upcoming mission (spooky, tense, comical, etc)
  • give hints about what equipment the player might want to buy, if applicable

Don't underestimate the importance of setting a tone. If you want players to take your mission seriously, DON'T make jokes in the breifing! A poorly edited briefing with spelling errors will set a negative tone...if you're not a native English speaker, have someone else look over your text.


Which Briefing to Choose?

At present, there are three ways the mapper can implement their briefings:

  • Text-only Briefing
  • Button Controlled Animated Briefing
  • Timed Flowing Briefing


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. You can get the package from

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.

Editing mainmenu_briefing.gui for the Button Controlled Briefing

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. Check the toolbox for these parameters.

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. You can get the package from

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.

Editing mainmenu_briefing.gui for the Timed Flowing Briefing

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.

Please note that the first image is put in motion in the section "windowDef BriefingStateInit" section when the briefing is intialized.

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.

General Tips for Advanced Briefing Editing

When playing with transition values, it might be helpful to know that the whole screen is 640x480. Note that the coordinates are always the left top corner of the image. To get a feeling for what coordinates are where on screen: open gimp, create new 640x480 image and draw a box there with the rectangle select tool where you would like to see your images. Pay attention to the location mentioned in the toolbox for the rectangle x,y coords and size. Then enter these values in your gui file and the image should appear at the same area on screen.

Controlling Where the Player Starts

Beginning with TDM 1.08, map authors can offer more than one start point to players. This could increase re-playability of a map, allowing the player to replay the map with a different starting point.

This is an extension to the Button-Controlled Menu Briefing, so you should first obtain and install that package (see above) and become familiar with how it works.

mainmenu_briefing.gui

Obtain a new version of mainmenu_briefing.gui from this location:

This version of mainmenu_briefing.gui adds new definitions to the final briefing screen (screen 6), two for each optional start point.

In the sample gui, you'll see these new definitions:

  • windowDef StartPointBox1
  • windowDef StartPointBox2
  • windowDef StartPointBox3
  • windowDef StartPointText1
  • windowDef StartPointText2
  • windowDef StartPointText3

StartPointTextN defines the starting point text for point N and handles highlighting and mouse events.

StartPointBoxN defines a checkbox to the left of the text describing starting point N.

Though the template provides three starting points, you can change it to offer any number you wish. They don't need to appear on the last briefing screen, either, though you may find that's the most logical place to offer them.

What the Player Sees

When the player hovers the mouse over either the checkbox or text for a starting point, the text highlights.

When the player clicks on either the checkbox or text, a checkmark appears in the box and the text remains highlighted. Selecting a different starting position will unhighlight the previous selection and highlight the new one.

When the player starts the mission, he'll start at the selected location.

If the player makes no selection, he'll start at the info_player_start in the map that has the lowest entity number.

Making It Your Own

Three sample starting point descriptions are provided. Change these to match the briefing and starting points for your map. Look for and change these lines:

text "Scale the north wall and enter through an attic window."
.
.
.
text "Use the secret tunnel into the cellar."
.
.
.
text "Slide down the coal chute."

Each selection is tied to a specific info_player_start in your map. Look for these lines and change them to match the names of your info_player_starts:

set "gui::startSelect" "PlayerStart1";
.
.
.
set "gui::startSelect" "PlayerStart2";
.
.
.
set "gui::startSelect" "PlayerStart3";

That's all you need to do to offer three starting points.

If you want to offer only two starting points, comment out the third checkbox and text windowDef definitions, as well as any other lines that reference those definitions.

If you want to offer four starting points, copy/paste the StartPointBox3 and StartPointText3 definitions, rename the copies as StartPointBox4 and StartPointText4, adjust (x,y) locations on the screen, and extend the first three box/text definitions so they know about the new definitions.

For example, in the StartPointBox1 definition, you'll see these lines in the onAction() event:

set "background"			"guis/assets/objectives/box_checked";
set "StartPointBox2::background"	"guis/assets/objectives/box_default";
set "StartPointBox3::background"	"guis/assets/objectives/box_default";
set "StartPointText1::forecolor" 	HIGHLIGHTED_TEXT_COLOR;
set "StartPointText2::forecolor" 	DEFAULT_TEXT_COLOR;
set "StartPointText3::forecolor" 	DEFAULT_TEXT_COLOR;

If you add a fourth starting point, these lines would change to include knowledge of the new starting point box/text definitions:

set "background"			"guis/assets/objectives/box_checked";
set "StartPointBox2::background"	"guis/assets/objectives/box_default";
set "StartPointBox3::background"	"guis/assets/objectives/box_default";
set "StartPointBox4::background"	"guis/assets/objectives/box_default";
set "StartPointText1::forecolor" 	HIGHLIGHTED_TEXT_COLOR;
set "StartPointText2::forecolor" 	DEFAULT_TEXT_COLOR;
set "StartPointText3::forecolor" 	DEFAULT_TEXT_COLOR;
set "StartPointText4::forecolor" 	DEFAULT_TEXT_COLOR;

Make similar changes where needed by searching the file for StartPointBox3 and StartPointText3 to find all the places where box/text definitions are referenced.

Also look for references to "selectionIndex", see how it's used, and adjust its setting in your new definitions accordingly.

If you have questions, you can contact grayman on the TDM forums by either sending a PM or posting to this thread: Controlling where the player starts a mission

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, preferably in this thread http://forums.thedarkmod.com/topic/12083-briefing-wiki/