• Welcome to Final Fantasy Hacktics. Please login or sign up.
September 29, 2020, 04:42:07 pm


Use of ePSXe before 2.0 is highly discouraged. Mednafen/RetroArch is recommended for playing/testing, pSX is recommended for debugging.

My progress in FFTA hacking [Map, Events and Text editing] [Engine Hacks]

Started by Leonarth, July 16, 2018, 12:14:58 am


Here's something else weird about this error. I took the save and opened it in a version of the rom patched only with the steal shoes patch (yes I mean the patch not the Engine Hack thing) and while I couldn't change Marche's job, the red mage had the AP gained previously (in the Engine Hacks version it's either MASTER or 0 AP for every red mage ability). Everybody else could change jobs and everything else seemed normal.


I'm working on other stuff at the moment but I will keep this in mind for when I continue working on the FFTA stuff.

Red Mage does have something special about it, it's the only class that I made a custom learning list for (so that learning Cure on White Mage gives it to Red Mages and viceversa).
If you disable that, Red Mages would work like any other class, you can do that by removing this line from the buildfile and rebuilding the rom:

If you do this you should notice that your Red Mage forgot Cure, consider it for a temporary fix.
Please report back, I will default it to off if that fixes it.
  • Modding version: Other/Unknown


It worked. She had AP learned. I finished learning thunder and then gave her a different rapier, the new ability (and thunder) was usable in battle and more AP was gained normally.


Here's something I've been meaning to ask. How do you edit action abilities with these engine hacks? Imagine I want to make "Cure" cost 4 MP and require 300 AP to be learnt. How would I do that using your editor?
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"


I'm not sure what you mean by my editor, so I'll assume you are talking about Event Assembler.

The answer is: however you want.
I haven't done much stuff like that so I don't have a way to do it, but as long as the right values get to the right places that's all you need.
Since I only neede to change a few abilities all I do is specify the address with ORG and then just insert whatever data is needed.

There's a table at 0x851BA84, this table has a pointer for each of the races, if you wanted to change a bangaa ability you would get the corresponding pointer and then figure out the offset of the ability from there.

The structure of the abilities in those tables is:

0x00 SHORT name id
0x02 SHORT description id
0x04 SHORT ability id (effect)
0x06 BYTE ability type
0x07 BYTE ap cost/10

So you would multiply the id by 8 and add it to the offset of the race's table, then you can change whatever data you want.

Here's a macro I just made, untested:

#define actionAbility(label,index,name,desc,effect,type,ap) "PUSH; ORG label+(8*index); SHORT name desc effect; BYTE type ap; POP"

So to use this you would, for example (and I'm making the numbers up here), do this:
Where bangaaTable would be either a label you have for a new or repointed table or a definition for the original table, which I think is at 0x851BFD4

Finally, let's say you wanted to change only the AP cost, we can make a macro specifically for that, looking at the original macro:

#define actionAbility(label,index,name,desc,effect,type,ap) "PUSH; ORG label+(8*index); SHORT name desc effect; BYTE type ap; POP"

AP is the last value, which means it's 7 bytes after the data for the ability starts, so we can do this change:
label+(8*index) -> label+(8*index)+7
And remove the stuff we aren't using, so the result is:
#define actionAbility(label,index,ap) "PUSH; ORG label+(8*index)+7; BYTE ap; POP"
This way you could modify AP without having to worry about any of the other values.

If you want to learn more about EA you can check this tutorial, it's focused on Fire Emblem but it should teach you the general stuff EA can do, although it also gets into custom companion tools that aern't relevant to what we are discussing here. Buildfile basics will be the most helpful section to just learn how EA works.
  • Modding version: Other/Unknown


  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"


Godamnn that's awesome!
I'd like to help with anything I could if possible.
Long ago (2k11?) I have tried to change sprites but with no success...
I'm now beginner java programmer, hope it can be of any help.
Nice work! I'll stay up to any activity on FFTA mod
  • Modding version: Other/Unknown


If you want to try to get your sprites in the game you can check this thread:

Although it's not finished yet, you should be able to test them just fine.
  • Modding version: Other/Unknown


Earlier I saw an old post saying that Marche's starting Combo ability is something hard to change.
I thought I would drop here why: It's set directly through ASM, specifically for Marche.
The mastering part is just the regular stuff, set it on the Party Formation editor just like job and everything else.

The ability itself is stored into Marche's Combo slot at 0x80CA066 on boot, when the game prepares the data for a new game.
Technically it's stored with the instruction at 0x80CA068, but 0x80CA066 is where the value to store is loaded.

To change which Combo Marche gets just change the formation data to change what he's mastering and then go to 6CA066 in your hex editor, you should see "0B", 0x0B is the ID of Combat Combo, you can change this to any Combo (or non-combo ability, really, but that's probably just not going to work) you want (of the same race!), including 00 for none.
The Combo abilities are always the last one of the job, so if you want to quickly check the ID for a combo ability you can go into the Job Editor and look at the Job's "End" ability, right here:

