• 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

To give a wheel to Ezel the easiest way would be to make him a Nu Mou, once everything is ready I will include an easy way to do that with the download.
You can totally give a special job to Ritz or Marche and have only them be able to switch to it (or even see it, which I recommend), with Marche you would have the issue of not having any free abilities on the hume race, unless you have 1bit abilities, but for Ritz you should have no issue at all.

Ezel wouldn't get a wheel by default because he has no jobs available on his default race, since I already made a routine to lock Babus' and Cid's jobs to their character IDs.
This is a section of the table:

The first pointer is the ability list, it's 0 which means that the vanilla list of abilities will be used.
The second pointer is the unlocking condition.
The third pointer is checked even after the job is unlocked, and prevents units from seeing the job if they can't fulfill it.

Only units that can see more than one job for their race get a wheel, otherwise the job change option is greyed out.

There's only one job that I made a list for so far, other than for testing, Red Mage:
vieraRedMageAbilities:
BYTE 0x16 0x17 0x18 0x19 0x21 0x1B 0x1C 0x1D 0x1E 0x1F 0x20 0
This list is the same as the vanilla one, but the Cure ability is replaced with the same Cure that white mages have, freeing one ability and making sure they are mastered at the same time even when using the JP Purchase system.

If the system can't find a custom ability list it will use the vanilla one so there's no need to make lists for most of the existing jobs.

On a different note, I finished all the Gria Hunter animations, including water ones:


A friend helped me with the portrait too, making a version with colors that play nice with palette swaps:

I also figured it would be nice to be able to set which races get which random names so I added that to my list of things to include. I have some ideas on how it should work but there's a few routines to worry about so it might take a while to complete.
  • Modding version: Other/Unknown

Blunderpusse

Thank you.

I have some question on the sprites, though.
1 - Are you ripping the sprites from the ROM itself or from Spriters Resource?
2 - Which software are you using to edit them?
3 - What are the specs for the spritesheets for when I want to insert custom animations on the ROM (ex. width, height, number of rows/columns, etc.)?
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"

Leonarth

  • I'm using multiple sprite sheets I found on the internet, none of which is complete, some of the frames were done by a friend bust most of them I fixed myself (the colors and all that).

  • I use usenti and aseprite, aseprite for the editing, usenti to make sure the format is correct.

  • There isn't an easy answer to this so I'll detail it down below.


There are two different sprite sizes, 0x10 and 0x18, 0x10 is used for playable jobs and 0x18 is used for monsters, Grias use 0x18 because there would be no way to fit them in otherwise.

0x10 sprites may have up to 10 unique 8x8 tiles in any arrangement, 0x18 sprites may have up to 20 8x8 tiles in any arrangement.
I don't really know why they are 0x10 and 0x18 but those are the numbers the game uses.

Animations are actually metasprites, composed of several multiple sprites, on top of making the graphics you also need to make sure to use (or create!) the right metasprite data for them. This is what I mean when I say "any arrangement", your sprites don't need to stick to the same rectangular shape every time, in fact, vanilla doesn't, many poses have special metasprite data for them, often specific to only that pose, and even though monsters always use the same data and are all 32x40 sprites nothing is preventing us from using different data to use a different shape.
Something similar happens with portraits, the Gria portrait I made is composed of 11 different sprites that move together, which means I had to go and make the data for this collection of sprites.

