• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

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

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

Leonarth

The party images are 32x40, there is nothing to discuss there, just open the game in an emulator, check the sprites used and you will see these are 32x40 (there are actually two sprites, a 32x32 one and a 32x8 one but all the tiles are in the same order we see them so there is nothing to worry about there).
When in doubt just do the same I already did, I did it that way for a reason, the reason being that's just how it is.

Also the battle sprites are not 16x16, or 16x40, there is no fixed dimensions to them as I explained in an earlier post.
Some are 16x40, some are 16x32, some can't even be described as a single rectangle.

Remember to use the correct palette, with the correct order.
The only actual important part is the order but having the right colors will help you see how it's going to look in-game. Checking the images you made I can see they don't have neither the right order or the right colors, please use one of the already existing images as a reference, and be sure to use a tool that can correctly handle palettes and indexed images, like Usenti.
  • Modding version: Other/Unknown

KyleTheRunner

Hello. Thanks for the hard work!
Since you are very experienced in FFTA hacking, could you, please, provide me with text editing tools?
I'm trying to do a full Portuguese translation for this game.
Thanks in advance!
  • Modding version: Other/Unknown

Leonarth

I don't have any text editing tools, nor would I know how to make them, I barely have any programming experience and I've never made any kind of GUI, I use Event Assembler for text. As far as I know other people just use a hex editor.

There are many things we don't know about the text system, but you can find some data on it here:
https://datacrystal.romhacking.net/wiki/Final_Fantasy_Tactics_Advance:Strings

A lot of games use pointers or a text table (also with pointers) to indicate where the text is, this can often be a fairly simple thing. It's not like that in FFTA. Text in FFTA is pretty complicated, it comes in two forms (1 byte per character and 2 bytes per character), I'm unsure if there's compressed text or not, control codes are mostly unknown and the worst part: the text is all over the place.

There is no one text table, there are a lot of them, some kinds of text are split into multiple tables, some use pointers, some use relative offsets, even for someone that knew everything that's going on making a tool to deal with all of it would be a pain.
I only have documentation on 6 of these tables and I've seen many others, I can't understate how complicated it gets.
From what I know every mission has it's own little text table.
On top of that, this is a game with a huge ammount of text.

If you are still interested in trying (using Event Assembler) send me a private message.
  • Modding version: Other/Unknown

KyleTheRunner

  • Modding version: Other/Unknown

Diedrik

How much free space do the various engine hacks take? And is there a limit to it? If say I want to install all of them, where should I put the free space start for the next one?

If you are going to include most of the minor ones in the JP system, you might want to also include the Manual Sort in it as well. Are you planning to have it be a master hack that allows you to toggle each of the parts in the options file? That would work pretty well.
  • Modding version: Other/Unknown

Leonarth

You don't need to know how much each one takes, neither do I know, and you don't need to set the freespace for anything other than the first time it's checked, the others should be ignored by EA like this:
#ifndef FreeSpace
#define FreeSpace 0xA39920
ORG FreeSpace
#endif

If FreeSpace is already defined, it does nothing. If any of the hacks don't do it like this please let me know.
The whole point of using EA is that, other than when you first set FreeSpace, you never have to worry about space management or even the specific location the stuff ends up at.

The limit is 32MB total for GBA games, it can actually go higher with bank switching but that's just a mess and as far as I know only GBA Video carts ever used this (for example, Shark Tale and Shrek are both 64MB, in case someone doesn't know: yes, the movies, the actual movies on GBA). We aren't going to be hitting 32MB anytime soon. Or ever probably. Vanilla uses about 10 to 11MB, the rest being free. It's pretty hard to hit 32MB unless you start inserting a lot of graphics and use .wav for your new music.
In order to show how little space text actually takes: the EUR ROM of FFTA only takes up 3.5MB more than the USA one. It has 5 languages, so we could say the whole text of the game takes less than 1MB, and this is including graphics that are different in each language.

