DB/CharBaseInfo: Difference between revisions

From wowdev
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
Defines availability of classes for the different races. This particular DBC is byte-packed.
Defines availability of classes for the different races. Please note that this [[DBC]] does not have the typical 4 byte columns only!


==Structure==
==Structure==
Line 25: Line 25:
The easiest way is to open it in a hex editor. No DBC-Editor beside Tallis supports this type of file.
The easiest way is to open it in a hex editor. No DBC-Editor beside Tallis supports this type of file.


The structure is particulary easy. The first 4 Bytes contain the Magic value (57 44 42 43), followed by the Field count (set the count of 000xbyte[4] as Signed Byte). Next 3 bytes are empty. 000xByte[8], 000xByte[C] and 001xByte[0] are 01 each, the bytes inbetween are 00. Effectively, the actual pairs start with 001xByte[4] and 001xByte[5], containing the first pair. Afterwards, it goes on and on.
The structure is particularly easy, as described in [[DBC]]. The first 20 bytes are the header and are to be ignored. Most important, the uint32 at 0x4 defines the count of entries. After that, starting at 0x14, the entries start. There for each entry, it will be 4 bytes for a unique id (which can be ignored), then two bytes for the actual data, one for race, one for class, then two bytes to be ignored.  


   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
   0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
  ''57 44 42 43'' 06 ''00 00 00 02 00 00 00 02 00 00 00''
  ''57 44 42 43'' 06 00 00 00 ''02 00 00 00 02 00 00 00''
  ''01 00 00 00'' 01 01 01 02 01 03 02 01 02 03 04 06
  ''01 00 00 00'' 01 01 01 02 01 03 02 01 02 03 04 06
  00
  00


The italic text stays the same. Note that 000xByte[4] would be the count of pairs, each combination line of Race and Class raise the counter by 1. 001xByte[5] begins the first pairing. This file would contain:
The italic text stays the same (it is the header). Note that the uint32 at 0x4 would be the count of pairs, each combination line of Race and Class raise the counter by 1. 001xByte[5] begins the first pairing. This file would contain:


  Race Class
  Race Class
Line 42: Line 42:
  04  06
  04  06


A last 0-Byte at the end marks the end of the file. And that's about it.
After all records, there will be an additional 0x00, which is the empty string block of the [[DBC]] file.
 
--[[User:Ascathos|Ascathos]] ([[User talk:Ascathos|talk]]) 09:38, 4 May 2015 (UTC)
--[[User:Ascathos|Ascathos]] ([[User talk:Ascathos|talk]]) 09:38, 4 May 2015 (UTC)


[[Category:DBC]][[Category:3.0.2.8905]][[Category:DBC_WotLK]]
[[Category:DBC]][[Category:3.0.2.8905]][[Category:DBC_WotLK]]
[[Category:DBC_WoD]][[Category:6.0.1.18179]]
[[Category:DBC_WoD]][[Category:6.0.1.18179]]

Revision as of 23:17, 4 May 2015

Defines availability of classes for the different races. Please note that this DBC does not have the typical 4 byte columns only!

Structure

Column Field Type Notes
1 Race iRefID For this race,
2 Class iRefID these classes are allowed.

6.0.1.18179

struct CharBaseInfoRec {
  uint8_t padding_0[4];
  uint8_t m_raceID;
  uint8_t m_classID;
  uint8_t padding_1[2];
};

Editing CharBaseInfo.dbc

The easiest way is to open it in a hex editor. No DBC-Editor beside Tallis supports this type of file.

The structure is particularly easy, as described in DBC. The first 20 bytes are the header and are to be ignored. Most important, the uint32 at 0x4 defines the count of entries. After that, starting at 0x14, the entries start. There for each entry, it will be 4 bytes for a unique id (which can be ignored), then two bytes for the actual data, one for race, one for class, then two bytes to be ignored.

 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
57 44 42 43 06 00 00 00 02 00 00 00 02 00 00 00
01 00 00 00 01 01 01 02 01 03 02 01 02 03 04 06
00

The italic text stays the same (it is the header). Note that the uint32 at 0x4 would be the count of pairs, each combination line of Race and Class raise the counter by 1. 001xByte[5] begins the first pairing. This file would contain:

Race Class
01   01
01   02
01   03
02   01
02   03
04   06

After all records, there will be an additional 0x00, which is the empty string block of the DBC file.

--Ascathos (talk) 09:38, 4 May 2015 (UTC)