• Welcome to Final Fantasy Hacktics. Please login or sign up.
March 27, 2023, 05:43:12 pm


Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed. Find out how you can help in the Recruitment section.

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

Hacking/Patching Tools / Re: FFT Patcher (.494)
February 20, 2023, 01:27:04 am
There is this tool that already exists to know what is being used and where it is being used :


Requires Excel
Help! / Re: Katana - Draw Out Skill
January 22, 2023, 06:56:35 am
ASM Hacking.

The mechanics of katana breaking is twisted. The katana is broken by default and restored if it do not break.
You can't do it with the patcher.

There is a hack doing this in the patcher suit. (using OrgASM)
Draw out skills are pretty well hardcoded. There is a strong relation between Katana ID and Ability ID and the number of abilities matches the number of katanas (this number is hard coded too).

It's checked several time in the code. So not a simple hack. I'm not sure this hack exists, if it does, i don't think it is released. Ask on discord. Celia had some interest in extending the number of katanas a couple months ago.

In THIS POST it seems that every ability added to draw out turns in a AoE 3 inflict regen result. That might be the reason the AI do not use it.

It's already done...

Rendez-vous and new game+ features.

But it is a PSX mod, featuring most TLW features.


And it has required far more work than using the patcher  ;)
PSX FFT Hacking / Re: T.O.F.U is ready
November 18, 2022, 03:57:37 pm
New Update !

- Break katana : now if you uncheck this box with regular draw out skills your katana won't break. Checking this box outside the regular draw out ability wont' break anything, and may lead to strange messages.

- Multi Hit : Any formula can access multi hit mechanics. You'll find two boxes in TOFU maker.
    - X + 1 : Lead to X + 1 hits
    - Rdm (1...X) : Rafa Malak mechanics (random number between 1 and ability X)

Multi Hit is not restricted to default and monster action menus anymore. Elements, draw out and maths are fully operational.
Weapon inventory avoid the multi hit section.
Jump and Aim abilities lack of ability X field.

PSX FFT Hacking / Re: T.O.F.U is ready
November 12, 2022, 08:09:20 am
Some updates.
All related to a new feature allowing to set a random flag only on the first argument of XA or YA build.

For example :
Rdm (1 to PA) + PA/2 resulting in an output of 0.5*PA to 1.5*PA
Help! / Re: Can't patch isos
November 06, 2022, 08:19:25 am
Not sure.

When you test your TLW ISO,  you are not doing it from a savestate ? Because if you do it is the issue.
PSX FFT Hacking / Re: T.O.F.U is ready
November 04, 2022, 04:07:45 pm
TOFU Maker is out !
Check the main post for more infos.
PSX FFT Hacking / Re: T.O.F.U is ready
October 05, 2022, 07:11:43 am
Well the PA ceiling seems a bit complicated. What if PA ceiling is reached but not MA ceiling ? PA misses but not MA boost. It'll add a check to every stat alteration. it is doable but not lightly. Not a priority but who knows ?

I planned to modify Faith and Brave alteration in a very close way of what you're thinking. But it was for my own purpose, adding a way to alter formulas output based on brave (like faith). For what you're asking, it's easy for faith, the brave instances seems more difficult to track, scattered around reaction routines... (i've little knowledge of those routines yet).
PSX FFT Hacking / Re: T.O.F.U is ready
October 04, 2022, 05:20:26 pm
I don't understand what you're asking with the stats floor/ceiling. It's like in vanilla. I just merge everything in one formula. So i guess the response is no.

Faith and anti Faith are supported On both, on caster only or on target only (and cross faith too). Brave is not supported yet.

First I wish to release a sheet allowing to customize every formula flags. Then i'll add more.

PSX FFT Hacking / Re: T.O.F.U is ready
October 04, 2022, 04:28:49 pm

This Excel sheet will allow you to customize every weapon type damage calculation.

TOFU uses 2 tables to manage weapon damage calculation :
- Base attack table
- Jump attack table

You can edit both.
To do so, go to the "TOFU Base XAYA builder" sheet and select the "Complement" Tab (just before the "Help" one by default)

1/ Edit the desired weapon data
- Create a new line :
- By adding a blank line and fill all the gaps (clic on add a blank line)
- By importing a pre-filed line with the Vanilla (TLW) data (clic on import base or import jump)
- Fill the gaps, if there is some red cells, you're doing something wrong

2/ Export the data to the "Code" sheet (button) and use Xif's tool as normal (generate XML or patch save state etc...)

XA and YA can support 4 "arguments" and do maths with them.
First you have to set the number of arguments
  Example : Attacker PA is one argument, Attacker (PA+Speed)/2 is three))

Once the number is set,choose the maths formula
  The MATHS column list will be adjusted to the nb of arguments and you'll have to choose in the list
  For Example : Attacker (PA+Speed)/2 --> choose (A+B)/C

Then specify if XA is the value itself or a random number between 1 and this value (Axe flail etc...)

First choose if the argument is a unit's stat, an ability state or a raw number
- For unit stat choose Attacker or Target in the list
- For Ability choose Ability
- For raw numbers :
- if the number is less than 16 : choose i<16 (i for immediate...)
- if not choose i>16. Then select a number in the list.

Big credit to Xifanie for her FFT Hack Template, which is the base of this tool
PSX FFT Hacking / T.O.F.U is ready
September 29, 2022, 02:55:33 pm
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?)
- 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
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
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.

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.
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...

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.
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
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:
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