QuoteIf you are going to include most of the minor ones in the JP system, you might want to also include the Manual Sort in it as well. Are you planning to have it be a master hack that allows you to toggle each of the parts in the options file? That would work pretty well.

The manual sorting has been in the JP purchase for a while now: http://ffhacktics.com/smf/index.php?topic=12036.msg225249#msg225249
And yeah, that's the idea, and how it already works, you can just comment out (or undefine) stuff to have it not be installed, or go mess with it manually to customize it if you want.
  • Modding version: Other/Unknown

Diedrik

Okay thanks. Good to know we have plenty of space to work with.

Duh, sorry I did not see that line. I did not see the toggle in the Buildfile, so I just assumed it was not in yet.

The Race and Customization in the JP Skill Purchase is not as up to date right? It does not appear to have the animation work done yet. Can I just copy paste the updated one from the release thread into it in order to update it?

How hard would it be to make a class that could select skills from other classes in the skill learning menu? Also, can we have racial skills that can be used no matter what class you are?

Edit: I just looked with a bit more depth at the engine hacks folder, and it looks like it includes the Ironman and FFT Death hacks, can we get options for that in the buildfile as well?

Editedit: Can we enable retreat as an option in the no judges?
  • Modding version: Other/Unknown

Leonarth

Manual sorting is one of those things I just assumed nobody would want to turn off anyway so if there isn't a toggle for it, that's the reason. I guess I'll add an option just for the sake of it.
I don't think I meant to include the death hacks, if they made it in at some point then that's because I'm not very organized, I don't think they are included right now but I guess I can include them too.

The job and race customization thingy doesn't have the animation stuff yet, the downloads at the bottom are just so people can start making their sheets and whatnot, the actual template (which is already all working by the way) will be added on the next update, once I finish the last feature I want to implement. When that happens I will also update the JP purchase with some new stuff.
I think there have actually been 0 updates so far to the job and race customization, other than adding in the readme I forgot the first time I uploaded it.
Also, I have a completely new surprise ready for the next update, shouldn't take more than a few days.

As for making a job that can use abilities from other jobs, that's already a thing with job and race customization, in fact the viera red mage fix does just that, it has a custom list that uses the white mage's ID for cure instead of the red mage's.

If you wanted to make racial skills all jobs can use then the easiest way to do it would be to make new ability lists for all the jobs, including the new abilities you want them all to share, then they could be purchased from any of the jobs and this would unlock them for all of them.
A more fancy way to do it, which would require some new ASM, would be to make a new job that is not displayed on the wheel and can't be chosen as a secondary command, make new lists for all the jobs, have the shared abilities not display on the purchase menu for any job other than the new job. You could also set them to cost 0 AP/JP which in the next update will make them automatically unlocked.
Finally, a third way to do it (which would also require new ASM) would be to add a new job that maybe can't be selected or seen anywhere, but that can be used as a command in-battle, like what happens with Item for the alchemist.

I'll look into the judges retreat thing.
  • Modding version: Other/Unknown

Diedrik

That makes sense. I would definitely like to have the options for them there.
Two new options I would like, though I do not know how popular they would be: toggling whether the countdown is visible, and the option for everyone to have a revival chance like the undead. Would be especially cool if you could specify the percentage of revival for both normal and undead in the buildfile.

The Job and Race Customization has a few subfolders that are not in the latest Skill Purchase, such as the fixed animations. I am assuming though that the one currently in Skill Purchase is outdated and inactive, waiting for your next update to remerge them.
Sounds awesome, I am very excited.

True, but I meant assigning abilities in game. I was thinking basically having a handful of dummy abilities and then replacing the data for them with the data of the selected ability on the learning menu.

Thanks, those are pretty good ideas. I definitely would like more access Alchemist style options. It also reminds me, do we have any access to innate passives yet?

Thanks.
  • Modding version: Other/Unknown

Leonarth

Quotetoggling whether the countdown is visible, and the option for everyone to have a revival chance like the undead

