XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Thu Nov 23, 2017 1:22 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Unreadable Game Data XMLs
PostPosted: Sat Sep 30, 2017 8:29 am 
Offline
n00b

Joined: Mon Sep 25, 2017 2:14 am
Posts: 11
Has thanked: 0 time
Have thanks: 0 time














You can make the ads go away by registering

I have a list of XML files that i want to edit from WADs I've extracted from the game called Wizard101 (GameBryo Engine if that helps).

I believe these XML's contain the game code for their respective areas (example: extracting MB_Arena.wad gives me the textures, the model and these XML's).

My only issue is upon opening these XML's in Notepad, WordPad etc.. I am greeted with strange characters that I cannot understand (let alone make edits to).

My goal is to edit the areas code so that teleporting to the area as a spectator would teleport my character on the battle circle and not in the spectator area (maybe with triggers.xml so that it adds me into battle always, or spawndata.xml to spawn my character onto the battle circle.. (as colliding with the circle joins you into battle automatically).

Can anyone translate the code in these XML's or help me read it? (Note: I believe the mechanics were written mainly in C/C++)

EXAMPLE XML'S + OTHER DATA FROM MB_ARENA.WAD HERE:

http://www.mediafire.com/file/99ore2ia8 ... +Arena.rar


Attachments:


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



Last edited by ReedSteed on Sun Oct 01, 2017 12:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Unreadable Game Data XMLs
PostPosted: Sat Sep 30, 2017 10:23 am 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 593
Has thanked: 70 times
Have thanks: 127 times
These are "binary" xml files - xml files packed into data.

Interestingly portals.xml is actual xml :mrgreen:

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: Unreadable Game Data XMLs
PostPosted: Sat Sep 30, 2017 11:50 am 
Offline
n00b

Joined: Mon Sep 25, 2017 2:14 am
Posts: 11
Has thanked: 0 time
Have thanks: 0 time
WRS wrote:
These are "binary" xml files - xml files packed into data.


Is there any way I can open/edit these binaries properly?


Top
 Profile  
 
 Post subject: Re: Unreadable Game Data XMLs
PostPosted: Sat Sep 30, 2017 1:45 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 593
Has thanked: 70 times
Have thanks: 127 times
What tools did you use to unpack the 'WAD's? I'm thinking there may be other tools like XML converting for this engine? Some of these other files like NIF are graphics files which would need converting to read..

Otherwise we can look at examining it

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: Unreadable Game Data XMLs
PostPosted: Sat Sep 30, 2017 2:33 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 593
Has thanked: 70 times
Have thanks: 127 times
Here, I've written a script which can parse all files. Not sure how to reconstruct them to xml yet! Check back later

Code:
// binary template for 010 editor. save as FILENAME.bt
// wrs

/////////////////////////////////
typedef uint uint_p2 <read=ReadUIntP2>;

uint unpackLen(uint len)
{
  // len is is bits (x8 larger than it need be)
  // odd values are restored

  local int b = (len>>3);// + (len&0x7);
  //Printf("%u ==> %u (%u)**\n", len, b, (len&0x7));

if( (len&0x7) == 1 ){ b++; }

  return b - 4;//sizeof(uint);
}

// 010ed magic
string ReadUIntP2( uint_p2 b ) {
  string s;   
  SPrintf( s, "%u", unpackLen(b) );
  return s;
}
/////////////////////////////////
struct
{
  char Magic[4];
  Assert(Magic=="BINd");

  uint Version;
  Assert(Version==7);

} BINdHeader;
/////////////////////////////////
struct str(int size)
{
  byte len;

  if(size!=-1)
  Assert((len/2)==size);
  //Printf("Expected: %u\n",size);
  //Printf("Read:     %u\n",len/2);

  char cstr[len/2];

  Printf("%s\n", cstr);
};
/////////////////////////////////
struct ChunkBit
{
  uint_p2 len;
union{
  byte bits[unpackLen(len)];
  struct {
    uint tag <format=hex>;
    if( (tag &0xFF) == 0x10 ) {
      str astr(-1);
    }
  } s;
} u;
};
/////////////////////////////////

union un
{
  byte a[8];

  struct
  {
    byte a, b, c, d;
    uint_p2 len;
  } b;
};

/////////////////////////////////
struct
{
  byte flags[4];
  uint_p2 len_first; // from this offset -> eof


  // first chunk
  uint_p2 len; // from this offset -> eof
  byte unknown[4];
  byte cnt_2;

  local uint cnt = cnt_2/2;
  if( cnt > 0 ) {
    struct {
       un hdr;
       local uint max = unpackLen(hdr.b.len);
       local uint size = 0;
      struct {
         while(size<max) {
         ChunkBit cs;
         size += sizeof(cs);
         }
      } data;
     
    } chunk[cnt] <optimize=false>;
  }

} data;

/////////////////////////////////

Assert(FEof());

/////////////////////////////////

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: Unreadable Game Data XMLs
PostPosted: Sun Oct 01, 2017 12:03 am 
Offline
n00b

Joined: Mon Sep 25, 2017 2:14 am
Posts: 11
Has thanked: 0 time
Have thanks: 0 time
WRS wrote:
What tools did you use to unpack the 'WAD's?


QuickBMS, using scripts I've found on this forum. I repack WAD's using a python shell written specifically for this game.


WRS wrote:
Some of these other files like NIF are graphics files which would need converting to read..


I have opened the NIF's with NifSkope and it opens older versions just fine, but making any edits to the NIF either in hex or in NifSkope causes a game client crash upon entering the Marlybone Arena. (that post here: http://forum.xentax.com/viewtopic.php?f=16&t=17074)

WRS wrote:
Here, I've written a script which can parse all files.



Executing the script on the XML's provide me with data I still can't exactly understand! Can we define what each of these do so I can edit accordingly?


Attachments:


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



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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