Dragon Quest Monsters: Joker/Notes

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a Notes Page for Dragon Quest Monsters: Joker.

Save Files

Save files consist of 5 sections:

  • Header - Magic and the checksum of the file.
  • Summary - Information displayed on the load game screen and some other misc. info.
  • Player info - The player's gold, ATM balance, number of monsters in their party, etc. (Exact dump of this info from RAM)
  • Monster info - Info on all the players' monsters (party/substitutes/storage). (Exact dump of this info from RAM)
    • Incarnus has both an entry as a monster in the player's party/substitutes/storage, and also a dedicated entry (presumably too keep track of their info when they temporarily leave the party). The dedicated entry is only populated with useful data once the Incarnus joins the player's party for the first time.
  • Other - Miscellaneous other info.

Checksum

Every save file has a 32bit checksum value which is used by the game to determine if the save file has been corrupted.

When the game loads a save file it recomputes the checksum based on the data stored in the save file and checks if the calculated checksum matches the checksum that is stored in the save file. If the checksum does not match, then the game will show a message indicating the the game’s save file may be corrupted and the game will clear out the save data, forcing the player to start a new game in order to play.

The algorithm for the save data checksum is:

Read 10,613 32bit unsigned integer values starting from index 0x70 in the save file data and sum those integers together, the resulting 32bit unsigned integer is the checksum value.

Format

import std.io;

fn format_playtime(u32 raw) {
    u32 remaining = raw & 0b111111;
    u32 seconds = (raw >> 6) & 0b111111;
    u32 minutes = (raw >> 12) & 0b111111;
    u32 hours = raw >> 18;

    return std::format("{}:{:0>2}:{:0>2} ({})", hours, minutes, seconds, remaining);
};

struct name {
    u8 name[9];
    u8 unknown_a[3];
};

struct player_info {
    name name;
    u32 gold;
    u32 atm_gold;
    u8 items_in_hand[16];
    u8 item_in_bag_counts[256];
    u8 num_darkonium_times_5;
    u8 unknown_b[3];
    u32 playtime [[format("format_playtime")]];
    u8 num_party_monsters;
    u8 num_monsters;
    u8 unknown_c[290];
    u32 num_monsters_scouted;
    u8 unknown_d[8];
    u32 num_battles_won;
    u32 num_times_synthesized;
    u8 unknown[640];
};

struct parent_monster {
    u16 species;
    u8 name[0x09];
    u16 unknown;
    u8 scout_name[11];
};

struct monster {
    u8 monster_name[12];
    u16 species; // Confirmed, but does not appear to auto update rank + traits + resistances, does update family
    u8 rank; // 1=F, 2=E, 3=D, 4=C, 5=B, 6=A, 7=S, 8=X, 9=???
    u8 family;
    u8 sex; // 0=+, 1=-, 2=+-
    u8 unknown_d[3];
    u8 synthesis_plus_number;
    u8 unknown_de[4];
    u8 unknown_e[24];
    u8 unknown_f[29];
    u8 unknown_f2[2];
    u8 unknown_g[29];
    u8 unknown_g2[5];
    
    u8 level; // Confirmed
    u8 level_limit;
    
    // Stats
    //
    // Stats are represented by two sets of values "base" stat values and
    // "adjusted" stat values.
    //
    // "base" stat values are the stat values without accounting for the
    // monster's current equipment. "adjusted" stat values are the stat
    // values after accounting for the effects of equipment.
    //
    // A monster will use its "adjusted" stat values. Once the monster's
    // equipment is removed, its "adjusted" stats values will be set back
    // to the corresponding "base" stat values.
    //
    // If you want to edit the stat values of a monster, be sure to change
    // both the "base" stat value and the corresponding "adjusted" stat
    // value.
    u16 base_max_hp;
    u16 base_max_mp;
    u16 base_attack;
    u16 base_defense;
    u16 base_agility;
    u16 base_wisdom;
    u16 current_hp; // This appears to be healed right after loading the game (at least at a centre)
    u16 adjusted_max_hp;
    u16 current_mp; // This appears to be healed right after loading the game (at least at a centre)
    u16 adjusted_max_mp;
    u16 adjusted_attack;
    u16 adjusted_defense;
    u16 adjusted_agility;
    u16 adjusted_wisdom;
    
