• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
July 12, 2020, 12:02:38 pm

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen/RetroArch is recommended for playing/testing, pSX is recommended for debugging.


Regarding Formula 38 (duplicate of another segment of code?)

Started by Neophyte Ronin, July 23, 2019, 02:12:04 pm

Neophyte Ronin

July 23, 2019, 02:12:04 pm Last Edit: July 25, 2019, 03:53:04 pm by Neophyte Ronin
Perusing the Wiki's Formula lists, I noticed Formula 38 (100% Set Status) is claimed to be a duplicate of "Apply Status (to Action)" code, which implies it exists elsewhere in the program code.  Abilities that utilize 38 have balance issues (e.g. Boss Status checks are "either you're immune or you die") and I seek to amend them by tying the Abilities with other more suitable Formulas.

So, if I outsource all Abilities, can Formula 38 be pruned, or will it spell doom to "Apply Status (to Action)" also?

EDIT: Solved
(see Glain's first post below for specifics).  0x38 points to an existent formula; to change what 0x38 does (i.e. Set Status 100%), the pointer must be changed to another region in the "Free/Kanji" data space.

Xifanie

Each formula has its own function. They usually call for the same subroutines if they calculate some of the same things, but each formula routine is independent and can be altered as you want.
  • Modding version: PSX
Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Glain

Formula 0x38 is actually unique in that it doesn't have its own function and the formula table links directly to the status applying routine instead.  If you want to alter what the formula does without changing the status application routine, you have to change where it points.

At address 0x8018f610 in RAM (0x128610 in BATTLE.BIN) is the formula table.  Each entry is a 4-byte pointer to the function to call when that formula is used.  Entry 0x38 is at address 0x8018f6f0 in RAM and offset 0x1286F0 in BATTLE.BIN.  You would need to change that entry (from 0x80187f24) to the address of your custom function in free/kanji space.
  • Modding version: Other/Unknown

Xifanie

  • Modding version: PSX
Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Neophyte Ronin

Thank you.  I was wondering what the deal was with the duplication.  So, in future reference, 0x38 points to an existent routine and changing the pointer elsewhere.  I'll be sure to set this thread as a favorite!   :D