Changes for page Mission Director Guide

Last modified by Klaus Meyer on 2025/03/31 16:39

From version 32983.1
edited by Owen Lake
on 2025/03/19 13:54
Change comment: There is no comment for this version
To version 32974.2
edited by Heinrich Unrau
on 2024/10/17 13:46
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Owen
1 +xwiki:XWiki.Heinrich
Content
... ... @@ -726,8 +726,6 @@
726 726  * {{code language="xml"}}table[$foo = 'bar']{{/code}}⟹ exactly the same, just a shorter notation for string keys
727 727  * {{code language="xml"}}table[foo = 'bar']{{/code}}⟹ error, 'foo' does not start with a '$'
728 728  * {{code language="xml"}}table[{1} = [], {2} = table[]] {{/code}}⟹ a table that maps 1 to an empty list and 2 to an empty table
729 -* {{code language="xml"}}table[faction.argon = 'bar']{{/code}}⟹ error, the expression faction.argon will not be resolved into a key value. Requires { } braces.
730 -* {{code language="xml"}}table[{faction.argon} = 'bar'] {{/code}}⟹ a table that maps the value faction.argon to the string 'bar'
731 731  
732 732  Just like lists, tables are stored as references, so it's possible that multiple variables reference the same table (see above).
733 733  
... ... @@ -1009,7 +1009,8 @@
1009 1009  
1010 1010  * MD scripts and cues are identified by their names. So a script can only be refreshed if it has the same script name as before (file name is irrelevant).
1011 1011  * If there are new script files or new cue nodes (i.e. scripts/cues with new names) they are created and added properly. If you remove script files or cue nodes, the corresponding scripts/cues are removed from the game, including instances.
1012 -** (!) Pitfall: It is recommended that cues are not removed if they were previously released in public builds, to prevent future cues with the same name leading to errors (see example below). Instead they can be emptied and marked as deprecated.
1010 +** (!) Pitfall: Cue Removal
1011 +
1013 1013  * As a consequence, you CANNOT rename scripts or cues if you want to refresh them. Doing so would remove the old script or cue and add a new one with the new name.
1014 1014  * You CANNOT change a <cue> to a <library> or vice versa.
1015 1015  * You CANNOT add, remove, or change the "ref" attribute of a cue. But it is possible to remove the whole cue. (If all references to a library are removed you can also remove the library itself.)
... ... @@ -1031,9 +1031,7 @@
1031 1031  When adding a variable in a new MD script version and using that variable in multiple places, be aware that the variable doesn't exist yet in older savegames. You may have to check the existence of the variable before accessing it, or add some patch logic that initiailses the variable after loading the savegame, if necessary.
1032 1032  {{/warning}}
1033 1033  
1034 -{{warning}}
1035 -(% id="cke_bm_221021S" style="display:none" %) (%%)Cue Removal Pitfall:
1036 -If you remove a cue and then later add another cue with the same name, old save files will not know that the cue has been removed inbetween. In the following example the first cue was created setting $val_1 and the game is saved.
1033 +(% id="cke_bm_117445S" style="display:none" %) (%%)If you remove a cue and then later add another cue with the same name, old save files will not know that the cue has been removed inbetween. In the following example the first cue was created setting $val_1 and the game is saved.
1037 1037  {{code language="xml"}}<cue name="Deprecated_Test1">
1038 1038   <actions>
1039 1039   <set_value name="$val_1" exact="'old value'"/>
... ... @@ -1057,7 +1057,6 @@
1057 1057  \\To avoid this, do not delete any cues (once they are public for save game compatibility), but empty them out and mark them as deprecated. This will prevent new cues with the same name in the script.
1058 1058  {{code language="xml"}}<!-- Deprecated Cues, kept to not duplicate names in future cues -->
1059 1059  <cue name="Deprecated_Test1" comment="deprecated"></cue>{{/code}}
1060 -{{/warning}}
1061 1061  
1062 1062  == Patching ==
1063 1063