If there's demand for that I'll look into it, otherwise I always include the source so anybody can play with the routines.

QuoteThe Job and Race Customization has a few subfolders that are not in the latest Skill Purchase

The job and race customization does not have those folders yet.
I did upload them on their own so people can test them, but they are not in the main download.
Quotewaiting for your next update to remerge them.

You won't need to merge anything because the update will be included on the JP purchase download.

Quotehaving a handful of dummy abilities and then replacing the data for them with the data of the selected ability on the learning menu

I don't understand your assigning abilities idea. I don't know what you mean.
Maybe you mean a job that can choose up to X abilities from any other job and use them or something like that? Because that would need to be saved in some way, it would also need a completely new menu, this would be pretty hard for what sounds like an extremely specific feature.

Quotedo we have any access to innate passives yet?

It's not a "not yet" thing, there's just no good way to do this.
There isn't one routine that gets the support/reaction/combo ability, each routine that needs them gets them on its own, this means that to make a passive abilities system were the user could just change a byte on a table to give a job an ability I would need to edit possibly over 100 routines. I'm not going to do that.
What can be done is add specific passives in, but each one would need to be programmed individually. Then there would be a list of jobs that get this passive, instead of jobs having a table of what passive they get. So, for example there could be a passive that changes the unarmed damage formula for a specific list of jobs.
There's also the issue of overlapping effects, what would happen if a unit had Counter but also Absorb MP? Or if a unit had Doublehand but also Monkeygrip? The game is not made to handle that.
  • Modding version: Other/Unknown

Leonarth

New update, here's the changelog:

  • Added options to turn off stuff that didn't have an option before, some are just new though:
       JP Learn, default on. (So you can turn off the whole system if you want, to use only the minor hacks).
       Movement Abilities, default on. (This won't make combo abilities work, it will just make movement abilities be gone).
       Manual Sorting, default on.
       FFT-like Death, default off. (Should be able to be combined with Ironman).
       Ironman (all maps have jagd death), default off. (Should be able to be combined with FFT-like Death).

  • Abilities that cost 0 AP/JP should now be unlocked by default, even if using 1bit abilities.

  • The ability learnt messages after battles should now never appear when using 1bit abilities.

  • Units can now be made to spawn with a Movement/Combo ability.
       The byte used is the last one in the unit entry, this is the last Unknown Values in AIO's formation editor.

  • Judges no longer reset JP when an infraction is commited. This seemed too big of a punishment.

  • When laws/judges are removed, any existing laws will stop working.
       This is to prevent Judges spawned through events from enforcing them.
       The Laws/Law Cards menu option should also never be available.

  • Removing laws/judges no longer prevents the Flee option from working.
       To get this to work, however, I had to make it not check if judges are present (duh).
       This means some situations that couldn't be fled from before now can be and vice versa, probably.
       I can't think of any situations this would affect other than maybe jagds?

  • Fixed the Bishop Judge and Judgemaster Judge Sword abilities.
       Added options for the "Steal 2 JP" ability effect, same options as the regular "Steal JP" effect.
       Default 50 damage, 10 up and down variance.

  • Fixed the File level, it should now always display Marche's level instead of the first unit's level.

  • Fixed the Move+1 check, it should now work regardless of which ability it is replacing.

  • Made sure that the 999 JP cost display looks the same as the others.

  • Added a few new movement abilities, the easier ones to make:
       The previously existing Move +1 is still replacing the Combat Combo.
       Move +2, replacing Knight Combo
       Move +3, replacing Fight Combo
       Jump +1, replacing Dragon Combo
       Jump +2, replacing Sacred Combo
       Jump +3, replacing Lunge Combo
       Ignore Height, replacing Sword Combo
       Teleport, replacing White Combo
       Levitate, replacing Black Combo
       Levitate just works the same as vanilla, so it allows movement over water and lava, nothing else.
       I would like to make floating units get 1 extra height but having it be animated or the shadow be correct would get pretty hard, especially the shadow because of sprite limitations.
       Same deal for teleport, it is just the same as vanilla teleport. Making one that allows teleportation to any square but can fail would be possible but I'm worried about the AI.
       Please note that I'm just replacing the combos by order of ID, this is not a suggestion as to which jobs should get them.
       Ignore height doesn't change the jump stat, but makes it be treated as 127 when moving.

   
Be sure to check the job and race customization thread for the changelog on that, remember that it is included in this!
http://ffhacktics.com/smf/index.php?topic=12169.msg225244#msg225244

And here's the download, same link as always: https://www.dropbox.com/s/cbjl8bahx29rpyq/ffta%20skill%20purchase.rar?dl=0
  • Modding version: Other/Unknown

Blunderpusse

Proper nice. :)

