XML:Basic tutorial: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (..)
m (better link for supershield details)
 
(79 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=XML modding: getting started=
{{XML Home}}
'''What is XML modding?'''
: 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?'''
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!
: [[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?'''
: '''Open AEInstaller, then Vago'''
: OniSplit cannot be opened in a classic way. But you are lucky. Now we have a GUI (graphical user interface) for it.
:: Open the AEI and choose the menu item Tools > Vago GUI (first, Vago has to have been installed via Tools > Manage Tools).
:: Mac user will want to get '''"[http://edt.oni2.net/AETools/AEToolsBeta.zip AETools (Beta)]"'''
:: When Vago is opened for the first time, it will ask you to locate the AE installation on your hard drive.
::: Unpack and put "AETool" and "AETools_Data" into your "edition" folder.
:: Windows user will want to get '''"[http://drop.io/demos_kratos/asset/0-6-rar OniSplit GUI v0.6]"'''
::: Unpack and put the executables into your "edition" folder.


'''Is there an easy exercise to get me started?'''
: '''Get Konoko's character file (ONCC) by splitting level0_Final.dat'''
: Just see at the following table. Read left side if you use a Macintosh, read right side if you use Windows.
:: 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 [[Konoko's outfits|documented here]].
:: Go to Vago's "XML" tab and drag-and-drop ONCCk4_L.oni into the "Sources" section. Click "Convert".


{|
: '''Edit the XML'''
{{table}}
:: Click the blue folder icon again and go into "XML/ONI - XML". There should be a file called ONCCk4_L.xml now.
!colspan=4|converting an ONI file into an XML file
:: 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'''.
|valign="top"|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".
:: Save the file and close it.
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img1.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img1_TN.png]
|valign="top"|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".
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img1.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img1_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.
|[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.
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img2.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img2_TN.png]
|-
!colspan=4|creating, <font color="#999999">debugging,</font> and transporting the file
|-
|valign="top"|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.


: '''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.


Now click on "Import source file" button. Navigate to your XML file, select it and click "Choose source" button.
[[Image:HasSupershield_1.png|thumb|200px|right|For more information on the supershield flag, see [[Supershield]].]]
: '''Get the file back into Oni'''
:: 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 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.


<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>
[[Category:Modding tutorials]]
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img3.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img3_TN.png]
 
 
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img4.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img4_TN.png]
|valign="top"|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".
 
 
<font color="#888888">Try [[#way_without_Windows_GUI:_local_called_CMD|THIS]] method if no oni file was created. Use then "onisplit -create created extracted/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>
 
 
Copy the file from "created" folder and insert it into the "level0_Final" folder which is located in the "GameDataFolder". Confirm the replacement.
 
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img3.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img3_TN.png]
 
 
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img4.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img4_TN.png]
|-
!colspan=4|recombining the level archive
|-
|valign="top"|Click on "Select Level to rebuild" and then "LEVEL 0: GLOBAL DATA".
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img5.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_mac_img5_TN.png]
|valign="top"|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.
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img5.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/XML_tutorial_img5_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 healh 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). The supershield becomes automatically switched on at 51% overpower (301 healh 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]
|}
 
 
'''Okay. What mod possibilities do I have?'''
: 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.
: 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]].
:: Check also [[Anniversary_Edition/Team#Current_To-Do|AE's current To-Do page]] and maybe there are fields that need a modder.
 
 
==supported file types==
 
{|
{{table}}
|General information.
: In which level is chapter X stored? See [[GDF|HERE]].
: [[Image:Aqua Dot-Green.png]] : XML documentation available
: [[Image:Aqua Dot-Yellow.png]] : XML documentation available but incomplete
: [[Image:Aqua Dot-Red.png]] : XML documentation not available but that doesn't mean you cannot mod the file type
: [[Image:Aqua Dot-Grey.png]] : XML documentation not needed / uninteresting file type
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/CHAR|CHAR]]''' [[Image:Aqua Dot-Yellow.png]]
: List of characters in a specific level. There you can setup their position, script name, weapon, ammunition, items, team, combat, melee id, etc..
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/CONS|CONS]]''' [[Image:Aqua Dot-Green.png]]
: List of consoles in a specific level. There you can setup their position, script name (Id), screen images, and script functions. Basically they are used to open doors.
|-
|'''BINA/OBCJ/[[OBD:BINA/OBJC/CMBT|CMBT]]''' [[Image:Aqua Dot-Red.png]]
: List of combat profiles for global use. There you can set AI's conditions for hand-to-hand, weapon combat, and retreat - in dependence of distances and enemy's counterattack.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/DOOR|DOOR]]''' [[Image:Aqua Dot-Green.png]]
: List of doors in a specific level. There you write conditions when a door opens (or not), and what events are triggered by a character who come passes/comes near the door.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/FLAG|FLAG]]''' [[Image:Aqua Dot-Green.png]]
: List of flags in a specific level. There you can setup their position. They are used by script commands and patrol paths.
|-
|'''BINA/OBCJ/[[OBD:BINA/OBJC/FURN|FURN]]''' [[Image:Aqua Dot-Grey.png]]
: List of furniture in a specific level. This file type could be extract as XML file but it's obsolete, nothing more than a relict from time of development.
|-
|'''BINA/OBCJ/[[OBD:BINA/OBJC/MELE|MELE]]''' [[Image:Aqua Dot-Red.png]]
: List of melee profiles for global use. It means how the AI use it's combat moves.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/NEUT|NEUT]]''' [[Image:Aqua Dot-Green.png]]
: List of neutral behaviors in a specific level. Every character has melee, combat and netral behavior Id. It determines whether a non-player character (NPC) talks to you or not, this includes also rewards you could get from such characters.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/PART|PART]]''' [[Image:Aqua Dot-Green.png]]
: List of particle in a specific level. There you can setup their position, script name and scaling.
|-
|'''BINA/OBCJ/[[OBD:BINA/OBJC/PATR|PATR]]''' [[Image:Aqua Dot-Green.png]]
: List of patrol paths in a specific level. A patrol path has an Id which is used by CHAR and script command "ai2_dopath".
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/PWRU|PWRU]]''' [[Image:Aqua Dot-Green.png]]
: List of powerups (items, e.g. hyposprays) in a specific level which are spawned at level load. There you can setup their position.
|-
|'''BINA/OBCJ/[[OBD:BINA/OBJC/SNDG|SNDG]]''' [[Image:Aqua Dot-Red.png]]
: List of sound "groups" (spheres) in a specific level.
: It used to create sound spheres. Come near a machine and you might hear a sound, that's because of SNDG.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/TRGV|TRGV]]''' [[Image:Aqua Dot-Green.png]]
: List of trigger volumes in a specific level. They are invisible areas which trigger script functions, this depends on character's team Id.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/TRIG|TRIG]]''' [[Image:Aqua Dot-Green.png]]
: List of laser triggers in a specific level. There exist several forms and can trigger not only script functions.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/TURR|TURR]]''' [[Image:Aqua Dot-Green.png]]
: List of turrets in a specific level. Not that their pods are part of the level geometry. Spawn one additional and it might be located somewhere in the air. Basicly you can setup their head's position, the weapon inside the turrent head, and the team Id which is the target.
|-
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/WEAP|WEAP]]''' [[Image:Aqua Dot-Green.png]]
: List of weapons in a specific level which are spawned at level load. Actually only the position of them is set there.
|-
|'''BINA/[[OBD_talk:BINA/ONIE|ONIE]]''' [[Image:Aqua Dot-Yellow.png]]
: ONIE is a list of all impacts effects which can happen in the game. That includes weapon particle, hand-to-hand combat and movements. The impact effects depends on sorce type and the material which is hit.
|-
|'''BINA/[[OBD_talk:BINA/TMBD|TMBD]]''' [[Image:Aqua Dot-Green.png]]
: TMBD is a list of all materials in the game which groups texture map under them. That way environment gets materials which are used by ONIE.
|-
|'''[[OBD:CONS|CONS]]''' [[Image:Aqua Dot-Red.png]]
: Console. You can write there user's position and facing and also the screen images.
|-
|'''[[OBD_talk:DPge|DPge]]''' [[Image:Aqua Dot-Green.png]]
: Diary page. You what to write a page for a new level or alternative story then there you go.
|-
|'''[[OBD_talk:FILM|FILM]]''' [[Image:Aqua Dot-Green.png]]
: Movement record. Usually used for cutscenes. During that time of animation, AIs have no AI. ^_^
|-
|'''[[OBD:HPge|HPge]]''' [[Image:Aqua Dot-Grey.png]]
: Help page. But, ahm, who wants to mod that?
|-
|'''[[OBD:IGHH|IGHH]]''' [[Image:Aqua Dot-Red.png]]
: In-game HUD. That's your health bar, compass, etc..
|-
|'''[[OBD_talk:IPge|IPge]]''' [[Image:Aqua Dot-Green.png]]
: Item page. If you have created a new item then there you can describe it, give warnings, whatever.
|-
|'''[[OBD_talk:Impt|Impt]]''' [[Image:Aqua Dot-Green.png]]
: Impact. This file is used to build up the hierarchy of impacts. See [[OBD_talk:BINA/ONIE|ONIE]] for more information.
|-
|'''[[OBD_talk:Mtrl|Mtrl]]''' [[Image:Aqua Dot-Green.png]]
: Material. This file is used to build up the hierarchy of materials. See [[OBD_talk:BINA/ONIE|ONIE]] for more information.
|-
|'''[[OBD_talk:ONCC|ONCC]]''' [[Image:Aqua Dot-Yellow.png]]
: Character class. It contains weapon skills, behavior Ids, view radius, jump power, sounds, 3D model (TRBS), animation collection (TRAC), textures (TRMA), and much more.
: The XML file contains also the character's body part material (CBPM), body part impacts (CBPI), and particles for animations (ONCP and ONIA).
|-
|'''[[OBD_talk:ONCV|ONCV]]''' [[Image:Aqua Dot-Green.png]]
: Character variant. 1) It's used to build up the hierarchy of randomness pools. Some characters with different appearance can form a pool for randomness. A flag in CHAR determinze if a character use one of these pools. 2) It can be also used to upgrade characters on difficult level hard - enabled by a flag in CHAR.
|-
|'''[[OBD_talk:ONGS|ONGS]]''' [[Image:Aqua Dot-Yellow.png]]
: Game settings. There you can modify the values of the health bar, hypospray strength, game difficult setting, at what distance item glow is displayed, and autoprompts (text message when picking up a new kind of item).
|-
|'''[[OBD:ONLD|ONLD]]''' [[Image:Aqua Dot-Red.png]]
: Level descriptor. In other words it is the level name in the save game menu.
|-
|'''[[OBD:ONSK|ONSK]]''' [[Image:Aqua Dot-Red.png]]
: Sky. It's design as box so you will need five images. (The buttom has of course no image.)
|-
|'''[[OBD_talk:ONVL|ONVL]]''' [[Image:Aqua Dot-Green.png]]
: Variant list of characters. It's used for randomize characters' appearance.
|-
|'''[[OBD_talk:ONWC|ONWC]]''' [[Image:Aqua Dot-Red.png]]
: Weapon class. Contains primary and secondary fire mode, more flags, particle, 3D model, and textures.
|-
|'''[[OBD_talk:OPge|OPge]]''' [[Image:Aqua Dot-Green.png]]
: Objective page. That's the place where you can write the objective for a new or modified level.
|-
|'''[[User:Paradox-01/for_WIP_pages#BINA.2FPAR3:_particle|PAR3]]''' [[Image:Aqua Dot-Yellow.png]]
: 3D particle. Particle are used as weapon's damage doer, decals and light effects.
|-
|'''[[OBD_talk:PSpc|PSpc]]''' [[Image:Aqua Dot-Green.png]]
: Part specification. Oni can decorate a page (OPge, TxtC, maybe other too) with images from one source. You write  coordinates there which means these parts.
|-
|'''[[OBD:PSpL|PSpL]]''' [[Image:Aqua Dot-Red.png]]
: Part specification list.
|-
|'''[[OBD:PSUI|PSUI]]''' [[Image:Aqua Dot-Red.png]]
: Part Specifications UI (User Interface).
|-
|'''[[OBD:TRAC|TRAC]]''' [[Image:Aqua Dot-Red.png]]
: Animation collection. Every character can move and fight thanks to a collection.
|-
|'''[[OBD:TRAM|TRAM]]''' [[Image:Aqua Dot-Red.png]]
: Animation. Theoretical it's possible to write animations in XML but so far nobody has been crazy enough to do that. The format might change in near future enabling real animation modding. At the moment we use it only for minor tweaks and particle links.
|-
|'''[[OBD:TRGE|TRGE]]''' [[Image:Aqua Dot-Red.png]]
: Laser trigger emitter. This file type holds the 3D model and it's coordinates. Used by TRIG.
|-
|'''[[OBD:TRMA|TRMA]]''' [[Image:Aqua Dot-Grey.png]]
: Character's texture map array. Every [[OBD:TRIA#Bones|body part]] is covered by textures. This file type holds links to those textures.
|-
|'''[[OBD_talk:TXMB|TXMB]]''' [[Image:Aqua Dot-Green.png]]
: Big texture map. Only used for spalsh screens, you know .. these big Intro, WinLevel and LoseLevel images.
|-
|'''[[OBD_talk:TXMP|TXMP]]''' [[Image:Aqua Dot-Red.png]]
: Texture map. Well, this type covers all images in Oni. (TXMB are actually TXMP too.)
|-
|'''[[OBD_talk:TxtC|TxtC]]''' [[Image:Aqua Dot-Green.png]]
: Console text. Each time you access a console you get a text page. That's TxtC.
|-
|'''[[OBD:WMCL|WMCL]]''' [[Image:Aqua Dot-Red.png]]
: Window menu cursor list. Mouse pointer(s).
|-
|'''[[OBD_talk:WMDD|WMDD]]''' [[Image:Aqua Dot-Green.png]]
: Window Menu Dialog Data. It shapes pages like TxtC and WPge. However, new button functions would require engine modding.
|-
|'''[[OBD:WMM|WMM]]''' [[Image:Aqua Dot-Red.png]]
: Window menu menu.
|-
|'''[[OBD_talk:WPge|WPge]]''' [[Image:Aqua Dot-Green.png]]
: Weapon page. That's the place where you can write descriptions page about a specific weapon.
|}
 
==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. [http://www.microsoft.com/express/download/ Microsoft Visual ... Express] and [http://developer.apple.com/technology/Xcode.html 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.
 
{|
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/collapse_code.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/collapse_code_preview.png]<br>Windows (Visual C++)
|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/hover_an_instance.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/hover_an_instance_preview.png]<br>Windows
|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/code_folding.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/code_folding_preview.png]<br>Macintosh (xcode)
|}
 
 
==way without Windows GUI: window address bar==
{| border=0 cellspacing=20 cellpadding=0 align=right
| [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/window_address_bar.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/window_address_bar_preview.png]
|}
Put the '''[[OniSplit|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'''
{| border=0 cellspacing=20 cellpadding=0 align=right
|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/level_recombine.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/level_recombine_preview.png]
|}
 
 
'''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 '''[[OniSplit|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".)

Latest revision as of 15:56, 9 May 2024

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 Supershield.
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.