    u32 exp; // TODO: confirm the size
    // Note: Exp to next level is not stored, it is re-calculated based on the monster's level
    u8 tactic;
    u8 unknown_17[0x6];
    u8 unknown_18[0x4];
    u8 equipment;

    // Skill sets // TODO: change to arrays of 3 elements
    u8 first_skill_set_id;
    u8 second_skill_set_id;
    u8 third_skill_set_id;
    u8 first_skill_set_points;
    u8 second_skill_set_points;
    u8 third_skill_set_points;
    u8 first_set_num_unlocked_skills;
    u8 second_set_num_unlocked_skills;
    u8 third_set_num_unlocked_skills;

    u8 unknown_20;
    u16 unallocated_skill_points;
    u8 skills[0x1E]; // TODO: confirm size
    u8 traits[0x1F]; // TODO: confirm size
    u8 unknown_21[10];
    u8 level_when_hashed;
    u16 hash;
    u16 unknown_22;
    u8 scout_name[12];
    parent_monster parents[2];
    parent_monster grandparents[4]; // These have no name or scout name info
};

struct header {
    u32 magic_1;
    u32 magic_2;
    u32 magic_3;
    u32 checksum;
};

struct preview_name {
    u8 unknown[3];
    u8 name[9];
};

struct monster_previews {
    preview_name names[3];
    u8 unknown_a[3];
    u16 species_ids[3];
    u8 levels[3];
};

struct summary {
    u8 unknown_a[16];
    u8 unknown_b[12];
    u32 playtime [[format("format_playtime")]];
    u8 num_party_monsters;
    u8 unknown_c;
    u8 player_name[9];
    monster_previews party_monster_previews;
    u8 num_darkonium_times_5;
    u8 unknown_d[268];
};

struct other {
    u8 unknown_a[64];
    u8 unknown_b[64];
    u32 unknown_btl_enmy_prm_value;
};

struct save_file {
    header header;
    summary summary;
    player_info player_info;
    monster player_monsters[100];
    monster incarnus;
    other other;
};

save_file save_file @ 0x0;

IDs

Monster IDs

