• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
July 06, 2025, 07:19:33 pm

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Orkney

21
PSX FFT Hacking / T.O.F.U is ready
September 29, 2022, 02:55:33 pm
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)

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)
    - 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
- All formulas dealing damage or healing the target can affect HP and/or MP
- 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 there is an element checked, it will be applied.
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)
- 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 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 Affect stat is checked : Ability will affect stats under conditions
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
- If Unequip is checked the ability will try to destroy something
    -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)
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
- Reversion : Every ability could be reverted (undead reverse or element absorbtion) it will affect Damage, malus, status etc...
- 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

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
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.
How does it works ? here are some explanations that you don't realy need to read to use it
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).
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.
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))

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
22
Hacking/Patching Tools / Ability Overview
August 29, 2022, 03:36:59 pm
I post here an Excel file i made to help me to mod, track and test abilities,formulas, skillsets and Jobs.
It's just an overview, linking some usefull infos.



There's 2 versions filled with TLW data :
- The light version contains just data.
- The complete version comes with formulas and can be filled with different data. You can copy Other data using MassHexASM from SCUS  (ability formulas, job, , skillsets) and BATTLE.BIN (effects). You can also change skillset and Job names if needed.


EDIT : Xif have done an amazing tool that far more this one is doing (but the list of formulas) :FFT Mod Helper v1.03

Ability overview light TLW 2.02.xlsx
Ability overview complete TLW 2.02.xlsx
23
The ability proc data is stored in 0x801938c8 and 0x801938c6 those 2 locations are cleared by the routine called in barrage formula (Switch_Ability_to_default_Attack)

So there is no chances to proc holy nor any other ability.
24

Quote from: nitwit on August 03, 2022, 09:07:23 pmTreat it like a range (0 to 4), basically? I could accomplish that by bit shifting it and masking out the parts I don't need, though I don't know if that would be simpler in ASM than dealing with bits and branches.

You might achieve that, but still the weapon and the shield section are peculiar. Shield section check the 2 hands, weapon section too, but it compare the two weapons to choose the one to break... So in the end you'll have to deal with some branches i guess.
25
Ho man ! That's a ton of details...

I can't answer all of this point at once. And even if i would to, i don't have the required skills.

I can't answer you for the AI, i've no experience with it yet. (All i know is that when i write a hack that adds a support ability adding fire to weapon element, AI was smart enough to figure it).

