T.O.F.U
The One Formula (unbounded)
This hack is a Massive formula Hack. It merges all formulas in a single one. Each previous formula now are a table of flags, allowing to build XA&YA and to trigger various vanilla mechanics.
Some of these mechanics are not managed with the formula but with the abilities flag.
The main hack : TOFU suit is mandatory. you have to use it if you want to use any of the other tools
I tried to stick to the vanilla routines. The idea was to keep it compatible with some existing hacks but since i've not tested any hacks yet. Try or Ask first.
In very short : all formulas can support status, evasion, faith, elements, item breakage etc..
What does it changes if you patch your ISO and don't change anything ?
- Oil fix
- Weapon Element is added to Ability element if weapon strike or Weapon range flag are checked
Consequence : Weather effects apply to weapon element too
- Jump and Throw keep the weapon characteristics (elemental, status and ability proc could be applied)
- Weapon Element is added to Ability element if weapon strike or Weapon range flag are checked
Consequence : Weather effects apply to weapon element too
- Jump and Throw keep the weapon characteristics (elemental, status and ability proc could be applied)
What can you do with Patcher ? : All formulas take status, evasion, faith, elements, item breakage etc...
- New concept : Hostility. (At the start of the formula hostility will be set)
- Base hostility is determined by the AI flag "Target Ally" (friendly) or "Target enemy" (hostile)
- Hostility affect HP&MP effect, Stats (bonus or malus), CT (00 or quick), Lv modification (bonus or malus) - All formulas dealing damage or healing the target can affect HP and/or MP - If there is an element checked, it will be applied. - Item with formula 0x04 (magic gun) cast ability ID from inflict status field if not null (prevails on element) - Animation is bugged (usual spell casting ) if not using a gun...
- If status infliction is not null it will be taken into consideration - If Affect stat is checked : Ability will affect stats under conditions - If Unequip is checked the ability will try to destroy something - Reversion : Every ability could be reverted (undead reverse or element absorbtion) it will affect Damage, malus, status etc...
- Base hostility is determined by the AI flag "Target Ally" (friendly) or "Target enemy" (hostile)
- Hostility affect HP&MP effect, Stats (bonus or malus), CT (00 or quick), Lv modification (bonus or malus)
- If none or both are checked, if Target is a teammate action will be friendly, if Target is a foe, it will be hostile.
- A target will not attempt to evade a friendly spell, Support Defense will not applies on friendly spell (physical does ,like in vanilla (Formula 0x17 and 0x0e))
Note : this will allow formula consolidation (0x08 and 0x0c are identical)
- Elemental absorption and Undead reverse may reverse an action hostility
- A target will not attempt to evade a friendly spell, Support Defense will not applies on friendly spell (physical does ,like in vanilla (Formula 0x17 and 0x0e))
Note : this will allow formula consolidation (0x08 and 0x0c are identical)
- Elemental absorption and Undead reverse may reverse an action hostility
- if the AI flag affect HP is checked it will affect HP
- if the AI flag affect MP is checked it will affect MP
Note : If both are checked it will affect both with chakra mechanics (MP effect = HP effect/2)
If none are checked damage will be ignored
- if the AI flag affect MP is checked it will affect MP
Note : If both are checked it will affect both with chakra mechanics (MP effect = HP effect/2)
If none are checked damage will be ignored
Strenghten : it will boost by 120% the output of the formula (like vanilla)
Pure vanilla is 120% of XA only for XA*YA formula. Since it has been extended to all formula, there's more to say.
- 120%XA * YA --> 120% of output
- 120%XA + 120%YA --> 120% of output
- No XA and YA but something is dealt (ex Wish where output is 40% of caster HP) --> 120% of output
Cancels : Cancels the action
Resist :
- Formula with XA&YA : halves the result (hit% or damage)
- No XA&YA but formula deals Damage or heal : halves the result
- No XA&YA no damage dealt : halve hit% (accumulate resisted will ends with hit% at 50%, same with all 100% hit formulas)
Weak :
- Formula with XA&YA : doubles the result (hit% or damage)
- No XA&YA but formula deals Damage or heal : doubles the result
- No XA&YA no damage dealt : nothing (yet?)
Absorb
- Hostile spell are reversed (see reversion)
- Friendly spell : 100% hit chances, 100% proc chances, MP cost becomes MP recovery, and MP cost * 2 becomes HP recovery (If No MP were used, it's 12.5% of Max MP and HP)
Pure vanilla is 120% of XA only for XA*YA formula. Since it has been extended to all formula, there's more to say.
- 120%XA * YA --> 120% of output
- 120%XA + 120%YA --> 120% of output
- No XA and YA but something is dealt (ex Wish where output is 40% of caster HP) --> 120% of output
Cancels : Cancels the action
Resist :
- Formula with XA&YA : halves the result (hit% or damage)
- No XA&YA but formula deals Damage or heal : halves the result
- No XA&YA no damage dealt : halve hit% (accumulate resisted will ends with hit% at 50%, same with all 100% hit formulas)
Weak :
- Formula with XA&YA : doubles the result (hit% or damage)
- No XA&YA but formula deals Damage or heal : doubles the result
- No XA&YA no damage dealt : nothing (yet?)
Absorb
- Hostile spell are reversed (see reversion)
- Friendly spell : 100% hit chances, 100% proc chances, MP cost becomes MP recovery, and MP cost * 2 becomes HP recovery (If No MP were used, it's 12.5% of Max MP and HP)
- If status infliction is not null it will be taken into consideration
- If one of the AI flags "add status or cancel status" is checked it will be a 100% infliction chance and action will miss if not inflicted (vanilla way)
- If none of the previous flags are checked it will be a 19% chances of infliction independant of action success.
Note : in vanilla some formulas are 100% status with preserved action : they remains unchanged.
- If none of the previous flags are checked it will be a 19% chances of infliction independant of action success.
Note : in vanilla some formulas are 100% status with preserved action : they remains unchanged.
Some formula are meant to affect dedicated stats (all vanilla ones), but if you check affect stats flag while not using one of thoses, you will uses the "hardcoded stat alteration table".
This table exists because of song and dance abilities mechanics (one formula for many effect)
This table can not be used by any formula affecting CT, Lv, Morbol, or Golem (Because abilities using those effects already have their AI flag "affect stat" enabled while not affecting stats)
Last Nybble of Ability ID is used to choose the stat to affect
Amount of alteration if based on Mod(X,10) from decimal value (12 is +/-2 16 is +/-6). For Brave and faith alteration this value is multiplied by 4. If result is 0 default is 1 or 4 (Br and Fa))
Bonus or Malus is based on hostility and may be reversed (element, undead). Except for the talk skill faith manipulation where bonus/malus is hardcoded to the formula.
0x0 PA
0x1 MA
0x2 Br
0x3 CT
0x4 Fa
0x5 Br and Fa
0x6 MA + PA + Sp
0x7 Br and PA
0x8 Sp
0x9 PA
0xa MA
0xb Fa MA
0xc CT
0xd Sp PA
0xe Sp MA
0xf Sp
This Table is editable with a hack provided in this post
Song and Dance abilities uses this table too
This table exists because of song and dance abilities mechanics (one formula for many effect)
This table can not be used by any formula affecting CT, Lv, Morbol, or Golem (Because abilities using those effects already have their AI flag "affect stat" enabled while not affecting stats)
Last Nybble of Ability ID is used to choose the stat to affect
Amount of alteration if based on Mod(X,10) from decimal value (12 is +/-2 16 is +/-6). For Brave and faith alteration this value is multiplied by 4. If result is 0 default is 1 or 4 (Br and Fa))
Bonus or Malus is based on hostility and may be reversed (element, undead). Except for the talk skill faith manipulation where bonus/malus is hardcoded to the formula.
0x0 PA
0x1 MA
0x2 Br
0x3 CT
0x4 Fa
0x5 Br and Fa
0x6 MA + PA + Sp
0x7 Br and PA
0x8 Sp
0x9 PA
0xa MA
0xb Fa MA
0xc CT
0xd Sp PA
0xe Sp MA
0xf Sp
This Table is editable with a hack provided in this post
Song and Dance abilities uses this table too
-If Unequip is checked and used formula is not a vanilla breaking/stealing one, the
action will be preserved even if the item can't be unequiped (Not equiped, Monster or maintenance)
- This table is used by break skills and mighty sword skills
- Last Nybble of Ability ID is used to choose the item to break (stealing is not supported yet (you have to use the steal formula)
action will be preserved even if the item can't be unequiped (Not equiped, Monster or maintenance)
- This table is used by break skills and mighty sword skills
- Last Nybble of Ability ID is used to choose the item to break (stealing is not supported yet (you have to use the steal formula)
0x0 Armor
0x1 Helmet
0x2 Weapon
0x3 Accessory
0x4 Shield
0x5 Armor
0x6 Helmet
0x7 Weapon
0x8 Accessory
0x9 Shield
0xa Helmet
0xb Armor
0xc Shield
0xd Weapon
0xe Accessory
0xf Weapon
0x1 Helmet
0x2 Weapon
0x3 Accessory
0x4 Shield
0x5 Armor
0x6 Helmet
0x7 Weapon
0x8 Accessory
0x9 Shield
0xa Helmet
0xb Armor
0xc Shield
0xd Weapon
0xe Accessory
0xf Weapon
- Toggle damage and Heal
- Toggle Stats/CT/Lv bonus and malus
- Hostile Ability without damage or stat alteration trigger the absorbtion of the used MP as MP and twice the amount as HP (if no MP is used, it will restore 12.5% of Max HP and MP)
- Friendly reversed Ability without damage or stat alteration triggers nothing (yet ?)
- Status infliction will fail
- Break/Steal will fail
- Knockback will fail
- Toggle Stats/CT/Lv bonus and malus
- Hostile Ability without damage or stat alteration trigger the absorbtion of the used MP as MP and twice the amount as HP (if no MP is used, it will restore 12.5% of Max HP and MP)
- Friendly reversed Ability without damage or stat alteration triggers nothing (yet ?)
- Status infliction will fail
- Break/Steal will fail
- Knockback will fail
TOFU Maker is done !
While using TOFU Hack, you can use this tool to customize every formula of the game !
For now, only vanilla features are supported, but there is room to add more mechanics. (Throw some ideas !)
A little guide through Xif Excel Hack Template How does it works ? here are some explanations that you don't realy need to read to use it
I was "forced" to add a not-vanilla feature to support some peculiar formulas (phoenix down and self-destruct).
This feature is the Fork function.
Once TOFU Maker is downloaded you might encounter a red security alert in the excel file. If you want to get rid of it, you have to right click on the file (in windows folder).
Then check the Unblock Box at the bottom right of the details window.

After that, you will still have to validate one or two security alerts (yellow this time) to activate the macros.
Now you can use Xifanie's Hack Template. (she wrote a tutorial in the dedicated post on the forum if you need it)
First you have to reach the Code sheet (you should be here by default)

Then select the Add-Ins Tab. Click the last Icon (TOFU Maker) and let your creativity flow.
At the end you'll be able to patch a savestate, an ISO or generate a xml.

Then check the Unblock Box at the bottom right of the details window.

After that, you will still have to validate one or two security alerts (yellow this time) to activate the macros.
Now you can use Xifanie's Hack Template. (she wrote a tutorial in the dedicated post on the forum if you need it)
First you have to reach the Code sheet (you should be here by default)

Then select the Add-Ins Tab. Click the last Icon (TOFU Maker) and let your creativity flow.
At the end you'll be able to patch a savestate, an ISO or generate a xml.

This tool is nothing more than a custom formula library.(You can see it in TOFU FORMULA MAKER sheet (hidden by default).
First you have to add some formulas to this collection by using the New Custom Formula button.You will be asked if you want to add a blank formula, a copy of a vanilla formula (imported) or a copy of one of your custom formula.
Then you can browse and edit every formula in your collection. Once editing something, don't forget to press the save button (or save as if you want to change the formula ID).
Then press the Patch button and choose which formula you want to patch/export.
Once you press patch you'll be thrown to the code sheet and frome there you can use Xif HackTemplate functionalities (patch ISO, Patch savestate, generate xml).
First you have to add some formulas to this collection by using the New Custom Formula button.You will be asked if you want to add a blank formula, a copy of a vanilla formula (imported) or a copy of one of your custom formula.
Then you can browse and edit every formula in your collection. Once editing something, don't forget to press the save button (or save as if you want to change the formula ID).
Then press the Patch button and choose which formula you want to patch/export.
Once you press patch you'll be thrown to the code sheet and frome there you can use Xif HackTemplate functionalities (patch ISO, Patch savestate, generate xml).
This feature is the Fork function.
Under certain conditions, the used formula will point to another formula.
By using the fork function you can access twice the number of vanilla formulas (up to formula 0xc8 = 200 formulas)
For example : If target is undead the phoenix down formula will point to a damage 100% of target HP instead of canceling death and restore a few HP.
For now there is very few fork condition. Status ID (on target or on caster) and Target ID (Target is or is not the caster).
I plan to add more conditions types (like used skillset, Gender (with this one, Human and monster could use the same ability but with a different formula))
By using the fork function you can access twice the number of vanilla formulas (up to formula 0xc8 = 200 formulas)
For example : If target is undead the phoenix down formula will point to a damage 100% of target HP instead of canceling death and restore a few HP.
For now there is very few fork condition. Status ID (on target or on caster) and Target ID (Target is or is not the caster).
I plan to add more conditions types (like used skillset, Gender (with this one, Human and monster could use the same ability but with a different formula))
A big thanks to Xifanie and his marvelous FFT Hack Template Spreadsheet !
TOFU-Main Hack (included in TOFU suit)
V 0.93 - MultiHit release + updated "break katana" mechanics
V 0.921- XA and YA Random flags can affect 1st Argument only
V 0.91 - TOFU Maker release bugfixes
V 0.82 - Thrown weapon with formula 0x06 keep absorbtion and undead reversion
- Thrown weapon with formula 0x07 heals the target
V 0.81 - Thrown weapon proc their abilities (formula 0x02)
TOFU-Formula Table (included in TOFU suit)
V 1.2 - MultiHit flags (formula 1E 1F 5E and 19)
V 1.1 - KnockBack flag fixes (formula 0x2A and 0x37)
TOFU- Ability Tweaks (included in TOFU suit)
V 1.1 - Change Ability 2D X value to 3 (formula 19 uses the X+1 multiHit routine)
TOFU - Formula maker
V 0.93 - MultiHit boxes + updated katana tips
V 0.92 - XA and YA Random flags can affect 1st Argument only
Button to toggle description off (won't automatically fill the description field of the patch)
TOFU - Base XA customization
V1.2 - XA and YA Random flags can affect 1st Argument only
V1.1 - Random flag fixed
V 0.93 - MultiHit release + updated "break katana" mechanics
V 0.921- XA and YA Random flags can affect 1st Argument only
V 0.91 - TOFU Maker release bugfixes
V 0.82 - Thrown weapon with formula 0x06 keep absorbtion and undead reversion
- Thrown weapon with formula 0x07 heals the target
V 0.81 - Thrown weapon proc their abilities (formula 0x02)
TOFU-Formula Table (included in TOFU suit)
V 1.2 - MultiHit flags (formula 1E 1F 5E and 19)
V 1.1 - KnockBack flag fixes (formula 0x2A and 0x37)
TOFU- Ability Tweaks (included in TOFU suit)
V 1.1 - Change Ability 2D X value to 3 (formula 19 uses the X+1 multiHit routine)
TOFU - Formula maker
V 0.93 - MultiHit boxes + updated katana tips
V 0.92 - XA and YA Random flags can affect 1st Argument only
Button to toggle description off (won't automatically fill the description field of the patch)
TOFU - Base XA customization
V1.2 - XA and YA Random flags can affect 1st Argument only
V1.1 - Random flag fixed