There is no limit to how long your sheet can be (you would sooner hit the limit of the ROM size), or to how many frames an animation can have (well, there is, it's 4294967295 frames), your spritesheet can be of any shape as long as the tiles end up in the right order, I used 32x(40*ammount of frames) for the gria animation, along with a script I wrote to reorder the tiles correctly.

I need to use a script because the way the sprites look to us is not the way the are stored in the rom, the GBA will just make sprites from left to right, top to bottom using tiles ONLY from left to right, there is another method of reading tiles for sprites but the game does not use it, and for good reason, even though it is a more human readable way of loading them it makes having as many possible sprites on screen a giant pain, these are often called 1d and 2d mapping modes, check the link at the bottom if you want to learn more. Anyway, this means the game needs a different order than the one that is natural to us, here is an example:

On the left, what we end up seeing and what my sheets look like, on the right is what the game needs and what my script outputs if given the image on the left.
Now the same image, with every sprite that forms the complete frame marked with a different color, maybe that will be easier to understand:


Only one frame is ever loaded at a time so there is no limit to the size of the sheet, sprites don't even need to be on a sheet, you can have the tiles of one frame at the beggining of the rom and the tiles for the next at the end of the rom.

In the end the animations aren't really difficult to do (not talking about graphics here, just the data for the animation), the process is just tedious as you are likely going to be referencing existing animations over and over. Luckily unless you want some special animation, like some non-generic characters have, you are likely just going to want the same animations for every job, this means we can build a templete that can be used for any new job, with only the graphics needing to be replaced.
I already did this for the Gria so when I make the next one I'll already have most of the tedious work done, however this one only works for monster sized sprites, which are much easier to work with, doing this same thing for small sprites will take a lot more time, and a much more complex tile reordering script. I guess I could just make several different scripts, too, that should be easier.

If you want to learn more about how sprites work in the GBA, give this a read: https://www.coranac.com/tonc/text/regobj.htm
Section 8.2.1 is the most relevant to what I explained.
If you are interested in how the GBA works I recommend to give the whole Tonc text a read!, I'm personally not interested in C hacking so I skip over that stuff, but just the data on the GBA itself is worth a read even if you don't care about the rest.
  • Modding version: Other/Unknown

Blunderpusse

When you say data animation, are you referring to battle motions? For example, by default, the Sage sprite doesn't have a motion for ranged attack weapons. But by fiddling with data animation, you can make that sprite have said motion (like, making the rom use graphics the sprite already has)?
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"

Leonarth

When you assign a Battle Sprite what you are truly asigning is an index on a table.

In this table there's a pointer for every battle sprite.
If we follow one of these pointers we'll find another list of pointers, one for each animation this battle sprite has, some of these are 0 because the game has no need for them, we can simply create an animation elsewhere in the rom and point to it in this list, making it use graphics it already has or new ones, doesn't matter.
You could even use the pointer for an animation of a different job and it would also work just fine.

When I say animation I'm talking about a list of data for each frame, just that: data of the location of the graphics, the location of the data for the oam, duration, position...

Generally speaking all playable jobs have the graphics for all animations of all other jobs, excluding race exclusive things (such as Advice and Morphing). There aren't that many different unique graphics, all attacking animations use the same 3 (or 6 I guess since there's different graphics for when they have their back turned towards the camera), sometimes mixing in the graphics for walking too.

The animations are always in the same order, lance/rapier animations will always begin with the 47th one:


A different issue we would run into is that some jobs have different animations in slots they would normally not use, marche has story animations where his lance animations would go, I have already planned a workaround for this though, which will take advantage of the free space that exists in the tables.
  • Modding version: Other/Unknown

Diedrik

Marche with rapier! Huzzah!

I am definitely looking forward to the job/ability one, I do think that you should separate out the tiny patches, like the steal shoes one they are good enough to be on their own. Especially the mighty morphin morphers, and the tutorial skip.

How much work would it be to make all classes able to use any weapon type? Oh, also is the update for Skill Purchase now compatible with Manual Sorting? And/or do I need to change the offset in the build file for that or something? I know last time when I just tested the UPSes together they resulted in a reliable crash.
  • Modding version: Other/Unknown

rrs_kai

Quote from: Diedrik on January 01, 2019, 12:10:20 am
I do think that you should separate out the tiny patches, like the steal shoes one they are good enough to be on their own. Especially the mighty morphin morphers, and the tutorial skip.

yes please.

Quote from: Leonarth on December 25, 2018, 11:24:57 am
Morphers will still use the same palette they were using before morphing so player morphers will always be blue or green.
I call it: Morphing Morphers Morph.

