XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 24, 2017 6:51 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: MX vs ATV Reflex BXML files
PostPosted: Mon Nov 29, 2010 11:47 pm 
Offline
ultra-n00b

Joined: Sun Nov 28, 2010 3:51 pm
Posts: 6
Has thanked: 0 time
Have thanks: 0 time














You can make the ads go away by registering

Hello all,

Could somebody please take a look at this BXML format from MX vs ATV Reflex for PC. They seem to be encrypted XML files, the original XML files are still there but the game doesn't read those even after removing the BXML file.

I have uploaded a RAR package with some BXML and XML files here.

It would be much appreciated by the whole MX vs ATV community.


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Wed Dec 01, 2010 7:53 am 
Offline
n00b

Joined: Wed Dec 01, 2010 7:39 am
Posts: 16
Has thanked: 4 times
Have thanks: 0 time
Don't feel bad. I've been working on this for days.

First I thought it was backbase.. I called the company for help.. They said they couldn't help. not anything they're familiar with.

Second I thought it was a BXML file from here. : http://www.cubewerx.com/bxml
I just got out of a conversation with a guy from there.. Here was the conversation...

ME:

I'm a modder. I've been part of modding communities for video games for years. I've always loved the communities and enjoyed creating new things for the them. I'm currently workin on a project for a game called "MX VS ATV Reflex" for the PC. However, I've run into a problem. I have a "BXML File" that I can't seem to edit. I can't find any text editors that will work for it and I've tried EVERYTHING I know with Visual Studio.

I've been going off tutorials because I'm extremely new to all of this. All I want to do, is be able to view and edit the BXML file. The game I'm working on has two files for each name. One file is an XML and another File is a BXML. For example "MXRegistry.xml" and "MXRegistry.BXML" The game doesn't care about the xml files, and I believe these are only there to edit, and pack back into a BXML file. I know that I need to edit the bxmls, but I can't for the life of me, figure out how to edit them.

I've spent days trying to figure this out with no help. If you could help, or shine some light on how to edit a BXML file, I would be extremely appreciative.

HIM:

