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,427
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.
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
    +1
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
  • BakerMan @ BakerMan:
    Also, no, that was his first time having a seizure, and hopefully the last
    +1
    BakerMan @ BakerMan: Also, no, that was his first time having a seizure, and hopefully the last +1