Changes for page Mission Director Guide
Last modified by Klaus Meyer on 2025/03/31 16:39
From version 32970.2
edited by Owen Lake
on 2023/10/10 15:34
on 2023/10/10 15:34
Change comment:
fighting with formatting
To version 32964.1
edited by Daniel Turner
on 2023/08/24 10:08
on 2023/08/24 10:08
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. Owen1 +xwiki:XWiki.Daniel - Content
-
... ... @@ -157,7 +157,7 @@ 157 157 158 158 * With //checkinterval//, you can specify a constant time interval between condition checks. The conditions will be checked regularly forever until they are met, unless the cue's state is changed explicitly by an external event. 159 159 160 -Additionally, you can use the attribute **checktime** to set the time of the first condition check (also possible in combination with //onfail//). The //checktime// can be an expression with variables and is evaluated when the cue is enabled (when the condition checks would normally start -for root cues that happens at game start, otherwise after the parent cue becomes active).160 +Additionally, you can use the attribute **checktime** to set the time of the first condition check (also possible in combination with //onfail//). The //checktime// can be an expression with variables and is evaluated when the cue is enabled (when the condition checks would normally start ΓÇô for root cues that happens at game start, otherwise after the parent cue becomes active). 161 161 162 162 Examples: 163 163 ... ... @@ -326,7 +326,7 @@ 326 326 </cue> 327 327 {{/code}} 328 328 329 -The values (including default values) can be variable expressions and will be evaluated when the cue is enabled, i.e. when it starts checking the conditions. They will be available to the cue as variables, using the parameter name with a '$' prefix. In the example above, the variables $foo, $bar, and $baz would be created.329 +The values (including default values) can be variable expressions and will be evaluated when the cue is enabled, i.e. when it starts checking the conditions. They will be available to the cue as variables, using the parameter name with a ΓÇÿ$' prefix. In the example above, the variables $foo, $bar, and $baz would be created. 330 330 331 331 {{code language="xml"}} 332 332 <library name="Lib"> ... ... @@ -517,23 +517,7 @@ 517 517 {{code language="xml"}}cos(60deg){{/code}} 518 518 \\{{code language="xml"}}cos(pi){{/code}}| 519 519 {{code language="xml"}}0.5{{/code}} 520 -\\{{code language="xml"}}-1.0{{/code}}|Cosine (function-style, parentheses required) 521 -|tan|unary| 522 -{{code language="xml"}}tan(-45deg){{/code}} 523 -\\{{code language="xml"}}tan(45deg){{/code}}| 524 -{{code language="xml"}}-1.0{{/code}} 525 -\\{{code language="xml"}}1.0{{/code}}|Tangent (function-style, parentheses required) 526 -|asin|unary| 527 -{{code language="xml"}}asin(-0.5f){{/code}} 528 -\\{{code language="xml"}}asin(1){{/code}}| 529 -{{code language="xml"}}-0.523599rad{{/code}} 530 -\\{{code language="xml"}}1.5708rad{{/code}}|Inverse sine (function-style, parentheses required) 531 -|acos|unary| 532 -{{code language="xml"}}acos(0.5f){{/code}} 533 -\\{{code language="xml"}}acos(1.0f){{/code}}| 534 -{{code language="xml"}}asin(2.0944rad){{/code}} 535 -\\{{code language="xml"}}0rad{{/code}}|Inverse cosine (function-style, parentheses required) 536 -|atan|unary| | |Inverse tangent (function-style, parentheses required) 520 +\\{{code language="xml"}}0.0{{/code}}|Cosine (function-style, parentheses required) 537 537 |sqrt|unary|{{code language="xml"}}sqrt(2){{/code}}|{{code language="xml"}}1.414213LF{{/code}}|Square root (function-style, parentheses required) 538 538 |exp|unary|{{code language="xml"}}exp(1){{/code}}|{{code language="xml"}}2.71828LF{{/code}}|Exponential function (function-style, parentheses required) 539 539 |log|unary|{{code language="xml"}}log(8) / log(2){{/code}}|{{code language="xml"}}3.0LF{{/code}}|Natural logarithm (function-style, parentheses required) ... ... @@ -563,7 +563,7 @@ 563 563 gt 564 564 \\> (>)|binary| 565 565 {{code language="xml"}}1 gt 3{{/code}} 566 -\\{{code language="xml"}}1 >3{{/code}}|{{code language="xml"}}false{{/code}}|Greater than550 +\\{{code language="xml"}}1 < 3{{/code}}|{{code language="xml"}}false{{/code}}|Greater than 567 567 | 568 568 ge 569 569 \\>=|binary| ... ... @@ -637,7 +637,7 @@ 637 637 * "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 638 638 ** Example:{{code language="xml"}} false and $foo{{/code}} ⟹ {{code language="xml"}}false{{/code}} (the value of $foo is not checked at all) 639 639 * 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. 640 -* <, <=, >, >= 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>>d oc:||anchor="HValuecomparisons"]] 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>>MediaWiki.NULL]] with additional XML attributes can be more readable. 641 641 642 642 == (% id="categorybroken_macroanchorstrings-and-formatting" %)Strings and formatting(%%) == 643 643 ... ... @@ -646,9 +646,9 @@ 646 646 * {{code language="xml"}}'The %1 %2 %3 jumps over the %5 %4'.['quick', 'brown', 'fox', 'dog', 'lazy']{{/code}} 647 647 * {{code language="xml"}}'%1 + %2 = %3'.[$a, $b, $a + $b]{{/code}} 648 648 649 -See also the section about [[value properties>> doc:||anchor="HValueproperties" style="outline-width: 0px !important; user-select: auto !important;"]].633 +See also the section about [[value properties>>MediaWiki.NULL]]. 650 650 651 -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'.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'. 652 652 \\To get a percent character in the result string, use '%%' in the format string. 653 653 \\\\\\If you need a more sophisticated method for text substitution, try **<substitute_text>**. See the XML schema documentation for this script action. 654 654 \\**[New as of X Rebirth 4.0]** ... ... @@ -665,14 +665,14 @@ 665 665 * "." 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). 666 666 667 667 {{info}} 668 -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.652 +There are also special methods to [[NULL|format money values and time values]] using the "formatted" property. 669 669 {{/info}} 670 670 671 671 == Lists == 672 672 673 -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>>d oc:||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;"]].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]]. 674 674 675 -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>>d oc:||anchor="HValueproperties"]]. 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>>MediaWiki.NULL]]. Lists can be empty, these are written as "[ ]". 676 676 677 677 {{info}} 678 678 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." ... ... @@ -691,7 +691,7 @@ 691 691 (% id="categorybroken_macroanchortables" %) 692 692 == Tables == 693 693 694 -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.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. 695 695 696 696 Almost all values are allowed as table keys, but there are a few exceptions: 697 697 ... ... @@ -784,7 +784,7 @@ 784 784 * {{code language="xml"}}$table.keys.random{{/code}}: A randomly chosen key (which requires that the table is non-empty) 785 785 786 786 {{info}} 787 -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'.{[...]}.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'.{[...]}. 788 788 {{/info}} 789 789 790 790 === (% id="lookup-tests-and-suppressing-errors" %)Lookup tests and suppressing errors(%%) === ... ... @@ -836,11 +836,11 @@ 836 836 |profile| 837 837 profile.flat 838 838 \\profile.increasing 839 -\\profile.bell|Probability distribution profile (see [[random ranges>> doc:||anchor="HRandomranges" style="outline-width: 0px !important; user-select: auto !important;"]])823 +\\profile.bell|Probability distribution profile (see [[random ranges>>MediaWiki.NULL]]) 840 840 |cuestate| 841 841 cuestate.waiting 842 842 \\cuestate.active 843 -\\cuestate.complete|[[Cue states>> ||anchor="HCues" style="outline-width: 0px !important; user-select: auto !important;"]]827 +\\cuestate.complete|[[Cue states>>MediaWiki.NULL]] 844 844 |level| 845 845 level.easy 846 846 \\level.medium ... ... @@ -909,7 +909,7 @@ 909 909 === (% id="categorybroken_macroanchormoney-and-time-formatting" %)Money and time formatting(%%) === 910 910 911 911 **[New as of X Rebirth 4.0]** 912 -\\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.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. 913 913 914 914 * {{code language="xml"}}$money.formatted.{'formatstring'}{{/code}} 915 915 * {{code language="xml"}}$money.formatted.default{{/code}} (using default format string '%s') ... ... @@ -945,7 +945,7 @@ 945 945 * {{code language="xml"}}(1234Cr).formatted.{'%1s'}{{/code}}⟹{{code language="xml"}}'1 k'{{/code}} (rounding towards zero) 946 946 * {{code language="xml"}}(1234Cr).formatted.{'%cM'}{{/code}}⟹{{code language="xml"}}'0 M'{{/code}} 947 947 948 -For documentation of time format strings, see the Lua function ConvertTimeString() in the [[ Lua function overview>>doc:X RebirthWiki.Modding.UI.Lua.WebHome||style="outline-width: 0px !important; user-select: auto !important;"]].932 +For documentation of time format strings, see the Lua function ConvertTimeString() in the [[MediaWiki.ARCHIVE.XRWIKIModding_supportUI_Modding_supportLua_function_overview]]. 949 949 950 950 Examples: 951 951 ... ... @@ -1088,6 +1088,7 @@ 1088 1088 <set_value name="$foo" min="-20" max="20" profile="profile.increasing" scale="4"/> 1089 1089 {{/code}} 1090 1090 1075 + 1091 1091 = Variables and namespaces = 1092 1092 1093 1093 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). ... ... @@ -1142,6 +1142,7 @@ 1142 1142 1143 1143 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. 1144 1144 1130 + 1145 1145 == Accessing remote variables == 1146 1146 1147 1147 You can also read and write variables in other cues by using the variable name as property key: