xdata Template

Socius Decennalis
Decennium
Joined
Jan 5, 2009
Messages
342
Reaction score
392
as i promised, since guild emblem tool is now released (here) i will share my xdata Template, useful things about this: easy to edit hashes, easy to find magic key and easy to add new files/hashes to it :P

filename: xdata Template.bt
Code:
//--------------------------------------##
// Game: CABAL Online
// File: xdata.enc (unpacked)
// Description: Template for CABAL's xdata file
//--------------------------------------##
// Author: x30
// Website: http://cabal.ws
//--------------------------------------##

//-Local-Variables----------------------

local int x=0;

//-Enumerations-------------------------

typedef struct {
    char name[260];
} Folder<read=FolderName>;

typedef struct {
    byte folder_index<read=FolderNameIndex>;
    char name[60];
    byte unk1;
    char hash[32];
    byte unk2;
} File<read=FileNameRead, write=FileHashWrite>;

//-Functions----------------------------

string FolderName(Folder &f) {
    string s;
    SPrintf(s, "%s", f.name);
    return s;
}

string FolderNameIndex(byte i) {
    i-=1;
    string s;
    if(i==-1) s="MagicKey";
    else SPrintf(s, "%i ( %s )", i, folder[i].name);
    return s;
}

string FileNameRead(File &f) {
    string s;
    if(f.folder_index==0)
        s="MagicKey";
    else
        SPrintf(s, "%s", f.name);
    return s;
}

void FileHashWrite(File &f, string s ) {
    SScanf(s, "%s", f.hash);
}

//-Main---------------------------------

int folders;
while (x<folders){
    Folder folder;
    x+=1;
}
x=0;
int files;
while (x<files){
    File file;
    x+=1;
}

edit: did a small update to it :P

edit2: if you don't know how the magic key is built here is an example 1X2X3X4X5X6XXXXXXXXX = 123456 :D i don't think it's that hard ... tho i'll try adding a feature to the template in order to edit it rly easy :)
 
Last edited:
since 28-04-13 no1 reported any bugs, don't you think it's a real problem you being the first one ? i'd feel a bit awkward if i was the only person in a group of 17 that wasn't able to use something properly ... and i sure as hell wouldn't let every1 know ... but back to our topic, you have 1 of those 2 problems, either an outdated version of 010 editor or a broken xdata file (maybe already edited by some1 who is just like you) ... good luck :D
 
Back