Editing Module:Test/data/doc
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Transformation rules == | == Transformation rules == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Elements with attributes === | === Elements with attributes === | ||
Line 17: | Line 7: | ||
<defName> is used as part of the index for the main Def table. | <defName> is used as part of the index for the main Def table. | ||
− | Additional | + | Additional meta elements added. |
<pre> | <pre> | ||
Line 26: | Line 16: | ||
</pre> | </pre> | ||
− | + | becomes | |
<pre> | <pre> | ||
Line 33: | Line 23: | ||
["ParentName"] = "BaseHare", | ["ParentName"] = "BaseHare", | ||
["FileName"] = "Races_Animal_Hares.xml", | ["FileName"] = "Races_Animal_Hares.xml", | ||
+ | ["Version"] = "1.2.2753 rev705", | ||
["DLC"] = "Core", | ["DLC"] = "Core", | ||
}, | }, | ||
Line 40: | Line 31: | ||
</pre> | </pre> | ||
− | Parent ( | + | Parent (absctact) Def that gets inherited: |
<pre> | <pre> | ||
Line 50: | Line 41: | ||
</pre> | </pre> | ||
− | + | becomes | |
<pre> | <pre> | ||
Line 59: | Line 50: | ||
["Name"] = "BaseHare", | ["Name"] = "BaseHare", | ||
["FileName"] = "Races_Animal_Hares.xml", | ["FileName"] = "Races_Animal_Hares.xml", | ||
+ | ["Version"] = "1.2.2753 rev705", | ||
["DLC"] = "Core", | ["DLC"] = "Core", | ||
}, | }, | ||
Line 67: | Line 59: | ||
</pre> | </pre> | ||
− | === | + | === Descriptions === |
+ | |||
+ | Because of some exceptions in Royalty Defs, <description> content has to be wrapped in double square brackets (Lua multiline syntax). | ||
+ | |||
+ | === <nowiki><li></nowiki> elements without children === | ||
Get transformed into ordered lists (numerically indexed Lua tables). | Get transformed into ordered lists (numerically indexed Lua tables). | ||
Line 77: | Line 73: | ||
</pre> | </pre> | ||
− | + | becomes | |
<pre> | <pre> | ||
Line 88: | Line 84: | ||
Note: a comma after the last item in a list is not flagged as an error in Lua. | Note: a comma after the last item in a list is not flagged as an error in Lua. | ||
− | === | + | === <nowiki><li></nowiki> elements with children === |
<pre> | <pre> | ||
Line 107: | Line 103: | ||
</pre> | </pre> | ||
− | + | becomes | |
<pre> | <pre> | ||
Line 125: | Line 121: | ||
}, | }, | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Ranges (1~2) === | === Ranges (1~2) === | ||
− | + | : TODO | |
− | |||
− | |||
=== Curve points === | === Curve points === | ||
Line 174: | Line 141: | ||
</pre> | </pre> | ||
− | + | becomes | |
<pre> | <pre> | ||
Line 187: | Line 154: | ||
</pre> | </pre> | ||
− | === | + | === Components === |
+ | |||
+ | It would be useful to have some of the more used components. They can then be queried for additional functionality that some game objects have. | ||
− | + | They can be numbered tables or, as in some of the examples above, string indexed. String indexes, in general, are simpler to use. Numeric tables I have to search through. | |
− | + | TODO: filtering syntax | |
− | |||
== Issues == | == Issues == | ||
Line 209: | Line 177: | ||
=== Inheritance (interaction with parser) === | === Inheritance (interaction with parser) === | ||
Inheritance can be handled by the parser or the module. If the parser handles it, then for any change the dataset needs to be recreated so I'm leaning towards letting the module take care of that. In this case the only purpose of the parser is to filter data and transform it into something Lua can use. | Inheritance can be handled by the parser or the module. If the parser handles it, then for any change the dataset needs to be recreated so I'm leaning towards letting the module take care of that. In this case the only purpose of the parser is to filter data and transform it into something Lua can use. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |