Fixed a bug in a GBA game...

I've just fixed a bug in a GBA game, the Meteorite Mania quest from Sword of Mana.

When trading items with the NPC, he's supposed to tell you that your bag's full if you have 99 of the item he wants to give you.
That works fine in the original Japanese version.
But for some reason in the English versions, that dialog was left out - and the NPC was not informed :D
So if you have 99 of the item an empty/invalid dialog will be loaded and the game will soft lock.

Ideally the fix would be to restore the missing dialog, I'd want to do that, but it would require freeing up some space in the dialog data block as there's currently not any room for new dialog.
Some space could be reclaimed by making more use of placeholders:
For example, replace the text "Pikachu" with "{P_25}" from what I remember the game / English translation had quite a few instances where I could do this, placeholders that aren't always being used etc.
If I'm wrong and we can't reclaim (enough) space, then we could move the entire dialog table, the easiest way would be to extend the rom which is overkill.
Another possibility would be to branch to some custom code to use a modified text loading method and read the dialog from somewhere else, as there is free space elsewhere in the rom which could store the new dialog.
But I'd rather not add custom code to free space because there's no guarantee that another person won't use that same free space for their own modification, and thus the two patches break each other. Not a big concern but it's something to consider.

The fix for now is making the NPC's missing "full bag" message only appear if you have 255 (or 100 etc) of the item instead of 99.
The game caps item limits to 99, and so the only way to have a quantity of 255 would be through hacking.
So now the NPC will see you have 99, think that's fine and proceed to give you another one yet the game will not actually increase the count, it will remain at 99.
Better than crashing the game!

Minor bug that probably very few people have ever encountered, but cool to fix something.
  • Love
Reactions: Alexander1970

Comments

thats so awesome!
are you gonna submit it to romhacking.net?
First I want to check what releases of the rom have this bug - like I said the Japanese version is fine.
I have a fix for the US version, but still need to test the European English rom, FR/DE rom, and ES/IT rom.
It just takes a bit of time to start a new save and put myself where I need to be (location, items, etc).
I imagine they all have it but I should test first.

Then I want to do an extra check and make sure my modification isn't affecting other checks / other NPCs giving items...
The best fix will be to add in the missing dialog, I'll work on that.

But yes once that's all done, then I'll submit a patch to romhacking.net! :)
I submitted a patch last week for the game to remove some strict restriction that each magic element's "ultimate" attack could only be used by a certain class - https://www.romhacking.net/hacks/8515/
So now you don't have to play the game 8 times using a different class in order to see/use all of these attacks :D
 
Last edited:
  • Love
Reactions: SaulFabre
First I want to check what releases of the rom have this bug - like I said the Japanese version is fine.
I have a fix for the US version, but still need to test the European English rom, FR/DE rom, and ES/IT rom.
It just takes a bit of time to start a new save and put myself where I need to be (location, items, etc).
I imagine they all have it but I should test first.

Then I want to do an extra check and make sure my modification isn't affecting other checks / other NPCs giving items...
The best fix will be to add in the missing dialog, I'll work on that.

But yes once that's all done, then I'll submit a patch to romhacking.net! :)
I submitted a patch last week for the game to remove some restriction the game that each magic element's "ultimate" attack could only be used by a certain class - https://www.romhacking.net/hacks/8515/
So now you don't have to play the game 8 times using a different class in order to see/use all of these attacks :D
Doing your due dilligence, thats awesome! i approve wholeheartedly <3
 
  • Like
Reactions: cearp

Blog entry information

Author
cearp
Views
164
Comments
3
Last update

More entries in Personal Blogs

More entries from cearp

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: sigh