XML:Basic tutorial: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
(edited text for grammar and clarity, and made the language "bi-platform" since Vago works on both platforms)
Line 1: Line 1:
{{XML Home}}
{{XML Home}}
{{update}}


Here's a step-by-step guide to creating a mod through XML modding, using an ONCC modification as an example. It will give you a grasp of the usual tools and workflow. Let's roll!


This a step-by-step guide taking an ONCC modification as example.
It will give you an impression of the tools and workflow. Let's roll!
===Windows===
: '''Open AEInstaller, then Vago'''
: '''Open AEInstaller, then Vago'''
:: Open AEI, goto "Tools" > "Vago GUI (Win)". (Install Vago via Tools manager if necessary.)
:: Open the AEI and choose the menu item Tools > Vago GUI (first, Vago has to have been installed via Tools > Manage Tools).
:: When Vago is used for first time it ask you the AE path
:: When Vago is opened for the first time, it will ask you to locate the AE installation on your hard drive.


: '''Get Konoko's character file (ONCC) by spliting level0_Final.dat'''
: '''Get Konoko's character file (ONCC) by splitting level0_Final.dat'''
:: In Vago goto "Levels" tab.
:: In Vago, go to the "Levels" tab.
:: Drag and drop level0_Final.dat from AE\AEInstaller\vanilla into the "Sources" field. Click "Convert".
:: Drag and drop the file level0_Final.dat, found in the directory AE/AEInstaller/vanilla/, into the "Sources" section of the window. Click "Convert".
:: At the top, click onto the blue folder icon. Follow that path "Levels\DAT - ONI FILES\level0_Final".
:: At the top, click on the blue folder icon. The folder with Vago's converted files will appear. Go into Levels/DAT - ONI FILES/level0_Final/.


