Final Fantasy Hacktics

Modding => Non-FFT Modding => FFTA/FFTA2 Hacking => Topic started by: Rurusachi on April 08, 2025, 11:28:27 am

Title: FFTA2 Editor v1.3.3
Post by: Rurusachi on April 08, 2025, 11:28:27 am
I made an editor for FFTA2 that reads and rebuilds the internal filesystem instead of using fixed offsets. It can do everything that currently existing editors can do (as far as I know) + more. However the saved rom is not compatible with any other editors because all the known data offsets will change after editing. Manually editing with a hex editor is possible if you can find the new offsets.

Setup instructions and known issues can be found here:
FFTA2 Editor (https://github.com/Rurusachi/ffta2-editor)

Current version: v1.3.3

Features:

Changelog:
v1.3.3 (2025/06/01):
Fixes:
v1.3.2 (2025/05/13):
As of this update text encoding/decoding and line height calculations should finally be correct.
A new menu at the top named Fixes contains a fix that resets all text affected by the encoding bug to vanilla.
Features:
Fixes:
v1.3.1 (2025/04/29):
Features:
v1.3.0 (2025/04/26):
Features:
Fixes:
v1.2.3 (2025/04/19):
Features:
v1.2.2 (2025/04/16):
Features:
Fixes:
v1.2.1 (2025/04/15):
Features:
Fixes:
v1.2.0 (2025/04/14):
Fixes:
v1.1.3 (2025/04/13):
Fixes:
v1.1.2 (2025/04/12):
Fixes:
v1.1.1 (2025/04/11):
Fixes:
v1.1.0 (2025/04/08):


Included optional patches:
Title: Re: FFTA2 Editor v1.2.0
Post by: Rurusachi on April 14, 2025, 09:44:25 am
I just released v1.2.0 which fixes a bug that affects any rom saved with a previous version of the editor. To fix affected roms either start over from a clean rom or follow the manual fix found here (https://github.com/Rurusachi/ffta2-editor/releases/tag/v1.2.0).
Title: Re: FFTA2 Editor v1.2.2
Post by: Emin3ms on April 16, 2025, 03:33:13 pm
Amazing, thanks a lot man
Title: Re: FFTA2 Editor v1.2.2
Post by: Saul-G on April 17, 2025, 03:07:30 am
That's impressive. Your editors is pretty solid alright!
Just asking a question: It is possible to add an option to set the level cap? Like making all units (both yours and the enemy) to reach max level 50?
Title: Re: FFTA2 Editor v1.2.3
Post by: Rurusachi on April 18, 2025, 06:39:49 pm
Quote from: Emin3ms on April 16, 2025, 03:33:13 pmAmazing, thanks a lot man
Thank you :)

Quote from: Saul-G on April 17, 2025, 03:07:30 amThat's impressive. Your editors is pretty solid alright!
Just asking a question: It is possible to add an option to set the level cap? Like making all units (both yours and the enemy) to reach max level 50?
Thanks :)
I can look into it. I've seen a post mentioning how to do that somewhere.
Title: Re: FFTA2 Editor v1.2.3
Post by: Emin3ms on April 19, 2025, 06:32:36 am
I'd like to know more about how you managed to make this editor. Have you been able to identify parts of the source code in assembly ?

There is this feature I've spent a lot of time trying to implement but no success, it's the possibility to have negative stats on equipment. Do you think it's possible ?
Title: Re: FFTA2 Editor v1.2.3
Post by: Rurusachi on April 19, 2025, 04:06:36 pm
Quote from: Emin3ms on April 19, 2025, 06:32:36 amI'd like to know more about how you managed to make this editor. Have you been able to identify parts of the source code in assembly ?
A while ago I found a text editor that had been built to translate the game. I looked at the code and realized it was unpacking and rebuilding the internal filesystem. This gave me the idea to build an all-purpose editor that does the same instead of using known fixed offsets. I built the editor by studying the code of this translation tool and reverse engineering the game with Ghidra. I've used Ghidra to map out a lot of the game's code at this point.