ID      Monster
--      -------
0	
1	slime
2	bubble slime
3	shell slime
4	healslime
5	drake slime
6	metal slime
7	slime knight
8	wild slime
9	liquid metal slime
10	angel slime
11	king slime
12	king bubble slime
13	metal king slime
14	grandpa slime
15	gem slime
16	trode
17	she-slime
18	snail slime
19	cureslime
20	behemoth slime
21	beshemoth slime
22	dragon slime
23	metal slime knight
24	metal kaiser slime
25	dark slime knight
26	dark slime
27	king cureslime
28	darkonium slime
29	
30	
31	
32	
33	
34	
35	
36	
37	
38	
39	
40	
41	
42	
43	
44	
45	
46	
47	
48	DUMMY M30
49	komodo
50	DUMMY M32
51	argon lizard
52	DUMMY M34
53	green dragon
54	DUMMY M36
55	jargon
56	metal dragon
57	DUMMY M39
58	hacksaurus
59	red dragon
60	dragurn
61	great argon lizard
62	DUMMY M3E
63	mechan-o’-wyrm
64	great dragon
65	drakulard
66	dragonlord
67	DUMMY M43
68	Dragovian lord
69	DUMMY M45
70	skelegon
71	dragonthorn
72	nardragon
73	frou-fry
74	sea dragon
75	seasaur
76	snapdragon
77	drakularge
78	tyrantosaurus
79	black dragon
80	frou-frou
81	abyss diver
82	megalodon
83	alabast dragon
84	great dragon
85	
86	
87	
88	
89	
90	
91	
92	
93	
94	
95	
96	platypunk
97	great sabrecub
98	scissor beatle
99	stark raven
100	jailcat
101	khalamari kid
102	capsichum
103	hell hornet
104	chimaera
105	Hades condor
106	frogface
107	crabid
108	bullfinch
109	DUMMY M6D
110	giant moth
111	treeface
112	yabby
113	gorerilla
114	scorpion
115	heligator
116	great sabrecat
117	garuda
118	DUMMY M76
119	firebird
120	DUMMY M78
121	king squid
122	khalamari
123	leopold
124	empyrea
125	spiked hare
126	powie yowie
127	wild boarfish
128	eveel
129	riptide
130	beetlebully
131	
132	
133	
134	
135	
136	
137	
138	
139	
140	
141	
142	
143	
144	mischievous mole
145	bodkin archer
146	hammerhood
147	satyr
148	jumping jackal
149	DUMMY M95
150	chainine
151	puppeteer
152	beetleboy
153	orc
154	headhunter
155	fallen priest
156	fencing fox
157	pan piper
158	DUMMY M9E
159	gargoyle
160	weartiger
161	mandrake major
162	gigantes
163	cockateer
164	stone guardian
165	notso macho
166	DUMMY MA6
167	boss troll
168	atlas
169	don mole
170	robbin’ hood
171	dhoulmagus
172	rhapthorne
173	rhapthorne
174	Ace of Spades
175	brownie
176	orc
177	Ace of Spades
178	
179	
180	
181	
182	
183	
184	
185	
186	
187	
188	
189	
190	
191	
192	bag o’ laughs
193	wax murderer
194	firespirit
195	mecha-mynah
196	mud mannequin
197	dingaling
198	goodybag
199	shadow
200	cannibox
201	spitnik
202	hunter mech
203	rockbomb
204	mum
205	golem
206	boh
207	dancing flame
208	jum
209	frostburn
210	boe
211	king kelp
212	mimic
213	diemon
214	DUMMY MD6
215	gold golem
216	living statue
217	trap box
218	killing machine
219	mumboh-jumboe
220	ruin
221	psaro
222	estark
223	anchorman
224	golem
225	estark
226	
227	
228	
229	
230	
231	
232	
233	
234	
235	
236	
237	
238	
239	
240	dracky
241	lips
242	winky
243	imp
244	lump wizard
245	night emperor
246	dancing devil
247	DUMMY MF7
248	merman
249	lesser demon
250	gryphon
251	DUMMY MFB
252	octavian sentry
253	silvapithecus
254	DUMMY MFE
255	archdemon
256	moosifer
257	buffalogre
258	jamirus
259	mohawker
260	pazuzu
261	gracos
262	belial
263	night clubber
264	malroth
265	zoma
266	nimzo
267	mortamor
268	orgodemir
269	see urchin
270	dessert demon
271	lethal armour
272	great dracky
273	wrecktor
274	demon-at-arms
275	moosifer
276	buffalogre
277	mohawker
278	gracos
279	belial
280	demon-at-arms
281	
282	
283	
284	
285	
286	
287	
288	DUMMY M120
289	ghost
290	stump chump
291	drooling ghoul
292	muddy hand
293	DUMMY M125
294	funghoul
295	DUMMY M127
296	walking corpse
297	demonrider
298	skeleton
299	restless armour
300	grim rider
301	mummy boy
302	soulspawn
303	wailin’ weed
304	phantom fencer
305	roseguardin
306	bone baron
307	dullahan
308	tortured soul
309	Captain Crow
310	Dr Snapped
311	skipper
312	flyguy
313	hellhound
314	skeleton soldier
315	phantom swordsman
316	wight king
317	Captain Crow
318	Dr Snapped
319	
320	
321	
322	
323	
324	
325	
326	
327	
328	
329	
330	
331	
332	
333	
334	
335	
336	wulfspade
337	hawkhart
338	cluboon
339	diamagon
340	wulfspade ace
341	hawkhart ace
342	cluboon ace
343	diamagon ace
344	Wildcard
345	
346	
347	
348	
349	
350	
351	

