18,700
edits
m (link fixes) |
m (using hatnote template) |
||
Line 1: | Line 1: | ||
{{Hatnote|This documentation uses many technical [[wp:XML|XML]]-related expressions such as: element, parent element, node, attribute. Therefore it is highly recommended that you have a basic background in XML before using XmlTools or reading its documentation. You'll find a good quick tutorial to familiarize yourself with these terms and XML itself [https://www.w3schools.com/xml/xml_whatis.asp on this page].}} | |||
XmlTools is a command-line modding tool developed by [[User:Script 10k|s10k]] to operate on XML files, especially those exported by [[OniSplit#XML|OniSplit]]. It supports many basic operations, and allows more complex programmable operations through [[wp:JavaScript|JavaScript]]. It is written in C++, works in both macOS and Windows, and is currently very efficient in terms of performance. | |||
XmlTools is a command-line modding tool developed by [[User:Script 10k|s10k]] to operate on XML files, especially those exported by [[OniSplit#XML|OniSplit]]. It supports many basic operations, and allows more complex programmable operations through [[ | |||
The initial version was written to help with the development of the Old China level mod and was written in C# previous to v2.0, but later was rewritten in C++ for performance and cross-platform reasons. It was then developed further for the purposes of the [[AE]] so that resources could be patched smartly. | The initial version was written to help with the development of the Old China level mod and was written in C# previous to v2.0, but later was rewritten in C++ for performance and cross-platform reasons. It was then developed further for the purposes of the [[AE]] so that resources could be patched smartly. | ||
Line 116: | Line 115: | ||
==Patch file operations== | ==Patch file operations== | ||
Patch files are primarily used to create a list of commands within one file that you can pass to XmlTools to execute all at once, to insert blocks of XML into existing nodes, and to use | Patch files are primarily used to create a list of commands within one file that you can pass to XmlTools to execute all at once, to insert blocks of XML into existing nodes, and to use JavaScript code to modify the XML. | ||
To make a patch, create a plain-text file that uses the following commands and pass it to XmlTools using the <tt>patchfile</tt> command documented above. See [[Making a patch mod|HERE]] for instructions on making a patch mod package for the AE and [[Anniversary Edition/Framework#Installation|HERE]] to learn how the [[AEI]] handles patch mods. | To make a patch, create a plain-text file that uses the following commands and pass it to XmlTools using the <tt>patchfile</tt> command documented above. See [[Making a patch mod|HERE]] for instructions on making a patch mod package for the AE and [[Anniversary Edition/Framework#Installation|HERE]] to learn how the [[AEI]] handles patch mods. | ||
Line 138: | Line 137: | ||
<tt>[[XmlTools/Full_documentation#.40CUSTOM_CODE|@CUSTOM_CODE]]</tt> | <tt>[[XmlTools/Full_documentation#.40CUSTOM_CODE|@CUSTOM_CODE]]</tt> | ||
:Executes the following | :Executes the following JavaScript code for the purpose of editing the XML. If you are creating a patch mod for the AE, <u>you should try to avoid this operation as much as possible</u> because it is much slower than the native XmlTools commands. | ||
===Command options=== | ===Command options=== |