If you are using my EA stuff, you can do this instead:
PUSH; ORG $6CA066; BYTE 0x0B; POP //change 0x0B to your desired ID

Of course this is all specifically for the USA version of the game.
  • Modding version: Other/Unknown


Quote from: Leonarth on August 26, 2019, 11:49:41 pm
If you are using my EA stuff, you can do this instead:
PUSH; ORG $6CA066; BYTE 0x0B; POP //change 0x0B to your desired ID

(Possibly) Silly question:
Will the othe EA hacks have any sort of conflict with this? I tried building the ROM file with the "fixed animations", "quick start", "jp learn", etc, but Marche still comes with the "Combat Combo/Move+1" ability mastered.

On another note:
In the "jobAbilityTable.event", the second pointer is used to determine extra conditions for unlocking jobs. However, imagine I want to change the base unlocking conditions/requirements. How would I do that (through EA)? According to RHDN's Data Crystal, job requirement data starts at 0x5231A4 and its data is 0x4 bytes long.

Thanks in advance.
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"


PUSH; ORG $6CA066; BYTE 0x0B; POP would only change the ability Marche starts equipped with, not the abilities Marche has mastered.

If we read it:
PUSH (save cursor position)
ORG $6CA066 (change cursor position to 6CA066)
BYTE 0x0B (write 0x0B at cursor, advance 1)
POP (restore cursor)

So this is equivalent to going to 6CA066 in your hex editor and changing the byte there

As for changing job requirements, there's two places you would need to change, the one you listed is a table of job requirement data, so for example if we go to $5231A4+(5*4) (base offset+index times length of an entry) we'll see requirement 5, this does not mean the requirement is for job 5.
Job requirements look like this: BYTE jobIDNeeded1 skillMasteredNeeded1 jobIDNeeded2 skillMasteredNeeded2
So to change them you would just write bytes to that location.
To change which job requirement from the table a job uses you would go into job data and change the job requirements index, Elementalist for example has id 5.

If you wanted to add requirements more specific than vanilla uses you would need to make ASM for them, if you wanted to add more requirements to the table you would need to repoint it, that means copying the data, placing it into freespace and changing all pointers to the old data to point to the new one.
Or if you wanted to you could set the job requirement to 0 and just write your own requirement in asm, even if it's pretty much just a vanilla-like requirement, macros for that could probably be made pretty easily.
  • Modding version: Other/Unknown


Haven't posted in a while. I have an announcement to make, not a huge one but still an important one.

I just fixed a pretty nasty bug related to reading new animations, if you had tried to build your own patch using my buildfile (found in github) and it randomly didn't work, this was likely to be the cause.

Even if you hadn't encountered this issue (with the game freezing seemingly at random) you should still update, not many files changed so it shouldn't be a hard process.
  • Modding version: Other/Unknown


Any update is welcome (and thank you for that  :cool:)!

On a sorta side note:
I remember someone asking about making a job exclusive to Marche. For some "unknown" reason, I decided to try and do just that. So Marche's character ID is 02, so, if you go to jobAbilityTable.event, you can make a new "ALIGN 4" thingy for Marche.

(this thingy)
isCharacter (0x02)

If you open AIO and go to the "New Formation Editor", opening the "Special Character" dropdown list, you can get the order of special characters, starting at "Error" (0x00, as my powers of deduction tell me XD). If, by any chance, you want to give Montblanc a job of his own, his ID matches 0x08 (only tested it with Marche, though, but I predict it checks out).

Don't know why I haven't tried before...
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"


Yeah, all you said is correct.

The issue with giving Marche a new job is just that you would need to be using JP learning with the 1bit abilities option, because otherwise there's just no room to save more learnt abilities for Hume characters.

Another option would be to just give Marche a mix of abilities from different Hume jobs, or remove some abilities from some Hume jobs to repurpose them and add them to Marche's new custom job.

You also need to repoint the data for the race's abilities if you want to add more of them, but that applies to all races.

Hume is the race with the most abilities so vanilla isn't prepared to save more than that, other races have less abilities so you could add new ones to other races without the 1bit abilities option as long as you don't make them have more abilities than Humes have in vanilla.

