News: 11 March 2016 - Forum Rules

Author Topic: FF4 GBA & PSP - Editing Magic and Commands  (Read 1921 times)

PowerPanda

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
FF4 GBA & PSP - Editing Magic and Commands
« on: May 20, 2020, 11:49:43 pm »
Hello. I am looking to do a series of small hacks for Final Fantasy IV GBA and PSP that offer some compelling tweaks.

The first patch I'd like to release (for both versions) expands Cecil and Rydia's White Magic lists to include the additional spells that they learn in the 3D version (DS/iOS/Android/Steam). For Cecil, this expands his list from 6 spells to 9, adding Protect, Shell, and Raise (aka Life), and making him a bit more versatile towards the end of the game. For Rydia, this expands her list from 3 white magic spells to 7, adding in Confuse, Esuna, Cura, and Raise. If I can figure out how, I'd like to re-use some animations from enemy skills to create Edge's 3 additional Ninjutsu of Gale, Tremor, and Frost -- skills that don't currently exist in the game's code. That will be saved for version 2 though. Attached is the completed patch for GBA as a proof of concept.

The second patch I'd like to release expands the command list of a few characters. For example, Paladin Cecil will gain Gird/Brace so that he can up his defense and then cover other characters. Kain will gain Kick in addition to Jump so that he has a much-needed attack-all option. If possible, I'd like to give Child Rydia's white magic to Edward, and give Salve/Heal to someone else.

I have done quite a bit of research, and have found all of the data I'm looking for in the GBA rom. I've done some test edits, and my changes are working. For the PSP EBOOT.BIN, I'm having a bit more trouble. I'm new to PSP editing, and while editing the decrypted EBOOT in a hex editor is relatively simple, I don't know the first thing about re-encrypting the EBOOT to stick back into the ISO. (Actually compiling the iso is something I did with FFT: War of the Lions, so I know I can do that part when the time comes.) I've searched for a guide, but it appears to be one of those things where "if you know, you know, and if you don't, you shouldn't be touching it". Does anyone have experience, and would you be willing to (A) give me some pointers, or (B) re-encrypt my EBOOT?

I'm attaching my research notes for spell lists and command data. For spell lists, I've found all that I'm looking for, and am ready to make edits. For command data, I've found everything in the GBA version, but in the PSP version, I'm struggling to find the pointer table that tells the game which command list to read for each character. Any help is appreciated.

Here are my notes and the initial patch:
https://drive.google.com/file/d/1jGZ1_NpdvyIrq09OCYeJnuHvwVmU2bMJ/view?usp=sharing

EDIT: Corrected Google Drive share settings so that you can actually view the link.  :P


May 22, 2020, 09:40:22 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Hmm... so I ran a test today, and learned 3 things:
1. The EBOOT doesn't HAVE to be re-encrypted in order for the PSP to run it. It runs an un-encrypted EBOOT just fine. That's good for testing out the hack, but not so good for releasing a patch, since any patch I put out would be essentially distributing an entire rom. Still, it means I can test without having to worry about several extra steps, and that's great.

2. For the PSP version, the data for my magic lists is accurate, but the data for my command pointers is not. That data is an artifact from the GBA version, and is junk data. The good news is that gives me plenty of space for writing new magic lists.

3. The PSP version will accept ANYTHING as valid magic for a magic list. This includes item spells (Heal, Basuna, Mage Arrow), and even enemy spells. I haven't tested these in battle yet, but the fact that they're showing up in the menu is encouraging, and brings us one step closer to giving Edge his 3 new spells.
« Last Edit: May 22, 2020, 09:40:22 pm by PowerPanda »