• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
August 09, 2020, 04:44:53 am

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.


More Job and Race customization options [Release]

Started by Leonarth, January 10, 2019, 11:24:13 am

Leonarth

January 10, 2019, 11:24:13 am Last Edit: August 01, 2020, 02:41:50 pm by Leonarth
Download: https://github.com/LeonarthCG/FFTA_Engine_Hacks

New Update!
I've done a lot of progress, I made graphics and animations for all jobs of all races and a couple of special characters so that they can use all abilities (for example, Marche could use Jump or Montblanc could use Parley). Any previously playable job should now have animations for all weapons and all generic job animations (I have not checked if there are animations unique to special jobs).
The characters that got these are: Marche, Montblanc, Ritz, Shara, Babus, Ezel, Cid, Llednar and the judges you get to fight. And of course all the playable generics.
Just like the weapon animations, the animations for the abilities were done with a script.
Please let me know if you notice anything that doesn't look right.

Here are some samples of the new animation stuff:


However, finding which abilities use which character animations takes a lot of time, this is what I said I would need help with.
I have added support for all the abilities I found, but there may still be some missing, if when using this you notice any of those, let me know.
Additionally, if you could help complete this list of which abilities use which animations it would be of great help:
Talking: Advice, Wyrmtamer, Parley.
Fast swing: Saint Cross, Tremor, Lancet, Far Fist
Spin: Whirlwind, Mow Down, Wild Swing, Swallowtail.
Charged punch? Kinda weird imo: Revive, Exorcise, Holy Sign.

I know the descriptions of those animations isn't great so please refer to the originals if you want to see what they look like.

Here's the changelog:
  • Abilities that cost 0 AP/JP should now be unlocked by default, even if using 1bit abilities.
  • Added the complete animation template. This allows for new animations to be made by just editing an image.
       The template works for both regular and water animations.
       Animations made with the template come with animations for all weapons and for abilities from all playables jobs.
       There is one exception to this: I did not make animations for being morphed while in the water.
       Unless there's enough demand for that I would suggest to use the Morphing Moprhers Morph hack instead.
       I also didn't make flying animations for everyone but it's not like any playable has those in vanilla.
       If someone takes the effort to make sprites for those, I'll add them in.
  • Added animations for all weapons for all playable jobs, Marche, Ritz, Shara, Babus, Ezel, Cid, Llednar and enemy Judges.
  • Added animations for all abilities from all playable jobs for all playable jobs, Marche, Ritz, Shara, Babus, Ezel, Cid, Llednar and enemy Judges.
  • Jobs will now correctly be displayed as mastered (the little star) when using 1bit abilities.
  • Instead of showing all jobs on the ability list, only jobs the unit can change into will be shown.
       Jobs that the unit somehow has an ability for will be shown even if the unit can't change into them.
  • Similarly, only the current job and jobs the unit has abilities for will be shown when equipping a second action command.
  • The Item option will not appear for monsters, and it will appear greyed out for the Alchemist. I think this is clearer.
       Of course which jobs get or don't get Item can be changed in the job and race customization hack data.
  • Changed how abilities are displayed when checking what abilities an item teaches.
       It's now just generally less hardcoded.
       You can set any abilities and any jobs and all of them will be displayed correctly.
       However, just like in vanilla, there is only one icon displaying what type of ability is being taught.
  • Units can now be made to spawn with a Combo ability.
       The byte used is the last one in the unit entry, this is the last Unknown Values in AIO's formation editor.
   
Here's a comparison of the old vs new window for the abilities an item teaches:

It might look worse at first, but unlike vanilla this can update the ability name and cost instead of just changing icons.
This means you can potentially have 9 completely different abilities being taught by an item, and all of them will be displaed.
You can also customize it with empty entries or move the old entries around to make it look like it did in vanilla.
For example, instead of the vanilla:
Fire Fire Fire Thunder Thunder Thunder Blizzard Blizzard Blizzard for the Rod, you could get it to look the same as vanilla with:
Fire Thunder Blizzard Fire Thunder Blizzard Fire Thunder Blizzard. If that makes sense. It's hard to explain.

Currently there's an issue when scrolling through items in the equip menu, if you encounter that just press R to hide and display the window again. It's being looked at so expect a fix for the next update.

First Release!

You might have seen me talk about this in my progress thread, I used to call it job/ability assignation rework or similar.
It's currently called "Job and Race customization", still the same thing, the name doesn't matter much.

Expect a JP purchase update that includes this: soon.

Have some images showing the new features because images are nice and people like them:



