• Welcome to Final Fantasy Hacktics. Please login or sign up.

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.

Topics - Orkney

PSX FFT Hacking / Archmage HACK
August 06, 2023, 02:25:54 pm
Hi everyone !

I'm happy to share with you my Archmage Hack. I had this in mind for a long, and i'm glad i finally found the time to do it.

This hack will turn the calculator in a Mage able to modifiy basic spells. Through his skillset, the unit will still have access to known Black magic, White Magic, Time Magic and Yin Yang magic spells.
What is change is the combo aspect. Now You'll have access to a list of abilities that will modify the spell you choose.
In the base version of the hack these abilities are :
-0x19E Vanilla : no changes
-0x19F Long : Range + 1 , MP cost +50%
-0x1A0 Wide : AoE + 1 Vertical +2 Power -25% MP cost + 25%
-0x1A1 Focused : AoE -1 Power +33% MP cost + 50%
-0x1A2 Fast : CT/2 Power -33%
-0x1A3 Friendly : CT*1.5 Allies Only
-0x1A4 Hostile : CT*1.5 Foes Only
-0x1A5 Radiant : Range = 0 AoE+1 Vertical + 2 Do not Hit caster if Target ennemies (Kind of samourai)

Note : - Power alteration changes Amount of Heal/Dmg and Hit%.
       - Focus and Radiant are in Set 2 Only, Just for avoiding some bugs (Radiant in set 1 and Long in Set 2 will end with a non radiant spell)
      - You'll need to edit the abilities names with FFTactText
If You have something else in mind with these abilities, i've made this hack keeping it modders friendly. You'll find here an Excel file, based on Xifanie HackTemplate.
In this file i had a "ARCHMAGE TABLE" sheet where you can edit any ability to add or remove wathever you want. Once you're done, save your change as xml and patch your ISO.
Remember that the main hack comes with my changes, so patch yours after the main hack.
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
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 3646 words entries in SCUS. from 0x8002ce6c to 0x8002fee4
PSX FFT Hacking / FFTP Status conditionnal formulas
July 29, 2021, 04:29:05 pm

Here is my first patch attempt : FFTPatcher status conditional formulas.

This hack allow to set conditional statuses for any formula. To do so you'll have to check the box under learn on hit.
Once checked the routine will check Ability X value and will check if the statuses present in the Inflict status table (matching X value) are on the target. If Yes the formula keep going if not, it's a miss.
NB : if the chance to learn end by 01 The hack will take Ability Y as Status ID.

By default one of the statuses is enough, but if you check the bottom box of the status type (value 0x01 while all or nothing is 0x80) all the statuses are necessary.
If The 0x02 box is checked, then the conditional status will be deleted
If the 0x04 box is checked, then the conditional status will be copy on the caster. If both are checked, it'll look like an absorption

The formula that add statuses should work normaly (so this hack is a solution for necromancy - conditional death canceled and then add undead). To do so i had to hack the 0x80184B24 routine (* see notes)

If the formula is absorbed (elemental) reversed (undead) or nullified, the conditional status will not be canceled nor absorbed.
I've hacked the undead reversal formula (** see notes)

This hack use Kanji space (the very same place that in Xif video, because i know nothing about kanji space yet)
I attached the xml (made with Xif sheet) and the sheet (allowing to move the location of the used kanji space if necessary).

I do this very slowly, having few time (like many :) ), and i tried to check everything before releasing it, but i don't check it the hard way (not every status in every situation) just every function (with immortal, mounted innate etc .. units). I hope it will do the job. If you find bugs, i'll try to fix them (but again, slowly).

Thanks for all the people around here , their tutorials and all the wiki infos, for allowing me to do this. It kept me busy in hard times. Special thanks to Xif for it's video tutorial that make me feel i can do this.

NB : this is a milestone. I intend to implement other functions (patcher friendly) and rework the formula system. I hope it'll save enough space to not use kanji space.

*note 1 : i hack the formula to alter the "can't stack on" part, so it'll ignore the conditional statuses that are going to be canceled (and freed 34 lines)
**note 2 : i add some lines so if the formula is undead reversed it'll have the special flags 0x10 in current action special flags 2 (not used or unknowed ... nothing bad happened)
Help! / Modifying FFTPatcher ressources
January 24, 2021, 03:47:51 pm

I've tried to edit an ability name in the ressources folder (generated by FFTPatcher), but it seems it's not working at all...
I 've failed to find a post that explain this in details.

I've found the xml file in the subfolder PSX-US/Ability but what next ? I've to import the file back ? Just zip the ressource folder back ?

Help! / Brainstorming faith and brave revisited
January 23, 2021, 03:36:07 pm
Hi !

There's something I have in mind...

I've always been a bit frustrated to end up with the same team at every FFT run. A bunch of badasses with top brave and either top faith or minimal faith.

I like to imagine a system where having minimal brave could be an advantage (other than finding objects on the maps). It would require a lot of ASM coding, but also find something other than bravery and faith as stats name.

For bravery, I was leaning towards a couple of aggressivity/control.
- Above 50 a character would be aggressive and could receive bonuses for damage and certain offensive techniques. (and defensive maluses)
- Below 50 the character would have more control and would receive bonuses in hits, parry/blocking and certain defensive/monk/thief techniques. (and offensive maluses)

For the faith I imagined a couple of concentration/instinct.
- Above 50 the character would receive bonuses for the classic school of magic (= able to memorise and cast spells in the middle of the battlefield to the detriment of his sense of observation)
- Below 50 the character is instinctive and would gain bonuses in dodging (or even reduce the dodge of others) and would receive bonuses in "shamanic" magic (geomancer?).
This would suit Malak and Rafa quite well.

