Briefing: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
To create Briefing text for your mission, create an xdata entry with the name "maps/<mapname>/mission_briefing". The keys to specify are "num_pages" and "pageX_body" (where "X" is 1, 2, 3, etc, for each page). Here's an example:
Briefing Text is a very 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.


  maps/blackheart_manor/mission_briefing
To create briefing text 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"   : "2"
  "num_pages": "1"
    "page1_body" : "I got a tip last night from..."
 
    "page2_body" : "So I suppose I should go check out the..."
  "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"
  }
  }
  }



Revision as of 18:19, 10 August 2009

Briefing Text is a very 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.

To create briefing text 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.