(keep in mind some of the images are taken after changing data, such as setting Biskamatar to be a Hume job)

Features Included:
  • New routines to check abilities mastered, with an option to set them to 1bit mode for JP purchase.
       Warning! Saves made with 1bit mode won't be compatible with ones made with the vanilla method, and vice versa.
  • A table with new data for jobs, where you can:
       Set a list of abilities the job has, if this is not set the vanilla way of handling it will be used.
       Set conditions for job unlocking, this is on top of the vanilla way.
       Set conditions for the job to show (so you can hide unit specific jobs).
       Set conditions for the job to show on the job change wheel (so you can hide second action command only jobs, like Flair).
  • A table where you can set each job's icon, includes some new icons for Experts and Undead.
       Set to 0 to use the vanilla one.
  • A table where you can set each job's death sound.
  • A table where you can set each job's party sprite, includes new sprites for monsters and some special units, like Llednar.
       Set to 0 to use the vanilla one.
  • A table where you can set data for portraits, both tiles and OAM data.
       Set to 0 to use the vanilla data.
  • A table where you can set data for portrait palettes.
       Set to 0 to use the vanilla data.
  • Ability to set which random names to use for each race, setting starting ID and how many IDs to use.
  • Ability to set which jobs can set Item as a command, as well as which ones get it as a third command.
  • Ability to set default unlocked jobs. Not incredibly useful but there it is. (I added this option mainly because it's hardcoded in vanilla. In vanilla, replacing a job that's unlocked at the beggining of the game by one that needs to be unlocked would result in the job being shown in the wheel even though it has never been unlocked).
  • New lists which allow customization by either race or character of the messages units will use when dismissed, after battle and in mission cutscenes.
       This includes cases for Llednar and Remedi, as well as a default case.
  • New job wheel: Support for up to 108 jobs, changing pages with L and R, jobs will automatically show up on their race's wheel when unlocked.
       "Change Jobs" will be available to any unit with more than one unlocked job.
  • Jobs are new checked for unlocking when visiting specific menus to ensure special unlock conditions work as well as possible.
       This includes after purchasing a skill with JP purchase, if installed.
  • New can equip menu: As with the wheel, it's been split into pages that you can swap between with L and R, one page for every race.
       You can set which races are shown in this menu, jobs will be hidden until unlocked, support for up to 42 jobs in each page.

As you can see this includes many things. Most of it is set to work like vanilla by default so you don't have to worry much about that.
There are a few things that are NOT set the same as vanilla though, these include:
  • The "Can Equip" menu, which uses the new pages system, which looks different.
  • The "fixRedMages" option, which is the same as vanilla but if the Red Mage or Fleuret had been edited it might cause issues.
  • The new icons for Experts and Undead, as well as the slightly edited Monster and Expert icons.
All of them can be turned off in the options file.

If you have requests about more job/race things you would want to see be customizable, please let me know.
I already have a few things planned though, expect a custom animation template in the future.

Most importantly, if you have doubts about how to use this, check the readme, but don't be shy to ask either here or via PM, I don't think I did a great job with the readme anyway.
  • Modding version: Other/Unknown

Blunderpusse

Hi! Thank you for your work so far. However, I seem to have run into a bit of a silly problem: I can't seem to find the readme file. :s
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"

Leonarth

Ah, I guess I clicked on it twice when selecting the files to include, silly me.
Check now, it should be in there.
  • Modding version: Other/Unknown

ExL

Yep, it's there now :v/: Amazing work! (even by looking at description only :shock: will try the real deal now)
---
Now there's a question on how to even apply that at all :D I feel as smart as a chair, but I'm using "jobAndRaceCustomization.event" on original ROM(pressing "Assembly" button). And while HxD shows that there difference in files all those cool features just doesn't show up in game...
---
That's strange, I've followed all instructions in your main thread with JP system hack and what I see is: intro skip :v/:, manual sorting :v/:, JP system :v/:, showing  items compatibility with L/R (works also in this one) :v/:, new icons for Babus, Cid and Ezel when checking abilities :v/: new job wheels aren't there either... Hmm... Maybe I'm doing something that I should? I've looked into options of both and didn't found anything commented that would've prevented it from appearing...

Maybe I'm expecting something that I shouldn't?
This:
isn't there and I've loaded save from Gamefaqs to check Babus and Ezel to swap jobs, which they can't...
  • Modding version: Other/Unknown

Leonarth

Chances are the new wheels are installed just fine, you just have no race that has over 12 jobs, the L and R buttons only show up if there is a second page and this only happens if there's more than 12 jobs.
For the gif I set all jobs to hume so I could show the different pages, of course that doesn't mean the jobs would work correctly, it was just a test.

