Open raekuul opened 6 years ago
Cool! I added them to the table.
Statistics: Increase of 1 is worth 2 points (Haven't yet figured out how to get even stats - which monsters naturally have even stats?) Stats are listed Low Nybble/High Nybble Derive the stat by multiplying the nybble value by 2, then adding it to a base value (which seems to universally be 5) $0D:01:Endurance/Intelligence $0E:01:Strength/Speed $0F:01:Luck/??? (Doesn't seem to affect anything)
Using Spider as an example, $0E:0x12 would yield a Strength of 9 and a Speed of 7
$10:02: Doesn't seem to affect anything
$12:01: Low Nybble is the number of Spells Available. Not sure what the high nybble does.
The rest of the data seems to be what spells are available to the monster (though I'm not completely convinced on this point - Changing $12 and these values gave spells to Spider, but when I looked at Lucifer's data they didn't appear to correspond to anything?). I'll poke around in the data some more to see if there's a list of the ability names.
Nice! I knew the stats were packed in some weird way.
Looks like the ability i
's name is at 0x40000 + 14 × i (in the English ROM) and is 12 bytes long.
Awesome! Also, I figured out why I wasn't getting the right list of skills for monsters before - I had a bug in my python script that led to it repeating some of the unknown data instead of printing the spell list data. Whoops :3
For the spell table - Like you said: $0 - $A is the name, $B is unknown data (probably target type), $C is cost. Includes all consumables (table structure ends with the Silph Wing)
I think I figured out how the number of spells available works high nibble is how many spells they can use against you, low nibble is how many spells they can use when recruited. Using Tanki as an example, his spell list is Sleep 1, Heal 1, and Recover. However, because the high nibble of his Spell Count byte is 1, as an enemy he's only allowed to use the first spell in the list - Sleep 1
Great going, you figured out all the stats you can actually see in-game now right? :D
Here's what the table is looking like. Interesting that it looks like there are never skills that are (Enemy only)
.
The next three bytes look like they might follow the same pattern as the last five for the spells (two nibbles for ally/enemy count + array of at most two bytes padded with 0xff
). No idea what they'd be for though.
Yeah, that should be the last of the stuff that's exposed to the player. Which means validating the rest of these findings is going to be a pain in the butt. There should be skills that are enemy-only; stuff like singing or raising their hand to the sky to steal MP. I'll take another look at the monster data to see if there's correlation. I'm surprised I didn't see elemental flags on the spells. If I were better at reverse-engineering (or at least knew how to read DMG bytecode) I'd look for code that calls the spell table to see if/how elements are handled.
$1d:2 is the EXP it gives when defeated.
$1f:1 appears to just be the number (ie. index + 1), except for Lucifer, who gets 0.
The high nibble of the byte that holds luck is always 1, 2, or 3. The following monsters have a value of 2
and these two have a value of 3
All others have 1. No idea what this is though -_-
$17 is a counter for stuff like poison breath or singing, $18 and $19 are the corresponding skills. I'm still unsure about $10, $11, $1A, $1B, or $1C
You mean $16, $17, and $18, right? I tried copying these three bytes from Mammoth to Spider but I couldn't get Spider to sing like Mammoth does. Can your own monsters do stuff like sing and raise hands to the sky?
Monster Data Structure Begins from 0x166DC Start:Length: Data $00:07: Name (Pad with 8F) $08:01: Level $09:02: HP $0B:01: MP $0C:01: Tribe/Dialog Group
As I find more I'll add them.