Item IDs

ID	Item
--      ----
0	
1	medicinal herb
2	strong medicine
3	special medicine
4	multi medicine
5	Yggdrasil dew
6	magic elixir
7	sage’s elixir
8	elfin elixir
9	Yggdrasil leaf
10	antidotal herb
11	moonwort bulb
12	panacea
13	antimagic powder
14	Oomph powder
15	wizard’s penny
16	wizard’s shilling
17	Insulade
18	jumbo Insulade
19	seed of skill
20	seed of life
21	seed of magic
22	seed of strength
23	seed of defence
24	seed of agility
25	seed of wisdom
26	chimaera wing
27	exodust
28	loyalty card
29	gold nugget
30	‘Positive Puller’
31	‘Think Negative’
32	‘Neutral Ground’
33	lunar tablet
34	solar tablet
35	baryon sphere
36	‘How to Zoom’
37	‘The Joy of Evac’
38	‘Whistling For Dummies’
39	‘The Art of Vanishing’
40	brass key
41	darkonium
42	metal ticket
43	
44	
45	
46	
47	
48	Book of Wulfspade
49	Book of Hawkhart
50	Book of Diamagon
51	Book of Cluboon
52	warrior’s scroll
53	mage’s scroll
54	priest’s scroll
55	martial artist’s scroll
56	sage’s scroll
57	thief’s scroll
58	
59	
60	
61	
62	
63	
64	
65	
66	
67	
68	
69	
70	
71	
72	
73	
74	
75	
76	
77	
78	
79	
80	copper sword
81	divine dagger
82	rapier
83	steel broadsword
84	zombiesbane
85	dragonsbane
86	obsidian sword
87	silver broadsword
88	zombiesblight
89	dragonsblight
90	giant’s sword
91	zombie slayer
92	dragon slayer
93	lost katana
94	metal king sword
95	iron lance
96	pitchfork
97	sacred spear
98	partisan
99	holy lance
100	hunting spear
101	dragon lance
102	halberd
103	hero spear
104	Gáe Bolg
105	stone axe
106	woodcutter’s axe
107	iron axe
108	woodsman’s axe
109	headsman’s axe
110	battleaxe
111	forester’s axe
112	king axe
113	ranger’s axe
114	executioner’s axe
115	oaken club
116	sludgehammer
117	iron hammer
118	war hammer
119	miracle mallet
120	giant wrench
121	sledgehammer
122	marauder’s maul
123	warlord’s hammer
124	miracle mace
125	leather whip
126	battle whip
127	thorn whip
128	sidewinder
129	snakeskin whip
130	chain whip
131	dragontail whip
132	spiked steel whip
133	scourge whip
134	Gringham whip
135	stone claws
136	metal claws
137	iron claws
138	sacred claws
139	razor claws
140	steel claws
141	metal talons
142	gryphon talons
143	sacred talons
144	orichalcum claws
145	cypress staff
146	rune staff
147	phoenix sceptre
148	DUMMY SCEPTRE
149	Plus sceptre
150	Minus sceptre
151	crystal staff
152	staff of darkness
153	sage’s staff
154	royal rod
155	
156	
157	
158	
159	

Skill Set IDs