If you want to spare some bit you can use the ability AI flags too.
Affect MP --> MP damage
Affect stat to point to the stat section (unequip for break/steal)
Undead reverse for absorption (but you'll have to implement real undead absorption for the AI sake)
Target enemy for damage, target ally for heal.

Your signed Y from -4 to 3 is more easy if you using a bitmask then using sll 0x05 then sra 0x05 (100 is - 4 and 111 is -1)

For the break/steal info, you can save some bit too, no need to use one bit per equipment part since you won't be able to break/steal more than one slot per action (not without writing a lot a stuff i guess). so bit 7 alone is weapon, bit 6 alone is armor, bit 7 and bit 6 is shield etc...
26
Hi,

Changing the Jal should work just fine (used weapon ID is ok with swordskills.

I'm not sure for the require sword things, because i haven't deal with this yet. But i don't see why you couldn't grab the weapon characteristics instead of ID or type. (you can use the ARH hack too)

Not sure to understand the integrate thing with swordskills formulas. You mean merge them into one ? It's doable of course but it's more complicated.

Logical or is possible (i've done it) but you'll have to write these lines. (I merge the ability and weapon element if weapon strike or weapon range is checked in patcher)

Y signed is possible, i have not messed with it, but i would start by changing the loading and maths instructions (suppressing the "u")

Switching to unarmed formula ? you mean just the XA and YA ? or a totally different formula ? If you want to alter XA and YA, i think you'll have to write a custom routine instead of using the base XA one. For a different formula, you can jump directly into it and then exit 0x2d directly as soon as you return from the jal.
27
Tutorials and Learning / Re: JP gained modifier
July 04, 2022, 02:51:03 pm
Nop. Not with the Patcher

You might found some hacks in FFTorgASM library
28
Help! / Re: Edit Random Battle
June 21, 2022, 06:02:03 am
For the ennemies on field FFTPatcher is what you need. (Tools section)
For the squad size, You will need this : https://ffhacktics.com/smf/index.php?topic=9749.0

Not sure there's a tuto. But it's quite intuitive. You'll have to try and see what happens. :mrgreen:
29
Help! / Re: edit item price
June 21, 2022, 01:15:08 am
You could do that in FFTPatcher. You will find it in the Hacking/Tools section of this forum
30
Help! / Re: Need explanation to Status CT
June 06, 2022, 06:57:45 am
In vanilla statuses do not share a timer. So there is no list.

The two first in the list are Poison and regen. But since Poison infliction cancels Regen, and that Regen infliction cancels poison, they are a perfect example of two statuses that can share a timer (since they can not be inflicted at the same time).

Innocent and Faith are another example, as Haste and Slow... etc you can check/set in Patcher which status cancels what.
31
Help! / Re: Need explanation to Status CT
June 05, 2022, 07:37:24 am
Hi,

In patcher you can edit the CT value of the statuses that already have a CT. But some statuses are hard coded to not have a CT (for example petrify will never go away).
Every unit has 16 "slots" to manage their status CT :

0x005D Poison CT
0x005E Regen CT
0x005F Protect CT
0x0060 Shell CT
0x0061 Haste CT
0x0062 Slow CT
0x0063 Stop CT
0x0064 Wall CT
0x0065 Faith CT
0x0066 Innocent CT
0x0067 Charm CT
0x0068 Sleep CT
0x0069 Don't Move CT
0x006A Don't Act CT
0x006B Reflect CT
0x006C Death Sentence CT

Every other status CT will just be ignored unless you are using Pride's hack.
32
PSX FFT Hacking / Re: ASM Requests
May 13, 2022, 08:18:22 am
Hi,

Here. Tested only by patching a save state. It should work the same patched to an ISO.

Update 22/11/2023.
Initial Hack alters all abilities. I rename it and post a fixed one (yhanks to Sardek to point the mistake)
33
PSX FFT Hacking / A hack saving place in SCUS
January 19, 2022, 04:44:12 pm
Hi everyone,

I rewrite the routine setting rotation matrix elements to GTE. Three_Angle_Sine_and_Cosine_Maths
The routine is 9 lines shorter and free some space in SCUS. from 0x8002c6ec to 0x8002fee4SCUSFree0x37f8.xml
34
If you use psxfin there's a key to free framerate (default is backspace)
35
New Project Ideas / Re: Patch Ideas Proposal Thread
December 04, 2021, 06:47:09 am
Hi,

The salvage skill is a good idea. But you'll have to allow that ability to target dead unit.
I think that you can target a dead unit only if the ability is going to cancel death. It's possible but it'll require some ASM skills.
It happens here Set_some_data_for_current_attack The routine is called in Pre formula set up routine just after the return from the formulas.

And there might be others checks in the routines that modify target equipment...
36
Hi,

You're probably right for bloodsuck (i don't use it at all, and i can remember only one combat where it was a problem)

For death sentence, it's because of the 3 turns delay. Since in vanilla you can kill anybody in 2 blows (if not one), i never use it.

37
Assuming they've a 100% hit. And i guess it's very subjective and bound to my way to play the game
Debuffs
 Dead 9
 Undead 1
 Petrify 9
 Invite 9
 Darkness 3 - 5
 Confusion 6
 Silence 3
 Blood Suck 0
 Oil 3
 Berserk 6 - 3
 Chicken 6
 Frog 6
 Poison 1
 Slow 5
 Stop 7
 Charm 7
 Sleep 7
 Don't Move 3
 Don't Act 6
 Death Sentence 3 - 3

Buffs
 Defending 0
 Float 0
 Reraise 6
 Transparent 5
 Regen 3
 Protect 7
 Shell 7
 Haste 7

Both
 Faith 4
 Innocent 4
 Reflect 1
38
Hi,

It's something i was thinking about too.

I went to something slightly different :
- Healing + absorb --> the Heal is boosted
- Healing + cancel --> No Heal (taking it as an immunity to that element)
- Healing + Weak --> Half the heal (like if the target is uncompatible to that element)
- Healing + Half --> Normal amount : it's a heal, there's nothing to resist at. it could be think as an affinity to the element too (with a slight boost).
39
Help! / Re: filetype question - savedata
September 19, 2021, 01:48:17 am
Hi,

Not sure to understand your problem.

Memcardrex (1.8) can convert opened .mcr into .gme (via save as)
40
Help! / Re: Changing ASM formula hack to different formula
September 18, 2021, 01:59:17 pm
Yes, it's quite simple.

Watch this tutorial : https://ffhacktics.com/smf/index.php?topic=12477.0 : at the beginning of the first video Xifanie point to three formulas. You just have to follow the same steps with the formula you want.