Jump to content

XML:Basic tutorial: Difference between revisions

rewriting intro to be more intro-y
m (link fix)
(rewriting intro to be more intro-y)
Line 1: Line 1:
{{update}}
{{update}}
==XML tutorial for Anniversary Edition==
==XML tutorial for Anniversary Edition==
'''What is XML modding?'''
This tutorial is written with the [[Anniversary Edition]] in mind, because it installs the modding tools you need, gives you the framework for making a mod package, and globalizes more data. Global data can be used in any level.
: Binary data becomes converted into more human-readable form which allows easier modding. All supported file types can be seen [[#supported_file_types|HERE]].


'''Okay, what do I need?'''
'''What is XML?'''
: [[OniSplit]] will be your tool. It's part of [[AE]]. Installing AE spares you some work because it splits the level achieves right away and globalize some more data. Global data can be used in any level.
:[[wikipedia:XML|E'''X'''tensible '''M'''arkup '''L'''anguage]] is a plain-text file format designed to be both human-readable and machine-readable. It stores data in between tags, e.g. <tt><Data>Some data here.</Data></tt>, and these tags can be arranged in a hierarchy to keep things organized. The only difference between a normal text file and an XML file is that the file ends in .xml instead of .txt and that it typically begins with the string <tt><?xml version="1.0" encoding="UTF-8" ?></tt>. While you thus could easily make an XML file by hand in any text editor, there are programs listed below which are better suited for easy XML editing.


'''AE installed. What now?'''
'''Okay, so what is XML modding?'''
: OniSplit cannot be opened in a classic way. But you are lucky. Now we have a GUI (graphical user interface) for it.
:In the old days, most of Oni's resources had to be edited by [[wikipedia:Hex editor|hex editor]]. Then [[User:Neo|Neo]], a fan and hacker, introduced XML exporting. This turns "binary data" -- raw Oni resource data -- into human-readable XML which allows much easier modding. You can then import your edited XML back into Oni's resource format with a simple command. The list of file types with XML support can be seen [[#supported_file_types|HERE]].
 
'''So I just export some data to XML and start editing. Got it.'''
:Not so fast! A lot of the data is not that self-explanatory; it simply can't be, when the game engine is so complex. That's what the XML namespace on this wiki is for: documenting the game data tag by tag according to what you'll be seeing in the XML files, but just as importantly, explaining ''what all that data does''. That's important, because the wiki's original game data documentation in the [[OBD]] namespace was written for hackers and is lacking in plain-English explanation.
 
'''Okay, what do I need to get started?'''
: [[OniSplit]] will be your main tool. [[xmlTools]] is also needed for making XML patch mods. Installing the [[AE]] is the recommended way to get these tools and a helpful framework installed.
 
'''I've got the AE installed. What now?'''
: OniSplit cannot be opened by simply double-clicking it; it's a command-line tool. But you are lucky -- we now have a [[wikipedia:GUI|GUI]] for it.
:: Mac user will want to get '''"[[AE:Anniversary_Edition_Tools|AETools]]"'''
:: Mac user will want to get '''"[[AE:Anniversary_Edition_Tools|AETools]]"'''
::: Install instructions are on same page.
::: Install instructions are on same page.
Line 14: Line 22:
::: Unpack and put the executables into your "GameDataFolder" inside "edition" folder.
::: Unpack and put the executables into your "GameDataFolder" inside "edition" folder.


'''What mod possibilities do I have?'''
'''What kinds of mods can I make?'''
: See [[#supported_file_types|HERE]] again. It's an overview what you could do. But note that some types can be more difficult to mod than other.
: See [[#supported_file_types|HERE]] again. It's an overview of the kinds of resources that allow XML editing. But note that some types can be more difficult to mod than other.
: If you need some ideas look at this page: '''[[Modding_brainstorms|modding brainstorms]]'''.
: If you need some ideas look at this page: '''[[Modding_brainstorms|modding brainstorms]]'''.
: If you want to contribute AE: [[AE:Bug-fix_and_feature_requests|bug-fixes and feature requests]].
: If you want to contribute AE: [[AE:Bug-fix_and_feature_requests|bug-fixes and feature requests]].