Speaking of moving abilities. How doable is it to make an ability usable only when the caster is standing on a certain terrain type (simulating the Geomancer job)?
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"

Diedrik

Quote from: Leonarth on January 30, 2019, 05:03:01 pm
I don't understand your assigning abilities idea. I don't know what you mean.
Maybe you mean a job that can choose up to X abilities from any other job and use them or something like that? Because that would need to be saved in some way, it would also need a completely new menu, this would be pretty hard for what sounds like an extremely specific feature.

Pretty much, I would not worry about it. It is just a feature that I think would be pretty interesting in an ability based tactics game, instead of having characters be a class, having them select a limited loadout of skills from the classes they have trained in.

Quote from: Leonarth on January 30, 2019, 05:03:01 pm
It's not a "not yet" thing, there's just no good way to do this.
There isn't one routine that gets the support/reaction/combo ability, each routine that needs them gets them on its own, this means that to make a passive abilities system were the user could just change a byte on a table to give a job an ability I would need to edit possibly over 100 routines. I'm not going to do that.
What can be done is add specific passives in, but each one would need to be programmed individually. Then there would be a list of jobs that get this passive, instead of jobs having a table of what passive they get. So, for example there could be a passive that changes the unarmed damage formula for a specific list of jobs.
There's also the issue of overlapping effects, what would happen if a unit had Counter but also Absorb MP? Or if a unit had Doublehand but also Monkeygrip? The game is not made to handle that.

I see, there are two things that I was thinking of here. One is having the Blue Mage learning be innate to all classes, and use it as an alternate overlapping method of learning skills. Along with other possibilities if this was something we could easily accomplish.
And the other is precisely the overlapping issue, one of the really interesting things about Worker 8 in FFT is that he had Hamedo, and Counter. He would use counter if Hamedo (Which is essentially strikeback) failed.

Very nice, happy to see more movement abilities. An interesting take on teleport, which would probably cooperate with the AI is to make it randomize your move stat per turn.

Thank you for fixing retreats.

Not sure if I would actually want the file level fixed. If you are playing a generics only run, it would make sense to have it list the first character's level instead of Marche's.

Does this include the new animations, and the weapon animation expansion?

Oh, also how hard would it be to add a skip intro yes/no? That way the decision could be made on a per run basis rather than at the patching level.
  • Modding version: Other/Unknown

Leonarth

QuoteHow doable is it to make an ability usable only when the caster is standing on a certain terrain type (simulating the Geomancer job)?

That's something I have been thinking about (remember that I was working on Grias), however I can't think of a good way to do this so we would need to make terrain type maps for all maps in the game, I think what I would do is have a placeholder terrain type while I (or we) work on making terrain type maps for all maps.
So for example while in the herbs mission all tiles would count as grass or something, until a proper terrain map is made.
I was thinking each tile could have up two 2 different types of 16 different types, like say a tile that counts as ground and grass, or one that counts as stone and water because it has a puddle or whatever.
As for making the abilities themselves not being usable under specific conditions, that doesn't sound so hard, I could just make the game think that the unit doesn't have enough MP for that specific ability (even if it costs no MP) if conditions aren't met.
For something similar: look forward to the Primed status in the near future. Probably.

