News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Removing character portraits in FFV (GBA)  (Read 10171 times)

ginja_ninja

  • Newbie
  • *
  • Posts: 4
    • View Profile
Removing character portraits in FFV (GBA)
« on: March 19, 2014, 08:27:46 pm »
I'm completely new to rom hacking and figured this would be a relatively simple first project. I've always played the SNES version of FFV mainly because of how horrible all the character portraits in the GBA version look. I'd like to be able to just completely get rid of all of them, both in the dialogue boxes and the character menus.

I've viewed some tutorials and done some searches on graphics editing, but there appears to be a lot of conflicting information on what the best programs to use are. I've downloaded 4 or 5 different ones and loaded up the ROM in them, but none of the tiles appear to be discernable and are just a random jumble of pixels. I'm not sure if there's a specific program that works best for GBA games (I only bothered to download ones that explicitly mentioned GBA compatibility in the descriptions), but I'd welcome any recommendations from people who have experience with stuff like this.

I tried using VBA's built-in tile viewer functionality on a screen with a dialogue box open in the game's intro. Here's a screenshot I took: http://i.imgur.com/ql50BrA.png

I believe the tiles used for the character portrait are the ones I put a red box around. The last "char base" option is the only one that produced visible representations of the sprites. Some questions: I clicked on one of the tiles in the box there, is the "address" of 06014480 going to be a way to consistently find that tile when loading the ROM up in a graphics editor? Or is it only linked to the tile in that specific frame? Also, what I would like to do is change it so just the blank blue window is shown where the portrait used to be. To accomplish this, would I just change each pixel to the same color as the background to simulate transparency? I'm not sure why it's green or if it would turn up green when properly loaded into an editor, but would using that color to paint over the portrait tiles effectively make it an invisible layer?

Sorry if this is really basic stuff, but I'm pretty lost trying to get the tilesets properly loaded and am wondering if the FFV US ROM maybe doesn't play as nice with the editors available here as some other games do. Any advice on methods to use or even just pointing me towards more relevant tutorials would be greatly appreciated.

Splatter

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #1 on: March 19, 2014, 10:07:25 pm »
I don't have the information you need, but I want to post my moral support. The script in Final Fantasy V's Game Boy Advance port is so much better than the fan translation (no disrespect to RPGe) or Anthology version (some disrespect to whoever put that pirate nonsense in). The character portraits are so terrible, though, that I practically cringe every time your party members open their mouths.

FAST6191

  • Hero Member
  • *****
  • Posts: 3023
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #2 on: March 20, 2014, 08:40:09 am »
Personally I am not bothered by the portraits but my shortcomings when it comes to art criticism are not unknown to me.

By the way it is usually the European versions of the game that get fiddled with, certainly the music patch is for the Euro version. http://www.romhacking.net/?page=hacks&genre=&platform=&game=818&category=&perpage=20&title=&author=&hacksearch=Go does not have as much as it does for the likes of the other FF advance ports but hey. You will want the sound patch if you are used to the SNES version as well.

We could go long and discuss the GBA graphics system but there is an easier method in this case.

Assuming you do not have the location of the portraits in the ROM you get to find them. Looking at the tile/background viewers is the first step on that path. After that http://www.romhacking.net/documents/361/ covers the method. Hopefully it is just a copy of some form from memory but you could also face compression, such things are not so bad on the GBA.

Alternatively you might find something simply scanning through the ROM with a tile viewer or try a slightly less involved method than the one linked (compression searching, BIOS logging.....), the one linked will get you the location of the data in question though.

Now if you used the method in the guide you could do the in depth removal thing (you would have had the instructions that deal in the loading of the data). The simple method is the GBA has transparency assigned to whatever the first palette value is, overwrite the portraits with transparent values and though the game will still load that area into RAM it will then have nothing visible to display.