Quote from: Emin3ms on April 19, 2025, 06:32:36 amThere is this feature I've spent a lot of time trying to implement but no success, it's the possibility to have negative stats on equipment. Do you think it's possible ?
That should be possible. I looked into it and it seems to mainly be a matter of changing some instructions to load the stats as signed values instead of unsigned. The slightly more complex part is changing the calls to display equipment stat as signed values but it's doable. I've attached some screenshots with a working implementation for the attack stat only. I'll add this as a patch in the editor at some point :)
Title: Re: FFTA2 Editor v1.2.3
Post by: vangstampede on April 20, 2025, 04:09:17 am
This editor is able to make it so that Al-Cid can change job? Instant 10/10 in my book.

Some questions, do you have plans to add features to edit:
1. your clan member's stats?
2. abilities, such as changing Charged Attack's 8 attack value into 40 and increasing Regen's health regeneration value?
3. MP regeneration rate, like say, 15 instead of 10?
Title: Re: FFTA2 Editor v1.2.3
Post by: Rurusachi on April 20, 2025, 05:51:37 am
Quote from: vangstampede on April 20, 2025, 04:09:17 am1. your clan member's stats?
If you mean the starting clan members they are in Formation 0. Formation 0 contains all the recruitable units. Any unit with Faction set to 8 will be a starting clan member.

Quote from: vangstampede on April 20, 2025, 04:09:17 am2. abilities, such as changing Charged Attack's 8 attack value into 40 and increasing Regen's health regeneration value?
3. MP regeneration rate, like say, 15 instead of 10?
These values are defined in the battle scripts which I haven't fully understood yet. I have found the mp per turn part of the script and made a proof-of-concept flat + %max mp per turn mod. I just need to implement it in the editor. I haven't found any other values in there yet but eventually yes
Title: Re: FFTA2 Editor v1.2.3
Post by: Emin3ms on April 20, 2025, 06:08:09 am
Damn bro you are such an unexpected hope 🤣

When i wrote the issue about yaml tasks/playbook I didn't see that you already have a Patch section in the editor, so another option could be to have a list of patches available like it is currently in the editor, with a little form if needed to adjust some values. Problem is that if you stop being active on this project there won't be new patches ^^
When it comes to edit assembly code it's difficult without known parts so anyway I wouldn't know how to create a patch !

My 2nd big change that i wanted to make is to gain % of max mana per turn instead of flat. We know the location of the flat values but then I haven't found the function that uses them.
Title: Re: FFTA2 Editor v1.2.3
Post by: Rurusachi on April 20, 2025, 07:00:52 am
Quote from: Emin3ms on April 20, 2025, 06:08:09 amWhen i wrote the issue about yaml tasks/playbook I didn't see that you already have a Patch section in the editor, so another option could be to have a list of patches available like it is currently in the editor, with a little form if needed to adjust some values. Problem is that if you stop being active on this project there won't be new patches ^^
When it comes to edit assembly code it's difficult without known parts so anyway I wouldn't know how to create a patch !
It's open source so anyone can contribute if they want to ;).
I do also plan to include an import/export function for the internal files. That way they can be modified outside of the editor if you know what you're doing.
But having a format for defining external patches is a good idea I'll write that down.

Quote from: Emin3ms on April 20, 2025, 06:08:09 amMy 2nd big change that i wanted to make is to gain % of max mana per turn instead of flat. We know the location of the flat values but then I haven't found the function that uses them.
Already on the way (mentioned one post above you) :).
I can explain it a bit more. The flat values you're talking about are inside one of the battle scripts ("battle/btlprocess.sbn" to be specific). The battle scripts are written in their own scripting language. So the values are actually part of a "push to stack" call in the script. That part of the script is roughly:
This is slightly simplified and eventually after this it calls setUnitCurrentMp with the new value. There's some more calls in there to manage the stack and memory. I'm also not 100% sure how it gets the unit pointer. I wrote a hook in the scripting language that also gets the max mp, divides by 10, and adds it to the value. I just need to implement it as a patch in the editor with customizable values.
Title: Re: FFTA2 Editor v1.2.3
Post by: Emin3ms on April 20, 2025, 07:47:56 am
Wonderful, how have you been to extract scripts ? With ghidra ?
Title: Re: FFTA2 Editor v1.2.3
Post by: Rurusachi on April 20, 2025, 11:16:17 am
Quote from: Emin3ms on April 20, 2025, 07:47:56 amWonderful, how have you been to extract scripts ? With ghidra ?
I found the filenames in the code with Ghidra. The internal filesystem is basically a hashtable so it doesn't store the filenames.
I currently use a python script to extract files but the editor can also do it, I just haven't made the UI for it. The editor already extracts the files to memory for editing (That is the core idea of the editor after all), I just have to make the UI for selecting which files to extract.
Title: Re: FFTA2 Editor v1.2.3
Post by: vangstampede on April 20, 2025, 06:19:04 pm
Quote from: Rurusachi on April 20, 2025, 05:51:37 amIf you mean the starting clan members they are in Formation 0. Formation 0 contains all the recruitable units. Any unit with Faction set to 8 will be a starting clan member.

