Difference between revisions of "Table files (D1DS)"
m (Fix formatting & add link to spreadsheet) |
(Document magic.dat structure) |
||
Line 137: | Line 137: | ||
== magic.dat == | == magic.dat == | ||
Specials/spells. | Specials/spells. | ||
+ | |||
+ | <pre> | ||
+ | struct { | ||
+ | u16 id; | ||
+ | u16 wpn_level; // Min. weapon skill level to unlock, if unlocked by weapon | ||
+ | u16 power; // Determines damage (TBD: how?) | ||
+ | u16 sp; // Base SP cost (TBD: determine growth curve) | ||
+ | char name[17]; | ||
+ | char description[57]; | ||
+ | u16 unk1; // ?? | ||
+ | u8 effect_param[5]; // Parameter to skill effect (see below) | ||
+ | u8 wpn_type; // 0 = not weapon tied; 1 = fist; 2 = sword; 3 = spear; 4 = bow; 5 = gun; 6 = axe | ||
+ | u8 element; // 0 = none; 1 = fire; 2 = wind; 3 = ice; 4 = star | ||
+ | u8 spell_class; // 2 = melee; 3 = magic; 4 = heal; 5 = buff; 6 = debuff | ||
+ | u8 wpn_type_2; // (copy of wpn_type) | ||
+ | u8 range; | ||
+ | u8 pattern; // Attack pattern, complex, see below | ||
+ | u8 range_up; // Attack range vertically, constraints on height difference between tiles | ||
+ | u8 range_down; | ||
+ | u8 effect[5]; // Attack effects (see below), or 0 for no effect | ||
+ | }; | ||
+ | </pre> | ||
+ | |||
+ | Some of these fields warrant additional explanation. The ''effect'' and ''effect_param'' fields allow up to 5 effects to be associated with a spell. Known effect numbers are listed below. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! # !! Description | ||
+ | |- | ||
+ | | 1 || ? | ||
+ | |- | ||
+ | | 2 || ? | ||
+ | |- | ||
+ | | 11 || Atk +n% | ||
+ | |- | ||
+ | | 12 || Def +n% | ||
+ | |- | ||
+ | | 13 || Res +n% | ||
+ | |- | ||
+ | | 14 || Int +n% | ||
+ | |- | ||
+ | | 21 || Poison (n = % chance to inflict) | ||
+ | |- | ||
+ | | 22 || Sleep | ||
+ | |- | ||
+ | | 23 || Paralyze | ||
+ | |- | ||
+ | | 24 || Amnesia | ||
+ | |- | ||
+ | | 25 || Deprave | ||
+ | |- | ||
+ | | 101 || Cure ailments (n=?) | ||
+ | |- | ||
+ | | 102 || HP Drain | ||
+ | |- | ||
+ | | 104 || Self-destruct | ||
+ | |} | ||
+ | |||
+ | The ''pattern'' field describes the attack pattern (which tiles are targeted relative to the user, etc). (TBD: document these.) | ||
== mitem.dat == | == mitem.dat == |
Revision as of 13:19, 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.)
Contents
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.
struct { u16 id; u16 wpn_level; // Min. weapon skill level to unlock, if unlocked by weapon u16 power; // Determines damage (TBD: how?) u16 sp; // Base SP cost (TBD: determine growth curve) char name[17]; char description[57]; u16 unk1; // ?? u8 effect_param[5]; // Parameter to skill effect (see below) u8 wpn_type; // 0 = not weapon tied; 1 = fist; 2 = sword; 3 = spear; 4 = bow; 5 = gun; 6 = axe u8 element; // 0 = none; 1 = fire; 2 = wind; 3 = ice; 4 = star u8 spell_class; // 2 = melee; 3 = magic; 4 = heal; 5 = buff; 6 = debuff u8 wpn_type_2; // (copy of wpn_type) u8 range; u8 pattern; // Attack pattern, complex, see below u8 range_up; // Attack range vertically, constraints on height difference between tiles u8 range_down; u8 effect[5]; // Attack effects (see below), or 0 for no effect };
Some of these fields warrant additional explanation. The effect and effect_param fields allow up to 5 effects to be associated with a spell. Known effect numbers are listed below.
# | Description |
---|---|
1 | ? |
2 | ? |
11 | Atk +n% |
12 | Def +n% |
13 | Res +n% |
14 | Int +n% |
21 | Poison (n = % chance to inflict) |
22 | Sleep |
23 | Paralyze |
24 | Amnesia |
25 | Deprave |
101 | Cure ailments (n=?) |
102 | HP Drain |
104 | Self-destruct |
The pattern field describes the attack pattern (which tiles are targeted relative to the user, etc). (TBD: document these.)
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]; };