I'm not very satisfied with the terms I found (mainly concentration/instinct).
If someone has a an idea, I'm curious.
If someone has other ideas on how to change this faith/bravery system I am very curious !

Bugs and Suggestions / Return location in the wiki
January 15, 2021, 03:08:32 pm
Hi !

I'm a bit lost,

I started to complete the wiki while I was consulting its pages. Not very complicated things, putting links and filling in return locations.

I've just noticed that there are several ways of doing things (which may not be a good thing).
Sometimes it is the first line of the formula/routine that is indicated, sometimes it is the exact line of the return that is indicated .

I can understand both ways, but I can't say which one is more appropriate... Is there a place where the writing rules are detailed or do we just have to rely on common sense?

Help! / ASM understanding
January 10, 2021, 04:01:49 pm

I'm trying to write some ASM formulas, and i run into this code (in formula 15)

001891d0: 3402007f ori r2,r0,0x007f
001891d4: 3c038019 lui r3,0x8019
001891d8: 8c632d90 lw r3,0x2d90(r3) r3 = target current action data pointer
001891dc: 00000000 nop
001891e0: a0620013 sb r2,0x0013(r3)  Set target CT to -127.
001891e4: 3c038019 lui r3,0x8019
001891e8: 8c632d90 lw r3,0x2d90(r3)
001891ec: 34020001 ori r2,r0,0x0001
001891f0: a0620025 sb r2,0x0025(r3) 

I understand what it does, but i'm wondering, why there is two sequences ending to lw r3, 0x2d90(r3) ? r3 is not modified by the command sb r2 0x0013(r3) does it ?

Probably a dumb question...
Bugs and Suggestions / Some small problems on the wiki
December 27, 2020, 01:28:08 pm

I spent some time on the wiki exploring the formulas, and I found some small problems.

1/ Some routines are missing from the page Routines location.

001876e4 : https://ffhacktics.com/wiki/Store_Reaction/Proc_ID_and_Target

00185d00 : https://ffhacktics.com/wiki/Store_PA_and_PA_+_Y_/_2

00188888 : https://ffhacktics.com/wiki/00188888_-_00188960 (pointed as Calculate Accuracy as User Faith * (MA + X)%)
from formula 1_4)

2/Some dulicate links

0013b590 :  accessible as https://ffhacktics.com/wiki/Get_Script_Variable from the routine location page, but still accessible from https://ffhacktics.com/wiki/0018e660_-_0018e6b4 as unknown_1. In unknown_1 there is a link that is supposed to go to 13b644 but in the page the code starts again at 13b590)

0018433c - two links accessible from the routine page, one of the links (here) specifies 2 return locations that I have not been able to find. The return location 00184360 is not present.

I hope that these are really anomalies, and not just a lack of competence on my part...

Edited the 29/12/20 : wrong first link for 0013b590
Hacking/Patching Tools / Formula mapping
December 19, 2020, 11:45:11 am
Hi everybody. (and sorry for the poor english)

I'm submitting an excel sheet at an alpha stage, but quite functionnaly. Mostly because i'm losing faith in this project.

At the beginning i want to learn ASM hacking, and i was very pleased by Xifanie videos tutorial. But at a moment in the video, she's looking for a formula that will fit her project (physical damage). At this stage i ask myself how will i pick the good formula for my own project. I start digging in the wiki and a went quite lost.

So i decided to make a sheet with all the formulas in order to quickly know when a formula his affected by zodiac compatibility, elemental modification, physical damage reduction etc...

I've a hard time doing it and i decided to start a map. I went quite mad about it (jal jal jal, then vba vba vba)

Today all the formulas and the routine are on the sheet, they are connected to each other. Even if the very right of the sheet is not clean (because those are the unknown routines, so i was less motivated)
-There is an arrow on each of them that link to the wiki of each of them.
-When you click on a formula/routine, all the non connected routines vanish (if not, the sheet is not usable)
-If you click again on the same routine the sheet return to it base stage (the "what the f...?" stage)
-If you click on another routine (visible so connected to the first) it will either reboot the visible routine (as if you click it at the first time) or either add to the visible routines all those which are connected to the one you just click (i'm quite sure i'm mad at this time). If the word "ADD" is in the cell B1 you'll be in the second case.

I was planning to add another function to color the formulas and routines.
I tried to keep the routine in the order they are called. (that why some link are colored or not). It's probably not totaly acurate at this time.
There are probably some bug too (with connectors to nothing, because missnamed some of the connector (there are a lot of them !!!)
The VBA is probably not ultra efficient (mostly the remaping of the shape) and it could take a few seconds to work - mostly with the first formulas)
And the présence of arrow or not on the links, looks totaly random.

At this stage, i need to know if i'm trying to do something that will help to ASM coding formulas or if i'm (definitively) loosing my time here... Maybe some suggestions will help me to move on this project (or drop it)

Here is an image of what happen when you click on the formula 0C

I was drive to put the routines on different column to avoid multiple link direction, the the jal always go to the right (not true at the very right, but it's understandable i guess)

Help! / ASM : All formulas can inflict status ???
May 26, 2020, 01:54:02 am
Hi !

I'm confused, i'm pretty sure that i saw ,somewhere in the forum,an ASM hack allowing all formulas to inflict status.

I spend a few hours yesterday trying to find it again... It's drive me crazy.

Did i dream this hack ?