Not that, I meant editing the stats of all the characters I currently have recruited as clan members. Like, suppose that I accidentally level up Luso as Soldier instead of Paladin. I wanna edit Luso so that Luso stays on the same level but his stat is adjusted as if he just leveled up as Paladin instead of Soldier.

Quote from: Rurusachi on April 20, 2025, 05:51:37 amThese values are defined in the battle scripts which I haven't fully understood yet. I have found the mp per turn part of the script and made a proof-of-concept flat + %max mp per turn mod. I just need to implement it in the editor. I haven't found any other values in there yet but eventually yes

Looking forward to that! I've always thought that it's messed up how Doublehand and Charged Attack only give 8 extra attacks lol
Title: Re: FFTA2 Editor v1.2.3
Post by: Rurusachi on April 21, 2025, 09:26:42 am
Quote from: vangstampede on April 20, 2025, 06:19:04 pmNot that, I meant editing the stats of all the characters I currently have recruited as clan members. Like, suppose that I accidentally level up Luso as Soldier instead of Paladin. I wanna edit Luso so that Luso stays on the same level but his stat is adjusted as if he just leveled up as Paladin instead of Soldier.
Oh this editor is only for editing the rom. It's not for save or memory editing. That's completely different.

Quote from: vangstampede on April 20, 2025, 06:19:04 pmLooking forward to that! I've always thought that it's messed up how Doublehand and Charged Attack only give 8 extra attacks lol
Yeah that's ridiculous lol. I'll find the values eventually so they can be fixed.
Title: Re: FFTA2 Editor v1.2.3
Post by: vangstampede on April 21, 2025, 11:23:14 am
Quote from: Rurusachi on April 21, 2025, 09:26:42 amOh this editor is only for editing the rom. It's not for save or memory editing. That's completely different.

Oh, I see. I legit didn't know that, thanks.
Title: Re: FFTA2 Editor v1.3.0
Post by: GasT87 on April 28, 2025, 10:53:25 am
Amazing work, from time to time I still play around with A2 but never have the time to finish anything. This will hopefully help me get things back on track.
A question that has bothered me ever since the game release is that Nu Mou and Moogle can't enter water and changing their jobs to allow them too crashes the game. Would the animation fix patch fix this or is there something else that can be changed to make them work? Also if I understand correctly the animation patch would enable any race to use any weapon? Like spear wielding Viera o Nu Mou using braces?
Title: Re: FFTA2 Editor v1.3.1
Post by: Rurusachi on April 29, 2025, 10:33:23 am
Quote from: GasT87 on April 28, 2025, 10:53:25 amA question that has bothered me ever since the game release is that Nu Mou and Moogle can't enter water and changing their jobs to allow them too crashes the game. Would the animation fix patch fix this or is there something else that can be changed to make them work?
The problem here is probably that they don't have an alternate sprite set for being in water. It should be possible to add in-water sprites for them. Though since the editor doesn't support animation editing you'd have to copy the in-water unit sprites from a race that already has all the animations Moogle/Nu Mou need.

Quote from: GasT87 on April 28, 2025, 10:53:25 amAlso if I understand correctly the animation patch would enable any race to use any weapon? Like spear wielding Viera o Nu Mou using braces?
Yes
Title: Re: FFTA2 Editor v1.3.1
Post by: Saul-G on April 29, 2025, 11:55:48 pm
Nice nice nice nice nice nice...

These improvements on your editor are quite impressive after a few weeks. Thanks to implementing the level cap, btw.

