Changes for page Mission Director Guide

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

From version 32964.1
edited by Daniel Turner
on 2023/08/24 10:08
Change comment: There is no comment for this version
To version 32965.1
edited by Daniel Turner
on 2023/08/24 10:24
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -621,7 +621,7 @@
621 621  * "and" and "or" use short-circuit semantics: The right side of the operation can be skipped if the left side already determines the outcome of the operation
622 622  ** Example:{{code language="xml"}} false and $foo{{/code}} ⟹ {{code language="xml"}}false{{/code}} (the value of $foo is not checked at all)
623 623  * Unlike != and ==, the comparison operators <, <=, >, >= are only supported **for numeric values**, **difficulty levels**, and **attention levels**. Comparing other non-numeric values will result in an error and an undefined result.
624 -* <, <=, >, >= cannot be used in XML directly, so lt, le, gt, ge are provided as alternatives. In some cases you won't have to use them, though - using [[range checks>>MediaWiki.NULL]] with additional XML attributes can be more readable.
624 +* <, <=, >, >= cannot be used in XML directly, so lt, le, gt, ge are provided as alternatives. In some cases you won't have to use them, though - using [[range checks>>doc:||anchor="HValuecomparisons"]] with additional XML attributes can be more readable.
625 625  
626 626  == (% id="categorybroken_macroanchorstrings-and-formatting" %)Strings and formatting(%%) ==
627 627  
... ... @@ -630,7 +630,7 @@
630 630  * {{code language="xml"}}'The %1 %2 %3 jumps over the %5 %4'.['quick', 'brown', 'fox', 'dog', 'lazy']{{/code}}
631 631  * {{code language="xml"}}'%1 + %2 = %3'.[$a, $b, $a + $b]{{/code}}
632 632  
633 -See also the section about [[value properties>>MediaWiki.NULL]].
633 +See also the section about [[value properties>>doc:||anchor="HValueproperties" style="outline-width: 0px !important; user-select: auto !important;"]].
634 634  
635 635  Instead of ΓÇÿ%1 %2 %3', you can also use ΓÇÿ%s %s %s', which is also compatible with Lua string formatting in the UI system. However, this should only be used if you are sure that the order is the same in all supported languages. If you want to make translators aware that they can change the order of parameters, you should prefer '%1 %2 %3'.
636 636  \\To get a percent character in the result string, use '%%' in the format string.
... ... @@ -649,14 +649,14 @@
649 649  * "." must be followed by a single digit (0-9). In case of ".0" any fractional digits are discarded (rounding towards zero, not half away from zero).
650 650  
651 651  {{info}}
652 -There are also special methods to [[NULL|format money values and time values]] using the "formatted" property.
652 +There are also special methods to [[format money values and time values>>doc:||anchor="HMoneyandtimeformatting" style="outline-width: 0px !important; user-select: auto !important;"]] using the "formatted" property.
653 653  {{/info}}
654 654  
655 655  == Lists ==
656 656  
657 -Another example for a non-numeric value is a list: It is an ordered collection of other arbitrary values (called array or vector in other languages). It can be constructed within an expression using the [[~[~] syntax>>MediaWiki.NULL]]. It may also be generated by special actions and conditions, and there are actions that can [[insert or remove values>>MediaWiki.NULL]].
657 +Another example for a non-numeric value is a list: It is an ordered collection of other arbitrary values (called array or vector in other languages). It can be constructed within an expression using the [[~[~] syntax>>doc:||anchor="HOperators"]]. It may also be generated by special actions and conditions, and there are actions that can [[insert or remove values>>doc:||anchor="HCreatingandremovingvariables" style="outline-width: 0px !important; user-select: auto !important;"]].
658 658  
659 -A list can contain values of arbitrary data types, even mixed in the same list - so a list can actually contain other lists. However, some of the things that you can do with lists require that all contained elements are of a certain type. The contents of a list can be accessed via properties, see the section about [[value properties>>MediaWiki.NULL]]. Lists can be empty, these are written as "[ ]".
659 +A list can contain values of arbitrary data types, even mixed in the same list - so a list can actually contain other lists. However, some of the things that you can do with lists require that all contained elements are of a certain type. The contents of a list can be accessed via properties, see the section about [[value properties>>doc:||anchor="HValueproperties"]]. Lists can be empty, these are written as "[ ]".
660 660  
661 661  {{info}}
662 662  When accessing a list's elements, the numbering is '''1-based''', so the first element has number 1. This is intuitive but different from 0-based numbering in most programming languages."
... ... @@ -675,7 +675,7 @@
675 675  (% id="categorybroken_macroanchortables" %)
676 676  == Tables ==
677 677  
678 -Tables are associative arrays - they are like lists, but you can assign values to (almost) arbitrary keys, not just to index numbers. A table is constructed within an expression using the [[table~[~] syntax>>MediaWiki.NULL]]. See the section about [[value properties>>MediaWiki.NULL]] for how to access the contents of a table. [[Creating and removing entries>>MediaWiki.NULL]] works similarly to lists, but instead of inserting, you simply assign a value to a table key. If the key does not exist yet, it will be created.
678 +Tables are associative arrays - they are like lists, but you can assign values to (almost) arbitrary keys, not just to index numbers. A table is constructed within an expression using the [[table~[~] syntax>>doc:||anchor="HOperators" style="outline-width: 0px !important; user-select: auto !important;"]]. See the section about [[value properties>>doc:||anchor="HValueproperties" style="outline-width: 0px !important; user-select: auto !important;"]] for how to access the contents of a table. [[Creating and removing entries>>doc:||anchor="HCreatingandremovingvariables" style="outline-width: 0px !important; user-select: auto !important;"]] works similarly to lists, but instead of inserting, you simply assign a value to a table key. If the key does not exist yet, it will be created.
679 679  
680 680  Almost all values are allowed as table keys, but there are a few exceptions:
681 681  
... ... @@ -768,7 +768,7 @@
768 768  * {{code language="xml"}}$table.keys.random{{/code}}: A randomly chosen key (which requires that the table is non-empty)
769 769  
770 770  {{info}}
771 -The string formatting syntax that you have seen [[NULL|above]] is also based on the property system. You basically pass a list as property key to a string. Braces around the brackets are not required, so 'foo'.[...] is just a convenient alternative notation for 'foo'.{[...]}.
771 +The string formatting syntax that you have seen [[above>>doc:||anchor="HStringsandformatting" style="outline-width: 0px !important; user-select: auto !important;"]] is also based on the property system. You basically pass a list as property key to a string. Braces around the brackets are not required, so 'foo'.[...] is just a convenient alternative notation for 'foo'.{[...]}.
772 772  {{/info}}
773 773  
774 774  === (% id="lookup-tests-and-suppressing-errors" %)Lookup tests and suppressing errors(%%) ===
... ... @@ -820,11 +820,11 @@
820 820  |profile|
821 821  profile.flat
822 822  \\profile.increasing
823 -\\profile.bell|Probability distribution profile (see [[random ranges>>MediaWiki.NULL]])
823 +\\profile.bell|Probability distribution profile (see [[random ranges>>doc:||anchor="HRandomranges" style="outline-width: 0px !important; user-select: auto !important;"]])
824 824  |cuestate|
825 825  cuestate.waiting
826 826  \\cuestate.active
827 -\\cuestate.complete|[[Cue states>>MediaWiki.NULL]]
827 +\\cuestate.complete|[[Cue states>>||anchor="HCues" style="outline-width: 0px !important; user-select: auto !important;"]]
828 828  |level|
829 829  level.easy
830 830  \\level.medium
... ... @@ -893,7 +893,7 @@
893 893  === (% id="categorybroken_macroanchormoney-and-time-formatting" %)Money and time formatting(%%) ===
894 894  
895 895  **[New as of X Rebirth 4.0]**
896 -\\Numbers don't have any properties, except for money and time: They have a "**formatted**" property, which allows you to get a custom string representation with more advanced options than the [[generic formatting method>>MediaWiki.NULL]] for numbers.
896 +\\Numbers don't have any properties, except for money and time: They have a "**formatted**" property, which allows you to get a custom string representation with more advanced options than the [[generic formatting method>>||anchor="HStringsandformatting" style="outline-width: 0px !important; user-select: auto !important;"]] for numbers.
897 897  
898 898  * {{code language="xml"}}$money.formatted.{'formatstring'}{{/code}}
899 899  * {{code language="xml"}}$money.formatted.default{{/code}} (using default format string '%s')
... ... @@ -929,7 +929,7 @@
929 929  * {{code language="xml"}}(1234Cr).formatted.{'%1s'}{{/code}}⟹{{code language="xml"}}'1 k'{{/code}} (rounding towards zero)
930 930  * {{code language="xml"}}(1234Cr).formatted.{'%cM'}{{/code}}⟹{{code language="xml"}}'0 M'{{/code}}
931 931  
932 -For documentation of time format strings, see the Lua function ConvertTimeString() in the [[MediaWiki.ARCHIVE.XRWIKIModding_supportUI_Modding_supportLua_function_overview]].
932 +For documentation of time format strings, see the Lua function ConvertTimeString() in the [[Lua function overview>>doc:X Rebirth Wiki.Modding support.UI Modding support.Lua function overview.WebHome||style="outline-width: 0px !important; user-select: auto !important;"]].
933 933  
934 934  Examples:
935 935  
... ... @@ -1072,7 +1072,6 @@
1072 1072   <set_value name="$foo" min="-20" max="20" profile="profile.increasing" scale="4"/>
1073 1073  {{/code}}
1074 1074  
1075 -
1076 1076  = Variables and namespaces =
1077 1077  
1078 1078  As you have seen above, you can easily access variables by writing their name (including $ prefix) in an expression. Namespaces define in which cue the variables are actually stored (and from which cue they are read).
... ... @@ -1127,7 +1127,6 @@
1127 1127  
1128 1128  Removing an entry from a list shifts all following elements down by one. If you want to clear an entry without removing it from the list, just use <set_value> instead.
1129 1129  
1130 -
1131 1131  == Accessing remote variables ==
1132 1132  
1133 1133  You can also read and write variables in other cues by using the variable name as property key: