XML:Basic tutorial: Difference between revisions
Paradox-01 (talk | contribs) m (fixed link) |
Paradox-01 (talk | contribs) mNo edit summary |
||
Line 201: | Line 201: | ||
{{table}} | {{table}} | ||
|General information. | |General information. | ||
: In which level is chapter X stored? See [[GDF|HERE]]. | : In which level is chapter X and its files I'm searching for stored? See [[GDF|HERE]]. | ||
: [[Image:Aqua Dot-Green.png]] : | : XML documentation status: | ||
: [[Image:Aqua Dot-Yellow.png]] : | : [[Image:Aqua Dot-Green.png]] : available | ||
: [[Image:Aqua Dot-Red.png]] : | : [[Image:Aqua Dot-Yellow.png]] : incomplete | ||
: [[Image:Aqua Dot-Grey.png]] : | : [[Image:Aqua Dot-Red.png]] : not available, but that doesn't mean you cannot mod the file type | ||
: [[Image:Aqua Dot-Grey.png]] : not available, useless file type | |||
|- | |||
|'''[[OBD:AKEV|AKEV]]''' [[Image:Aqua Dot-Red.png]] / [[Image:Aqua Dot-Grey.png]] | |||
:Akira Environment. You can take a look into it but it's not recommended to tweak this by hand at all. | |||
|- | |- | ||
|'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/CHAR|CHAR]]''' [[Image:Aqua Dot-Yellow.png]] | |'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/CHAR|CHAR]]''' [[Image:Aqua Dot-Yellow.png]] | ||
Line 241: | Line 245: | ||
|- | |- | ||
|'''BINA/OBCJ/[[OBD:BINA/OBJC/SNDG|SNDG]]''' [[Image:Aqua Dot-Red.png]] | |'''BINA/OBCJ/[[OBD:BINA/OBJC/SNDG|SNDG]]''' [[Image:Aqua Dot-Red.png]] | ||
: List of sound "groups" (spheres) in a specific level. | : 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]] | |'''BINA/OBCJ/[[OBD_talk:BINA/OBJC/TRGV|TRGV]]''' [[Image:Aqua Dot-Green.png]] | ||
Line 259: | Line 262: | ||
: 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 source type and the material which is hit. | : 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 source type and the material which is hit. | ||
|- | |- | ||
|'''[[OBD_talk:BINA/PAR3#XML_section| | |'''BINA/[[OBD_talk:BINA/PAR3#XML_section|PAR3]]''' [[Image:Aqua Dot-Yellow.png]] | ||
: 3D particle. Particle are used as weapon's damage doer, decals and light effects. | : 3D particle, also known as 3RAP and PART files. Particle are used as weapon's damage doer, decals and light effects. | ||
|- | |- | ||
|'''BINA/[[OBD_talk:BINA/TMBD|TMBD]]''' [[Image:Aqua Dot-Green.png]] | |'''BINA/[[OBD_talk:BINA/TMBD|TMBD]]''' [[Image:Aqua Dot-Green.png]] | ||
Line 274: | Line 277: | ||
: Movement record. Usually used for cutscenes. During that time of animation, AIs have no AI. ^_^ | : Movement record. Usually used for cutscenes. During that time of animation, AIs have no AI. ^_^ | ||
|- | |- | ||
|'''[[OBD:HPge|HPge]]''' [[Image:Aqua Dot- | |'''[[OBD:HPge|HPge]]''' [[Image:Aqua Dot-Red.png]] | ||
: Help page. | : Help page. | ||
|- | |- | ||
|'''[[OBD:IGHH|IGHH]]''' [[Image:Aqua Dot-Red.png]] | |'''[[OBD:IGHH|IGHH]]''' [[Image:Aqua Dot-Red.png]] | ||
Line 285: | Line 288: | ||
|'''[[OBD_talk:Impt|Impt]]''' [[Image:Aqua Dot-Green.png]] | |'''[[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. | : Impact. This file is used to build up the hierarchy of impacts. See [[OBD_talk:BINA/ONIE|ONIE]] for more information. | ||
|- | |||
|'''[[OBD:M3GM|M3GM]]''' [[Image:Aqua Dot-Red.png]] | |||
:Geometry. Some of these 3D objects are used by OBANs and PAR3 files. | |||
|- | |- | ||
|'''[[OBD_talk:Mtrl|Mtrl]]''' [[Image:Aqua Dot-Green.png]] | |'''[[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. | : Material. This file is used to build up the hierarchy of materials. See [[OBD_talk:BINA/ONIE|ONIE]] for more information. | ||
|- | |||
|'''[[OBD:OBAN|OBAN]]''' [[Image:Aqua Dot-Red.png]] | |||
:Object Animation. Yes, used by objects but also for moving characters and cutsceen cams. | |||
|- | |- | ||
|'''[[OBD_talk:ONCC|ONCC]]''' [[Image:Aqua Dot-Yellow.png]] | |'''[[OBD_talk:ONCC|ONCC]]''' [[Image:Aqua Dot-Yellow.png]] | ||
Line 301: | Line 310: | ||
|'''[[OBD:ONLD|ONLD]]''' [[Image:Aqua Dot-Red.png]] | |'''[[OBD:ONLD|ONLD]]''' [[Image:Aqua Dot-Red.png]] | ||
: Level descriptor. In other words it is the level name in the save game menu. | : Level descriptor. In other words it is the level name in the save game menu. | ||
|- | |||
|'''[[OBD:ONLV|ONLV]]''' [[Image:Aqua Dot-Red.png]] | |||
:Oni Game Level. Holds among other things: BSL folder name (<Name>), AKEV (Akira Environment) link, ONSK (Oni sky) link, and a link to AISA (AI Character Setup Array which is a bit obsolent because of [[OBD_talk:BINA/OBJC/CHAR|CHAR]]). | |||
|- | |- | ||
|'''[[OBD:ONSK|ONSK]]''' [[Image:Aqua Dot-Red.png]] | |'''[[OBD:ONSK|ONSK]]''' [[Image:Aqua Dot-Red.png]] | ||
Line 310: | Line 322: | ||
|'''[[OBD_talk:ONWC|ONWC]]''' [[Image:Aqua Dot-Red.png]] | |'''[[OBD_talk:ONWC|ONWC]]''' [[Image:Aqua Dot-Red.png]] | ||
: Weapon class. Contains primary and secondary fire mode, more flags, particle, 3D model, and textures. | : Weapon class. Contains primary and secondary fire mode, more flags, particle, 3D model, and textures. | ||
|- | |- | ||
|'''[[OBD_talk:OPge|OPge]]''' [[Image:Aqua Dot-Green.png]] | |'''[[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. | : Objective page. That's the place where you can write the objective for a new or modified level. | ||
|- | |||
|'''[[OBD:OSBD|OSBD]] [[Image:Aqua Dot-Red.png]] | |||
:Oni Sound Binary Data. | |||
|- | |- | ||
|'''[[OBD_talk:PSpc|PSpc]]''' [[Image:Aqua Dot-Green.png]] | |'''[[OBD_talk:PSpc|PSpc]]''' [[Image:Aqua Dot-Green.png]] | ||
Line 326: | Line 338: | ||
: Part Specifications UI (User Interface). | : Part Specifications UI (User Interface). | ||
|- | |- | ||
|'''[[ | |'''[[OBD_talk:TRAC|TRAC]]''' [[Image:Aqua Dot-Green.png]] | ||
: Animation collection. Every character can move and fight thanks to a collection. | : Animation collection. Every character can move and fight thanks to a collection. | ||
|- | |- | ||
Line 335: | Line 347: | ||
: Laser trigger emitter. This file type holds the 3D model and it's coordinates. Used by TRIG. | : Laser trigger emitter. This file type holds the 3D model and it's coordinates. Used by TRIG. | ||
|- | |- | ||
|'''[[OBD:TRMA|TRMA]]''' [[Image:Aqua Dot- | |'''[[OBD:TRMA|TRMA]]''' [[Image:Aqua Dot-Red.png]] | ||
: Character's texture map array. Every [[OBD:TRIA#Bones|body part]] is covered by textures. This file type holds links to those textures. | : Character's texture map array. Every [[OBD:TRIA#Bones|body part]] is covered by textures. This file type holds links to those textures. | ||
|- | |||
|'''[[OBD:TRSC|TRSC]]''' [[Image:Aqua Dot-Red.png]] | |||
:Screen (Aiming) Collection. Used for make characters aim with weapons. | |||
|- | |- | ||
|'''[[OBD_talk:TXMB|TXMB]]''' [[Image:Aqua Dot-Green.png]] | |'''[[OBD_talk:TXMB|TXMB]]''' [[Image:Aqua Dot-Green.png]] | ||
Line 359: | Line 374: | ||
: Weapon page. That's the place where you can write descriptions page about a specific weapon. | : Weapon page. That's the place where you can write descriptions page about a specific weapon. | ||
|} | |} | ||
==working with XML files: good to know== | ==working with XML files: good to know== |
Revision as of 10:18, 31 March 2010
XML 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"
- Install instructions are on same page.
- Windows user will want to get "OniSplit GUI"
- Unpack and put the executables into your "GameDataFolder" inside "edition" folder.
- Mac user will want to get "AETools"
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 PC, read right side if you use a Windows PC.
converting an ONI file into an XML file | |||
---|---|---|---|
Open Edition's AETools_Data folder and create a new folder named "ONIfiles".
|
Open Edition's GameDataFolder and create two new folders named "XML" and "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 | |||
Choose "Convert" tab. Now click onto "Select File(s) for Conversion" button and mark "ONCCk4_L.xml". Click "Choose" button. Then click "Select Destination Folder". Search for your ONIfiles folder, mark it, and click "Choose button."
|
Goto "XML -> ONI" section. Click first browse button and search for "ONCCk4_L.xml" inside the XML folder. Click second browse button and choose the ONI folder as target. Now click on Convert button.
|
||
creating and installing a mod package | |||
Choose "Package" tab.
The GUI is actually pretty much self-explaining.
|
|
Click on GUI's "AE Package" tab.
Browse Edition's GameDataFolder and choose the ONI folder as source folder. Browse Edition's install folder and choose the package folder as target.
|
|
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.
|
AKEV /
|
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/PAR3
|
BINA/TMBD
|
CONS
|
DPge
|
FILM
|
HPge
|
IGHH
|
IPge
|
Impt
|
M3GM
|
Mtrl
|
OBAN
|
ONCC
|
ONCV
|
ONGS
|
ONLD
|
ONLV
|
ONSK
|
ONVL
|
ONWC
|
OPge
|
OSBD
|
PSpc
|
PSpL
|
PSUI
|
TRAC
|
TRAM
|
TRGE
|
TRMA
|
TRSC
|
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. Destroying the structure doesn't affect the reconversion but it is 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.)
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".)
XML advanced tutorial
Read on HERE.