does this mean that if I change morpher to sprite 2 all his monsters will use sprite 2??

I like the unused yellow sprites (makes morpher unique).
They are all numbered as "2" in the AIO.
  • Modding version: Other/Unknown

Leonarth

Quote from: Diedrik on January 01, 2019, 12:10:20 am
How much work would it be to make all classes able to use any weapon type? Oh, also is the update for Skill Purchase now compatible with Manual Sorting? And/or do I need to change the offset in the build file for that or something? I know last time when I just tested the UPSes together they resulted in a reliable crash.

Giving all jobs animations for all weapons it would just be some tedious work, the graphics already exist, it's only a matter of making the data for the frames, I have an idea that will allow that without replacing the special animations the jobs may have.
As for the patches, they have always been compatible, if you have trouble mixing them send me a pm and I'll walk you through it.

rrs_kai:
That's the palette, not the sprite, if you set the player morpher to be yellow then his monsters will be yellow, which are the rarest, it's the least used palette by far but it's not unused, Montblanc, creams, thunderdrakes and some npcs use it.

As I have explained before there is no need to "separate" the thiny patches, they are already separated, they are just included in the same download, you can go grab them from the jp purchase system and use them on their own, If you guys need a tutorial on that just let me know. If you are talking about making .ups patches for all of them, that's not possible.
  • Modding version: Other/Unknown

rrs_kai

Quote from: Leonarth on December 26, 2018, 07:26:49 pm
A friend helped me with the portrait too, making a version with colors that play nice with palette swaps:

I also figured it would be nice to be able to set which races get which random names so I added that to my list of things to include. I have some ideas on how it should work but there's a few routines to worry about so it might take a while to complete.

Nice Gria :)
  • Modding version: Other/Unknown

Leonarth

This update is a pretty big one!
It includes my recently released job/race customization stuff, which means 1bit abilities are here.
For now that doesn't change much but look forward to new things that make use of the freed up save space!

Please remember that saves done with 1bit abilities on are NOT compatible with saves made with 1bit abilities off and vice cersa.

[Download]

Changes:

  • Reworked the way the game ties abilities to jobs and jobs to races.
       Please read this post for more information on that, how to use it and what it allows: [click here]
       It adds many options so be sure to check it.

  • You no longer need to visit the job change menu to unlock jobs.

  • When Judges are disabled the "Law" button on the world map will no longer appear, pressing L will do nothing.
       The yellow and red card icons and count on the status screen also gets removed.

  • Reworked the way the JP purchase figured out which skills were being drawn or looked at to prevent future issues.

  • Added 1bit abilities, along with an option to disable them and use AP like always.

  • There is also a new way to load abilities for spawned units, which is optional to use, and allows for abilities up to 0xFF to be loaded.
       In vanilla there is only 5 words for known abilities in formation data.
       By setting the first 4 words to 0xFFFFFFFF the last word will be used as a pointer to an 8 word list.

  • Added manual sorting, which allows swapping units around, changing their unit number.
       There have also been some fixes done to it.
       Fixed some graphical stuff and Marche not being the first unit hanging the game in some events.

  • The Link option has been removed.
       Adding support for it would have been extremely hard.
       The Link option has been removed because it was now both useless and potentially dangerous.


   
Fixes:

  • Replaced the AP icon with a JP one at the shop.

  • Made JP icons that replaced AP ones use the right palette.

  • Fixed the Action/Support/Reaction/Combo icons on item info.

  • Fixed some stuff related to drawing the 999 JP cost.

  • The menu no longer goes back to the unit's current job after purchasing an ability from a different job.

  • Purchasing abilities now correctly unlocks jobs, and the menu is updated instantly.

  • Imprisoned and dispatched units can no longer buy abilities.

  • Made the movement confirmation hack not explode on you when you tried playing the game.

  • Made the movement confirmation hack not lock the game after looking at the status screen of a different unit.

  • Fixed the abilities lists not working correctly during battle if there were no abilities to display for the current job.



