• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 02:07:48 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


FFTA2 - Fixing Al-Cid and Agent

Started by Julian, September 17, 2017, 07:14:38 pm

Julian

September 17, 2017, 07:14:38 pm Last Edit: September 17, 2017, 08:11:02 pm by Julian
Hi all,

Novice rom hacker but experienced programmer here. Been replaying FFTA2 recently, got to Al-Cid, wanted to use him in my party without the dumb limitations, and I have now gone down this rabbit hole! (Yes, I realize I am probably the only person in the world that likes him and wants to use him. -_-)

Anywho, here is my progress:

Anyone who has changed Agent to "can change jobs" knows that once Al-Cid changes jobs, he can't change back. I managed to add Agent to Al-Cid's job list successfully. (Thanks, Edea! (RHDT)) (And on a side note - I can easily add any special job to any character now, providing the races match. Gave Frimelda Agent as well to help test. There seems to be a limit to two characters per special job, though.)

This has brought another issue: When you're an Agent and you change jobs, everything else is marked "*MASTER". When you change from anything else to Agent, Agent is marked as "*MASTER". Playing around a bit, this seems to be tied to the primary skillset of the job. When I change Agent's primary command from Reconnaissance to, say, Piracy, everything works perfectly.

It looks like the issue is with the Reconnaissance skillset itself. When you equip it, or rather, a job with it as its main skillset, you can only use "Items" as a secondary, everything other secondary is unusable. (You -can- use passives and reactions, though!) Likewise, it seems that, either inherently from the initial restriction, or as another restriction on itself, other primaries cannot equip Reconnaissance as a secondary.

So, at a little bit of a loss here on the front end. Getting tired of staring at hex editors and constantly reloading this game to see what happens. :P I think I'm pretty close, if my gut is correct all I need to do is fix the Reconnaissance skillset to be like the rest, and it should work. I can't find any decent hex editors with good searching abilities (say, regex, or dynamic number of wildcards, etc...) so I think I'll just write a quick hex parser to do searching on to see if I can find any interesting offsets.

I figured I'd ask if anyone else has any insights on this. :P I'll keep y'all updated with anything else I find, as well.  (This -almost- makes me feel like making my own rom hack! But at that point I think I'd rather just build my own game from scratch.)

Julian

edit: I will cry when he ends up missing animations and crashes ;_;
  • Modding version: Other/Unknown

Zeke_Aileron

Quote from: Julian on September 17, 2017, 07:14:38 pm
Anyone who has changed Agent to "can change jobs" knows that once Al-Cid changes jobs, he can't change back. I managed to add Agent to Al-Cid's job list successfully. (Thanks, Edea! (RHDT)) (And on a side note - I can easily add any special job to any character now, providing the races match. Gave Frimelda Agent as well to help test. There seems to be a limit to two characters per special job, though.)


You was able to add the special job to the special unit's job list, i'm curious on how to do that as well.
  • Modding version: Other/Unknown
  • Discord username: Zeke Aileron™#0606

Julian

September 18, 2017, 09:07:00 pm #2 Last Edit: September 18, 2017, 10:42:05 pm by Julian
Table starts at 0x053FFEA2

These are the values according to Edea:

12 bytes:
Byte 00: Index/order the job will appear in
Byte 01: Job ID
Bytes 02 and 03: Unique Sprite ID, one in each byte (see below)
Bytes 04-09: A-Ability mastery requirements (up to 3 jobs - didn't look too much into it, should be able to reverse it from known classes)
Bytes 0A-0B: Quest completion prerequisite (did not look into this at all as I'm not very interested in it)

Theoretically I suppose you could assign a class to more than 2 people by just repeating the entry.

Sprite ID's: (didn't double check all of them but should be it)
01 Luso
02 Cid
03 Adelle
04 Hurdy
05 Vaan
06 Penelo
07 Al-Cid
08 Montblanc
3A Frimelda

The table fits every job assignment perfectly, and ends with Heritor. Since there was no space, I used the 00 job assignment, since it's unused. Could potentially use Keeper's as well, I suppose. No issues seen from testing.

Anywho, I spent like 4 hours looking for that offset I was looking for to no avail. I'm starting to think the game just has a hardcoded check for Reconnaissance when playing around in the menu. It probably wouldn't be too difficult to find it if I had a proper debugger.

So, the solution I came up with was to swap skillsets with Nightshade. (I tried skillset 00, didn't work.) Agent gets the Guile skillset, Nightshade gets Reconnaissance. I then swapped the skills in each skillset, then swapped the pointers for the skillset name and description. So effectively, I just rearranged the skillset ID: 5E is now Guile (which the game has some hardcoded check to gimp, I believe) and 5D is now a fully functioning Reconnaissance.

Screenshots: https://imgur.com/a/ZaXY8  - Using Frimelda as a test subject since she has skills learned, to show how everything works properly.

I just tested the final battle really quick.... and Illua lost all her skills XD oops. Not entirely too sure why. So this isn't perfect but it's the least damaging solution I can come up with for now, and not an issue for me since I beat the game already. Attached a ups patch for anyone who may be interested. (Agent Frimelda not included!)

edit: Apparently fat fingered one of the bytes on the new Guile skillset, fixed it, didn't change anything. D: Oh well.
edit2: Eyy, I fixed it! Updated patch attached. Should work flawlessly with no issues now. About to load up onto my 3ds to play a bit and test.
edit3: If you're loading a save with Al-Cid already on it, he'll have Guile equipped. Change jobs and it'll go away forever.
edit4: So... Went into a fight with Soldier Al-Cid. Went to hit an enemy, game crashed XD no animation I guess. All this for nothing lol. Oh well I was just about done with this game I guess, had some fun figuring this out anyway. :)
  • Modding version: Other/Unknown