FINAL FANTASY TACTICS GAMESHARK HELPER
Version 0.1 (Beta)
BY Neo-Kamek (kammykoopa@earthlink.net)
---------------------------------------

SPECIAL THANKS:
Sam Volo for his Final Fantasy Tactics Battle Mechanics Guide, which made this research a lot easier
Ex Soldier Cloud for posting the original theories on the different ability bytes
CzarDragon for a cool site with job codes


1. QUICK 'N EASY GUIDE
======================

This utility is still in a Beta stage and thus the layout could use some improvement. I'll provide an easy procedure for making the Gameshark codes you want to change whatever ability.

STEP 1: CHOOSE THE ABILITY.
  Use the listbox in the upper-left hand corner of the window to choose which ability you want to modify. For simplicity we'll assume you want to use CURE.

STEP 2: CHOOSE THE ABILITY RANGE.
  This is how far away you can target the ability. If you want a range of 4, enter "0004" in the "Byte 1 - Ability Range" row. If you want a range of 10, enter "000A". The range must be entered in hexadecimal. If you don't know the hexadecimal number for the range you want, use Windows Calculator to convert it.

STEP 3: CHOOSE THE EFFECT AREA.
  Most magics use the "Effect 2" area, which is more or less a plus sign. Use the dropdown list box to choose the effect area you want.

STEP 4: CHOOSE THE VERTICAL EFFECT AREA.
  If you don't want any vertical tolerance on your move, set this to 0, otherwise choose the vertical tolerance for your move.

STEP 5: "UNKNOWN FLAGS"
  The only flag you should concern yourself with for now is the "Auto Range" flag. If you want the move to automatically be centered on the caster, click Auto Range.

STEP 6: AFFECTED TARGETS
  CASTER IMMUNE -- check this if you don't want the caster to be affected by the move.
  4-DIR -- Check this if you want an Earth Slash-like effect range.
  RNDTARGETS -- Check this if you want the move to attack randomly in the affect area.
  ENEMIES -- Check this and only the panels on which enemies are standing will be targeted.
  ALLIES -- Check this and only the panels on which your teammates are standing will be targeted.

STEP 7: MORE FLAGS
  RNDTARG? -- Used with random targeting and auto range moves. Exact purpose unknown.
  EVADE -- Check this if you want the target's evasion factor to be figured into the success rate.
  MATERIABLD -- If the attack requires a Materia Blade to use, check this.
  NOBLK -- Check this if the attack cannot be blocked.
  CTRMAG -- Check this if you want the attack to be Counter Magickable.
  ELEMENTAL? -- Effect unknown.

STEP 8: ELEMENT
  Simply check the element or elements you want the attack to be.

STEP 9: ABILITY EFFECT, K VALUE, AND Q VALUE
  There are many ability equations here. Choose one from the list, and set your K and Q values accordingly.

STEP 10: ADD STATUS
  If you want your move to add a status effect, choose it from the list.

STEP 11: CHARGE TIME
  For no charge time, set the charge time to 0, else choose the number of clockticks the move has to charge before it will work.

STEP 12: MP COST
  Enter the MP cost.

After you are done, any codes that are in RED will need to be entered into your GameShark. Codes that are in BLACK were unchanged and do not need to be entered. Now enter the codes, start the game, and try out your new ability!


2. UNKNOWN FLAGS
================

The rest of this guide will discuss the different options in detail.

FLAG 1: Used on a myriad of abilities. It's used on so many abilities that it's hard to determine what it's for. If anyone has any information on the purpose of this flag it would be greatly appreciated.

AUTO RANGE: This flag is used on every attack whose range is "Auto", meaning that the ability is automatically centered on the caster. It is also used quite frequently with the "RndTarg?" flag in Byte 7.

SWORD SKILL: This flag is used on all the sword skills (HOLY SWORD, MIGHTY SWORD, DARK SWORD, DESTROY SWORD, LIMIT). Unfortunately, it doesn't appear that you can turn a normal attack into a "sword skill" by applying this flag. It might be something else, such as "this attack takes on the element of whatever weapon the caster is holding", which would make sense for HOLY SWORD since those attacks aren't really HOLY elemental anyway.

