Changes for page Mission Director Guide
Last modified by Klaus Meyer on 2025/03/31 16:39
From version 31067.1
edited by Daniel Turner
on 2023/04/14 16:47
on 2023/04/14 16:47
Change comment:
Created page with "{{Info |body = Please note that this is officially-maintained documentation. To ensure that you can rely on the information having been checked by Egosoft, you will not be able to edit this page. }} <span style="color: rgb(0,0,0);text-decoration: none;"><br /> </span> <span style="color: rgb(0,0,0);text-decoration: none;">The Mission Director (MD) is a subsystem of the game and interprets mission scripts, which are written in an XML-based language. The Mission D..."
To version 31072.1
edited by Daniel Turner
on 2023/04/14 17:05
on 2023/04/14 17:05
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -80,13 +80,26 @@ 80 80 81 81 (% style="color: rgb(0,0,0);text-decoration: none;" %)The XML root node of an MD file is called “mdscript” and looks like this: 82 82 83 -{{code}}<?xml version="1.0" encoding="utf-8"?><mdscript name="ScriptName" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">{{/code}} 83 +{{code language="xml"}} 84 +<?xml version="1.0" encoding="utf-8"?> 85 +<mdscript name="ScriptName" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd"> 86 +{{/code}} 84 84 85 85 (% style="color: rgb(0,0,0);text-decoration: none;" %)“ScriptName” is the name used for this script regardless of the file name. It (%%)**(% style="color: rgb(0,0,0);text-decoration: none;" %)has to start with an upper case letter and must be unique(%%)**(% style="color: rgb(0,0,0);text-decoration: none;" %) among all MD script names. It also should not contain spaces, so other MD scripts can use it as an identifier to access this script’s contents easily. 86 86 87 87 (% style="color: rgb(0,0,0);text-decoration: none;" %)The only allowed sub-node of <mdscript> is <cues>, which can only contain <cue> sub-nodes: 88 88 89 -{{code}}<?xml version="1.0" encoding="utf-8"?><mdscript name="ScriptName" ...>  <cues>    <cue name="RootCue1"> [...]    </cue>    <cue name="RootCue2"> [...]    </cue>  </cues></mdscript>{{/code}} 92 +{{code language="xml"}} 93 +<?xml version="1.0" encoding="utf-8"?> 94 +<mdscript name="ScriptName" ...> 95 + <cues> 96 + <cue name="RootCue1"> [...] 97 + </cue> 98 + <cue name="RootCue2"> [...] 99 + </cue> 100 + </cues> 101 +</mdscript> 102 +{{/code}} 90 90 91 91 (% style="color: rgb(0,0,0);text-decoration: none;" %)  92 92 ... ... @@ -118,7 +118,17 @@ 118 118 119 119 (% style="color: rgb(0,0,0);text-decoration: none;" %)This is how a cue node looks like: 120 120 121 -{{code}}<cue name="CueName">  <conditions> [...]  </conditions>  <delay exact="5s" />  <actions> [...]  </actions>  <cues> [...]  </cues></cue>{{/code}} 134 +{{code language="xml"}} 135 +<cue name="CueName"> 136 + <conditions> [...] 137 + </conditions> 138 + <delay exact="5s" /> 139 + <actions> [...] 140 + </actions> 141 + <cues> [...] 142 + </cues> 143 +</cue> 144 +{{/code}} 122 122 123 123 (% style="color: rgb(0,0,0);text-decoration: none;" %)The rules for naming cues is the same for MD script names: The name **starts with an upper case letter**, and has to be (%%)**(% style="color: rgb(0,0,0);text-decoration: none;" %)unique within this file(%%)**(% style="color: rgb(0,0,0);text-decoration: none;" %). So it is actually possible to use the same cue name in different scripts, which is different from the MD in X3. 124 124