Options:

  • Added an install1bitAbilities option, when defined 1bit abilities will be used, otherwise AP will work same as always.
       This includes all graphical changes that replaced AP with JP.
       Current AP will also be drawn in the abilities list. It looks a bit different than it used to.
       On by default.

  • Added a quickStart option, if defined the two first fights will be replaced by a new event.
       The new event allows the player to name the main character and the guild, then throws them on the world map.
       On by default.

  • Added a noStatVariance option, which makes non-player units always have the same stats if spawned at the same level and job.
       Off by default. This thing will probably see changes in the future.

  • Added an option to have Morphers transform when they morph



Here are two screenshots comparing 1bit abilities and non-1bit abilities things:



There were a lot of changes, I think I covered all of them but I might have missed some, sorry if that's the case.

Next on my list is to continue with reducing tiles in animations, which I talked a bit about in a previous post.
The idea is to get animations that use too many tiles to use 20 or less.
Playable jobs use up to 16, which I have lowered to 12 just in case, currently I'm working on monsters.
The point is that if we manage that we'll be able to use big (monster-sized) animations only.
This would grant more freedom on animations and make them easier to work with and install.
It would allow 13 monsters on the map at once, making a 6v6 of monster sized units and a judge possible.
Currently if you tried to do that you would find that you can only have 11 units on the map before they go invisible.
Of course, doing this without changing what the animations look like is quite difficult so it might take a while.

As for what will be done with the freed up space, I was considering a few things:

  • Squares moved in the current turn.

  • JP pools for each job of the unit's race (undecided on max job ammount by race).

  • Custom names for generic units without forced names.

  • Stat decimal fractions, which would add up to 1 and grant a point, removing the random factor of growths.

  • New counters, there's already a kill counter but we could count other stuff as well if people are intersted in that.



Also, in my testing I was unable to get the enemy to ever use "Steal: Ability", do you guys know if they CAN?
If you have a method to make them use it, please tell me.
And I mean a proved method that has worked for you, not just an idea that might work, I tried all I could think of for days.

Remember, if you have any features you would like to see in (or changed), let me know, there's several things I want to touch up, like how JP is earned in combat, any suggestion you drop here will be considered when I add new stuff.

[Download]
  • Modding version: Other/Unknown

rrs_kai

Quote from: Leonarth on January 11, 2019, 09:16:00 am
Remember, if you have any features you would like to see in (or changed), let me know, there's several things I want to touch up, like how JP is earned in combat, any suggestion you drop here will be considered when I add new stuff.

I would like to see these:

  • Higher Exp difference:
    When a lv3 unit hits a lv 3 unit it gains 10 exp.When a lv3 unit hits a lv4 unit it gains 8 exp.
    The difference here is 2 exp per level. Can this be changed to 5?
    I have seen high exp difference in Tactics Ogre Knight of Lodis.

  • 3 turn Petrify & Toad recovery
    These two status effects are powerful and permanant. Sleep/Charm/Blind/Confuse lasts 3 turns, can toad and petrify be set to have the same behavior?
    I have seen 3 turn petrify recovery in Tactics Ogre Let us Cling Together.

  • Recoverable temporary stat drops
    This is for Power/Magic/Speed Break. If your unit got hit by DEF minus and used Mighty Guard for DEF plus you would now be at zero. Problem is, another Mighty Guard will not increase your defense, you will be unable to get buffed but can still suffer a debuff.
    This works properly in FFTA2
    • Can their % bonus be increased to 20%. (I think they are 10% default, not sure)

    • Dragon force increases ATK, MAG, DEF & RES, can it be changed to only ATK & MAG?
      From FFTA2.

    • There is no SPEED plus, can it be created?


  • Auto Regen - Reaction ability
    Reaction ability that casts cure on self when hit, spends required mp.
    Auto-potion from FFT

  • Doublehand - Support ability
    Increase damage from 20% to 100%.
    From FFT.

  • Mag Res + Support ability
    Support ability that increases resistance by 40% (like shell).
    From FFTA2.

  • Turbo MP - Support ability
    Increase damage from 30% to 40%.

  • Unscarred - Support ability
    Increases ATK, DEF, MAG, RES by 20% if HP is full. Its a combination of all plus support skills.
    From FFTA2.

  • Modding version: Other/Unknown

