The monsters are enumerated from 0x0000 to 0x017E. As always these are little endian, so Yeti (0x0056) would be stored as 5600.
There are only 324 monsters, counting the empty entry for 0x0000, with some holes in the enumaration. Whenever a core id is used, either a lookup table is needed, or these ids need to be filled.
Not to be confused with the prebuilt enemy ids.
The core monster data uses the full bank 0x35 (D4000-D4FFF)
|First Byte||Last Byte||Data stored|
|D4000||D4000||0x35 bank code|
ld de,D008 ld b,2F call 401C ret
ld de,D008 ld b,01 call 401C ret
ld de,D008 ld b,02 call 401C ret
- id in D006 and D007
- address in de
- length in b
gets the offset for id from the pointer table and writes length bytes from the monster data table to address.
Example: When accessing the info of a team memer in the menu its monster id is written to D006 and D007 the following code is executed: 21 01 40 06 35 D7
ld hl,4001 ld b,35 rst 10
0x300 Byte lookup table: core ID -> 2 Byte offsets
47 Byte long structure * 324 monsters
|1 byte||Gender ratio|
|1 byte||Flying (LegSweep immune)|
|1 byte||Species-specific join rate (see Recruitment)|
|1 byte||? (1 for flying monsters, 2 for Water family, 3 for Starfish)|
|1 byte||Unbred max level|
|1 byte||Experience growth|
|1 byte||Skill 1|
|1 byte||Skill 2|
|1 byte||Skill 3|
|1 byte||HP growth|
|1 byte||MP growth|
|1 byte||Attack growth|
|1 byte||Defense growth|
|1 byte||Agility growth|
|1 byte||Intelligence growth|
|2 bytes||Base exp yield in random worlds|
Note1: The two unknown bytes are not the critical rates, those are stored somewhere else (as they are in DWM1 as well) These unknown bytes may have something to do with how monsters are selected/created for random worlds, since they and the "base exp yield" are the only fields that don't exist in the corresponding monster species structure in DWM1.
Note2: The first structure starts with 0xFF. All pointers not pointing to a structure point to that. So technically all 'unused' monsters are 0x0. Code that uses the data may or may not check for this.