Changes for page Mission Director Guide

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

From version 32938.1
edited by Daniel Turner
on 2023/08/22 16:49
Change comment: Rollback to version 32934.1
To version 32935.1
edited by Daniel Turner
on 2023/05/26 13:11
Change comment: There is no comment for this version

Summary

Details

Page properties
Tags
... ... @@ -1,1 +1,1 @@
1 -Broken_macro/anchor|Broken macro/anchor
1 +Broken_macro/anchor
Content
... ... @@ -626,11 +626,8 @@
626 626  
627 627  
628 628  
629 -(% id="categorybroken_macroanchorstrings-and-formatting" %)== Strings and formatting==
630 -(% id="categorybroken_macroanchorstrings-and-formatting" %)
629 +== Strings and formatting ==
631 631  
632 -{{{==}}}
633 -
634 634  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:
635 635  
636 636  * {{code}}'The %1 %2 %3 jumps over the %5 %4'.['quick', 'brown', 'fox', 'dog', 'lazy']{{/code}}
... ... @@ -662,8 +662,8 @@
662 662  
663 663  \\
664 664  
665 -(% id="categorybroken_macroanchorlists" %)
666 666  
663 +
667 667  == Lists ==
668 668  
669 669  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]].
... ... @@ -686,8 +686,8 @@
686 686  
687 687  \\
688 688  
689 -(% id="categorybroken_macroanchortables" %)
690 690  
687 +
691 691  == Tables ==
692 692  
693 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.\\
... ... @@ -714,12 +714,11 @@
714 714  
715 715  
716 716  
717 -Just like lists, tables are stored as references, so it's possible that multiple variables reference the same table (see above).\\
718 -
714 +Just like lists, tables are stored as references, so it's possible that multiple variables reference the same table (see above).
719 719  \\
720 720  
721 -(% id="categorybroken_macroanchorvalue-properties" %)
722 722  
718 +
723 723  == Value properties ==
724 724  
725 725  Properties are a crucial concept in script expressions. In the previous sections you have seen mostly constant expressions, which are already evaluated when they are parsed at game start. For reading and writing variables and evaluating the gameΓÇÖs state, properties are used.
... ... @@ -806,11 +806,8 @@
806 806  
807 807  
808 808  
809 -(% id="lookup-tests-and-suppressing-errors" %)=== Lookup tests and suppressing errors
805 +=== Lookup tests and suppressing errors ===
810 810  
811 -
812 -{{{===}}}
813 -
814 814  If you look up a property that does not exist, there will be an error, and the result will be null. To test whether a property exists, you can append a question mark ΓÇ£?ΓÇ¥ to the lookup, which yields true or false:
815 815  
816 816  * {{code}}$list.{5}{{/code}} Γƒ╣ The fifth element of a list - however, if $list has less than 5 elements (and if it's also not a table with the key 5), there will be an error
... ... @@ -943,11 +943,10 @@
943 943  
944 944  These properties will not cause errors when used on ΓÇ£nullΓÇ¥ or on a destroyed object (which may still be accessible from scripts in some cases), and produce null or false as results, respectively. (The keyword ΓÇ£availableΓÇ¥ is used for trades, not for objects. Trades can also become invalid.) However, when using such a property on a different data type like a number, there will still be an error.
945 945  
946 -(% id="categorybroken_macroanchormoney-and-time-formatting" %)=== Money and time formatting
939 +(% id="categorybroken_macroanchormoney-and-time-formatting" %)
947 947  
941 +=== Money and time formatting ===
948 948  
949 -{{{===}}}
950 -
951 951  **[New as of X Rebirth 4.0]**
952 952  \\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.
953 953