As for what you have done thus far the memory location you mention is in the VRAM and nothing to do with the cartridge/ROM at all ( http://nocash.emubase.de/gbatek.htm#gbamemorymap ). It will probably stay in that location for every boot (more dynamic stuff did not happen until the DS and even there is not so common) but nobody really does N64 style texture hacks for the GBA at this point in time. The tile editors will tend to just show jumbled pixels until such a time as you line it all up -- the GBA does not have a filesystem commercial games used so it is all bundled into one file. It may happen that you get lucky some times and it loads fine (tile editors have default values and ROMs work in certain ways that allows for it to happen often enough) but it is not assured.

Tools

For the GBA I like, not all GBA supporting tools support all modes (several great tools for the SNES and co that say they support the GBA lack 8bpp GBA format) but the ones I link in a moment do.

Tiled2002
http://home.arcor.de/minako.aino/TilEd2002/
Nice little tool, it has issues with custom tile sizes though. Very few things on the GBA use it.

Crystaltile2
http://www.romhacking.net/utilities/818/
Its palette options are not as nice as the one above but it supports custom tile sizes and a few very odd/esoteric modes.

TileGGD (not really an editor, a very flexible viewer though)
http://code.google.com/p/tiledggd/

Compression capable graphics editing is also a thing. http://www.romhacking.net/?page=utilities&category=&platform=10&game=&author=&os=&level=&perpage=20&title=&desc=compressed&utilsearch=Go has a few. Crystaltile2 also has limited capabilities here.

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #3 on: March 20, 2014, 01:17:44 pm »
For what it's worth, I played around with it for a while and was able to find where the avatars are stored. And since they were compressed using the standard bios LZ77 routine, replacing them with blank ones was a cinch.

Here's how it looks like:


For the record, the pointer table for the avatars is stored at 0x1465A0 (for the European rom). Each avatar is prefixed by 0x01 0x00 0x00 0x00 0x14 0x00 0x00 0x00, followed by 640 bytes of tile data.
I was hoping to also move the text 3 tiles left so as not to leave blank space where the portraits used to be, but ran into some strange problems with write breakpoints not triggering in no$gba. I have some notes if someone is interested in doing that part.

Anyway, here is a quick and dirty patch, if you want to try it out. Just apply it to the European rom. Needless to say, this hasn't been extensively tested.
« Last Edit: March 20, 2014, 02:57:48 pm by mziab »

ginja_ninja

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #4 on: March 20, 2014, 08:17:51 pm »
Damn mziab, that is pretty much exactly what I wanted to accomplish! You rock! I am playing through the early game in VBA right now and everything seems to work great. I imagine it would require a lot more work to realign all the text to the entire window, and personally I wasn't even planning on attempting it. In any case certainly don't feel like you're obligated to have to do that, I came here just looking for a few pointers and you went above and beyond and basically realized my idea for me. Thanks so much. I have been wanting to do another playthrough of the game for a while so I would gladly make sure everything still worked properly at the later points in the game. Honestly I can't imagine any complications arising from just getting rid of the portraits though, I think you should publish your patch here for anyone else who might be interested to download in the future.

Thank you for linking all of those resources as well, FAST6191. Maybe I will play around with them and see if I can figure out how to recreate the effect just for my own knowledge. You guys have a really helpful community here, I can't thank you enough.

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #5 on: March 20, 2014, 08:40:16 pm »
Glad I could help, even if it's not very educational in the end :) Giving a man a fish and all that...

To be fair, I was expecting it to be more involved, but it turned out to be pretty standard stuff. You should be able to redo this on your own without much arcane knowledge, I think.

You're right, moving the text is a bit more involved, but in the end I expect that all you need to change will amount to a single hardcoded memory address. But I ran into a quirk with the debugger I was using and I kind of gave up midway. It would be nice to finish this though, if only for aesthetic reasons.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #6 on: March 21, 2014, 04:29:19 am »
Some games use manual line breaking only. You will need to change the entire script if you want to change the line length if that is the case.

VicVergil

  • Hero Member
  • *****
  • Posts: 726
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #7 on: March 21, 2014, 04:41:48 am »
Instead of looking for the graphics, you could try and alter the bytes in front of the text after studying them to notice a pattern: some of those are for portraits. You find the value for "no portrait dialogues" and you apply it everywhere.

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: Removing character portraits in FFV (GBA)
« Reply #8 on: March 21, 2014, 05:59:22 am »
You could simply dummy the bytecode interpreter used to trigger a portrait from script. It's probably a 2 byte change that would apply to the whole game in one shot.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #9 on: March 21, 2014, 06:15:38 am »
There are several ways to go about this, but blanking out the avatars was the laziest, so... :) I agree Gemini's idea is the way to go and would take care of the empty space on the left in one fell swoop. And the most ambitious option would be to add an option for this to the in-game menu :)

