XML:Basic tutorial: Difference between revisions
Paradox-01 (talk | contribs) m (Mac update follows by tomorrow at the latest) |
Paradox-01 (talk | contribs) m (valid until AETools gets updated) |
||
Line 27: | Line 27: | ||
!colspan=4|converting an ONI file into an XML file | !colspan=4|converting an ONI file into an XML file | ||
|- | |- | ||
|valign="top"|Update comes soon. | |valign="top"|Update comes soon.Open AETools. Click on "Export" tab, select checkbox "Export as .xml file", then click on "Export .oni file" and chose "ONCCk4_L.oni". See "XMLfiles" in "AETools_Data". There you should find "ONCCk4_L.xml". | ||
| | |[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_1B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_1B_TN.png] | ||
|valign="top"|Open the GUI.<br>Chose "ONI - XML" tab.<br>Write "level0_Characters/ONCCk4_L.oni" into the first line.<br>"XML" into the other.<br>After clicking on "Convert" you should see a new folder named "ONI". | |valign="top"|Open the GUI.<br>Chose "ONI - XML" tab.<br>Write "level0_Characters/ONCCk4_L.oni" into the first line.<br>"XML" into the other.<br>After clicking on "Convert" you should see a new folder named "ONI". | ||
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_1B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_1B_TN.png] | |[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_1B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_1B_TN.png] | ||
Line 34: | Line 34: | ||
!colspan=4|modifing the XML file | !colspan=4|modifing the XML file | ||
|- | |- | ||
|valign="top"| | |valign="top"|Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | ||
| | |[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img2.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img2_TN.png] | ||
|valign="top"|Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | |valign="top"|Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | ||
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_2B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_2B_TN.png] | |[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_2B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_2B_TN.png] | ||
|- | |- | ||
!colspan=4|creating | !colspan=4|creating the ONI file | ||
|- | |- | ||
|valign="top"| | |valign="top"|Write into the bottom line (manual input): "-create ONI_files XMLfiles/ONCCk4_L.xml". | ||
<font color="#888888">Made a mistake when modified the XML file? The terminal window would appear now and telling you the trouble making line. Find the line in you XML file and fix it. Line number isn't always accurate. (It can shift - often by 1.) Then try again creating the file.</font | <font color="#888888">Made a mistake when modified the XML file? The terminal window would appear now and telling you the trouble making line. Find the line in you XML file and fix it. Line number isn't always accurate. (It can shift - often by 1.) Then try again creating the file.</font> | ||
| | | | ||
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_3B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_3B_TN.png] | |||
|valign="top"|Goto GUI's "XML -> ONI" section and write "XML/ONCCk4_L.xml" into its first line and "ONI" into its second line. After clicking "Convert" you should see a new folder named "ONI". | |valign="top"|Goto GUI's "XML -> ONI" section and write "XML/ONCCk4_L.xml" into its first line and "ONI" into its second line. After clicking "Convert" you should see a new folder named "ONI". | ||
Line 59: | Line 58: | ||
|- | |- | ||
|valign="top"| | |valign="top"| | ||
Download this [http://paradox.oni2.net/mods/package_barebone.zip package barebone.] | |||
Unzip the archive, follow the path "90000Test/oni/level0_Final/level0_Characters" and insert there your ONCC from "ONIfiles" folder. | |||
Now put "90000Test" with all its content into AE's package folder. "Oni/Edition/install/packages" | |||
'''Important note:''' you can see "Upgraded ONCCs" and "[Test]" being selected in the screen shot. | |||
: Upgraded ONCCs' package folder is "21000UpgradedONCCs". | |||
: Test's package folder is "90000Test". | |||
: Both contain ONCCk4_L.oni but only the one in "90000Test" will be installed. | |||
: The highest number rules. | |||
Goto "Oni/Edition/install/packages/90000Test" and open "Mod_Info.cfg" with a simple text editor if you want to change your own mod's readme, displayed name and creator note. Look at the screen shot and you will understand where what goes. | |||
See '''[http://oni.bungie.org/community/forum/viewtopic.php?id=1030 HERE]''' for detail information about package creation. | |||
Open AEInstaller and select your test package. Hit "Install!" button. | |||
| | | | ||
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_4B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_4B_TN.png] | |||
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_5B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_5B_TN.png] | |||
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_6B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_6B_TN.png] | |||
|valign="top"| | |valign="top"| | ||
Download this [http://paradox.oni2.net/mods/package_barebone.zip package barebone.] | Download this [http://paradox.oni2.net/mods/package_barebone.zip package barebone.] | ||
Line 96: | Line 127: | ||
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img6.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img6_TN.png] | |[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img6.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img6_TN.png] | ||
|} | |} | ||
==mini-tutorial for pre-2009-7 AE release== | ==mini-tutorial for pre-2009-7 AE release== |
Revision as of 10:33, 21 July 2009
mini-tutorial for 2009-7 AE release
What is XML modding?
- Binary data becomes converted into more human-readable form which allows easier modding. All supported file types can be seen HERE.
Okay, what do I need?
- 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.
AE installed. What now?
- OniSplit cannot be opened in a classic way. But you are lucky. Now we have a GUI (graphical user interface) for it.
- Mac user will want to get "AETools (Beta)"
- Unpack and put "AETool" and "AETools_Data" into your "edition" folder.
- Windows user will want to get "OniSplit GUI v0.6"
- Unpack and put the executables into your "GameDataFolder" inside "edition" folder.
- Mac user will want to get "AETools (Beta)"
What mod possibilities do I have?
- See HERE again. It's an overview what you could do. But note that some types can be more difficult to mod than other.
- If you need some ideas look at this page: modding brainstorms.
- If you want to contribute AE: bug-fixes and feature requests.
- Check also AE's current To-Do page and maybe there are fields that need a modder.
Is there an easy exercise to get me started?
- Just see at the following table. Read left side if you use a Macintosh, read right side if you use Windows.
converting an ONI file into an XML file | |||
---|---|---|---|
Update comes soon.Open AETools. Click on "Export" tab, select checkbox "Export as .xml file", then click on "Export .oni file" and chose "ONCCk4_L.oni". See "XMLfiles" in "AETools_Data". There you should find "ONCCk4_L.xml". | Open the GUI. Chose "ONI - XML" tab. Write "level0_Characters/ONCCk4_L.oni" into the first line. "XML" into the other. After clicking on "Convert" you should see a new folder named "ONI". |
||
modifing the XML file | |||
Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | ||
creating the ONI file | |||
Write into the bottom line (manual input): "-create ONI_files XMLfiles/ONCCk4_L.xml".
|
Goto GUI's "XML -> ONI" section and write "XML/ONCCk4_L.xml" into its first line and "ONI" into its second line. After clicking "Convert" you should see a new folder named "ONI".
|
||
creating and installing a mod package | |||
Download this package barebone.
|
|
Download this package barebone.
|
|
testing the modification | |||
Let's test our modification. Therefore we start TCTF HQ redux (pre-last level). The supershield becomes automatically switched on at 51% overpower (301 healh points). "chenille" cheat works too. | Let's test our modification. Therefore we start TCTF HQ redux (pre-last level). The supershield becomes automatically switched on at 51% overpower (301 healh points). "chenille" cheat works too. |
mini-tutorial for pre-2009-7 AE release
What is XML modding?
- Binary data becomes converted into more human-readable form which allows easier modding. All supported file types can be seen HERE.
Okay, what do I need?
- 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.
AE installed. What now?
- OniSplit cannot be opened in a classic way. But you are lucky. Now we have a GUI (graphical user interface) for it.
- Mac user will want to get "AETools (Beta)"
- Unpack and put "AETool" and "AETools_Data" into your "edition" folder.
- Windows user will want to get "OniSplit GUI v0.6"
- Unpack and put the executables into your "edition" folder.
- Mac user will want to get "AETools (Beta)"
What mod possibilities do I have?
- See HERE again. It's an overview what you could do. But note that some types can be more difficult to mod than other.
- If you need some ideas look at this page: modding brainstorms.
- If you want to contribute AE: bug-fixes and feature requests.
- Check also AE's current To-Do page and maybe there are fields that need a modder.
Is there an easy exercise to get me started?
- Just see at the following table. Read left side if you use a Macintosh, read right side if you use Windows.
converting an ONI file into an XML file | |||
---|---|---|---|
Open AETools. Click on "Export" tab, select checkbox "Export as .xml file", then click on "Export .oni file" and chose "ONCCk4_L.oni". See "XMLfiles" in "AETools_Data". There you should find "ONCCk4_L.xml". | Open the GUI. Chose "ONI - XML" tab. Write "GameDataFolder/level0_Final/ONCCk4_L.oni" into the first line. "extracted" into the other. After clicking on "Convert" you should see a new folder named "extracted". | ||
modifing the XML file | |||
Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | Open the extracted file with a simple text editor. Search for "HasSupershield" tag and set its value to "1". Save file. | ||
creating, debugging, and transporting the file | |||
Let's choose the "Import" tab now. Click on the first drop down menu in case there is not level0_Final already chosen. AETools will create the ONI file in that folder.
|
Goto GUI's "XML -> ONI" section and write "extracted/ONCCk4_L.xml" into its first line and "created" into its second line. After clicking "Convert" you should see a new folder named "created".
|
||
recombining the level archive | |||
Click on "Select Level to rebuild" and then "LEVEL 0: GLOBAL DATA". | Let's choose the GUI's first tab now, "Compile". Write "GameDataFolder/level0_Final" into the first line, "level0_Final" into the second and "GameDataFolder" into the third line. Click now on "Compile" and wait until onisplit's black window disappears again. | ||
testing the modification | |||
Let's test our modification. Therefore we start TCTF HQ redux (pre-last level). The supershield becomes automatically switched on at 51% overpower (301 healh points). "chenille" cheat works too. | Let's test our modification. Therefore we start TCTF HQ redux (pre-last level). The supershield becomes automatically switched on at 51% overpower (301 healh points). "chenille" cheat works too. |
supported file types
General information.
|
BINA/OBCJ/CHAR
|
BINA/OBCJ/CONS
|
BINA/OBCJ/CMBT
|
BINA/OBCJ/DOOR
|
BINA/OBCJ/FLAG
|
BINA/OBCJ/FURN
|
BINA/OBCJ/MELE
|
BINA/OBCJ/NEUT
|
BINA/OBCJ/PART
|
BINA/OBCJ/PATR
|
BINA/OBCJ/PWRU
|
BINA/OBCJ/SNDG
|
BINA/OBCJ/TRGV
|
BINA/OBCJ/TRIG
|
BINA/OBCJ/TURR
|
BINA/OBCJ/WEAP
|
BINA/ONIE
|
BINA/TMBD
|
CONS
|
DPge
|
FILM
|
HPge
|
IGHH
|
IPge
|
Impt
|
Mtrl
|
ONCC
|
ONCV
|
ONGS
|
ONLD
|
ONSK
|
ONVL
|
ONWC
|
OPge
|
PAR3
|
PSpc
|
PSpL
|
PSUI
|
TRAC
|
TRAM
|
TRGE
|
TRMA
|
TXMB
|
TXMP
|
TxtC
|
WMCL
|
WMDD
|
WMM
|
WPge
|
working with XML files: good to know
- capitalization rules (use of capital and small initial letters): You need to care about it because also Onisplit does.
- text position in a line: most tags have some distance towards line begin. It is not needed but preserve the overview.
- structure: some tags have children. It doesn't hurt to break the structure but is also not good for the overview. Example:
<Instance id="4" type="IGSA"> <Strings> <Link>#7</Link> </Strings> </Instance>
<Instance id="4" type="IGSA"><Strings><Link>#7</Link></Strings></Instance>
- code folding: don't destroy the structure to compress code. There are tools which can handle large xml files. (e.g. Microsoft Visual ... Express and xcode both for free)
- You can fold whole instances and parent tags.
- Folded code can be previewed in Microsoft Visual Express applications, although xcode provides an extra scroll popup.
Windows (Visual C++) |
way without Windows GUI: window address bar
Put the newest OniSplit.exe into the "edition\GameDataFolder" folder and use the window's address bar (that's where you can see the directory in full length).
Delete that address, type (for example) the code below, and hit enter.
onisplit -extract:xml xml_dir level0_Final/ONCCkonoko*.oni
The star is good for mess extraction/creation and good for shorten long unique file names. ("ONCCkonoko_generic" will be extracted in new folder "edition\GameDataFolder\xml_dir".)
It's also a good idea to keep the code in a temporary opened text file. There you can easily modify the code for other files and doesn't need you to type it from beginning into the address bar. (Be aware of Windows' short cut "shift + c" for coping marked text and "shift + v" for pasting text.)
*.oni file creating goes like this:
onisplit -create oni_dir xml_dir/ONCCkonoko_generic.xml
level recombining goes like this:
onisplit -import:nosep level0_Final level0_Final.dat
You can put this line also into a new bat file. It saves you some time during intensive modding. Then just double-click it.
way without Windows GUI: local called CMD
Useful for debugging. Copy the code into an empty text file and save it as whatever.reg, then double click it.
REGEDIT4 [HKEY_CLASSES_ROOT\Directory\shell\cmd] @="Open Command Window Here" [HKEY_CLASSES_ROOT\Directory\shell\cmd\command] @="cmd.exe /k \"cd %L\"" [HKEY_CLASSES_ROOT\Drive\shell\cmd] @="Open Command Window Here" [HKEY_CLASSES_ROOT\Drive\shell\cmd\command] @="cmd.exe /k \"cd %L\""
Now you can goto "Oni/edition" and mark the GameDataFolder, right-click it, a popup menu appears, click "Open Command Window Here".
way without Mac GUI: the terminal
Put the newest OniSplit.exe into the "Oni/GameDataFolder" folder.
Open the Terminal program then "change directory" to the GameDataFolder (Type "cd " then drag the GameDataFolder into the Terminal window, now press the RETURN key)
At this point you can enter the OniSplit commands, such as:
mono onisplit.exe -extract:xml xml_dir level0_Final/ONCCkonoko*.oni
("ONCCkonoko_generic" will be extracted in new folder "GameDataFolder/xml_dir".)