FLAG 4: This flag isn't used quite as often as FLAG 1, but it's still hard to tell what it's for since it's used on many different types of abilities. As with FLAG 1, any info on this is greatly appreciated.

FLAG 5: Used on Kikuichimoji, Earth Slash, Holy Explosion, the dragon breath attacks, Black Ink, Blow Fire, and Triple Attack. Probably another 4-dir flag.

WPNRANGE: This flag is used on the equipment/statistic break skills, as well as the SNIPE commands. When used the ability's range takes on the range of the equipped weapon.

FLAG 7: Unused, possibly a dummy flag.

FLAG 8: Unused, possibly a dummy flag.


3. AFFECTED TARGETS
===================

CASTER IMMUNE: Used on most sword skills, elemental, and some others, this prevents the caster from being targeted with the ability.

FLAG 2: Used only on TRIPLE ATTACK and TRIPLE BRCELET. Probably a flag used only for the unusual effect area of these skills.

4-DIR: Used on the 4-dir attacks (Kikuichimoji, Earth Slash, etc.)

RNDTARGETS: Used on TRUTH, UNTRUTH, HOLY BRACELET, TRIPLE THUNDER, TRIPLE FLAME, and DARK WHISPER. Causes the move to attack randomly in the affect range based on the formula. In TRUTH, UNTRUTH, and HOLY BRACELET, the total number of strikes is a random number between 1 and the K value, which is 6 for TRUTH and UNTRUTH, and 4 for HOLY BRACELET. For the hydra attacks, the total number of strikes is the K value plus one, which is 3 for TRIPLE FLAME and TRIPLE THUNDER, and 6 for DARK WHISPER. It is unknown whether other formulas (besides the ones used for these attacks) support this flag.

FLAG 5: Used on a myriad of skills. Effect unknown.

FLAG 6: Unused, possibly a dummy flag.

ENEMIES: Used on moves that target enemies only, such as summons and draw outs. If on, this flag forces the move to target enemy units only.

ALLIES: Used on moves that target allies only, such as summons and draw outs. If on, this flag forces the move to target allied units only.

Effect of using both the ENEMIES and ALLIES flag is unknown.


4. VARIOUS FLAGS
================

FLAG 1: Used on the random targeting attacks, as well as Black Ink, Nose Bracelet, Oink, Pooh-, Blow Fire, the dragon breath attacks and Triple Brcelet. Effect unknown.

QUOTE: Used on nearly all magic spells, as well as some non-magic abilities. If this flag is on, there will be a 20% chance of the caster saying the spell quote before the spell goes off. The only skills that have quotes but the quote flag is off are DEATHSPELL 2 and the MAGIC SWORD abilities. If you use this flag on any other ability you will get a "No messages" quote. The MAGIC SWORD quotes are just as cheesy as all the other quotes, but it's worth seeing.

PERFORM: Used only on SING and DANCE. It likely puts you into a "Performing" state while charging.

FLAG 4: Used only on Skill 000, a BLANK skill. Effect unknown.

NO MIMIC: If this is checked, Mimes cannot mimic this ability. Turn it off if you want your Mimes to be able to use sword skills :D

FLAG 6: Used on magic and talk skills. Effect is unknown.

CALC: If ON, the skill can be Calculated. AFAIK, you can't just slap this onto any ability and expect it to show up in the MATH SKILL menu -- I think you have to shark it over one of the current spells.

REFLECT: If ON, the skill can be Reflected.


5. MORE FLAGS
=============

The insanity continues.

RNDTARG?: Used on random targeting and fixed range attacks. Exact effect is unknown.

EVADE: If enabled, the target's evade factors will be calculated into the success rate. Chances are, not all formulas use the evade factor.

MATERIABLD: Used on the Limit skills. If the skill needs a MATERIA BLADE to use, this is enabled.

NOBLK: Used on all the sword skills. Likely named incorrectly and requires a sword to use.

FLAG 5: Not sure.

