gameboy9 / DW4RandoHacker

Dragon Warrior 4 RandoHacker
GNU General Public License v3.0
18 stars 5 forks source link

How to make Fairy Water nonelemental #43

Closed awjackson closed 7 years ago

awjackson commented 7 years ago

To make Fairy Water work on all enemies including metal slimes, change the byte at 4f8b0 from 0xe9 to 0xf2. The table at 4F81B-4F91A controls the effectiveness of spells, items, and monster special attacks like sleep breath. The bottom 5 bits are the "element" (i.e. which resistance bits apply) when the spell/item/ability is used on an enemy (0x09 is Expel's element, while 0x12 means "no resistance applies, always hits"), and the upper 3 bits are the hit rate when the spell/etc. is used on a party member (with 0xE0 meaning "damage effect, always hits"). If you compare the table with the corresponding data in the Japanese DQ4 ROM you'll see that Fairy Water's byte is the only one that's different between the two ROMs.

While figuring out this data, I discovered that the Luck stat apparently does absolutely nothing in DW4 :( A subroutine exists that should modify the base spell hit rates based on Luck using exactly the same formula as in DW3, but it's shortcutted with an early RTS so the final hit rate is always the same as the base hit rate. I wonder why the developers did that--maybe there was some problem making it work with the NPCs (who don't have Luck stats)?

gameboy9 commented 7 years ago

This was implemented as prescribed and included in the 0.11.1 release.