• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 30, 2024, 07:52:35 am

News:

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


Convert formula 54 in to HealMP_(Y)%

Started by Rfh, January 22, 2012, 12:03:02 pm

Rfh

January 22, 2012, 12:03:02 pm Last Edit: January 24, 2012, 04:50:00 pm by Rfh
A fast request:
Convert formula 49, 4A or 54 in to HealMP_(10 or Y)%

Sorry, my English level makes impossible to read the ASM hack guide.
  • Modding version: PSX
  • Discord username: rfh

Pickle Girl Fanboy

You're missing something - the condition which will switch between 10 and Y.  Do you mean:
HealMP_(10 or Y, whichever is greater)%

Rfh

Quote from: Pickle Girl Fanboy on January 23, 2012, 03:32:11 pm
You're missing something - the condition which will switch between 10 and Y.  Do you mean:
HealMP_(10 or Y, whichever is greater)%


Sorry, I only want to convert in HealMP_(Y)%
  • Modding version: PSX
  • Discord username: rfh

Rfh

  • Modding version: PSX
  • Discord username: rfh


Rfh

  • Modding version: PSX
  • Discord username: rfh


Rfh

January 25, 2012, 09:36:56 am #7 Last Edit: January 25, 2012, 09:44:54 am by Rfh
Quote from: Pickle Girl Fanboy on January 24, 2012, 06:48:19 pm
Nothing I can do, then.

Well, if is difficult work with formula 54, anyone can convert the elixir formula  Heal_(100)% HealMP_(100)% in to HealMP_(10)%?
  • Modding version: PSX
  • Discord username: rfh

Pickle Girl Fanboy

Off Topic: for me, it's not really a matter of difficulty, since ASM hacking is beyond me.  But if there were a hack involving the formula you want, you could screw around with it until you get it to do what you want.

Rfh

Quote from: Pickle Girl Fanboy on January 25, 2012, 12:22:26 pm
Off Topic: for me, it's not really a matter of difficulty, since ASM hacking is beyond me.  But if there were a hack involving the formula you want, you could screw around with it until you get it to do what you want.

The ASM Tutorial uses this formula: Dmg_(Y%) Hit_(MA+X%) Can you convert it in HealMP_(Y)% Hit_(MA+X%)?
  • Modding version: PSX
  • Discord username: rfh

Pickle Girl Fanboy

Probably not.  Even if I could, I promise you it would screw up a bunch of other formulas.

Rfh

Is impossible to convert 49, 4A, 54 or elixir formula in to HealMP_(Y)%? :?
  • Modding version: PSX
  • Discord username: rfh


Glain

I was hoping to find a formula that does that sort of thing (MP heal based on percentage), and then just edit it. There is a routine labeled "MP Healing" in the BATTLE.BIN map but it's actually MP Absorb. As it stands we'd have to write a new routine again for something that could probably be accomplished easily with the formula rewrite.
  • Modding version: Other/Unknown

RavenOfRazgriz

Quote from: Glain on January 27, 2012, 12:34:41 pm
I was hoping to find a formula that does that sort of thing (MP heal based on percentage), and then just edit it. There is a routine labeled "MP Healing" in the BATTLE.BIN map but it's actually MP Absorb. As it stands we'd have to write a new routine again for something that could probably be accomplished easily with the formula rewrite.


Problem is, that formula rewrite is still a very long ways off, at this rate, especially since a lot of it will need to be re-examined once FDC determines exactly which flags can be merged after every flag is identified.  Most people modding right now probably don't want to wait months and months and months to do what they want to do when they only really need a few things to make the game work the way they need it to.

Glain

I don't want to use up all my kanji space doing random formula hacks :(
  • Modding version: Other/Unknown

RavenOfRazgriz

Quote from: Glain on January 27, 2012, 02:01:33 pm
I don't want to use up all my kanji space doing random formula hacks :(


VincentCraven's space is completely unused as I recall, and I'm guessing that Razele and nates1984 have reserved space they didn't fill yet and that's never going to be used by them.  Steal some of their space for the random formula hacks.  :p

Glain

January 27, 2012, 09:16:46 pm #17 Last Edit: January 28, 2012, 05:10:19 pm by Glain
Well then, I present this hack using some of my newly nationalized space (claiming VincentCraven's):


 <Patch name="Formula 54 becomes HealMP_(Y%)">
   <Description>
     Formula 54 becomes HealMP_(Y%)
   </Description>
   <Location file="BATTLE_BIN" offset="EAF1C">
     1980023C
     982D438C
     FA384480
     2E006384
     64000520
     18008300
     12200000
     902D468C
     10000734
     1A008500
     12200000
     0A00C4A4
     0800E003
     2500C7A0
   </Location>
   <Location file="BATTLE_BIN" offset="123668">
     C7470508
      00000000
   </Location>
 </Patch>



lui r2,0x8019
lw r3,0x2d98(r2)   # r3 = Target
lb r4,0x38fa(r2)   # r4 = Ability Y
lh r3,0x002e(r3)   # r3 = Target Max MP
addi r5,r0,100
mult r4,r3
mflo r4         # r4 = (Ability Y) * (Target Max MP)
lw r6,0x2d90(r2)   # r6 = Ability
ori r7,r0,0x10      # r7 = MP Healing Type
div r4,r5
mflo r4         # r4 = (Ability Y) * (Target Max MP) / 100
sh r4,0x000a(r6)   # Ability MP Healing = (Ability Y) * (Target Max MP) / 100
jr r31
sb r7,0x0025(r6)   # Ability Type = MP Healing
  • Modding version: Other/Unknown