ID	Name
--      ----
0	
1	Frizz & Bang
2	Frizz & Bang II
3	Frizz & Bang III
4	Frizz & Woosh
5	Frizz & Woosh II
6	Frizz & Woosh III
7	Frizz & Zap
8	Frizz & Zap II
9	Frizz & Zap III
10	Frizz & Zam
11	Frizz & Zam II
12	Frizz & Zam III
13	Bang & Woosh
14	Bang & Woosh II
15	Bang & Woosh III
16	Bang & Crack
17	Bang & Crack II
18	Bang & Crack III
19	Bang & Zap
20	Bang & Zap II
21	Bang & Zap III
22	Bang & Zam
23	Bang & Zam II
24	Bang & Zam III
25	Woosh & Crack
26	Woosh & Crack II
27	Woosh & Crack III
28	Woosh & Zap
29	Woosh & Zap II
30	Woosh & Zap III
31	Woosh & Zam
32	Woosh & Zam II
33	Woosh & Zam III
34	Crack & Zap
35	Crack & Zap II
36	Crack & Zap III
37	Crack & Zam
38	Crack & Zam II
39	Crack & Zam III
40	Fire
41	Fire II
42	Fire III
43	Ice
44	Ice II
45	Ice III
46	Breath
47	Breath II
48	Breath III
49	Firewind Slashes
50	Thunderwind Slashes
51	Iceplosion Slashes
52	Darklight Slashes
53	Fire Fighter
54	Boom Boxer
55	Wind Blower
56	Icemeister
57	White Knight
58	Dark Knight
59	Healer
60	Cure-all
61	Cleanser
62	Champion
63	Defender
64	Speedster
65	Mage Aid
66	Fortifier
67	Enfeebler
68	Saboteur
69	Antimagic
70	Antimagic II
71	Anti-dragon
72	Anti-metal
73	Bolsterer
74	Barricade
75	Seal
76	Hypnotist
77	Toxifier
78	Fear-monger
79	Bad Breath
80	Diminisher
81	Guerrilla
82	Assassin
83	Huntsman
84	Bounty Hunter
85	Crusader
86	Cursader
87	Muspell
88	Niflheim
89	Dancer
90	Bombardier
91	Toughie
92	Berserker
93	Martyr
94	Reaper
95	Nightmare
96	Cold Sleep
97	Cleric
98	Aquapothecary
99	All-Rounder
100	Mime
101	Trickster
102	Slimer
103	Naturalist
104	Graveheart
105	Diabolist
106	Dragon Lore
107	Bird Brain
108	Green Finger
109	Hive Mind
110	Materialist
111	Wulfspade
112	Wulfspade II
113	Hawkhart
114	Hawkhart II
115	Diamagon
116	Diamagon II
117	Cluboon
118	Cluboon II
119	Dragonlord
120	Dragovian Lord
121	Leopold
122	Dhoulmagus
123	Rhapthorne
124	Rhapthorne II
125	Estark
126	Nimzo
127	Mortamor
128	Captain Crow
129	Über Dark Dynamiter
130	Über Blessed Blizzardier
131	Über Mage
132	Über Breath
133	Über Knight
134	Über Healer
135	Über Helpful
136	Über Charmer
137	Wulfspade III
138	Diamagon III
139	Hawkhart III
140	Cluboon III
141	Dr Snapped
142	Attack Boost
143	Attack Boost II
144	Attack Boost III
145	Defence Boost
146	Defence Boost II
147	Defence Boost III
148	Agility Boost
149	Agility Boost II
150	Agility Boost III
151	Wisdom Boost
152	Wisdom Boost II
153	Wisdom Boost III
154	Frizz Ward
155	Bang Ward
156	Woosh Ward
157	Crack Ward
158	Zap Ward
159	Zam Ward
160	Water Ward
161	Thunder Ward
162	Fire Ward
163	Earth Ward
164	Fire Breath Ward
165	Ice Breath Ward
166	Whack Ward
167	Dazzle Ward
168	Poison Ward
169	Drain Magic Ward
170	Antimagic Ward
171	Gobstopper Ward
172	Ban Dance Ward
173	Confusion Ward
174	Inaction Ward
175	Paralysis Ward
176	Sleep Ward
177	Über Health Boost
178	Über Magic Boost
179	Über Attack Boost
180	Über Defence Boost
181	Über Agility Boost
182	Über Wisdom Boost
183	Über Heat Ward
184	Über Cold Ward
185	Über Windblast Ward
186	Über Darklight Ward
187	Warrior
188	Mage
189	Priest
190	Martial Artist
191	Sage
192	Thief
193	DUMMY SKILLNAME C1