Difference between revisions of "Missiontext.plist"

From Elite Wiki
(Added new system name expansion.)
(Links: Added another)
 
(26 intermediate revisions by 11 users not shown)
Line 1: Line 1:
This is the filename of the file that contains all the text relevant to scripted missions.  
+
This is the filename of the file that contains all the text relevant to scripted missions. It should be placed inside the /Config - folder (see [[OXP_howto#Structure|OXP HowTo]]). See the [[Property_list|Property List]] page for more detail on plists.
  
 
== Structure ==
 
== Structure ==
The file is organised as a dictionary <dict>.  
+
The file is organised as a dictionary { }.  
Every entry consists of the name <key>, followed by the text <string>.
+
Every entry consists of the key name, followed by a '=' and then the text in quotes.
  
Example:
+
Example:
 
   conhunt_short_desc1 = "Hunt for the constrictor stolen from Xeer.";
 
   conhunt_short_desc1 = "Hunt for the constrictor stolen from Xeer.";
or in XML:
 
  <key>conhunt_short_desc1</key>
 
  <string>Hunt for the constrictor stolen from Xeer.</string>
 
 
  
 
==Special Expansions==
 
==Special Expansions==
  
These can be include in your text, within the <string>..</string>, to automatically insert the following detail;
+
These can be included in your text, inside the quotation marks in openStep, to automatically insert the following details:
  
 
[commander_name] - Displays the name of the saved game file.
 
[commander_name] - Displays the name of the saved game file.
  
[commander_shipname] - Displays the name of the players ship, as specified by [[shipdata.plist]].
+
[commander_shipname] - Displays the name of the player's ship, as specified by [[shipdata.plist]].
 +
 
 +
[commander_shipdisplayname] - Could be different from commander_shipname.
 +
 
 +
[commander_rank] - Displays the player's Elite rating.
 +
 
 +
[commander_legal_status] - Displays the player's current legal status.
 +
 
 +
[commander_bounty] - Displays the current bounty on the player. ''(Oolite v1.74 & up)''
 +
 
 +
[mission_xxxx] - displays the missionVariables.xxxxx.
 +
 
 +
[nom] - Generate a random surname.
  
[commander_rank] - Displays the players Elite rating.
+
[thanks-for-assist] - Err, thanks the player for their assistance.
  
[commander_legal_status] - Displays the players current legal status.
+
[police-thanks-for-assist] - the police thanks the player personally.
  
[Thanks-for-assist] - Err, thanks the player for their assistance.
+
[describe-pirate] - Random description for an outlaw.
  
[Thargoid_curses} - Random Thargoid curses.
+
[describe-Pirate] - Capitalized random description for an outlaw.
 +
 
 +
[thargoid_curses] - Random Thargoid curses.
 +
 
 +
[police_warning] - Random impending fines notifications.
  
 
[police_attack_warning] - Random warning of immediate(?) attack.
 
[police_attack_warning] - Random warning of immediate(?) attack.
Line 34: Line 46:
 
%I - Displays the current system name with "ian" attached i.e. Isinorian.
 
%I - Displays the current system name with "ian" attached i.e. Isinorian.
  
%R - Random word.
+
%R - Random word. (Use %N for a better result)
 +
 
 +
%N - Random name. More variation than with %R. Multiple repetitions of %N in the same string generate the same expansion. (Feature added with Oolite 1.73)
 +
 
 +
%Jxxx - Will display the system name of system with ID number "xxx". xxx must be a 3 digit number or no replacement takes place. e.g. %J007 is Lave. This replacement follows any system renaming by other OXPs. (Feature added with Oolite 1.73)
  
%Jxxx - Will display the system name of system with ID number "xxx". xxx must be a 3 digit number or no replacement takes place. e.g. %J007 is Lave. (Feature added with Oolite 1.73)
+
%Gxxxyyy - Will display the system name of system with ID number "xxx" in galaxy with ID "yyy". xxx and yyy must be 3 digit numbers or no replacement takes place. e.g. %G007000 is Lave. This replacement follows any system renaming by other OXPs. (Feature added with Oolite 1.87)
  
See also [[Methods#Communications|Communications in Methods]].
+
[oolite_key_FOO] - A human-readable description of the [[Oolite_Keyboard_Controls|keyconfig.plist]] entry <code>key_FOO</code>, if one exists. (Feature added with Oolite 1.79) It is '''discouraged''' for OXPs to use these, instead it is '''recommended''' to use <code>oolite-keycode-</code> prefixed entries found in [[descriptions.plist]].
  
== Layout ==
+
If the message contains elements enclosed in square brackets [like_this] that correspond to mission_variable names or keys in [[descriptions.plist]], or several [[String expansion|other variations]], then these also will be expanded and substituted into the original message.
Several spacial characters are used in determining the layout of the text, just as in Wiki.
 
  
*'''\"''' Enables the use of colons.
+
== Layout/Punctuation ==
*'''\\n''' Insers a hard Enter.
+
Several special characters are used in determining the layout of the text, just as in Wiki.
 +
 
 +
:'''\"''' Enables the use of quotation marks ''etc''.
 +
:'''\\n''' Inserts a hard Enter.
  
 
In XML:
 
In XML:
*'''\n''' Inserts a hard Enter.
+
:'''\n''' Inserts a hard Enter.
  
Example:
+
Example:
  <key>trumble_offer</key>
+
  trumble_offer = "Commander,\\n\\nYou look like someone who could use a Trumble!...";
<string>Commander,\n\nYou look like a man who could use a Trumble!...</string>
 
  
 
== Choices ==
 
== Choices ==
 
Most missions offer a choice, that is the spirit of elite.  
 
Most missions offer a choice, that is the spirit of elite.  
  
Example:
+
Example:
<key>nova_yesno</key>
+
  nova_yesno = {
<dict>
+
    YES = "Okay, I'll help";
<key>YES</key>
+
    NO = "No, sorry.";
<string>Okay, I'll help.</string>
+
}
<key>NO</key>
+
On the missionscreen the choices are sorted by key.
<string>No, sorry.</string>
+
 
</dict>
+
== Links ==
 +
*[[OXP mission offering]]
 +
*[[Mission screen]]
 +
 
 +
 
 +
*[[Media:OoliteInternals for 1.71.zip | Oolite Internals]] (downloaded {{#downloads:OoliteInternals for 1.71.zip}} times) 3 internal Oolite missions in JS by Eric Walch (2008) with a 4th by Ahruman. How to do it...<br>
 +
*[https://bb.oolite.space/viewtopic.php?t=6365 Creating misssion oxp] (2009) Rustybolts' thread for developing his [[BlackjacksBullion OXP]]
 +
*[https://bb.oolite.space/viewtopic.php?t=9911 Mission choice returns null] (2011) Issues with the Mission screens
 +
*[https://bb.oolite.space/viewtopic.php?f=4&t=17144 Columns in missionText] (2015)
 +
* [https://bb.oolite.space/viewtopic.php?t=6301 Oolite in French] (2009) - handling diacritical signs on letters
  
 
[[Category:Oolite]]
 
[[Category:Oolite]]
 
[[Category:Oolite scripting]]
 
[[Category:Oolite scripting]]

Latest revision as of 17:32, 16 May 2025

This is the filename of the file that contains all the text relevant to scripted missions. It should be placed inside the /Config - folder (see OXP HowTo). See the Property List page for more detail on plists.

Structure

The file is organised as a dictionary { }. Every entry consists of the key name, followed by a '=' and then the text in quotes.

Example:

  conhunt_short_desc1 = "Hunt for the constrictor stolen from Xeer.";

Special Expansions

These can be included in your text, inside the quotation marks in openStep, to automatically insert the following details:

[commander_name] - Displays the name of the saved game file.

[commander_shipname] - Displays the name of the player's ship, as specified by shipdata.plist.

[commander_shipdisplayname] - Could be different from commander_shipname.

[commander_rank] - Displays the player's Elite rating.

[commander_legal_status] - Displays the player's current legal status.

[commander_bounty] - Displays the current bounty on the player. (Oolite v1.74 & up)

[mission_xxxx] - displays the missionVariables.xxxxx.

[nom] - Generate a random surname.

[thanks-for-assist] - Err, thanks the player for their assistance.

[police-thanks-for-assist] - the police thanks the player personally.

[describe-pirate] - Random description for an outlaw.

[describe-Pirate] - Capitalized random description for an outlaw.

[thargoid_curses] - Random Thargoid curses.

[police_warning] - Random impending fines notifications.

[police_attack_warning] - Random warning of immediate(?) attack.

%H - Will display the current system name i.e. Isinor.

%I - Displays the current system name with "ian" attached i.e. Isinorian.

%R - Random word. (Use %N for a better result)

%N - Random name. More variation than with %R. Multiple repetitions of %N in the same string generate the same expansion. (Feature added with Oolite 1.73)

%Jxxx - Will display the system name of system with ID number "xxx". xxx must be a 3 digit number or no replacement takes place. e.g. %J007 is Lave. This replacement follows any system renaming by other OXPs. (Feature added with Oolite 1.73)

%Gxxxyyy - Will display the system name of system with ID number "xxx" in galaxy with ID "yyy". xxx and yyy must be 3 digit numbers or no replacement takes place. e.g. %G007000 is Lave. This replacement follows any system renaming by other OXPs. (Feature added with Oolite 1.87)

[oolite_key_FOO] - A human-readable description of the keyconfig.plist entry key_FOO, if one exists. (Feature added with Oolite 1.79) It is discouraged for OXPs to use these, instead it is recommended to use oolite-keycode- prefixed entries found in descriptions.plist.

If the message contains elements enclosed in square brackets [like_this] that correspond to mission_variable names or keys in descriptions.plist, or several other variations, then these also will be expanded and substituted into the original message.

Layout/Punctuation

Several special characters are used in determining the layout of the text, just as in Wiki.

\" Enables the use of quotation marks etc.
\\n Inserts a hard Enter.

In XML:

\n Inserts a hard Enter.

Example:

trumble_offer = "Commander,\\n\\nYou look like someone who could use a Trumble!...";

Choices

Most missions offer a choice, that is the spirit of elite.

Example:

  nova_yesno = {
    YES = "Okay, I'll help";
    NO = "No, sorry.";
}

On the missionscreen the choices are sorted by key.

Links