QuoteOne is having the Blue Mage learning be innate to all classes

That would be as easy as making whatever routine checks for Learn being equipped always think it is equipped, likely a 2 byte change.
I actually stopped writting this post to go look for it, go to 0xA7B96 and write 00 00, should make everyone have Learn, even if they have something else equipped.

QuoteAn interesting take on teleport

Just to be clear, teleport works the same as vanilla, the other description of how teleport would work is just an idea and would probably be a different ability.

QuoteNot sure if I would actually want the file level fixed. If you are playing a generics only run, it would make sense to have it list the first character's level instead of Marche's.

I'll make it an option on the next update.

QuoteDoes this include the new animations, and the weapon animation expansion?

Yes.

Quotehow hard would it be to add a skip intro yes/no?

I haven't seen any event that deals with a yes/no condition yet, events are a pretty undeveloped thing so this would actually be pretty hard to do. I'll keep it in mind for the future but don't expect anything on it anytime soon.

QuoteThank you for fixing retreats.

No problem! Thank you for letting me know.
  • Modding version: Other/Unknown

Diedrik

Making terrain maps reminds me, are you still working on custom maps? I feel like some of your testing ones are a lot more interesting tactically than many of the default ones.

Quote from: Leonarth on February 02, 2019, 07:14:45 pm
Just to be clear, teleport works the same as vanilla, the other description of how teleport would work is just an idea and would probably be a different ability.

Yeah, definitely. Having a few teleport variants would actually be really cool.

Quote from: Leonarth on February 02, 2019, 07:14:45 pm
I haven't seen any event that deals with a yes/no condition yet, events are a pretty undeveloped thing so this would actually be pretty hard to do. I'll keep it in mind for the future but don't expect anything on it anytime soon.

I know some of the clan challenge encounters give you a Join "" or Engage option. Which is essentially a two option choice. In fact all of the ones I have seen would still flow well if the options were replaced with yes or no.
  • Modding version: Other/Unknown

Leonarth

Quoteare you still working on custom maps?

Not really, I got them to work and then kinda stopped there, I guess it would be good to get a better tool for them at some point but I don't really know much of anything about making stuff like that.

QuoteI know some of the clan challenge encounters give you a Join "" or Engage option.

If you mean the blue units on the overworld, I don't think that's related to events, at least not the same type, that's a whole different thing.
  • Modding version: Other/Unknown

Diedrik

On the topic of ExL's suggestion:
So if I am understanding that suggestion right, it is that the behavior would change to this?:
1. Move - Attack > turn ends
2. Attack > turn ends
3. Attack - Move > turn ends (Only possible if cunning equipped)
If so, I am not sure if I would like the default behavior to be changed to that. Or rather, I feel like that is the sort of thing that should be unlocked permanently for a character, rather than having to be equipped instead of other movement options. And/or should be available much earlier than other movement options.
Would definitely be cool to see, but not sure if I would want it to be bundled with the movement skills. The rest give more access to existing functionality, or add functionality, whereas this one removes it, in a somewhat interesting way.

On the topic of changing movement mechanics there are two things that I think would be really interesting, but both would probably much more work.
1. Decreasing the ability to circle enemies in some manner, that is one of the primary weaknesses of FFT, the best option was often to circle to the back of your enemy to attack, so it resulted in some battled where two people were just constantly walking around eachother. One solution is more subtle, remove the facing accuracy system, and instead have it be based on how many opponents they are adjacent to.
2. Make movement into an action, and then let you do two actions. That way you can sprint by using movement twice, or double down on your DPS by attacking twice. Adding defense as an option for everyone that could boost your damage reduction or evasion, or both, would also improve this system. I think the base hit chance should be higher in this case to incentivize using defense, and make concentrate less mandatory. Attacking twice without defending would be similar in effect to reckless swing in D&D, where you have higher damage potential, but anyone attacking you also does. It might make sense to have attacking twice outright decrease your defense/evasion, in order to make it riskier than moving and attacking.