: '''Convert oni to xml'''
: '''Convert the .oni to XML'''
:: In level0_Final folder there are a lot of files. You want to convert ONCCk4_L.oni to xml format.
:: In the level0_Final/ folder, there will be a lot of files. You want ONCCk4_L.oni. This is the name of the file for the version of Konoko that appears in Chapter 13, as [[Konoko#Appearance_during_storyline|documented here]].
:: Goto Vago "XML" tab and drag and drop "ONCCk4_L.oni" into the "Sources" field. Click convert.
:: Go to Vago's "XML" tab and drag-and-drop ONCCk4_L.oni into the "Sources" section. Click "Convert".


: '''Edit xml'''
: '''Edit the XML'''
:: Click blue folder again and follow "XML\ONI - XML", there should be a "ONCCk4_L.xml" now.
:: Click the blue folder icon again and go into "XML/ONI - XML". There should be a file called ONCCk4_L.xml now.
:: Open that file with a plain text editor. (Windows: Start > notepad.exe)
:: Open that file with a plain-text editor (in Windows, you should use Notepad, and TextEdit will work on the Mac).
:: Search for <HasSupershield> and set its value from 0 to '''1'''.
:: Search for the <HasSupershield> tag and change its value from 0 to '''1'''.
:: Save file.
:: Save the file and close it.


: '''Convert the xml back to oni format'''
: '''Convert the XML back to a .oni'''
:: Vago, "XML" tab. Choose From "XML" To "Oni"
:: Go to Vago's "XML" tab. In the "From:" popup menu, choose "XML", and the "To:" popup menu should have "ONI" supplied automatically by Vago.
:: DnD your xml file into the "Sources" field. Convert.
:: Drag-and-drop your XML file into the "Sources" section. Click "Convert".
:: Click blue folder again and follow "XML\ONI - XML".
:: Click the blue folder icon again and go into "XML/XML - ONI".
:: Create a new folder "level0_Final" and put your ONCC*.oni file there.
:: Create a new folder on your hard drive, preferably outside of the VagoWorkspace folder, called "level0_Final", and put your new ONCCk4_L.oni file into it.


[[Image:HasSupershield_1.png|thumb|200px|right|For more information on Supershield see [[XML:ONCC#ONCV.2C_death_particle.2C_TRBS.2C_TRMA.2C_TRAC.2C_TRAS.2C_health.2C_daodan.2C_etc.|XML:ONCC page]] ]]
[[Image:HasSupershield_1.png|thumb|200px|right|For more information on the supershield flag, see [[XML:ONCC#ONCV.2C_death_particle.2C_TRBS.2C_TRMA.2C_TRAC.2C_TRAS.2C_health.2C_daodan.2C_etc.|XML:ONCC]].]]
: '''Get the file back into the game'''
: '''Get the file back into Oni'''
:: Vago supports AE package creation: in Vago, goto "Tools", "AEI Mod Package Wizard"
:: The best way to test your mod is to make an [[Making_a_mod_package|AE package]]. Vago can help you do this: choose the menu item Tools > AEI Mod Package Wizard.
:: Fill all fields. Let Type be "Character". When choosing a number, replace the X and click "Check".
:: Fill in all the mandatory fields. Set the Type to "Character". When choosing a package number, follow the suggested numbering range that is auto-filled in Package Number, and click "Check" to see if it has already been used by another package. Hit "Continue" once you have decided on a package number.
:: DnD your level0_Final folder into the "Common" field. Hit "Next". Leave the optional fields blank.
:: Leave the optional fields blank. Hit "Continue".
:: Drag-and-drop your level0_Final folder into the "Common" section. Hit "Done".  


: '''Test your mod'''
: '''Test your mod'''
:: Copy your package into "Oni\AE\AEInstaller\packages"
:: Copy your package folder into AE/AEInstaller/packages/ in your Oni installation.
:: Restart AEI and install your mod. (Type your mod's name into the Filter to find it faster.)
:: Open the AEI, locate your mod by looking under the "-Local-" category or by typing its name into the Filter, and install it.
:: Start TCTF HQ redux (pre-last level).
:: Load Oni's level "TCTF Regional HQ (redux)" (the next-to-last level).
:: The supershield becomes automatically switched on at 51% overpower (301 health points). "chenille" cheat works too.
:: If you raise your health above 150% (301 HP), the supershield will switch on and you will be untouchable. The "chenille" cheat is a handy alternative to finding some hypos, and it will permanently turn on the supershield.
 
 
===Mac===
 
[...]
 
remove pc, update mac section if needed
 
{| class="wikitable" width="100%"
!colspan=2|Mac:
!colspan=2|PC:
|-
!colspan=4|converting an ONI file into an XML file
|-
 
 
|valign="top"|Open Edition's AETools_Data folder and create a new folder named "ONIfiles".
 
 
Run AETools, choose "Extract" tab.<br>Click on checkbox "Expract as .xml file".<br>Then click on "Extract .oni file(s)" and choose "ONCCk4_L.oni".<br>See "XMLfiles" in "AETools_Data". There you should find "ONCCk4_L.xml".
|valign="top"|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_1C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_1C_TN.png]
|valign="top"|Open Edition's GameDataFolder and create two new folders named "XML" and "ONI".
 
 
Run the GUI, choose "ONI - XML" tab and its upper section.<br>Click first browse button and search for "ONCCk4_L.oni" inside the level0_Characters folder.<br>Click second browse button and choose the XML folder as target.<br>Now click on Convert button.
|valign="top"|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_1C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_1C_TN.png]
|-
!colspan=4|modifing the XML file
|-
|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"|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_2C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_2C_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"|[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 the ONI file
|-
|valign="top"|Choose "Convert" tab.<br>Now click onto "Select File(s) for Conversion" button and mark "ONCCk4_L.xml". Click "Choose" button.<br>Then click "Select Destination Folder". Search for your ONIfiles folder, mark it, and click "Choose button."
 
 
<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>
|valign="top"|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_3C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_3C_TN.png]
|valign="top"|Goto "XML -> ONI" section.<br>Click first browse button and search for "ONCCk4_L.xml" inside the XML folder.<br>Click second browse button and choose the ONI folder as target.<br>Now click on Convert button.
 
 
<font color="#888888">Try [[#way_without_Windows_GUI:_local_called_CMD|THIS]] method if no oni file was created. Use then "onisplit -create ONI XML/ONCCk4_L'''.xml'''" and look for error messages. 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>
|valign="top"|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_3C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_3C_TN.png]
 
|-
!colspan=4|creating and installing a mod package
|-
|valign="top"|
Choose "Package" tab.
The GUI is actually pretty much self-explaining.<br>Fill the editboxes with following:
:90000
:Test
:[Test]
:1
:That's a package to test new mods.
:''YourNameHere''
 
 
Then click "Create package" button and search for your ONIfiles folder. Mark it and click "Choose" button.
 
 
AEInstaller should automatically open now, select your test package. Hit "Install!" button.
|valign="top"|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_4C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_4C_TN.png]
 
 
 
 
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_5C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_5C_TN.png]
|valign="top"|
Click on GUI's "AE Package" tab.<br>The GUI is actually pretty much self-explaining.<br>Fill the editboxes with following:
:90000
:Test
:[Test]
:1
:That's a package to test new mods.
:''YourNameHere''
 
Browse Edition's GameDataFolder and choose the ONI folder as source folder.
Browse Edition's install folder and choose the package folder as target.
 
 
Open AEInstaller and select your test package. Hit "Install!" button.
|valign="top"|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_4C.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_4C_TN.png]
 
 
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_6B.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_6B_TN.png]
|-
!colspan=4|testing the modification
|-
|valign="top"|Let's test our modification. Therefore we start TCTF HQ redux (pre-last level). The supershield becomes automatically switched on at '''51% overpower''' (301 health points). '''"chenille" cheat works too.'''
|[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]
|valign="top"|Let's test our modification. Therefore we start TCTF HQ redux (pre-last level).<br>The supershield becomes automatically switched on at '''51% overpower''' (301 health points). '''"chenille" cheat works too.'''
|[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]
|}


[[Category:Modding tutorials]]
[[Category:Modding tutorials]]

Revision as of 21:32, 14 June 2015

Click to return to the main XML page.

Here's a step-by-step guide to creating a mod through XML modding, using an ONCC modification as an example. It will give you a grasp of the usual tools and workflow. Let's roll!

Open AEInstaller, then Vago
Open the AEI and choose the menu item Tools > Vago GUI (first, Vago has to have been installed via Tools > Manage Tools).
When Vago is opened for the first time, it will ask you to locate the AE installation on your hard drive.
Get Konoko's character file (ONCC) by splitting level0_Final.dat
In Vago, go to the "Levels" tab.
Drag and drop the file level0_Final.dat, found in the directory AE/AEInstaller/vanilla/, into the "Sources" section of the window. Click "Convert".
At the top, click on the blue folder icon. The folder with Vago's converted files will appear. Go into Levels/DAT - ONI FILES/level0_Final/.
Convert the .oni to XML
In the level0_Final/ folder, there will be a lot of files. You want ONCCk4_L.oni. This is the name of the file for the version of Konoko that appears in Chapter 13, as documented here.
Go to Vago's "XML" tab and drag-and-drop ONCCk4_L.oni into the "Sources" section. Click "Convert".
Edit the XML
Click the blue folder icon again and go into "XML/ONI - XML". There should be a file called ONCCk4_L.xml now.
Open that file with a plain-text editor (in Windows, you should use Notepad, and TextEdit will work on the Mac).
Search for the <HasSupershield> tag and change its value from 0 to 1.
Save the file and close it.
Convert the XML back to a .oni
Go to Vago's "XML" tab. In the "From:" popup menu, choose "XML", and the "To:" popup menu should have "ONI" supplied automatically by Vago.
Drag-and-drop your XML file into the "Sources" section. Click "Convert".
Click the blue folder icon again and go into "XML/XML - ONI".
Create a new folder on your hard drive, preferably outside of the VagoWorkspace folder, called "level0_Final", and put your new ONCCk4_L.oni file into it.
For more information on the supershield flag, see XML:ONCC.
Get the file back into Oni
The best way to test your mod is to make an AE package. Vago can help you do this: choose the menu item Tools > AEI Mod Package Wizard.
Fill in all the mandatory fields. Set the Type to "Character". When choosing a package number, follow the suggested numbering range that is auto-filled in Package Number, and click "Check" to see if it has already been used by another package. Hit "Continue" once you have decided on a package number.
Leave the optional fields blank. Hit "Continue".
Drag-and-drop your level0_Final folder into the "Common" section. Hit "Done".
Test your mod
Copy your package folder into AE/AEInstaller/packages/ in your Oni installation.
Open the AEI, locate your mod by looking under the "-Local-" category or by typing its name into the Filter, and install it.
Load Oni's level "TCTF Regional HQ (redux)" (the next-to-last level).
If you raise your health above 150% (301 HP), the supershield will switch on and you will be untouchable. The "chenille" cheat is a handy alternative to finding some hypos, and it will permanently turn on the supershield.