What more can be done to improve the editor? Maybe adding a flag for monster abilities than can be learn by blue mages? Would that be hardcoded?

What about modifying the unit list that can join your clan on these events? Whould be possible for monsters to join the clan that way?

Sorry if this is read like it that can be easily added upon. Thanks for your fine work.
Title: Re: FFTA2 Editor v1.3.1
Post by: Emin3ms on April 30, 2025, 03:47:49 pm
Are item slots used for grenades usable to create new items or they have something special hardcoded ? Same question for possibility of reordering the items
Title: Re: FFTA2 Editor v1.3.1
Post by: Rurusachi on May 02, 2025, 05:59:06 am
Quote from: Saul-G on April 29, 2025, 11:55:48 pmWhat more can be done to improve the editor? Maybe adding a flag for monster abilities than can be learn by blue mages? Would that be hardcoded?
Each ability has a field for what ability can be learned from it. Each Blue Magic ability has a Blue Mage version and a monster version. The monster version has the field set to the Blue Mage version (there is also a flag that is automatically handled by the editor).

Quote from: Saul-G on April 29, 2025, 11:55:48 pmWhat about modifying the unit list that can join your clan on these events? Whould be possible for monsters to join the clan that way?
Formation 0 contains all the recruitable units. Any event where a unit joins the clan uses it. But I haven't figured out enough about the event scripts to modify them properly yet.
Having monsters join would probably work to some degree. But I don't think they have all the animations needed. I can look into that at some point, but probably not anytime soon as a lot of other things would need to be figured out first anyway.

Quote from: Emin3ms on April 30, 2025, 03:47:49 pmAre item slots used for grenades usable to create new items or they have something special hardcoded ? Same question for possibility of reordering the items
I don't think anything about the grenades is hardcoded. There are some items that have hardcoded effects though such as Mirror Mail and Angel Ring (and Peytral and Sequencer but there's a patch for those). There might be others, those are just the ones I know of.
It's generally not a good idea to try to reorder things because they might also be referenced in data that can't be edited properly yet (like event and battle scripts).
Title: Re: FFTA2 Editor v1.3.1
Post by: Emin3ms on May 03, 2025, 11:26:39 am
More questions and requests :
- is there a way to add reaction, support, and opportunity abilities to the editor ? AP values and linked action ability ?
- what about traps, can we edit effects the same way we do for regular abilities ?
- the items given by Judges when law has been respected seem to be always the same, how can this be edited ?
- can you make dropdown menus to unit's loot tables in the formation editor, instead of a number which we don't know what it means ?
- how to change which classes are valid for quests such as "Wanted: Sidekick" (0x113) ?
- how to edit the required clan title for recruiting some classes ?
- do you know where is the formula that calculates hit or miss ? because in this game 75% feels like 50%
- AP slots is quite a confusing thing, can we use any value or only those that originally exist in the game ?

Thanks a lot for your help :)
Title: Re: FFTA2 Editor v1.3.1
Post by: Rurusachi on May 06, 2025, 05:53:31 am
Quote from: Emin3ms on May 03, 2025, 11:26:39 amMore questions and requests :
- is there a way to add reaction, support, and opportunity abilities to the editor ? AP values and linked action ability ?
- what about traps, can we edit effects the same way we do for regular abilities ?
- the items given by Judges when law has been respected seem to be always the same, how can this be edited ?
- can you make dropdown menus to unit's loot tables in the formation editor, instead of a number which we don't know what it means ?
- how to change which classes are valid for quests such as "Wanted: Sidekick" (0x113) ?
- how to edit the required clan title for recruiting some classes ?
- do you know where is the formula that calculates hit or miss ? because in this game 75% feels like 50%
- AP slots is quite a confusing thing, can we use any value or only those that originally exist in the game ?

