Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 11/17/12 07:11

s10k
Member
Registered: 01/14/07
Website

XML Tools

Been working on and with it a quite while. The main idea was to incorporate it with the Vago GUI, but since my time to work on oni decreased dramatically in last months I will post it here. It may be very useful for some projects already.

==========================================================================================
XmlTools v0.9 Readme
==========================================================================================

########
Overview#
########

XmlTools is a command-line modding tool that operates on XML files, especially those exported by OniSplit. It was developed in C# and works in both Mac OS X (Mono required) and Windows (.NET required).

The initial version was written to help with the development of the Old China level mod. It was then developed further for the purposes of the AE.

It can be used as a standalone tool or as a base for another tools.


########
Features#
########

>>> Modify a chain of values (for example, to reposition an OBAN animation or adjust pelvis height for a TRAM).

>>> Invert a chain of values (for example, invert an OBAN animation).

>>> Add new values to XML elements (for example, add the 'unkillable' flag to some characters in a level).

>>> Remove values from XML elements (for example, remove boss shields from characters in a level).

>>> Replace values in XML elements (for example, increase the health of characters by replacing the old HP value).

>>> Add custom XML to existing files (patch only).

>>> Remove XML from existing files (patch only).

>>> Powerful custom XML editing using javascript (patch only).

>>> Patch file support allows the modder to list multiple commands in a file, on separate lines, to all be performed at once.

##########
How to use#
##########

XmlTools is a console program. If you run the program without parameters you will get all the available options, verbs and parameters.

You can get a more detailed manual how to use it in this page: http://wiki.oni2.net/XmlTools

Download

This version has been abandoned.

Please use XmlTools2 from now:
http://oni.bungie.org/community/forum/v … hp?id=2707
http://wiki.oni2.net/XmlTools

Last edited by s10k (02/08/14 19:02)

Offline

#2 11/17/12 08:11

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: XML Tools

Hmm, fascinating.  So is there a version of the AETools that works with this?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#3 11/17/12 08:11

s10k
Member
Registered: 01/14/07
Website

Re: XML Tools

I think it's on works. You can always do some terminal scripts meanwhile.

Offline

#4 11/17/12 09:11

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: XML Tools

Yup, I have XML Tools running in AETools.

Offline

#5 11/17/12 14:11

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: XML Tools

Can this for example automatically adjust the pelvis heights in a TRAM ?
For example .. When we adopt a move from a comguy to a female character (konoko or fury) we have to subtract a certain value from the pelvis heights of the comguy move so when the female characters do it they don't float.
And vice versa if we give a fury move to a comguy they will sink so we have to add that value to the TRAM of the fem move.
Would it be possible to implement such a feature ?

Example you open a TRAM .. You select source character and target character
example comguy to fury and then it automatically adjusts all the <heights>...</heights> valuse for you by adding / substracting value.

These values are predetermined ( i calculated them before)
we have 4 main cataegories
1.strikers, elites, swats (share same heights no conversion needed between them)
2.comguys, tctf light, thugs and tankers (have lower pelvis heights than first category)
3. Ninjas
4. Konoko and fury's and copfems  (lowest pelvis height)

so you could convert from striker to comguy, from striker to female from comguy to female from striker to ninja, from comguy to ninja, from ninja to female .. And vice versa

