Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: Daem0n on January 09, 2012, 11:58:05 am

Title: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Daem0n on January 09, 2012, 11:58:05 am
Hello. Help plz. How to open/edit CharBaseInfo (cata 4.0.6 client)?
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Steff on January 09, 2012, 12:55:30 pm
Just start cata client it load the DBC itself :)
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Eluo on January 09, 2012, 03:45:48 pm
Quote from: "Steff"
Just start cata client it load the DBC itself :)
Lol what? xD

I just tried out taliis and it works fine as far as i can tell...
But if it actually gets accepted when changed by taliis, that you will have to try out on your own^^
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Daem0n on January 09, 2012, 04:09:56 pm
heh....new file format ...
raceID classID unk0 unk1 classcombinationGUID unk2 unk3 unk4

unk0-4 = 0

maybe it will help someone =)
sorry for my bad english and bad code =)
i write so fast ;)


take near CharBaseInfo.dbc and get CharBaseInfoNew.dbc


Code: [Select]
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
using namespace std;
#define RACESCOUNT 14




typedef long int INT32;


int _tmain(int argc, _TCHAR* argv[])
{
    char Signature[4];
    INT32 Records = 0;
    INT32 Fields = 0;
    INT32 RecordSize = 0;
    long long StringBlockSize = 0;
    int tmp;

    FILE *fin = fopen("CharBaseInfo.dbc", "rb");
    if(!fin)
    {
        cout << "Error" << endl;
        cin.get();
        return 0;  
    }

    memset(Signature, 0, 4);


    fread(Signature,       4, 1, fin);
    fread(&Records,         4, 1, fin);
    fread(&Fields,          4, 1, fin);
    fread(&RecordSize,      4, 1, fin);
    fread(&StringBlockSize, 8, 1, fin);


    printf("%c%c%c%cn", Signature[0], Signature[1], Signature[2], Signature[3]);

    cout << Records << endl;
    cout << Fields << endl;
    cout << RecordSize << endl;
    //cout << StringBlockSize << endl;


    for(int i=0; i<Records; i++)
    {
        for(int j=0; j<8; j++)
        {
            tmp = 0;
            fread(&tmp, 1, 1, fin);
            cout << tmp << "t" ;
        }
        cout << endl;
    }

    fclose(fin);


    Records = 10*RACESCOUNT;

    FILE *fout = fopen("CharBaseInfoNew.dbc", "wb");
    if(!fin)
    {
        cout << "Error" << endl;
        cin.get();
        return 0;  
    }

    fwrite(&Signature,       4, 1, fout);
    fwrite(&Records,         4, 1, fout);
    fwrite(&Fields,          4, 1, fout);
    fwrite(&RecordSize,      4, 1, fout);
    fwrite(&StringBlockSize, 8, 1, fout);
    tmp = 0;
    int k = 1;
    for(int i=1; i<=RACESCOUNT; i++)
    {
        for(int j=1; j<=10; j++)
        {
            if(j != 10)
            {
                tmp = i;
                fwrite(&tmp, 1, 1, fout);
                tmp = j;
                fwrite(&tmp, 1, 1, fout);
                tmp = 0;
                fwrite(&tmp, 1, 2, fout);
                tmp = k;
                fwrite(&tmp, 1, 1, fout);
                tmp = 0;
                fwrite(&tmp, 1, 3, fout);
            }
            else
            {
                tmp = i;
                fwrite(&tmp, 1, 1, fout);
                tmp = 11;
                fwrite(&tmp, 1, 1, fout);
                tmp = 0;
                fwrite(&tmp, 1, 2, fout);
                tmp = k;
                fwrite(&tmp, 1, 1, fout);
                tmp = 0;
                fwrite(&tmp, 1, 3, fout);
            }
            k++;
        }
    }

    tmp = 0;
    fwrite(&tmp, 1, 1, fout);

    fclose(fout);


    cout << "OK" << endl;
    cin.get();

    return 0;
}
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Daem0n on January 09, 2012, 04:14:20 pm
Quote from: "Eluo"
I just tried out taliis and it works fine as far as i can tell...

taliis open only 3 row
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Eluo on January 09, 2012, 05:59:55 pm
Did you also use the newest version?
viewtopic.php?f=59&t=1095 (http://modcraft.io/viewtopic.php?f=59&t=1095" onclick="window.open(this.href);return false;)
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Daem0n on January 09, 2012, 07:41:56 pm
Quote from: "Eluo"
Did you also use the newest version?
viewtopic.php?f=59&t=1095 (http://modcraft.io/viewtopic.php?f=59&t=1095" onclick="window.open(this.href);return false;)

yes.
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: schlumpf on January 09, 2012, 08:03:04 pm
Taliis can only handle DBCs with a row width of 4 byte. This one seems to have less for some columns.
Title: Re: [DBC] CharBaseInfo.dbc 4.0.6
Post by: Steff on January 10, 2012, 12:14:53 pm
He changed his topic. Original was not good. So he understod what i meen:)