Thanks a lot for your help :)
Title: Re: FFTA2 Editor v1.3.1
Post by: apoc_now on May 09, 2025, 10:08:27 pm
Thanks for the editor, though I have some questions:
1. Is it possible to make a patch that allows a Beastmaster's controlled monster to use the Move command?
2. There's a patch that enables level scaling somewhere, hopefully you could implement that into your editor.
Title: Re: FFTA2 Editor v1.3.1
Post by: Rurusachi on May 11, 2025, 08:12:06 am
Quote from: apoc_now on May 09, 2025, 10:08:27 pmThanks for the editor, though I have some questions:
1. Is it possible to make a patch that allows a Beastmaster's controlled monster to use the Move command?
2. There's a patch that enables level scaling somewhere, hopefully you could implement that into your editor.
Title: Re: FFTA2 Editor v1.3.2
Post by: SuperiorDonut on May 18, 2025, 02:52:44 am
Do you think you would be able to make a generalized no-music patch? It's always kinda bugged me that I can't play this game with the music muted. The OST is great, but I've heard each song for dozens of hours (literally) over the years and I can't listen to it every time I replay it anymore hahaha. I just mute the game, but the sound effects are great and I miss getting to hear them (aside from maybe the menu stuff; attacks, spells, etc. I've never gotten sick of though haha).

If such a thing already exists, or I'm just super oblivious and such an option already exists in game I apologize! If it doesn't though I would tremendously appreciate it if you are able to! :)

Thanks for your work here in general regardless! I'm looking forwards to seeing what comes from the increased flexibility that rom hack makers will have in the future due to the efforts of you and your predecessors in the editor space :) I've seen mention of shrike saying that nu mou bows are possible now! Stuff like that is awesome!

(Btw, if a forum moderator reads this, the verification questions, asking for trivia from the original final fantasy tactics game (which I have not played and thus have no intuition for to be able to answer the question) took 1/3-1/2 as long as writing this message did! I hope it is made more lenient/less specific in the future!)
Title: Re: FFTA2 Editor v1.3.2
Post by: Wolfric on May 19, 2025, 02:36:51 pm
Holy cow this is amazing! You should absolutely submit this to other sites like romhack.ing and romhacking.net, I'm sure many unaware of these tools could be lured!

Quote from: SuperiorDonut on May 18, 2025, 02:52:44 am(Btw, if a forum moderator reads this, the verification questions, asking for trivia from the original final fantasy tactics game (which I have not played and thus have no intuition for to be able to answer the question) took 1/3-1/2 as long as writing this message did! I hope it is made more lenient/less specific in the future!)

You're not wrong, it's a super archaic filter. I struggled A LOT trying to make an account (And even joined and searched keywords on the Discord to find answers). They should definitely make it simpler, for it is aggresively unintendedly gatekeeping.

Hopefully they do read this, 'cause I don't see where else to post it (Don't see a forum board for suggestions or w/e).
Title: Re: FFTA2 Editor v1.3.2
Post by: blaide on May 21, 2025, 12:18:40 pm
This is incredible! Thank you so much for your amazing work.

The first FFTA game has always been my favourite of the two games, do you have any experience creating resources for the GBA game, I would love to see a new all in one editing tool for the first game, I feel if anyone can create it, you can :)

Keep up the brilliant work!
Title: Re: FFTA2 Editor v1.3.2
Post by: Zeke_Aileron on May 23, 2025, 08:25:05 am
I've been curious for some time now about this editor Rurusachi, is there any way to implement the following below to the editor to make it possible for Players to mess with?
Mechanics that might be implemented?

So far the Editor has been amazing and has done it's job for a lot of stuff that i've been able to previously do and some extra, love the work you've done for this Editor, it's been a great asset for the FFTA2 Modding scene and i'm hoping in the future it continues to get some extra QOL stuff.
Title: Re: FFTA2 Editor v1.3.2
Post by: maroon on May 27, 2025, 12:05:54 pm
i try to save by click on save as and then stuck on saving please wait does it take long to save or not?
Title: Re: FFTA2 Editor v1.3.2
Post by: maroon on May 27, 2025, 09:35:06 pm
please help me with save it stuck on saving. please waiting it took a long time
Title: Re: FFTA2 Editor v1.3.2
Post by: Rurusachi on May 28, 2025, 08:56:08 am
Quote from: SuperiorDonut on May 18, 2025, 02:52:44 amDo you think you would be able to make a generalized no-music patch?
I don't know how the music and sound works but I can look into it at some point.