Blunderpusse

QuoteRemember, if you have any features you would like to see in (or changed), let me know, there's several things I want to touch up, like how JP is earned in combat, any suggestion you drop here will be considered when I add new stuff.


Now that you mention it, what about setting special characters (such as Montblanc and Ritz) go on dispatch missions? And even Marche (it could skip the required days just as if he had been arrested).
  • Modding version: Other/Unknown
"You sure are a keen observer of the obvious, kupo!"

Leonarth

Special characters can already go on dispatch missions, the only ones that can't are Montblanc and Marche because of story reasons, All others, even Cid, can go on dispatch missions and even have text specific to this (I think Marche has that text too), I don't know about letting Marche go on dispatch but I'll think about Montblanc being able to do so after the first Jagd has been cleared (he would be treated as dead for story events, so the alternate scenes would play).

As for the Exp request, do you guys know details about the Exp formula?
I'll probably be touching Exp stuff after I'm done with the animation template I'm working on, I'll be trying to split the JP gained message into it's own thing and have earning JP through actions be optional, as well as probably a new formula for it (right now it's just the same as Exp), if you guys have ideas about formulas that would work (or think that the current one is fine) please let me know.

After that I would be interested in working with status effects, I still don't know where the counter for most of them is kept.

I had never heard of this unrecoverable drops thing, my guess is that what is actually happening is this:
When you use Dragon Force, the ATK up flag is set.
When you get hit by Power Break, the ATK up flag is unset, the ATK down flag is set.
And this is where the issue would happen: When you use Dragon Force while having the ATK down flag set, the ATK up flag is set but the ATK down flag is never unset. In my opinion it should work the same as Power Break, it should set the ATK up AND unset the ATK down flag, it not doing so sounds like an oversight to me.
I haven't checked how it actually works though, this is just my guess.

I'll keep in mind the ability requests but right now I have no plans on working with abilities in the near future, at least not until I get the steps taken counter working, with a proper way to check if a unit teleported/flew.
  • Modding version: Other/Unknown

dck

Personally I think that's the better way to go, the groundwork you're setting up already enables modders to make really drastic changes that would've not been possible before; I think that has a way higher impact than being able to fine-tune abilities that may need balance one way or another.
I think the current experience formula is decent, so long as the enemies are made to follow the scaling system in the game and that scaling is done according to the highest player unit- If this is not the case then the system encourages interacting with your own units in order to grind levels which I don't believe is a desirable outcome.

I had a question before I forgot to bring up if you don't mind. With your way of repurposing the combo slot as another passive ability, did you find out if the formation structure actually handles combo abilities at all? It's less important in mods that use it as an actual combo ability, but your approach is interesting and I was wondering how you'd go about actually giving units those movement abilities, since to the best of my knowledge they can't be set from that structure at least.


@rss_kai: For the record, debuff length has already been modified in FFTAGG iirc, albeit I don't know if the means to do so are public or not or since I never looked into it more.
Also, the % stat increases and decreases are not very consistent in their effect: Atk UP/DOWN give a 10% increase and decrease, while for example Def UP gives 40% increase and DOWN gives a 30% reduction.
Bear in mind defensive stats are half as effective as offensive ones are, so the differences aren't as big as they may seem and increasing attack values can get out of hand pretty quick.
  • Modding version: Other/Unknown
  • Discord username: adri#1824

Leonarth

There's two bytes in the unit data for formations that go completely unused as far as I can tell, never read, it would just be a matter of having the game read one of them and store it into the combo ability slot.
  • Modding version: Other/Unknown