FLAG 6: Seen on THROW STONE, the breath attacks, BLASTER, BLACK INK, the SOUL attacks, THROW SPIRIT, LOOK OF DEVIL, LOOK OF FRIGHT, and BLOW FIRE. Most likely for "projectile" attacks, where if a person or thing is in the firing line between the caster and the target, the ability effects the person or thing blocking the path instead.

CTRMAG: This flag is ON for all spells that can be countered by Counter Magic. Try throwing it on a sword skill and see what happens :)

ELEMENTAL?: Used only on the Geomancer's ELEMENTAL commands, and some monster skills. Effect unknown.


6. ELEMENTS
===========

Interestingly enough you can set multiple elements for a move. LIGHTNING STAB is the only attack that has multiple elements set. However, it doesn't matter since LIGHTNING STAB takes on the element of the equipped weapon. Try using this on other skills and see how it affects damage on certain monsters.


7. THE FORMULAS
===============

Probably the most complicated part of making your own ability is to figure out which damage formula you want to use.

[01] DAMAGE: PA * [PA * (Br/100)]
The basic physical attack formula.

[08] DAMAGE: [Q * MA * (CFa/100) * (TFa/100)]
Basic magic spell formula.

[09] DAMAGE: T.MaxHP*Q/100, % = [CFa/100 * TFa/100 * (MA + K)] * (evade)
Demi and Lich formula. These spells deal damage based on the target's maximum HP. Change the Q-value to 100 and you have an instant death attack that will work on anyone with 999 max HP or less.

[0A] Add status, % = [CFa/100 * TFa/100 * (MA + K)] * (evade)
Basic magic status add formula, used in yin-yang magic and some others.

[0B] Add status, % = [CFa/100 * TFa/100 * (MA + K)]
This is used in the beneficial status magic spells. The only difference seems to be that 0A uses evade.

[0C] Restores HP: [Q * MA * (CFa/100) * (TFa/100)]
Cure spells.

[0D] Restores T.MaxHP*Q/100 HP, % = [CFa/100 * TFa/100 * (MA + K)], adds status (misses if target already has status)
An odd little number, used in the RAISE spells. This spell will restore the target's HP by T.MaxHP*Q/100, and add the associated status. The status is guaranteed to be added if the spell works. The interesting part is that the ability's success rate is 00% if the target already has the status to be added. This prevents you from using "Raise" on living units.

[0E] Damages T.MaxHP*Q/100, % = [CFa/100 * TFa/100 * (MA + K)] * (evade), adds status
The opposite of the Raise formula, this is used in the Death formula. This proves a nice little point here. The Black Magic spell "Death" actually does add Dead, but it never needs to be added because the damage itself will kill the target. The bit about adding Dead is so that you can't use this on people who are immune to instant Death. I don't know if this one misses if the target already has the status, as with the Raise formula. As it stands, Black Magic "Death" damages the enemy for all HP they have, and THEN adds Dead if that somehow didn't kill them. Try this out by changing the Q value to something ridiculous like 2. They'll take pitiful damage but die anyway.

[0F] Drains MP, % = [CFa/100 * TFa/100 * (MA + K)] * (evade)
The Battle Mechanics guide says that Spell Absorb drains T.MaxMP/4 MP, but the Q value for Spell Absorb was 33, so I left this formula alone. It probably drains MP equal to T.MaxMP*Q/100, but I didn't get a chance to try it so I left it. Might just be another inconsistency.

[10] Drains T.MaxHP*Q/100 HP, % = [CFa/100 * TFa/100 * (MA + K)] * (evade)
This is consistent with the BM guide, and is used for Life Drain.

[11] ????
Untested.

[12] CT goes to 100, % = [CFa/100 * TFa/100 * (MA + K)]
If successful, the spell will give a quick flag to the target.

[13] ????
Untested.

[14] Golem summon
Golem summon. Nothing else is known, as I have not done any testing with it.

[15] CT goes to 0, % = [CFa/100 * TFa/100 * (MA + K)]
The Return 2 formula.

