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,502
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.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious