Modifications pour le document Mission Director Guide
Modifié par Klaus Meyer le 2025/03/31 16:39
Depuis la version 32939.1
modifié par Daniel Turner
sur 2023/08/22 16:50
sur 2023/08/22 16:50
Commentaire de modification :
Il n'y a aucun commentaire pour cette version
À la version 32935.1
modifié par Daniel Turner
sur 2023/05/26 13:11
sur 2023/05/26 13:11
Commentaire de modification :
Il n'y a aucun commentaire pour cette version
Résumé
-
Propriétés de la Page (2 modifications, 0 ajouts, 0 suppressions)
Détails
- Propriétés de la Page
-
- Tags
-
... ... @@ -1,1 +1,1 @@ 1 -Broken_macro/anchor |Broken macro/anchor1 +Broken_macro/anchor - Contenu
-
... ... @@ -20,11 +20,9 @@ 20 20 21 21 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. 22 22 23 -{{note}} 24 -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]]). 23 +{{note body="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 25 26 -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." 27 -{{/note}} 25 +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 29 29 == Script debug output == 30 30 ... ... @@ -628,11 +628,8 @@ 628 628 629 629 630 630 631 -(% id="categorybroken_macroanchorstrings-and-formatting" %)== Strings and formatting== 632 -(% id="categorybroken_macroanchorstrings-and-formatting" %) 629 +== Strings and formatting == 633 633 634 -{{{==}}} 635 - 636 636 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: 637 637 638 638 * {{code}}'The %1 %2 %3 jumps over the %5 %4'.['quick', 'brown', 'fox', 'dog', 'lazy']{{/code}} ... ... @@ -664,8 +664,8 @@ 664 664 665 665 \\ 666 666 667 -(% id="categorybroken_macroanchorlists" %) 668 668 663 + 669 669 == Lists == 670 670 671 671 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]]. ... ... @@ -688,8 +688,8 @@ 688 688 689 689 \\ 690 690 691 -(% id="categorybroken_macroanchortables" %) 692 692 687 + 693 693 == Tables == 694 694 695 695 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.\\ ... ... @@ -716,12 +716,11 @@ 716 716 717 717 718 718 719 -Just like lists, tables are stored as references, so it's possible that multiple variables reference the same table (see above).\\ 720 - 714 +Just like lists, tables are stored as references, so it's possible that multiple variables reference the same table (see above). 721 721 \\ 722 722 723 -(% id="categorybroken_macroanchorvalue-properties" %) 724 724 718 + 725 725 == Value properties == 726 726 727 727 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. ... ... @@ -808,11 +808,8 @@ 808 808 809 809 810 810 811 - (% id="lookup-tests-and-suppressing-errors" %)===Lookup tests and suppressing errors805 +=== Lookup tests and suppressing errors === 812 812 813 - 814 -{{{===}}} 815 - 816 816 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: 817 817 818 818 * {{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 ... ... @@ -945,11 +945,10 @@ 945 945 946 946 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. 947 947 948 -(% id="categorybroken_macroanchormoney-and-time-formatting" %) === Money and time formatting939 +(% id="categorybroken_macroanchormoney-and-time-formatting" %) 949 949 941 +=== Money and time formatting === 950 950 951 -{{{===}}} 952 - 953 953 **[New as of X Rebirth 4.0]** 954 954 \\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. 955 955