[16] MP goes to 0, % = [CFa/100 * TFa/100 * (MA + K)]
The Mute formula.

[17] HP goes to 1, % = [CFa/100 * TFa/100 * (MA + K)]
The Gravi 2 formula.

[18, 19] ????
Untested.

[1A] Statistic break (drops by K), % = [CFa/100 * TFa/100 * (MA + Q)] * (evade)
Destroy Sword stat breaks. The unusual part is that the roles of the K value and Q value are swapped. There doesn't seem to be any kind of flags or values telling the formula which stat to break, so it's likely determined by the ability number.

[1B] Damages T.MaxMP*Q/100, % = [CFa/100 * TFa/100 * (MA + K)] * (evade)
Magic Ruin formula.

[1C] Sing
Sing. Effect depends on ability number, I guess.

[1D] Dance.
See Sing.

[1E] Damage [(MA + Q)/2] * MA, maximum of K strikes
The Truth formula.

[1F] Damage [(1-CFa/100) * (1-TFa/100) * (MA + Q)/2] * MA], maximum of K strikes
The Untruth formula.

[20] Damage Q * MA
Simple magic damage. Used in draw outs.

[21] Damage MP = Q * MA
MP damage, used in draw outs

[22] Add status, 100%
100% status add formula. 'Nuff said.

[23] Restore HP = Q * MA
Restores HP, used in draw outs

[24] Damage: ([PA/2] + 1) * MA
Elemental damage formula.

[25] Breaks equipment, % = (PA + WP + K) * (evade)
Battle Skill formula, as with the Destroy Sword stat breaks, the particular equipment broken is likely determined by the skill number.

[26] Steal equipment, % = (Spd + K) * (evade)
Steals stuff.

[27] Steal Gil, % = (Spd + K) * (evade)
Steals money. Used in Gil Taking and Shine Lover.

[28] Steal EXP, % = (Spd + K)
Takes their experience away, hee hee hee.

[29] Adds a bad status, % = MA + K
Steal Heart.

[2A] Talk Skill, % = MA + K
Talk Skill. See Sing.

[2B] Stat break (drops by K), % = (PA + Q) * (evade)
As with Destroy Sword, the K and Q values are swapped.

[2C] Damage T.MaxMP*K/100, % = (PA + Q) * (evade)
Magic Break.

[2D] Damage (PA + Q) * WP
Did somebody say Holy Sword?

[2E] Damage (PA + Q) * WP, and breaks equipment
Has a 00% chance of success if the equipment to be broken is not present on the target.

[2F] Drains MP: (PA + Q) * WP
Makes mages worthless instantly, at least when used by Orlandu, heh heh.

[30] Drains HP: (PA + Q) * WP
All your HP are belong to Orlandu!

[31] Damage = PA * [PA / 2]
This formula is used in both Spin Fist and Wave Fist. For Spin Fist, the Q value of 0, and in Wave Fist the Q value is 2. I'm currently unsure of how the Q value affects the formula...

[32] Damage = Rand(1,K) * (PA + [PA/2])
Infamous random damage formula. Used for Repeating Fist, I think.

[33] Add status, 100%
Functionally the same as 22... I think.

[34] Restore (Q * PA) HP, [Q * PA / 2] MP
Chakra.

[35] Revive % = PA + K, recovers T.MaxHP*Q/100 HP
Probably works the same as the Raise formula, except this one is based on PA instead of MA and Faith.

[36] PA goes up by Q
Q = 99. Overkill? Maybe, but it might get you past the Wiegraf battle quicker.

[37] Damage = PA * Rand(1,Q)
Try setting Throw Stone's Q value to 99 and watch the rocks fly!

[38] Add status, 100%
Another one of those 100% status add formulas. This one's used in Stop Bracelet and Finish Touch.

[39] Speed goes up by Q
Set this to 50 and run circles around your opponent.

[3A] Brave goes up by Q
No explanation needed.

[3B] Speed, MA, and PA go up by Q, Brave goes up by 10?
The Scream formula. I'm not sure but I think Brave goes up by 10*Q.