for crouched moves (example a crouch kick the values are different (i also have them calculated)

right now i copy all values and use a spread sheet then copy them back and replace but the tags get messed up ... So it's a tideous process, (esp for throw trams) it would be neat if we had something that could do that automatically ..
What do you think tongue ?

Last edited by Samer (11/17/12 14:11)


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#6 11/17/12 16:11

s10k
Member
Registered: 01/14/07
Website

Re: XML Tools

I'm pretty sure that's already possible with this program. I will need however some samples of the files you are trying to change to help you to create the command that you need. Please post the original xml and what you are trying to change to.

That automatically TRAM conversion can be made in a gui application (for example added to vago), but right now I don't have the time. I can however help you building some .bat files which will be already a big help too to automatize the process.

Offline

#7 11/18/12 13:11

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: XML Tools

ok here's what i meant
https://dl.dropbox.com/u/22609960/tram%20xml.zip
I'm going to use the forward throw of the tanker for the hammer. the hammer uses elite\striker idle pose while the tanker uses comguy whose pelvis is lower.
so if i just give the hammer that move as is he'll sink in the ground a bit when he does it. therefore i have to adjust pelvis height, I do that by adding 0.7970685
to the height tags in the original TRAM .. they're in lines 59 to 144 in these xml .
the TRAMTANCOM is the original xml the TRAMHAMCOM is the xml after i added the value.

for conversion between other characters the value to be added or subtracted is different
*Converting between females and Striker/elite/swat (trying to use a female move for striker character) add to the original female move 1.8460934
*between females and comguys/muro/cops/thugs/tankers add 1.0490249
*between comguys and strikers/elites/swats add 0.7970685
*between crouched female move and crouched comguy move add 1.429101 (example a crouch kick of the fury to be use for a comguy)
subtract in the opposite direction.

what i'm hoping for is a tool that automatically finds the height tags in the xml and adds or subtracts the value (depending on from which character to which character the tram is going to be used for, have an option in which u define what is the source character and what is the target character : stiker, female, ninja, comguy) and replaces the tags with the new heights ..

Last edited by Samer (11/18/12 13:11)


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#8 11/18/12 14:11

s10k
Member
Registered: 01/14/07
Website

Re: XML Tools

Right now I don't have the time to do that tool for each character. However you can use xmlTools with a batch file to optimize the process, you will need first calculate the new position then just use the command:

xmlTools.exe -filename TRAMTANCOMthrow_fw.xml -newVal "9.9250085" -valElement Height -valParentElement Heights

Note that I used the new value calculated for the hammer (summed 0.7970685 to original value putted in -newVal parameter), after this all others positions will be automatically updated.

I've also made a batch file to test it which you can use with the xmlTools:
http://www.mediafire.com/?8a8gf2x1vdjxnyh

Here's the code if the link above becomes down:

@echo off
xmlTools.exe -filename TRAMTANCOMthrow_fw.xml -newVal "9.9250085" -valElement Height -valParentElement Heights
pause

If you have multiple TRAMS to update from tanker to hammer you could use the above command plus the "-valRelation" parameter, where you wouldn't need to do the sum for each tanker TRAM I suppose since they are all related.

Last edited by s10k (11/18/12 14:11)

Offline

#9 11/18/12 21:11

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: XML Tools

thanks Script that works smile


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#10 01/14/13 18:01

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 08/13/08

Re: XML Tools

The wonderful thing about C# and .NET in general is that I don't even need to ask anyone for the source code now. *the most stupid smirk you've ever witnessed*
Nice piece of work here. I do hope there is more to come.


Jente, du er deilig, du er lekker, ihvertfall nå når jeg drikker.
Baby, du har det som trengs, hva er sannsynligheten for at vi to hopper til sengs?
Kan du si meg det? Jeg er ikke så stø i sannsynlighetsregning.

Offline

#11 05/25/13 12:05

s10k
Member
Registered: 01/14/07
Website

Re: XML Tools

Added support for custom javascript code for xml editing.

More info here:
http://wiki.oni2.net/XmlTools

Offline

#12 05/25/13 17:05

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: XML Tools

Samer: Here is an example of using XmlTool to change a TRAM's height.

xmlTools.exe updatechainvalues -filename:/Oni/AE/Tools/TRAMELICOMkick_heavy.xml -newvalue:"6.5" -element:Height -parelement:Heights

This command will change the first value of <Height>9.71892</Height> to <Height>6.5</Height> and the rest of the Height values will be changed accordingly.

Note: This change is not a patch, but rather changes a single TRAM file.

Offline

Board footer

Powered by FluxBB