We cannot use the yes/no from the naming menu for the skip option can we? Oh, also are you still planning to add custom names for NPCs?

How hard would it be to flip the guest bit on an actor mid battle? Is that something that is only read while spawning characters?
  • Modding version: Other/Unknown

Leonarth

I fixed some bugs and there should be a small update soon, I'll let you guys know when that's done.

QuoteOn the topic of ExL's suggestion: [...] I am not sure if I would like the default behavior to be changed to that.

It would be off by default, and the movement skill would not be inserted unless on.

QuoteOr rather, I feel like that is the sort of thing that should be unlocked permanently for a character

As always the source would be open so you could add any checks you wanted.

QuoteDecreasing the ability to circle enemies in some manner

Wouldn't lowering base movement to 3 help with that? What about outright preventing a (walking) unit from standing directly behind an enemy unit if they started their turn in front of them?
I don't have any plans on working on these things right now, it sounds more of a balance thing so that would be down to whoever is making a hack using my stuff, although options for directional damage and hit are something I would like to look into in the future.

QuoteMake movement into an action, and then let you do two actions.

This would be very, very complicated, I would need to edit a huge ammount of stuff and even then I'm not sure if the AI would like it, getting the AI to work with it might be extremely difficult since there might not be a centralized way to check if the movement or action bit has been set (this game is allergic to reusing code).

QuoteAttacking twice without defending would be similar in effect to reckless swing in D&D, where you have higher damage potential, but anyone attacking you also does.

Keeping track of if the units has moved and attack or attacked twice or whatever else would also need more memory, this kind of data isn't stored between rounds either so for your other ideas new status effects would be needed.

QuoteHow hard would it be to flip the guest bit on an actor mid battle?

It would be no different than setting a status.
  • Modding version: Other/Unknown

Diedrik

Quote from: Leonarth on February 06, 2019, 02:26:29 pm
Wouldn't lowering base movement to 3 help with that? What about outright preventing a (walking) unit from standing directly behind an enemy unit if they started their turn in front of them?

I would rather not decrease the available movement, I think the latter option would actually work pretty satisfactory, and would give spears a realistic edge over sword fighters.

Yeah I figured the other one is outside the scope of what FFTA is comfortable doing. Speaking of exploiting statuses to achieve new mechanics, if you are downed does it clear your statuses, and/or does it display them? I was debating using the immobilized status to track whether you have been stabilized in the FFT Death system, since bandages cure that by default anyway.
  • Modding version: Other/Unknown

Leonarth

Statuses are generally not drawn while downed, and I don't know if all of them get cleared but I know some do.
An exception could be mode for a status to be displayed while downed, that's not an issue. The undead raise counter is a status too and that certainly displays.
Changing what an item does shouldn't be terribly hard either.

After a bit of testing it seems that the ones that aren't reset are:
One that seems unused (status 0), Frog, Zombie and 3 other ones that seem unused (the highest statuses, one seems to have something to do with Marche but doesn't seem to do much of anything as far as I can tell).
There are some that I couldn't really test because they are not very compatible with dying but I would assume they would be reset too.

One thing I never mentioned is that with the new fixed animations there's a bunch of object tiles that are now free, new status effect bubbles should be possible with these, I'm guessing we could fit about 10 or 11 new ones. I was thinking of making a test with Primed, but that can probably be done with just the Boost bubble using a different palette, it's a red hourglass in A2 anyway.

Edit:
https://github.com/LeonarthCG/FFTA_Engine_Hacks

I moved my stuff over here, I'll let you guys know if big stuff happens, like always. This new update is only a few new fixes though.
Please look at that repo for future updates, I will not be updateing the dropbox link.
To download it simply select "Clone or download" and then "Download ZIP".

I think this just makes sense and is something I should have done a while back.
  • Modding version: Other/Unknown