As for Babus and Ezel, the fix to make them regular Nu Mous is not finished, as a I said "keep in mind some of the images are taken after changing data, such as setting Biskamatar to be a Hume job", this is also true for Babus and Ezel, I just set their race to Nu Mou to show what can be done, by default they'll remain in their special race which means they have no jobs to change to. Even if the fix was completed the Babus and Ezel of your save would STILL not be Nu Mou so they wouldn't get the option to change jobs either.

So TL;DR: I think it's all working, you just haven't made changes to vanilla so it all looks normal, like intended.
Please try making a copy and setting some jobs to be bangaa or something to test if you want to check if it's working.
  • Modding version: Other/Unknown

ExL

Guess everything's fine, it's just all new stuff for me and that gif confused me to expect seeing that after applying :oops:
Couldn't find yet how jobs are set to certain race, but zeroed checks for isEzel and isBabus in jobAbilityTable and their jobs became available for each other.
Can you tell me in which file I can set races to jobs? And is it possible to turn Ritz in hume, but still be fencer(and Marche too, while I'm at it)?
  • Modding version: Other/Unknown

Leonarth

There's no option to change job races in the installer, you can use AIO editor like normal, it's not ideal though.
In the future I'll probably make and include tables for editing job data as .csvs, as well as making the current ones into .csvs.

In the meantime you can use a macro.
Place this anywhere within your buildfile:
#define setJobRace(jobID,raceID) "PUSH; ORG (0x521a14+4+(jobId*0x34)); BYTE raceID; POP"
After that, you can use setJobRace(jobID,raceID) to set the race of a job.
You would replace jobID and raceID with the numbers you want to use, but only when USING the macro, not when defining it.

Keep in mind this will have no effect on units that already exist in your save.
Special characters don't actually have races, only jobs do, units are given the race of the job they have when they spawn so Ritz is a Viera because she spawns as a Fencer, not because she is Ritz and NOT because she is currently a Viera job, only because she spawned as one, if you want her to not be a Viera then you'll need to go to the data she uses when she spawns/the data for her join request and change her job there.

However, even though you can set someone to hume and still have them be a fencer, the abilities will be all wrong, this is just how the game works, the ability list is tied to race and not to job, otherwise every unit would need space to save AP progress of every ability of every job of every race. Also Marche has no rapier/spear animations, similarly Ritz probably lacks some hume animations, like the animation for Provoke and the animation for Advice.
Even worse, they probably have some other unrelated story animation on the same slot that would be used for these animations, I do have an idea on how to solve this but it will take a while.

So yeah, setting an existing job to be of a different race with no changes is not going to do much, you need to repoint the ability list of the race, add the new abilities you want this job to use, then you can make a new job/edit a existing one to use these abilities and be of the race you want, and you also need to either take care of the new animations or be sure that no new animations are needed.

The ability lists are at 0x51ba84, each entry is a pointer to the list for that race, 0 being items, 1 being hume. If you want new races you'll have to repoint this table, if you just want new abilities for an existing race you'll only have to repoint that particular list. No race can have more than 0xFF abilities so be mindful of that. Also, the first entry on these lists is always 8 bytes of 0, I haven't looked much into that so I would recommend that when you repoint the list or make a new one you have it start AND end with 8 bytes of 0.

To repoint it what I would do is go to 0x51ba84+4*race id in my hex editor, go to the offset pointed to by the entry there, copy all the data for the list and save it in a new .bin file (also in the hex editor), I would place this file on the same folder as my buildfile.
Then I would make my new list like this:
ALGIN 4
nameOfYourList:
#incbin "path to the .bin file"
(insert new data for abilities here)
BYTE 0 0 0 0 0 0 0 0
And finally, to repoint the list:
PUSH; ORG $0x51ba84+(4*raceID); POIN nameOfYourList; POP

The data for an ability on that list would look like this:
SHORT nameID descriptionID abilityEffectID; BYTE abilityType apCost

Of course you would replace raceID, nameID etc with the values you want to use

If you need help getting this to work or setting it up feel free to send me a PM.
  • Modding version: Other/Unknown

ExL

Just for anyone who was interested in that - I've tried changing more jobs to humes and L/R buttons with pages appeared as they should've :v/:

For what I know I'd never structured it all like it is in game. I'd went for something like this:
Race 01 - 01 which job wheel this goes, also pointing table of base stats;
Job 02 - 02  pointing to table with all stat growths, equipables, graphics set to use, etc. and inside that table is 0A - pointing to Ability Pool tables with abilities;
Ability Pool 0A - would've consist of 000B Abilities(pointers to them) written one after another with last one being special symbol meaning end of a list;
Special 03 - 03 would say that this is special case and will use one of custom graphics set overwriting generic job's one.

I've probably said something silly right there so please don't mind that if I did :D Just how it is rubs me wrong way for some reason...
  • Modding version: Other/Unknown

Leonarth

Most of the data in the tables and the data.event files are either completely new, an extra way to load data on top of the existing one or replacing hardcoded values with lists, I haven't changed how the majority of the data works. When I say "what I would do" I mean that is how I would write the data in Event Assembler, the data itself would still be in the same format as the ROM data once inserted, I'm not doing anything that AIO doesn't do there.
The way a lot of routines work would also need to be adapted to this new ability lists, for example, when checking if an ability is an action ability or not you would need to find every job of that race, find the pointer to their ability pool, find every pointer inside there and check what type of ability it is, this is not just much more work than just checking one list for one race but would also, as I said, require a complete rewrite of many routines.

I didn't decide to make race ability lists or job data this way, that is just how they are in vanilla, changing them would take a very high ammount of effort and they are perfectly fine as they are right now.
What you propose for ability lists would, I think, make it take more space and make it harder to use, it could make reusing abilities on different jobs harder too.
Abilities would still be tied to race anyway so we wouldn't be adding anything to it.

For anyone reading that wants to understand why this is the case:
Keep in mind the game needs to at all times remember what abilities each unit has, there is only one way to do this and it is to keep track of it in RAM, the game also needs to know which abilities the unit has equipped.
To do this, the game in vanilla reserves a section of the unit's data in RAM to store the progress of each ability, it takes one byte for every ability, there are about 0x8E (142) bytes reserved for this because that is how many abilities humes have, and humes are the race with the most abilities.
This is why ability 2 for hume and ability 2 for nu mou are not the same, they use a different list so they can keep track of their own abilities, otherwise to store information for all possible abilities this 0x8E bytes section would need to be increased to... who knows how much, but a lot more, probably around 5 times as much, that's a huge ammount of data considering that these 0x8E bytes are already over half of all the data saved for a unit, this would not only need to be stored in RAM but also saved, which can be costly considering this is a game with a lot of moving parts and 3 whole save slots (one of them being the suspend one).
Additionally, the sections that keep track of the equipped abilities would need to be increased to 2 bytes, and all routines that deal with ability IDs at all would need to be updated to use 2 bytes for them instead of 1.
With the 1bit abilities engine hack the number of abilities that are kept track of is increased to 0xFF, yet it only takes up 0x20 (32) bytes because it no longer has to keep track of AP progress, it does not increase it past 0xFF because of what I mentioned earlier about equipped abilities.
I hope this explained why it just doesn't matter how you define abilities in ROM, having a list of abilities by race is the only way this can work.

As for the structure of the data itself:
Remember, data means nothing on it's own, there is nothing specific to a byte that says "this is HP", data is what the game makes of it, to reestructure a table what you actually have to do is rewrite all code that interacts with it, which is as much of a pain as it sounds like. There has to be a really good reason for that. It would also mean I would need to provide new tables with adapated vanilla data, or make the routine able to work with both, if you look at how tables like the portrait palette tables or the job icon tables that's what I did, these however are way simpler and they are providing a solution to the limitations of the game, for example: job icons above a certain number are hardcoded to be Monster except for specific IDs which are Expert, that is a pain to work with so I decided a new table was a good choice.

What you called "Special" is already a thing, it's not part of job data, it's part of character data, every unit has a character ID and IDs over 1 replace the graphics with that character's graphics for all jobs.
Also, is there such a thing as base race stats? Or is this a feature request for something that does not exist in vanilla?
  • Modding version: Other/Unknown

ExL

I'm really glad that you explaining all that stuff, it's of a great value for those who'd want to understand how it's all working under the hood.
Quote from: Leonarth on January 13, 2019, 06:55:44 am
Also, is there such a thing as base race stats? Or is this a feature request for something that does not exist in vanilla?

No, there isn't any racial base stats or multipliers in vanilla all is defined in jobs. And I didn't meant it as request, that's just how I thought it could've been done... That would had meaning in context if duplicate jobs were single entries and race changed not only appearance, but stats to make them different. Say hume and bangaa soldiers were same job, one entry and race would dictate if it's hume use sprite set 1, if bangaa - sprite set 2 AND use different base stats, more balanced for hume, bulkier for bangaa. Theoretically if it worked like this in full hack it would save space for new jobs by merging old ones into one entry and still give them different flavour, but that worth an effort only if someone actually making one...
Hope I didn't wasted your time pointlessly :|
  • Modding version: Other/Unknown

Leonarth

If it helps people understand better how it works then it's not a waste of time.

I don't think there is much need to merge jobs, the job table could be repointed and expanded and in vanilla only 0x73 (115) of them are used, that leaves us with a bit over half of the IDs (140) being unused, I doubt anybody is going to have issues with that.

If the day where we need more than 254 jobs does come then what I would suggest is making a job table for each race, which would be a lot of work too but would mostly preserve the vanilla layout of the data while expanding greatly on the job IDs, with 254 jobs for each race. I say 254 because the first one is a dummy to represent no job and the second one is data for using items.
  • Modding version: Other/Unknown

dck

@Exl: Tangent but, given the way the leveling system works (unit spawns with X stats and gains Y upon leveling), it's already possible to implement a stat system that has every job of a race sharing a set of stats, which are then modified by the jobs those level in. Of course it can't go as intricate as having multiple versions of every job but the basic functionality is already there, I think FFTAX had a start on this- works on long night too!
  • Modding version: Other/Unknown
  • Discord username: adri#1824

Leonarth

January 13, 2019, 05:17:38 pm #12 Last Edit: January 17, 2019, 02:50:58 pm by Leonarth

Scripts made this so much faster than I had hoped.
What you are seeing is 13 units on the same map, which doesn't sound like much, but there is more to it: in vanilla having more than 10 monsters at the same time was not possible, the remaining 3 (13 is the unit limit in general) would be invisible. Not anymore. (Gria have always been monster-sized, because of the wings).

I made some scripts to go through each animation and reduced the tile count of all of the offending ones manually to 20, you can now have any units you want in your map provided that you stay below (or at) the 13 units limit (the Judge IS a unit), I reduced tile count by changing which objects the sprites are made out of and shifting tiles, but without changing not even one single pixel of what they look like in the end. They will, however, behave a bit differently when moving behind tiles that cover them and similar, let me know if any of the animations looks unacceptably bad in those scenarios (most edited sprites are for attacking animations so I hope there won't be big issues).

This was step one on my plan for making an animation template, although for now it doesn't mean much unless you really really wanted to have that many monsters in your map. With the template all animations will be of the same size because there's just no reason not to use big animations anymore, this means I can have just one template instead of two which is easier for everyone.

The next step is to make a way to give units attacking animations for weapons they don't have, including units that, like Marche, use that slot for something else entirely, it will also include the data for them out of the box so if you wanted to say give Archers knives, you'll be able to.

When that's done I'll be able to release the template too, which will consist of one event file in which the user will define the race (from the playable races, for special animations unique to that race) and one sprite sheet. Users will drop this sheet on an .exe which will return a GBA ready version of the graphics. Of course if someone wants to edit the template to add some new animation or similar they'll be able to do that too.

When it is complete it will be part of the job customization.

You can check out the fixed animations with lower tile counts by downloading the attachment and including fixedAnimations.event in your buildfile. Please let me know if you see anything weird while playing around with it.

Update:
I wrote a python thingy to make weapon animations based off of the existing ones, no extra sprites needed.
(This is not yet included, it will be included when the next update comes).

This means all jobs (and races) will be compatible, animation-wise, with all weapons.

Please keep in mind these were written by a script and there are over 1200 animations, I won't be testing all of them individually, if you notice any odd-looking animations be sure to let me know.

As I previously said the next step is the write the animation template, I'll let you guys know when that's done.
  • Modding version: Other/Unknown

Leonarth

January 17, 2019, 02:40:57 pm #13 Last Edit: January 18, 2019, 07:22:00 am by Leonarth
The next update is not exactly ready yet, and it may take a while, but in the meantime I have put together something you can use to start working on your animations if you want, which should be 100% compatible with any future version of the template.
The template sheet comes with the 3 valid palettes.
There are two template sheets, one for regular animations are one for water animations, which includes some graphics for Llednar in the water that I put together a while back.

Right now it supports all basic actions, but there is no support for some ability animations, that's going to take a while and I might need help with it, I'll let you guys know.

I also attached sprites I ripped, but keep in mind the sprites are NOT in the same order as the template.

It includes a readme but feel free to ask any questions you have.

Edit: Apparently I forgot to include the palettes so I attached those too.
  • Modding version: Other/Unknown