giado123

hi! im newbie in EA. How do you change the battle sprites and the portrait? Can you make tutorial for this?
  • Modding version: Other/Unknown

Leonarth

Please check the thread for the job and race customization hack, as that's a question that is best suited for that thread:
http://ffhacktics.com/smf/index.php?topic=12169.msg225244#msg225244

I haven't finished making the battle sprite template yet, explaining all of the data that goes into an animation is well beyond what can be taught in one post.

As for portraits, there isn't really much special about them (as long as you are using my uncompressed graphics loader, which should be included) but you'll have to know how sprites work in GBA (and again check the other topic).
I attached the first portrait I made as an example (please note that I did not draw it, I only made it insertable), but all there is to it are the tiles, the palette and the OAM data for the sprites, that and including pointers to those in the table.

The limitations are 64 tiles max, 8bpp graphics, 48 colors (starting with the 6th palette, or 96th color), and I would recommend staying below 10 objects.
You'll want to use a tool that can work with those limitations, I recommend usenti.

Information on OAM data:
https://www.coranac.com/tonc/text/regobj.htm

There's a readme included with the job and race customization download in the other thread that includes some links, one of those is a tutorial on EA.

You can also use this macro and definitions for making OAM data in EA, once you have read the tutorials:
#ifndef dataOAMinstalled
#define dataOAMinstalled 0
#define square 0x0000
#define rectangleH 0x4000
#define rectangleV 0x8000
#define flipH 0x1000
#define flipV 0x2000
#define flipVH 0x3000
#define 4bppMode 0x0000
#define 8bppMode 0x2000
#define dataOAM(Y,X,Shape,Size,Tile) "SHORT 0|(Y&0xFF)|(Shape) 0|(X&0x1FF)|((Size&3)<<14) 0|(Tile&0x3FF)"
#define dataOAM(Y,X,Shape,Size,Tile,Flip) "SHORT 0|(Y&0xFF)|(Shape) 0|(X&0x1FF)|((Size&3)<<14)|(Flip) 0|(Tile&0x3FF)"
#define dataOAM(Y,X,Shape,Size,Tile,Flip,Priority) "SHORT 0|(Y&0xFF)|(Shape) 0|(X&0x1FF)|((Size&3)<<14)|(Flip) 0|(Tile&0x3FF)|((Priority&3)<<10)"
#define dataOAM(Y,X,Shape,Size,Tile,Flip,Priority,ColorMode) "SHORT 0|(Y&0xFF)|(Shape)|(ColorMode) 0|(X&0x1FF)|((Size&3)<<14)|(Flip) 0|(Tile&0x3FF)|((Priority&3)<<10)"
#endif
  • Modding version: Other/Unknown

giado123

Thank! I successfully change the battle sprites by using tile molester. The problem here is i cant find the location of the party sprites and the portrait in rom to change. Can you help me for this? I created 2 new party sprite for samurai and dark knight.
  • Modding version: Other/Unknown

Leonarth

I don't use tile molester, I use EA, just make the images in some image editing tool and insert them with EA... There is no need to mess with the ROM directly at any point doing this. You should NOT be using tile molester, or any other tool that edits the graphics of the ROM.

Look in jobAndRaceCustomization\Graphics, there you will find a folder called party which has the party sprites and a file called Job Party Image Installer.event which inserts them.

Just do the same, put your party images (with the right palette and size) in the folder, include them in Job Party Image Installer.event and put the label in the table at jobAndCharacterPartyTable.event

In case it's not clear, .event files are text files, open them with your text editor.

Even if you found the right location for the portraits and party sprites those are compressed so it wouldn't be of any help to you, on top of that you would still need to change the portrait palette and OAM data anyway. Just use the thing I made, it exists for a reason.
  • Modding version: Other/Unknown

giado123

Thank for your help! i just have one more questions:
- the party image you created is 32x40, larger than the sprites which is 16x16. So which size should i create for the new party image?
  • Modding version: Other/Unknown