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
4,465
Comments
3
Last update

More entries in Personal Blogs

More entries from cearp

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
    +1
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87 cents. Free shipping from China... It arrived it works and honestly I don't understand how it was so cheap.
    +1
    Psionic Roshambo @ Psionic Roshambo: @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87... +1