Bregalad

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #10 on: March 21, 2014, 07:32:30 am »
I can't say much but I fully support this hack, because the character portraits were absolutely terrible. (just as anything that wasn't straight from the SNES game by the way...)

However if this is replaced by a large blank space, it definitely doesn't look much better. You should either make the text left-aligned, or make the window smaller. (the first option is also probably the easiest)

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #11 on: March 21, 2014, 12:05:37 pm »
So anyway, I tried short-circuiting the bytecode command like Gemini suggested and was able to make some progress. Found the routine which displays an avatar based on the bytecode, but the command in question seems to be used for more than just avatars, so I can't disable the whole thing at this level. More research pending :)

Zero Dozer

  • Full Member
  • ***
  • Posts: 179
  • Wow, I've used that Eminem quote for a long time.
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #12 on: September 22, 2014, 10:53:56 am »
Well, time to get this off the grave for the same reason.

Six months later, it's my turn to search for a portrait removal patch, for the american version. Mziab, your Dropbox link's down.

I'll try to figure it out from FAST6191's tutorial. If I'm able to do something about it (though I can't guarantee or even promise anything, I'm a newbie when it comes to ROM hacking), I'll make a patch myself.
« Last Edit: September 22, 2014, 11:02:04 am by Zero Dozer »

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #13 on: September 22, 2014, 12:02:23 pm »
Mziab, your Dropbox link's down.

Just checked and it works here. I haven't removed it or anything, so there shouldn't be any problem.

Zero Dozer

  • Full Member
  • ***
  • Posts: 179
  • Wow, I've used that Eminem quote for a long time.
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #14 on: September 22, 2014, 01:37:12 pm »
Wait, now I've noticed that the link sends me right into the IPS's text. Downloaded it, I wonder if it would work with the US version.

Edit: Tested the maneuver. Didn't work. Worked for the european version as you said, though.

Y'know, the patch works as far as I know, so why don't you put it in RomHacking's patch database?
« Last Edit: September 22, 2014, 01:44:31 pm by Zero Dozer »

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #15 on: September 22, 2014, 01:51:00 pm »
Because it's just a quick and dirty hack made by replacing said avatars with blanks. That is not the proper solution, as mentioned above. As such, I don't think submitting it makes sense.

Zero Dozer

  • Full Member
  • ***
  • Posts: 179
  • Wow, I've used that Eminem quote for a long time.
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #16 on: September 23, 2014, 08:39:26 pm »
I was doing some small research with the guides FAST6191 gave here. Though I didn't succeed in making the patch, Darthatron from Final Fantasy Hacktics helped me and ended reproducing Mziab's patch on the US Version. I'll check the patch and tell you the results.

Edit: It works.


Also, Dart allowed me to post the link to his patch. Like Mziab's, this patch is a replacement, still unsuitable to make it to the database.
« Last Edit: September 23, 2014, 08:57:57 pm by Zero Dozer »

Darthatron

  • Newbie
  • *
  • Posts: 4
  • Massive Troll
    • View Profile
Re: Removing character portraits in FFV (GBA)
« Reply #17 on: September 23, 2014, 08:55:16 pm »
mziab, I just copied your hack over to the US version. The pointer table is at 0x1446E8 in the US version.

I, initially, was going to do it a different way; that is just stop the functions that call the data from firing, but it was causing graphical glitches for unknown reasons. As you've said, this is a dirty hack, but it's doing the job, so let's just leave it.

Anyway, thanks for doing all the hard work. ;)

mziab

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
    • mteam
Re: Removing character portraits in FFV (GBA)
« Reply #18 on: September 24, 2014, 03:19:31 pm »
Cool, nice to hear someone has some use for it, simple though it may be. I was planning on doing it the right way, but ran into pretty much the same snag you did and gave up. That particular bytecode command seems to be used for more than just loading avatars, at least from what I've seen. The avatars don't bother me all that much, so I probably won't be revisiting this.