[3C] C.MaxHP*.4 HP restored to target, C.MaxHP*.2 damage to caster
The Wish Effect (TM).

[3D] Add status, % = MA + K
Another of those add status formulas... this one isn't 100% though.

[3E] ????
Untested.

[3F] Add status, % = Speed + K
For Snipe.

[40] Add status, % = Speed + K, (undead only?)
Seal Evil.

[41] Add status, % = K
Galaxy Stop.

[42] Damage = Q * PA, caster takes (damage)/K recoil
Work formula. Note that not all Work skills give you the same recoil.

[43] Damage C.MaxHP-C.CurHP
Another Shock formula

[44] Damage T.MP
Difference.

[45] Damage T.MaxHP-T.CurHP
Blade Beam. Or Climhazzard. I forget which.

[46] ????
Untested.

[47] Drain T.MaxHP*Q/100, 100%
Blood Suck formula.

[48-4B] ????
Untested.

[4C] Restore HP = MA * Q
Choco Cure

[4D] Drain T.MaxHP*Q/100, % = MA + K
Drain Touch

[4E] Damage K*MA
Soul attacks and some others

[4F] Damage (C.MaxHP-C.CurHP), % = MA + K
Another Shock formula, but this one isn't 100%.

[50] Add status, % = MA + K
I hate how they have to use three different equations that do the same thing... or do they?

[51] Add status, % = MA + K

[52] Damage (MaxHP - CurHP), kills user?
Another Shock formula, this time seen on Self Destruct.

[53] Damage (T.MaxHP*Q/100), % = (MA + K) * (evade)
Hurricane!

[54] Restore MP = MA * Q
Magic Spirit

[55] Target's PA goes down by Q, % = MA + K
[56] Target's MA goes down by Q, % = MA + K
The monster stat breaks.

[57] Target's Level + 1, adds status to caster
The Please Eat formula. Crystal status is added in Please Eat, but you can take crystal status and apply it to other moves...

[58] Target becomes a Morbol, % = MA + K
Moldball Virus.

[59] Target's Level - 1, % = MA + K
Level Blast.

[5A] Recruits dragons
Adds the selected status to dragons with a 100% accuracy.

[5B] Esuna + Wish on dragons
Wish effect on dragons

[5C] Speed, Brave, PA, and MA go up by Q on dragons
Set Q to 99 and watch your Tiamats rip everything apart.

[5D] Quick on dragons
Enough said.

[5E] Damage MA * [(MA + K) / 2], (K+1) random hits
Speaking of Tiamats, this is the formula for their Triple Flame and Thunder attacks.

[5F] Damage MA * [(MA + K) / 2]
Nanoflare

[60] ????
Untested

[61] Brave goes down by Q, % = [CFa/100 * TFa/100 * (MA + K)] * (evade)
Foxbird and Chicken. Set Q to 100 for instant chickens.

[62] Brave goes down by Q, % = MA + K
Look of Fright. Again, set Q to 100 for instant chickens.

[63-FF] ????
Untested



8. ADD STATUS
=============
Most of the status adds are self explanatory, and not all are explained here. This area needs some more research.

[20] Alive
Can only be added to dead units that are not undead. Should be accompanied by some type of HP recovery. Effect of adding "Alive" to a dead unit without recovering any HP is unknown.

[25] Protect + Shell
Wall.

[3B] Haste or Shell or Protect or Regen or Reraise
This is the Bard's Nameless Song. Unlike Mbarrier, it will only add ONE of these effects.

[5D] Petrify (Undead only?)
This Petrify is used in the Engineer's Seal Evil command.

[60] CRYSTAL (!)
This is it, this is the status effect you want to go with if you're trying to make the cheesiest Gameshark character possible. By turning enemies immediately into crystal, you not only kill the unit, but you wipe it from the board completely and prevent that unit from being revived at all. You can make Holy a crystal move, and calculate Holy on enemy units, or better yet, just make a new move that targets all enemy units and crystallizes them using one of the 100% status add formulas. You'll be unbeatable. This will work on just about everything except for Lucavi (as the Lucavi demons are immune to Crystal).

