Changes for page Mission Director Guide

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

From version 32957.1
edited by Daniel Turner
on 2023/08/22 19:09
Change comment: There is no comment for this version
To version 32969.1
edited by Daniel Turner
on 2023/09/19 13:07
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -22,7 +22,7 @@
22 22  This functionality is only available if the schema files **md.xsd** and **common.xsd** are in the correct folder. If you are editing the XML in the game folder directly, all is well and the files are loaded from the libraries folder. However, if you are editing in a separate folder, copy those XSD files from the libraries folder directly into the folder where your XML files are located.
23 23  
24 24  {{info}}
25 -Even if your script is free of XSD errors, that does not mean that the script syntax is correct. For example, there are XML elements that require at least one of multiple attributes, but this requirement cannot be reflected in a schema (apart from documentation text). Please notice the XSD documentation of the elements and attributes, e.g. displayed via tooltips in Visual Studio / Visual Web Developer. Please also note additional requirements for MD cue attributes in this guide (see [[NULL|Conditions]]).
25 +Even if your script is free of XSD errors, that does not mean that the script syntax is correct. For example, there are XML elements that require at least one of multiple attributes, but this requirement cannot be reflected in a schema (apart from documentation text). Please notice the XSD documentation of the elements and attributes, e.g. displayed via tooltips in Visual Studio / Visual Web Developer. Please also note additional requirements for MD cue attributes in this guide (see [[Conditions>>doc:||anchor="HConditions" style="outline-width: 0px !important; user-select: auto !important;"]]).
26 26  
27 27  To check for errors, please pay attention to in-game error messages that are produced while your script is imported, and run-time errors while the script runs. The XSD files can help you a lot, but you should not rely on the absence of XSD errors."
28 28  {{/info}}
... ... @@ -84,7 +84,6 @@
84 84  * **Waiting**: Either this is a root cue, or the parent has become active. The cue is checking its conditions and will become active when they are met.
85 85  * **Active**: The cue is about to perform the actions. Child cues have entered the waiting state.
86 86  
87 -
88 88  * **Complete**: The cue has finished performing its actions.
89 89  * **Cancelled**: The cue has been cancelled. This state cannot normally be reached but only if a cue actively cancels itself or another cue. No condition checks or actions are performed in this cue or any sub-(sub-)cue.
90 90  
... ... @@ -156,10 +156,9 @@
156 156  
157 157  * Use //onfail// if the conditions should be checked only once. The possible attribute values are "//cancel//" and "//complete//". If the conditions are met, the cue will activate and perform the cue actions. Otherwise it's a failure and the cue will be cancelled or completed, based on the onfail attribute. Typically //onfail="cancel"// is used to prevent any further action. //onfail="complete"// can be used to continue with the sub-cues even in case of failure (but skipping the current cue actions).
158 158  
159 -
160 160  * 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.
161 161  
162 -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).
163 163  
164 164  Examples:
165 165  
... ... @@ -219,11 +219,11 @@
219 219  {{/code}}
220 220  
221 221  {{info}}
222 -Messages printed with <debug_text> are usually only visible when the "scripts" debug filter is enabled, see Script debug output
220 +Messages printed with <debug_text> are usually only visible when the "scripts" debug filter is enabled, see [[Script debug output>>doc:||anchor="HScriptdebugoutput"]]
223 223  {{/info}}
224 224  
223 +Script debug output
225 225  
226 -
227 227  Each child action in a <do_any> node can have a //**weight**// attribute, which can be used to control the random selection of an action node. The default weight of a child node is 1.
228 228  
229 229  Also available is **<do_if>**, which completes the enclosed action(s) only if one provided value is non-null or matches another. Directly after a <do_if> node, you can add one or more **<do_elseif>** nodes to perform additional checks only in case the previous conditions were not met. The node **<do_else>** can be used directly after a <do_if> or a <do_elseif>. It is executed only if none of the conditions are met.
... ... @@ -241,7 +241,6 @@
241 241  {{/info}}
242 242  
243 243  
244 -
245 245  Library cues are written like normal cues, they are also defined in a <cues> node, just with the difference that the XML tag is called library instead of cue:
246 246  
247 247  {{code language="xml"}}
... ... @@ -292,11 +292,9 @@
292 292  {{/code}}
293 293  
294 294  {{warning}}
295 -These examples are definitely <u>not</u> examples of good scripting style.
292 +These examples are definitely **__not__ **examples of good scripting style.
296 296  {{/warning}}
297 297  
298 -
299 -
300 300  So when writing the library, you don't have to worry about name confusion, just use the names of cues in your library and it will work as expected when the library is used. Names of cues that do not belong to the library will not be available in expressions (see Foo in the example above), however, names of other libraries in the file are available when referencing them in the ref attribute.
301 301  
302 302  Notes:
... ... @@ -331,7 +331,7 @@
331 331  </cue>
332 332  {{/code}}
333 333  
334 -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.
335 335  
336 336  {{code language="xml"}}
337 337  <library name="Lib">
... ... @@ -366,8 +366,6 @@
366 366  This sub-section requires basic knowledge of script expressions.
367 367  {{/info}}
368 368  
369 -
370 -
371 371  In case of instances with sub-instances, you will often want to access a related instance from the current one. Like in the non-instance case, you can simply write the cue name in an expression to reference that cue. However, you should be aware of the pitfalls that are accompanied by this.
372 372  
373 373  When you use a cue name from the same script in an expression, it will always be resolved to some cue - usually a static cue, even if it is still in the disabled state, but it can also be an instance, if it is "related" to the current one.
... ... @@ -403,7 +403,7 @@
403 403  
404 404  * **Conditions with results:** If the instantiating cue has conditions with results, those results are stored in variables - but in the variables of the static cue, not of the instance! So in the <actions> you have to access the variables via the **static **keyword:
405 405  
406 -{{code language="xml"}} <debug_text text="static.$foo"/>{{/code}}
399 +{{code language="xml"}}<debug_text text="static.$foo"/>{{/code}}
407 407  It may even be necessary to copy the variables over to the instance because the static variables can be overwritten by the next condition check:
408 408  {{code language="xml"}}<set_value name="$foo" exact="static.$foo"/>{{/code}}
409 409  
... ... @@ -424,8 +424,6 @@
424 424  Since octal numbers are hardly ever used (usually unknowingly), the parser is will produce a warning if an octal number is encountered."
425 425  {{/info}}
426 426  
427 -
428 -
429 429  You can write string literals by putting the string in single quotes:
430 430  
431 431  * {{code language="xml"}}'Hello world'{{/code}}
... ... @@ -503,10 +503,10 @@
503 503  |true|constant|{{code language="xml"}}null == 0{{/code}}|{{code language="xml"}}true{{/code}}|Integer value 1, useful in Boolean expressions
504 504  |pi|constant|{{code language="xml"}}2 * pi{{/code}}|{{code language="xml"}}6.2831853rad{{/code}}|╧Ç as an angle (same as 180deg)
505 505  |()|delimiter|{{code language="xml"}}(2 + 4) * (6 + 1){{/code}}|{{code language="xml"}}42{{/code}}|Parentheses for arithmetic grouping
506 -|[]|delimiter|{{code language="xml"}}[1, 2, 2+1, 'string']{{/code}}|{{code language="xml"}}[1, 2, 3, 'string']{{/code}}|[[List>>MediaWiki.NULL]] of values
507 -|table[]|delimiter|{{code language="xml"}}table[$foo='bar', {1+1}=40+2]{{/code}}|{{code language="xml"}}table[$foo='bar', {2}=42]{{/code}}|[[Table>>MediaWiki.NULL]] of values
497 +|[]|delimiter|{{code language="xml"}}[1, 2, 2+1, 'string']{{/code}}|{{code language="xml"}}[1, 2, 3, 'string']{{/code}}|[[List>>doc:||anchor="HLists" style="outline-width: 0px !important; user-select: auto !important;"]] of values
498 +|table[]|delimiter|{{code language="xml"}}table[$foo='bar', {1+1}=40+2]{{/code}}|{{code language="xml"}}table[$foo='bar', {2}=42]{{/code}}|[[Table>>doc:||anchor="HTables" style="outline-width: 0px !important; user-select: auto !important;"]] of values
508 508  |{}|delimiter|{{code language="xml"}}{101, 3}{{/code}}|{{code language="xml"}}'Some text'{{/code}}|Text lookup (page ID and text ID) from TextDB
509 -\\(Note: Braces are also used for [[property lookups>>MediaWiki.NULL]])
500 +\\(Note: Braces are also used for [[property lookups>>doc:||anchor="HValueproperties" style="outline-width: 0px !important; user-select: auto !important;"]])
510 510  |+|unary|{{code language="xml"}}+21 * (+2){{/code}}|{{code language="xml"}}42{{/code}}|Denotes positive number (no effect)
511 511  |-|unary|{{code language="xml"}}-(21 * -2){{/code}}|{{code language="xml"}}42{{/code}}|Negates the following number
512 512  |not|unary|{{code language="xml"}}not (21 == 42){{/code}}|{{code language="xml"}}true{{/code}}|Yields true if the following expression is false (equal to zero), false otherwise
... ... @@ -516,7 +516,7 @@
516 516  \\{{code language="xml"}}typeof 'Hello world'{{/code}}|
517 517  {{code language="xml"}}datatype.null{{/code}}
518 518  \\{{code language="xml"}}datatype.integer{{/code}}
519 -\\{{code language="xml"}}datatype.string{{/code}}|Yields the [[data type of the following sub-expression>>MediaWiki.NULL]]
510 +\\{{code language="xml"}}datatype.string{{/code}}|Yields the [[data type of the following sub-expression>>||anchor="typeof" style="outline-width: 0px !important; user-select: auto !important;"]]
520 520  |sin|unary|
521 521  {{code language="xml"}}sin(30deg){{/code}}
522 522  \\{{code language="xml"}}sin(pi){{/code}}|
... ... @@ -556,14 +556,14 @@
556 556  gt
557 557  \\> (>)|binary|
558 558  {{code language="xml"}}1 gt 3{{/code}}
559 -\\{{code language="xml"}}1 < 3{{/code}}|{{code language="xml"}}false{{/code}}|Greater than
550 +\\{{code language="xml"}}1 > 3{{/code}}|{{code language="xml"}}false{{/code}}|Greater than
560 560  |
561 561  ge
562 562  \\>=|binary|
563 563  {{code language="xml"}}1 ge 3{{/code}}
564 -\\{{code language="xml"}}1 <= 3{{/code}}|{{code language="xml"}}false{{/code}}|Greater than or equal to
555 +\\{{code language="xml"}}1 >= 3{{/code}}|{{code language="xml"}}false{{/code}}|Greater than or equal to
565 565  |(((
566 -= =
557 +
567 567  )))|binary|{{code language="xml"}}1 + 1 == 2.0{{/code}}|{{code language="xml"}}true{{/code}}|Equal to
568 568  |~!=|binary|{{code language="xml"}}1 + 1 != 2.0{{/code}}|{{code language="xml"}}false{{/code}}|Not equal to
569 569  |and|binary|{{code language="xml"}}true and false{{/code}}|{{code language="xml"}}false{{/code}}|Logical AND (short-circuit semantics)
... ... @@ -577,7 +577,6 @@
577 577  \\{{code language="xml"}}'T'{{/code}}|Conditional operator ("inline if")
578 578  )))
579 579  
580 -
581 581  === Operator precedence rules ===
582 582  
583 583  You can group sub-expressions using parentheses, but if you don't, the following order of operations is applied, so that 5-1+2*3 == 10 as you would expect. The order is the same as in the table above, but there are operators with the same precedence - these are applied from left to right.
... ... @@ -592,7 +592,6 @@
592 592  * or
593 593  * if/then/else (lowest precedence)
594 594  
595 -
596 596  === Type conversion ===
597 597  
598 598  When a binary arithmetic operator is used on numbers of different types, they will be converted to a suitable output type. The resulting type depends on whether a unit data type is involved (types that are not plain integers or floats). The following cases may occur:
... ... @@ -632,22 +632,18 @@
632 632  * "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
633 633  ** Example:{{code language="xml"}} false and $foo{{/code}} ⟹ {{code language="xml"}}false{{/code}} (the value of $foo is not checked at all)
634 634  * 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.
635 -* <, <=, >, >= 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.
636 636  
626 +== (% id="categorybroken_macroanchorstrings-and-formatting" %)Strings and formatting(%%) ==
637 637  
638 -(% id="categorybroken_macroanchorstrings-and-formatting" %)== Strings and formatting==
639 -
640 -
641 -{{{==}}}
642 -
643 643  You can concatenate string literals using the + operator, but there is also a printf-like formatting syntax, which is easier to use than concatenating lots of small pieces:
644 644  
645 645  * {{code language="xml"}}'The %1 %2 %3 jumps over the %5 %4'.['quick', 'brown', 'fox', 'dog', 'lazy']{{/code}}
646 646  * {{code language="xml"}}'%1 + %2 = %3'.[$a, $b, $a + $b]{{/code}}
647 647  
648 -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;"]].
649 649  
650 -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'.
651 651  \\To get a percent character in the result string, use '%%' in the format string.
652 652  \\\\\\If you need a more sophisticated method for text substitution, try **<substitute_text>**. See the XML schema documentation for this script action.
653 653  \\**[New as of X Rebirth 4.0]**
... ... @@ -664,14 +664,14 @@
664 664  * "." 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).
665 665  
666 666  {{info}}
667 -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.
668 668  {{/info}}
669 669  
670 670  == Lists ==
671 671  
672 -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;"]].
673 673  
674 -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 "[ ]".
675 675  
676 676  {{info}}
677 677  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."
... ... @@ -690,7 +690,7 @@
690 690  (% id="categorybroken_macroanchortables" %)
691 691  == Tables ==
692 692  
693 -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.
694 694  
695 695  Almost all values are allowed as table keys, but there are a few exceptions:
696 696  
... ... @@ -698,19 +698,16 @@
698 698  * null cannot be used as table key (but the number 0 is valid)
699 699  * Lists, tables, groups and buildplans cannot be used as table keys
700 700  
701 -
702 702  These restrictions only apply to the keys, there are no restrictions for values that you assign to them. For example:
703 703  
704 704  * {{code language="xml"}}table[]{{/code}} ⟹ creates an empty table
705 705  * {{code language="xml"}}table[{0} = null]{{/code}} ⟹ creates a table that maps the number 0 to null
706 706  
707 -
708 708  * {{code language="xml"}}table[{'$foo'} = 'bar']{{/code}} ⟹ a table that maps the string '$foo' to the string 'bar'
709 709  * {{code language="xml"}}table[$foo = 'bar']{{/code}} ⟹ exactly the same, just a shorter notation for string keys
710 710  * {{code language="xml"}}table[foo = 'bar']{{/code}} ⟹ error, 'foo' does not start with a '$'
711 711  * {{code language="xml"}}table[{1} = [], {2} = table[]] {{/code}} ⟹ a table that maps 1 to an empty list and 2 to an empty table
712 712  
713 -
714 714  Just like lists, tables are stored as references, so it's possible that multiple variables reference the same table (see above).
715 715  
716 716  == Value properties ==
... ... @@ -735,7 +735,6 @@
735 735  * {{code language="xml"}}[].{'count'}{{/code}} ⟹ 0
736 736  * {{code language="xml"}}table[{21} = 42].{21}{{/code}} ⟹ 42
737 737  
738 -
739 739  In most cases the property key is a fixed string, like "name" or "class". You can write this like above:
740 740  
741 741  * {{code language="xml"}}[42].{'count'}{{/code}}
... ... @@ -743,7 +743,6 @@
743 743  * {{code language="xml"}}$ship.{'class'}{{/code}}
744 744  * {{code language="xml"}}table[$foo='bar'].{'$foo'}{{/code}}
745 745  
746 -
747 747  But it is easier just to write the property key without braces, which is equivalent:
748 748  
749 749  * {{code language="xml"}}[0].count{{/code}}
... ... @@ -751,7 +751,6 @@
751 751  * {{code language="xml"}}$ship.class{{/code}}
752 752  * {{code language="xml"}}table[$foo='bar'].$foo{{/code}}
753 753  
754 -
755 755  (In this case, $ship is a variable. All variables start with a "$", so they cannot be confused with keywords.)
756 756  
757 757  A list has even more properties:
... ... @@ -785,12 +785,11 @@
785 785  
786 786  * {{code language="xml"}}$table.keys.list{{/code}}: Yields a list of all keys in the table (reliably sorted by key if all keys are numeric)
787 787  
788 -
789 789  * {{code language="xml"}}$table.keys.sorted{{/code}}: Yields a list of all keys in the table, sorted by their associated values (which requires that all values are numeric)
790 790  * {{code language="xml"}}$table.keys.random{{/code}}: A randomly chosen key (which requires that the table is non-empty)
791 791  
792 792  {{info}}
793 -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'.{[...]}.
794 794  {{/info}}
795 795  
796 796  === (% id="lookup-tests-and-suppressing-errors" %)Lookup tests and suppressing errors(%%) ===
... ... @@ -801,7 +801,6 @@
801 801  * {{code language="xml"}}$list.{5}?{{/code}} ⟹ true if $list exists and has the property 5, false otherwise
802 802  * {{code language="xml"}}$table.$key?{{/code}} ⟹ Analogously, true if $table exists and has the string property '$key'
803 803  
804 -
805 805  The question mark can even be applied to variables:
806 806  
807 807  * {{code language="xml"}}$list{{/code}} ⟹ The value stored under the name $list, or an error if there is no such variable
... ... @@ -843,11 +843,11 @@
843 843  |profile|
844 844  profile.flat
845 845  \\profile.increasing
846 -\\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;"]])
847 847  |cuestate|
848 848  cuestate.waiting
849 849  \\cuestate.active
850 -\\cuestate.complete|[[Cue states>>MediaWiki.NULL]]
827 +\\cuestate.complete|[[Cue states>>||anchor="HCues" style="outline-width: 0px !important; user-select: auto !important;"]]
851 851  |level|
852 852  level.easy
853 853  \\level.medium
... ... @@ -867,6 +867,8 @@
867 867  \\faction.argongovernment|Factions
868 868  )))
869 869  
847 +{{id name="typeof"/}}
848 +
870 870  {{info}}
871 871  With the ''typeof'' operator you can get the datatype of any expression and compare it with what you expect, for example:
872 872  
... ... @@ -890,11 +890,9 @@
890 890  * player.**money**: The money in the player's account
891 891  * player.**ship**: The ship the player is currently on (not necessarily the player's ship), or null if the player is on a station
892 892  
893 -
894 894  * player.**primaryship**: The player's own ship (but the player is not necessarily on board)
895 895  * player.**entity**: The actual player object
896 896  
897 -
898 898  * player.**zone**, player.**sector**, player.**cluster**, player.**galaxy**: Location of the player entity
899 899  * player.**copilot**: The co-pilot NPC
900 900  
... ... @@ -916,12 +916,11 @@
916 916  === (% id="categorybroken_macroanchormoney-and-time-formatting" %)Money and time formatting(%%) ===
917 917  
918 918  **[New as of X Rebirth 4.0]**
919 -\\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.
920 920  
921 921  * {{code language="xml"}}$money.formatted.{'formatstring'}{{/code}}
922 922  * {{code language="xml"}}$money.formatted.default{{/code}} (using default format string '%s')
923 923  
924 -
925 925  * {{code language="xml"}}$time.formatted.{'formatstring'}{{/code}}
926 926  * {{code language="xml"}}$time.formatted.default{{/code}} (using default format string '%T')
927 927  
... ... @@ -945,7 +945,6 @@
945 945  * %Cr: Localised "Cr" string
946 946  * %%: A % sign
947 947  
948 -
949 949  Examples:
950 950  
951 951  * {{code language="xml"}}(1234Cr).formatted.{'%s'}{{/code}}⟹{{code language="xml"}}'1,234'{{/code}}
... ... @@ -954,7 +954,7 @@
954 954  * {{code language="xml"}}(1234Cr).formatted.{'%1s'}{{/code}}⟹{{code language="xml"}}'1 k'{{/code}} (rounding towards zero)
955 955  * {{code language="xml"}}(1234Cr).formatted.{'%cM'}{{/code}}⟹{{code language="xml"}}'0 M'{{/code}}
956 956  
957 -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;"]].
958 958  
959 959  Examples:
960 960  
... ... @@ -1097,7 +1097,6 @@
1097 1097   <set_value name="$foo" min="-20" max="20" profile="profile.increasing" scale="4"/>
1098 1098  {{/code}}
1099 1099  
1100 -
1101 1101  = Variables and namespaces =
1102 1102  
1103 1103  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).
... ... @@ -1152,7 +1152,6 @@
1152 1152  
1153 1153  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.
1154 1154  
1155 -
1156 1156  == Accessing remote variables ==
1157 1157  
1158 1158  You can also read and write variables in other cues by using the variable name as property key:
... ... @@ -1206,8 +1206,8 @@
1206 1206  
1207 1207  {{code language="xml"}}
1208 1208  <cue name="LibRef" ref="Lib">
1209 - <cke:param name="Param1" value="$foo" ></cke:param> <!-- $foo from parent namespace -->
1210 - <cke:param name="Param2" value="namespace.$foo" ></cke:param> <!-- LibRef.$foo (error) -->
1182 + <param name="Param1" value="$foo" ></param> <!-- $foo from parent namespace -->
1183 + <param name="Param2" value="namespace.$foo" ></param> <!-- LibRef.$foo (error) -->
1211 1211  </cue>
1212 1212  {{/code}}
1213 1213  {{/warning}}