There are a few different formats for encoding XML data in binary and
I am only familiar with one of them. Send me a hexadecimal dump of the
first 16 bytes of the file (or the whole thing if it's short) and I'll
see if I can help you.

ME:

thank you so much! I think it would be much easier for you if I sent you the bxml files. If you can manage to edit this... I attached the file.

HIM:

Sorry, this isn't the BXML format that I'm familiar with. I don't know
what format your file is in.


So.... To sum it up.. I think we're SOL... I really hope someone can figure this out. I've exhausted my efforts. It's apparently not backbase, nor is it from cube, so... im lost.. lol


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Wed Dec 01, 2010 3:04 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
it uses a very common compression algorithm which is easy to identify.

the bxml format contains some details on the uncompressed data, which uses a string table for the tags which can easily be reproduced in xml format.

quickbms is not the best tool to rebuild the xml file, but if i have time, i'll see how far it can get. 2 minute bms script to at least parse the file:

Code:
idstring "BXML"
get UNKNOWN long # 0x103EA - bxmlformat/engine/game version
get STRINGS long # number of strings in uncompressed data
get P_EOSTR long # point to end of strings in uncompressed data

# room for 2 other numbers + pointers

goto 32

get ZSIZE long

comtype zlib

get NAME basename
string NAME += "_bxml.xml"

clog NAME 0x24 ZSIZE 0xfffff

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Wed Dec 01, 2010 6:46 pm 
Offline
n00b

Joined: Wed Dec 01, 2010 7:39 am
Posts: 16
Has thanked: 4 times
Have thanks: 0 time
well wrs I hope u can figure it out. you'd be the first. I know I'm lost. All I know is that its compressed. I don't know how to decompress it, and re-compress it back into bxml for the game to understand, so I hope you can. lol


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Wed Dec 01, 2010 8:14 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
figuare9 wrote:
well wrs I hope u can figure it out. you'd be the first. I know I'm lost. All I know is that its compressed. I don't know how to decompress it, and re-compress it back into bxml for the game to understand, so I hope you can. lol


use http://aluigi.altervista.org/papers/quickbms.zip and my script to decompress it but converting it to xml is next. just running the script you see how it matches the xml samples.

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Wed Dec 01, 2010 10:44 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
i'll be honest. i didn't see myself spending 3 hours on this format :mrgreen: i didn't really expect quickbms to support recursion too well either - I WAS WRONG!

i've finished a work in progress which works on smaller bxml files but i've overlooked something on node order, and i haven't looked at _valuetype yet, so thats not there.

bxml files doesn't store comments. at all. so recreating them is impossible.

i also decided formatting was worth including, so indenting and one conditional tag syntax is included :scaredy:

see the previous posts for a link to quickbms if you try this version out.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Wed Dec 01, 2010 11:38 pm 
Offline
n00b

Joined: Wed Dec 01, 2010 7:39 am
Posts: 16
Has thanked: 4 times
Have thanks: 0 time
damn that was fasssst! However, I actually don't need BXML to XML.. We need it the other way around. Let me explain.

As you can see in this picture, the game has a BXML file for every XML file. HOWEVER, the game doesn't actually use the xml files. I can run the game completely fine without any of the xml files. I can also edit the XML files and when I start the game nothing I edited works.

What does this mean? It means that the game ONLY uses the BXML files. So... We don't exactly need BXML to XML because the game already provided us with the XML files to edit.... We just need to edit the existing XML files and convert them to the BXML that the game needs to read.

Image


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Thu Dec 02, 2010 12:58 am 
Offline
ultra-n00b

Joined: Sun Nov 28, 2010 3:51 pm
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
Wow great work! If only we can compile them back to BXML now!

@figure9: We do need the ability to convert BXML to XML because there some some files, the camera presets for example that do not have an original XML in place.


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Thu Dec 02, 2010 1:12 am 
Offline
n00b

Joined: Wed Dec 01, 2010 7:39 am
Posts: 16
Has thanked: 4 times
Have thanks: 0 time
a lot of people that mod have very basic knowledge of anything besides photoshop and 3d modeling. If someone could develop an application that can give us "BXML to XML" and vise-versa, we would be in perfect business.I'm one of those people. I don't know C, and I don't like software im unfamiliar with. I think that goes for a lot of people. What we really need is an app that can do the bxml crap for us.


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Thu Dec 02, 2010 1:24 am 
Offline
ultra-n00b

Joined: Sun Nov 28, 2010 3:51 pm
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
figuare9 wrote:
a lot of people that mod have very basic knowledge of anything besides photoshop and 3d modeling. If someone could develop an application that can give us "BXML to XML" and vise-versa, we would be in perfect business.I'm one of those people. I don't know C, and I don't like software im unfamiliar with. I think that goes for a lot of people. What we really need is an app that can do the bxml crap for us.


Well we're halfway there now. Editing the XML is very easy with just notepad, though I use Dreamweaver myself.


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Thu Dec 02, 2010 2:09 am 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
it should be easy to convert back if anyone had the time do write it in a slightly more powerful language.

i just came back to post a spec i just wrote up with the corrections to how the node levels are stored in the last section of the uncompressed data.

Code:
BXML FORMAT
-----------

Signature (4 bytes, ASCII "BXML")
Version
StringCount
PoolPointer
PoolSize
AttributeCount
NodeCount
Unknown (0)
CmpSize

Followed by data (with a length of CmpSize) compressed with zlib:

UNCOMPRESSED DATA FORMAT
------------------------

String table (variable size):

Null-terminated strings


Pool (size of PoolSize):

Mixture of integer, boolean and floating point values


Attribute table (12 bytes):

ANameIndex
AValueIndex
AOther


Node table (32 bytes):

NNameIndex
NInnerTextIndex
NUsesPool
NValueType
NLevelId
NChildCount
NAttribIndex
NAttribCount

NODE TABLE INFO
---------------

All nodes on the same level are stored together

Level0
Level1
Level2
.. etc

There must only be 1 top level node at level 0 (named after the filename).

Property info:

NInnerTextIndex will have a value of -1 if there is no inner text.
NUsesPool is a boolean, if 1, the inner text is from the Pool.
NValueType with a value greater than 0 adds a "_valuetype" attribute:

(NOTE: NOT ALL VALUETYPES HAVE BEEN FOUND)

1: "string" (does not seem to use the pool)
3: "int"
5: "float"

11: "bool (either "T", "F" or "true" or "false")

There is also a vector3 type (MXRegistry.bxml)


NLevelID is the sum of the previous levels' NLevelID + NChildCount

NAttribCount is each attribute starting from NAttribIndex



The string table is just a list of all the unique strings in the XML document, which are referenced by the various name indexes.

This format was fun, thanks :wink:

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Thu Dec 02, 2010 3:53 am 
Offline
ultra-n00b

Joined: Sun Nov 28, 2010 3:51 pm
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
WRS wrote:
This format was fun, thanks :wink:


And thank you, this is a great step in the right direction! Not long before our community can continue modding the MvA series. :)


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Fri Dec 03, 2010 2:16 am 
Offline
n00b

Joined: Wed Dec 01, 2010 7:39 am
Posts: 16
Has thanked: 4 times
Have thanks: 0 time
WRS, I don't suppose you can make a tool to allow us to convert XML to BXML?


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Sun Dec 05, 2010 7:17 am 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
figuare9 wrote:
WRS, I don't suppose you can make a tool to allow us to convert XML to BXML?


i have spent a little longer on this format as the recursion thing was itching at me... and i finished a bxml to xml converter - but even that's missing some value types which aren't in the samples.

to repack i need to figure out how to read the xml tree recursively into the bxml table.. with all those indexes too :wink:

for now, see if you run into any trouble converting larger bxml files to xml - my pascal was a little rusty! source is included.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: MX vs ATV Reflex BXML files
PostPosted: Sun Dec 05, 2010 7:09 pm 
Offline
n00b

Joined: Wed Dec 01, 2010 7:39 am
Posts: 16
Has thanked: 4 times
Have thanks: 0 time
That's great! You'd definitely be the first to figure this one out. If you can get this done maybe I'll donate some cash your way for your efforts. I know there would be a lot of people that are gunna love you for this! haha


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group