Difference between revisions of "Table files (D1DS)"

From Netherworld Research
Jump to: navigation, search
(Add structs for most other table files)
m (Fix formatting & add link to spreadsheet)
Line 182: Line 182:
 
</pre>
 
</pre>
  
== zukan.dat
+
== zukan.dat ==
 
Bestiary entries.
 
Bestiary entries.
  
Line 201: Line 201:
 
};
 
};
 
</pre>
 
</pre>
 +
 +
== External links ==
 +
* [https://docs.google.com/spreadsheets/d/1QuShaZsuQe1cRybufzAFD97f6xQ0JlLXDIvsynusxZc/edit?usp=sharing D1DS table files in spreadsheet form]

Revision as of 13:56, 20 January 2018

Table files are files describing properties and statistics of various entities inside the game, e.g. items, classes or characters. Each file essentially corresponds to a database table, with rows and columns, or (probably more true to the actual implementation) a row count followed by an array of some struct, with that many elements.

This page documents the structs for the various table files inside D1DS.

Each table starts with the number of rows, as a u32, sometimes repeated twice for seemingly no good reason. (One ugly way to deal with this is to start by reading two u32's, and then seek back 4 bytes if they're equal.)

char.dat

Holds character/class data.

struct {
  char name[19];
  char title[19];
  u8 type;         // 0 = Static? (cutscene/geo); 3 = Usable in-battle; 4 = Prinny; 6 = Prism Red (Doll)
  u8 unk1;
  u8 pad1;
  u8 gender;       // 1 = Male; 2 = Female; 11 = Male (generic); 12 = Female (generic); 13 = Other (generic)
  u8 unk2;
  u8 tier;         // "Tier" into class/colour palette index
  u8 magic_rate;   // Rate of specials acquisition, judging by http://ningyokan.nisfan.net/game/disgaea/usa/usa-units3.html
  u8 jump;

  struct {
    u8 fist, sword, spear, bow, gun, axe, staff;
  } wpn_mastery;
  u8 pad2;

  struct {
    u8 hp, sp, atk, def, int, spd, hit, res;
  } aptitude;

  u16 immunity;     // Bitfield of immunities (0 for most, 255 for Divine Majin)
  u16 id;
  u16 family;       // Seemingly corresponds to row in "create character" screen, e.g. Male/Female Brawler kept separate, but mages are grouped, as are skulls.
  u16 unk3;         // (always 100)
  u16 unk4;         // (always 20)
  u16 throw;
  u16 help;         // (Key into charhelp.dat) Help entry text for this character, or 0.

  struct {
    u16 hp, sp, atk, def, int, spd, hit, res;
  } base_stats;

  u16 unk5;         // (always 5)
  u16 move_range;
  u16 move_class;   // 0 = normal; 1 = flying; 2 = warping
  u16 unk6;         // (always 1)
  u16 unk7;
  u16 unk8;
  u16 unk9;         // (always 10)
  u8 pad3[4];
  u16 unk10;
  u16 counter;

  u16 magic[32];    // (Key into magic.dat) Special index, for specials learned by this char/class, or 0 for unused.
  u16 magic_lvl[32]; // Level at which character learns the corresponding special
};

charhelp.dat

Class help descriptions. These are shown in the "create character" screen, and so the table file includes strings that aren't ever shown in-game (e.g. for story characters or enemies).

struct {
  u16 id;
  char description[62];
};

dungeon.dat

Gatekeeper warp data, powering the warp menu.

struct {
  char name[18];
  u8 pad;
  u16 id;
  u16 talk;        // talk.dat entry to execute when map is selected from warp menu
};

ge.dat

Geo effects.

struct {
  char name[21];
  char description[57];
  u16 id;
};

geocube.dat

Geocube effects (multiplayer).

struct {
  u8 id;
  u8 unk1;
  u8 unk2;
  u8 unk3;
  u16 unk4;
  char name[17];
  char description[65];
};

habit.dat

Item inhabitants.

struct {
  u32 unk1;
  char name[21];
  u8 pad1[1];
  u16 id;
  u8[20] item_chance;  // Chance to appear in an item, by item class. Which element corresponds to which item class isn't known exactly.
  // My best guess: ? Fist Sword Spear Bow Gun Axe Staff Monster ? Armor Belt Shoes Orb Glasses Muscle ? ? EX ?
  u8 pad2[1];
};


hospital.dat

Hospital rewards, with minimum requirements.

struct {
  u16 id;
  u16 req_deceased;
  u32 item;    // (Key into mitem.dat) Item to obtain
  u32 req_hp;
  u32 req_sp;
};

magic.dat

Specials/spells.

mitem.dat

Item table.

musicshop.dat

Song list for the music shop.

struct {
  u32 price;
  u8 pad1[4];
  u16 id;
  u16 song_id;  // Uncertain
  char name[21];
  char title[65];
  u16 options; // 0 = locked; 1 = starts unlocked; 3 = starts unlocked & default selected
};

thief.dat

Stat stealing entries.

struct {
  char name[21];
  u16 type;  // 0 = steal HP; 1 = SP; 2 = Atk; 3 = Def; 4 = Int; 5 = Spd; 6 = Hit; 7 = Res; 10 = Exp; 11 = HL?
  u8 pad1[1];
  u32 unk1;  // (always 1)
};

wish.dat

Dark Assembly bills.

struct {
  u32 mana;
  u8 id;
  u16 rank;  // Min. rank required to reveal bill
  i8 skew;   // Skews senators' general opinion on the bill, -100 to +100 (higher is more favourable)
  char name[31];
  char description[53];
};

zukan.dat

Bestiary entries.

struct {
  u16 id;
  u16 class_id;
  char name[21];
  char line1[45];
  char line2[45];
  char line3[45];
  char line4[45];
  char line5[45];
  char line6[45];
  char line7[45];
  char line8[45];
  u8 pad1[3];
};

External links