TLDR: You can't give any race more abilities than vanilla Humes have unless you use the 1bit abilities option.

Edit: I'm fixing some other issues I had noted down, the issue with Red Mage reported by Gokajern (Viera Red Mage not gaining AP) should now be fixed, although as far as I can tell this was only visual.
  • Modding version: Other/Unknown


I fixed a small visual issue with item ability lists.

Also, I don't remember who asked for this but I think it's a good change so:

This was harder than I expected, mostly because I wanted it to be easy for people to customize the order easily.
I've selected Rumors by accident more times than I can count so this is nice QOL.
  • Modding version: Other/Unknown


Hello Leonarth!

I need some help regarding your Engine Hacks. I've tried to patch my game as instructed, making no changes to the options. When I booted the game up in my emulator, everything seemed fine at first, and I can enter the first battle quest at Giza Plains, but when I access the law screen during battle, the graphics got corrupted somehow so I can't see what's the laws during battle, but I can still press the buttons to grapple my way out of the law screen and then the graphics screen cleared again and it shows the battlefield. I probably can proceed through the battle but I won't be able to check what's the laws in battle, but I can still check it on the world screen before I enter the battle.

Any idea what's going on here? I appreciate your help.
  • Modding version: Other/Unknown


Thanks for the report, this seems to be an issue with the quick start option, there's probably something missing, I'll look into it.

In the meantime you can either disable laws or disable quick start.

Edit: It should now be fixed.
  • Modding version: Other/Unknown


Yep, that solved the issue on my end. Many thanks, Leonarth!

A question:

Inside the ROM buildfile, at noStatVariance, it states "look at "Engine Hacks/newLevelup.event" for more options". I am interested in options such as newMaxLevel 99. Do I need to do anything else to get this option, meaning when I run ROM Buildfile it also includes the hacks from the included files? Or do I need to, like, copy the newMaxLevel hack codes into the main buildfile so it gets executed?

A suggestion:

I'm also interested in the Death Systems hacks you made, but I feel that they are too punishing for my taste. Permadeath feels too heavy a cost if I were to permanently lose high leveled and heavily trained units; AP's especially are very slow to grind back. I can still recruit new units, but they'd be a blank slate and I'd have to painstakingly train their abilities back up to get them useful again. We all know how much of a time suck and lengthy game this can be LOL.

Therefore, can I suggest a middle ground, where instead of the unit permadying at the end of battles, can you prevent them from participating in the next few battles? I think of this as if they were too heavily injured to recuperate quickly, but the judges still function as usual preventing permadeath outside of the jagds. Functionally and graphically, I imagine this to work similarly to the unit being dispatched for missions or getting jailed, preventing them from joining a few battles while they recover from their injuries. After a few battles (I imagine 3 or 4 should be enough), a popup appears informing that the unit has recovered. Maybe in the party screen such units can be labelled "incapacitated", "recovering" or "maimed". Whichever fits the text area.

With this type of death system there will be some repercussions to letting units die in battle, but not a ragequit inducing one, or leading to reloading a save. This makes me feel a bit more pressure to strategise better, but I'll be relieved knowing it won't be a total waste of time if I decide to just press forward with the consequences. Players will be forced to use other units while the maimed one recovers, or just make do with a smaller team for the next few battles (which I anticipate I will do often since I don't usually train the other units outside of the original six members). Maybe we can call this the Time Out Death System.

Thanks for your time.  =)
  • Modding version: Other/Unknown


QuoteOr do I need to, like, copy the newMaxLevel hack codes into the main buildfile

If you look at the buildfile you'll see lines that say "#include soandso.event", that is the same as if that whole file had been copied and pasted in, so you don't need to copy anything anywhere.
You would want to uncomment (remove the // that's in front of) noStatVariance so that it gets installed, after that you can just change the definition for newMaxLevel to whatever you want the max level to be.

As for the death system idea, I don't think it's a bad idea but I'm not really interested in implementing it, mostly because there's so many different ways it could work: it could be made to trigger when downed at the end of a battle, when downed for 3 turns or both at once, I could also see people wanting increasing punishments for this, ending in death maybe? or people wanting to mix it with permadeath, it all sounds like a headache.
Maybe you can just impose it on yourself as a challenge?
  • Modding version: Other/Unknown


I see, so the attached files are included already, so I can just include or comment out the hacks in the relevant files just like in the main buildfile. Got it.

Ok I see the complications in implementing this thing, so I'll just do it as a personal challenge. Thank you.
  • Modding version: Other/Unknown