Final Fantasy Hacktics

Modding => Non-FFT Modding => FFTA/FFTA2 Hacking => Topic started by: Edea on July 10, 2018, 10:55:00 PM

Title: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: Edea on July 10, 2018, 10:55:00 PM
This is an odd request/question, but did anyone here ever figure out how to get 'Invisible' status to stick to units which don't normally access it? 

Normally, if the unit tries to become Invisible and they don't use a sprite that has default access to Invisibility in some form to begin with (like Viera, Seeq, specifically Hurdy (not other Moogles), I think Dreamhares, etc.), they will immediately reappear on the field and they won't be Invisible any more.  I'm fairly certain it's some sort of sprite-check routine, but I don't remember ever being able to trace it.  Any knowledge about this would be appreciated (aware of how old this game is, unfortunately).
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: DeSgeretjin on July 11, 2018, 02:08:47 AM
Some spell effects are actually tied to animation data.
You would find that in the 14th byte of animation data for invis skill is 0E.
https://imgur.com/a/JDYTCrS (https://imgur.com/a/JDYTCrS)

On note of tracing, what disassembler do you use?
I couldn't find one that works well for me.
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: Edea on July 11, 2018, 02:24:21 AM
Me either, DS tracing is a perilous affair from what I remember unless you've got dev tools.

The problem seems linked to which characters use the skills, though this is also helpful data (like, if I game Luso the Vanish ability, it won't work on him, but if I give it to Hurdy it'll work fine, unless I'm misunderstanding what you're saying?)
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: DeSgeretjin on July 11, 2018, 06:48:30 AM
Vanish works fine on luso. Every unit has the animation for invis.

It's just that the 14th byte governs special animation routines which for most skills is set to 00, this returns the sprite to default after the skill is used. 0E just keeps the invis sprite active.
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: Edea on July 11, 2018, 06:50:07 AM
Ooooh, alright.  I'm going to go try that right now, actually, thanks!

EDIT: Nope, unfortunately Luso reappears immediately after using Vanish (and he's not considered Invisible by the game).  I'm just not certain what causes this behavior.

EDIT 2: ...oh, never mind.  Using the -original- Vanish A-Ability works fine with Luso; what happened is I copied that exact code over to another ability slot (for ability function data, command data and graphical data), and that's the version of the ability that's having this weird behavior, meaning there's probably another section of data for A-abilities of which I'm unaware.

FFTA2 Ability Data ($53da96c) (52 bytes/ability) - ability function data
FFTA2 Command Data ($53d8217) (12 bytes/slot) - command set data, including the stance the unit uses when activating the ability in question
FFTA2 Ability Graphics/Animation Data ($53e4878) (24 bytes/ability) - graphical data

Data for these sections were all copied exactly from the original code for the Vanish ability to their new respective slots, and the anomalous behavior for the 'new' ability still shows up (on everyone who uses it, not just Luso; a Viera Sniper immediately reappeared).  What other areas of the .nds file control ability behavior, this something new I need to add to my notes?
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: DeSgeretjin on July 11, 2018, 08:44:24 AM
Huh, thats something.

I've also notices that some routines are offset based. For example if you use the routine 0D( the routine for items) for fire it'd show the sprite of a water sigil.
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: Edea on July 11, 2018, 07:39:26 PM
There might also be a part near the end of the game's 'Action resolution' sub-routine (wherever it is in the .nds file, and whatever it actually looks like) that does a final 'check' of what ability ID was invoked after the actual effects of the Action have taken place.  If said ability ID didn't match one of the pre-programmed exceptions (like where the original Vanish, Hide and Camouflage abilities are located), the Invisible status would then be removed, due to that last 'check' step considering the ability ID invoked to be an Act capable of such.

I also remember being frustrated with Luso's inability to use Piercing Weapons or Hand-cannons, due to the battle routine freezing up whenever Actions were attempted using those weapons.  Doubleshot, as well, would freeze up...I'm wondering now if these aren't sprite issues, and instead involve unusual ID references like this.
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: DeSgeretjin on July 12, 2018, 01:35:11 AM
The piercing weapon thing seems to be a racial sprite issue, both bangaa and viera can use rapiers and spear without freezing even on jobs that don't usually use piercing weapons. Changing a jobs race doesn't seem to affect it as long as the sprites match, i.e hume fencer with viera sprites.
Title: Re: FFTA2: Invisible Status - Possibly Sprite-Related
Post by: Edea on July 18, 2018, 10:53:11 PM
Has there been any research/progress made in the 'sprite alteration' department?  Only sprite hack I've done at this point is re-doing the 'Job Title Placards' that appear when checking equipment for what abilities are taught to which jobs/which jobs can equip the item in the first place (changed 'Warrior' to 'Freelancer', so that Luso'd have a unique Job of his own).