Quote from: blaide on May 21, 2025, 12:18:40 pmThe first FFTA game has always been my favourite of the two games, do you have any experience creating resources for the GBA game, I would love to see a new all in one editing tool for the first game, I feel if anyone can create it, you can :)
I've done some modding for FFTA but I don't think there's any point in making a new tool for it. The reason I created this tool is that it works in a different way than the other FFTA2 tools (rebuilding the game's filesystem). I also alredy don't have time for all the projects I want to work on.

Quote from: Zeke_Aileron on May 23, 2025, 08:25:05 amI've been curious for some time now about this editor Rurusachi, is there any way to implement the following below to the editor to make it possible for Players to mess with?
Mechanics that might be implemented?
  • HP and MP being able to be added/reduced onto equipment pieces: there's been a few games that i've played that made me interested in this and hoping to see it in this FFTA2 editor
  • Clan Privileges being able to be adjusted, removed, and or made into Clan Passives instead?
  • Able to add more quests into the game above the Vanilla's 300 quests? I've been wondering about this since in the quest menu there's a lot of empty spots that could've been made for more quests.

Quote from: maroon on May 27, 2025, 12:05:54 pmi try to save by click on save as and then stuck on saving please wait does it take long to save or not?
I'm not sure what the problem could be. Please send me the log file so I can take a look.
Title: Re: FFTA2 Editor v1.3.2
Post by: Zeke_Aileron on May 29, 2025, 07:35:11 am
Quote from: Rurusachi on May 28, 2025, 08:56:08 am
  • I believe there are some unused bytes on equipment so this should be possible but will require some work.
  • Clan Privileges are mainly implemented in the battle scripts I believe. So probably doable whenever we can decompile and recompile those.
  • There are a lot of data structures kept in memory related to quests so I don't think it's feasible to add more. But there are actually 512 "quests" because of how multi-part/battle quests work, so you could probably make some room by changing/removing some of those.

Title: Re: FFTA2 Editor v1.3.2
Post by: maroon on May 29, 2025, 12:56:49 pm
here
Title: Re: FFTA2 Editor v1.3.2
Post by: maroon on May 29, 2025, 08:25:48 pm
here another the one
Title: Re: FFTA2 Editor v1.3.2
Post by: maroon on May 29, 2025, 11:41:25 pm
do you know the number of faction in formation is?
Title: Re: FFTA2 Editor v1.3.3
Post by: Rurusachi on June 01, 2025, 05:17:56 am
Quote from: maroon on May 29, 2025, 08:25:48 pmhere another the one
Thank you. It might've been a memory issue. Someone else had a similar issue on an earlier version that was fixed when I reduced the amount of memory used when saving. I just released an update (v1.3.3) that reduces the memory usage significantly (I was allocating way more than necessary). Let me know if that fixes the issue.

Quote from: maroon on May 29, 2025, 11:41:25 pmdo you know the number of faction in formation is?
I've also seen 4, 5, 6, and 18 but I have no idea what they mean.
Title: Re: FFTA2 Editor v1.3.3
Post by: maroon on June 03, 2025, 06:46:56 am
it is possible for hume race can learn ability for other race like nu mou for example seer learn esunaga
or nu mou learn goblin attack for beastmaster how can do that
Title: Re: FFTA2 Editor v1.3.3
Post by: maroon on June 09, 2025, 08:52:47 pm
can anyone tell me in menu routine mix what can do anything?
Title: Re: FFTA2 Editor v1.3.3
Post by: matchet on June 12, 2025, 05:45:45 pm
Its a new era of possibilities. Thank you Ruru!
Title: Re: FFTA2 Editor v1.3.3
Post by: maroon on June 13, 2025, 04:48:25 am
how can i change text in image?
Title: Re: FFTA2 Editor v1.3.3
Post by: Zeke_Aileron on June 13, 2025, 05:01:42 am
Quote from: maroon on Yesterday at 04:48:25 amhow can i change text in image?

From what i know, there currently is no way to do that in the Editor, in another older editor you can do so with the help of Crystaltile and such, but since this editor changes everything from the base vanilla game's code, i'm not sure if the image displays would be in the same places as in the crystaltile.
Title: Re: FFTA2 Editor v1.3.3
Post by: maroon on June 14, 2025, 08:11:17 am
can anyone figure out the problem