Please login or register.

Login with username, password and session length
Advanced search  

News:

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

Pages: [1]
Neophyte Ronin [Posts: 151]
  • View Profile
  • share
  • [July 23, 2019, 06:12:04 PM]
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.
« Last Edit: July 25, 2019, 07:53:04 PM by Neophyte Ronin »
French Maid
Xifanie (Webmistress) [Posts: 4468]
  • View Profile
  • Final Fantasy Hacktics
  • http://steamcommunity.com/id/Xifanie
  • share
  • [July 23, 2019, 07:37:16 PM]
Re: Regarding Formula 38 (duplicate of another segment of code?)
« Reply #1 on: July 23, 2019, 07:37:16 PM »
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
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    Glain [Posts: 523]
    • View Profile
    • share
    • [July 24, 2019, 11:14:42 PM]
    Re: Regarding Formula 38 (duplicate of another segment of code?)
    « Reply #2 on: July 24, 2019, 11:14:42 PM »
    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.
    French Maid
    Xifanie (Webmistress) [Posts: 4468]
    • View Profile
    • Final Fantasy Hacktics
    • http://steamcommunity.com/id/Xifanie
    • share
    • [July 25, 2019, 12:56:26 AM]
    Re: Regarding Formula 38 (duplicate of another segment of code?)
    « Reply #3 on: July 25, 2019, 12:56:26 AM »
    Wow, my bad o.o

    • Modding version: PSX
  • <R999> My target market is not FFT mod players
    <Raijinili> remember that? it was awful
    Neophyte Ronin [Posts: 151]
    • View Profile
    • share
    • [July 25, 2019, 07:48:57 PM]
    Re: Regarding Formula 38 (duplicate of another segment of code?)
    « Reply #4 on: July 25, 2019, 07:48:57 PM »
    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
    Pages: [1]