• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
June 21, 2025, 04:49:51 pm

News:

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


Is possible to do this?

Started by Rfh, March 11, 2012, 09:14:21 am

Glain

1. From what I can tell from looking at those routines briefly, "counter" is the index (number) of the status effect that is currently being checked (1=Crystal, 2=Dead, 3=Undead, etc... check Data Locations.txt). There are a total of 40 (0x28).

2. r4=0 is the result.
That statement is better read as: addiu r4,r5,-0x18 (r4 = r5 - 0x18).
As a general rule, if the immediate given to addiu is >= 0x8000, then it's actually a negative number: (0x10000 - immediate) * -1
  • Modding version: Other/Unknown

Rfh

June 16, 2012, 06:19:11 am #41 Last Edit: June 16, 2012, 06:29:40 am by Rfh
Ok Thanks.

I really oNly interested in two hacks,  the gear hack for my guide, and the CT Wall in to cused Status.

1 Glain, Have you comment the routine at 0x125028? I don“t undestand what is load really in r2 when load ''the variable shop current abailabity based in story progression''

2 I have a question, I was think about graphic data of status. Pride mencioned that someone find a lot of graphic data. Who is this ''someone'' and what he find? and anyone how is loaded this graphic data, and how in stored in an status?

In complement, I was think (not necesary) I was think in edit the mp hacks, in the way that: Units recover 10 mp when the unit turn start, and the mp recovery isn't showed. Now, I do this: Units start with 10 mp and recover 10 mp at the end of his turn. A way to do the mp recovery isn't displayed?
  • Modding version: PSX
  • Discord username: rfh

Glain

I don't have that routine commented. What I found is that when I went into a shop, the shop availability number was loaded from the two lines of code starting at 0x125028 in world.bin. As it stands, that code is currently:

jal 0x000ef1a8
ori r4,r0,0x006f

You can replace the shop availability with the highest party level by putting this code at 0x125028:

lui r2,0x8006
lbu r2,0x6308(r2)

  • Modding version: Other/Unknown

Rfh

More than 3 months waiting whis hack  :)
Yesterday was my last class day and today I am in my summer holidays! So I have much more time. Yesterday, I was with my friends but I cannot do nothing, but today, I find a routine thanks to Glain's LEDecoder, finding 0x005D in BATTLE.BIN. This is what i found:

00126910: 27bdffe8 addiu r29,r29,-0x0018
00126914: afbf0010 sw r31,0x0010(r29)
00126918: 000410c0 sll r2,r4,0x03
0012691c: 00441023 subu r2,r2,r4
00126920: 00021180 sll r2,r2,0x06
00126924: 3c048019 lui r4,0x8019
00126928: 248408cc addiu r4,r4,0x08cc
0012692c: 0c063681 jal 0x0018da04
00126930: 00442021 addu r4,r2,r4
00126934: 00002021 addu r4,r0,r0            r4=0 (counter)
00126938: 34090080 ori r9,r0,0x0080         r9=80
0012693c: 04810002 bgez r4,0x00126948       Branch if counter(r4) is = 0 or < 0
00126940: 00801021 addu r2,r4,r0            r2=r4 (counter)
00126944: 24820007 addiu r2,r4,0x0007       r2= r4 (counter) + 7
00126948: 000210c3 sra r2,r2,0x03           r2= r2(counter+7) / 8
0012694c: 24480003 addiu r8,r2,0x0003       r8= r2(counter+7/8) +3
00126950: 3c078019 lui r7,0x8019
00126954: 8ce72d98 lw r7,0x2d98(r7)         r7=  Target Data Pointer
00126958: 30830007 andi r3,r4,0x0007        counter and 0x07
0012695c: 00e82821 addu r5,r7,r8            counter+7/8 +3 + target data pointer
00126960: 90a201bb lbu r2,0x01bb(r5)        Load X set of unit status inflicted (depend of the counter)
00126964: 00693007 srav r6,r9,r3            r6= 80/2^(counter and 0x07)
00126968: 00461024 and r2,r2,r6             R2= X set of unit status inflicted and x status(depend of the counter) 
0012696c: 10400015 beq r2,r0,0x001269c4     Branch if not status inflicted
00126970: 00000000 nop
00126974: 90a2004e lbu r2,0x004e(r5)        Load X set of unit auto status
00126978: 00000000 nop
0012697c: 00461024 and r2,r2,r6             r2= X set of unit status inflicted and x status(depend of the counter)
00126980: 14400010 bne r2,r0,0x001269c4     Branch if the status is auto status (not CT)
00126984: 00e41821 addu r3,r7,r4            counter + target data pointer (depend of the counter)
00126988: 9062005d lbu r2,0x005d(r3)        Load X Status CT (depend of the counter)
0012698c: 00000000 nop
00126990: 2442ffff addiu r2,r2,-0x0001      CT - 1
00126994: a062005d sb r2,0x005d(r3)         Store new CT = Old CT -1
00126998: 304200ff andi r2,r2,0x00ff        R2= CT -1 and ff?
0012699c: 14400009 bne r2,r0,0x001269c4     Branch if CT != 0
001269a0: 00000000 nop
001269a4: 3c038019 lui r3,0x8019
001269a8: 8c632d90 lw r3,0x2d90(r3)         Load Target Current Action Data Pointer
001269ac: 00000000 nop
001269b0: 00681821 addu r3,r3,r8            r3= counter+7/8 +3 + Load Target Current Action Data Pointer
001269b4: 90620020 lbu r2,0x0020(r3)        Load X set of status removal (depend of the counter)
001269b8: 00000000 nop
001269bc: 00c21025 or r2,r6,r2              r2= set x status of the byte load before(depend of the counter) 
001269c0: a0620020 sb r2,0x0020(r3)         Store X status as a status removal
001269c4: 24840001 addiu r4,r4,0x0001       r4= counter + 1
001269c8: 2882000f slti r2,r4,0x000f     
001269cc: 1440ffdb bne r2,r0,0x0012693c     Branch if counter < 15
001269d0: 00000000 nop
001269d4: 0c0612c9 jal 0x00184b24          Status change routine?
001269d8: 00002021 addu r4,r0,r0           r4=0
001269dc: 10400005 beq r2,r0,0x001269f4   
001269e0: 34020008 ori r2,r0,0x0008        r2= 0x08 (Status Change Flag)
001269e4: 3c038019 lui r3,0x8019
001269e8: 8c632d90 lw r3,0x2d90(r3)        Load Target Current Action Data Pointer
001269ec: 00000000 nop
001269f0: a0620025 sb r2,0x0025(r3)        Store Action type = Status Change
001269f4: 8fbf0010 lw r31,0x0010(r29)
001269f8: 27bd0018 addiu r29,r29,0x0018
001269fc: 03e00008 jr r31
00126a00: 00000000 nop


Basicaly is where the las 16 Status CT is decrement, when activated, and how the CT removed the correspondent status. The routine does this using a counter, from 0 to 15, with each one does I said before. Creating an exception for Wall Status I writed this:

<Patch name="Cursed status use Wall CT">
<Description>Wall CT is always 0. Cursed CT is adjustable in ''Cursed CT'' in FFTPatcher</Description>
<Location file="SCUS_942_21" offset="4E3AC">
94980108
00000000
</Location>
<Location file="SCUS_942_21" offset="56a50">
1F000234
03004514
21100000
03770108
00000000
0E000234
05004510
21100000
E8FFA424
1000822C
ED760108
00000000
0400C010
21100000
6400E0A0
03770108
00000000
0680013C
C75E2190
00000000
6400E1A0
03770108
00000000

</Location>
<Location file="BATTLE_BIN" offset="12693c">
BC770508
00000000
00000000
00000000

</Location>
<Location file="BATTLE_BIN" offset="f6ef0">
07000234
07004410
21100000
02008104
21108000
07008224
C3100200
53360608
00000000
0E000534
01000834
1980073C
982DE78C
0700A330
2128E800
BB01A290
07306900
5A360608
00000000

</Location>
</Patch>

And... it works!
Only remains to do the Gear hack, I think I'm still silly
  • Modding version: PSX
  • Discord username: rfh

Rfh

And the waited too gear hack:

<Patch name="Shop Availabity is based on your the maximium unit level in the party and the level for unlock each item is the value put in ''Enemy level'' in FFPatcher.">
<Description>Shop Availabity is based on your the maximium unit level in the party and the level for unlock each item is the value put in ''Enemy level'' in FFPatcher</Description>
<Location file="WORLD_WORLD_BIN" offset="0451BC">
BA2E2290
</Location>
<Location file="WORLD_WORLD_BIN" offset="045128">
F2F8040C
00000000
</Location>
<Location file="WORLD_WORLD_BIN" offset="05e3c8">
0580023C
747F4224
16004290
00000000
4C940408
00000000
</Location>
</Patch>

Glain, after watching the routine that Calculate Highest Party Level, I see that the highest party level is always 99, but, I see that load the party level in r2, this work perfectaly. So ''Party Level'' is the maximium unit level in the party:

lui r2,0x8005
addiu r2,r2,0x7f74
lbu r2,0x0016(r2)
nop

I see too where is compared the shop availabity with the number of story progression, and I understand what I have to do.
  • Modding version: PSX
  • Discord username: rfh

Glain

Isn't that (0x57f74 + 0x16) Ramza's level? That won't work if Ramza isn't the highest level unit in the party.

I think you need to call the Calculate Highest Party Level routine:

jal 0x05cdb0
nop
  • Modding version: Other/Unknown

Rfh

June 23, 2012, 11:10:59 am #46 Last Edit: June 23, 2012, 09:01:27 pm by Rfh
It doesn't work, but the routine exist, because the ENTD flag in level ''party level'' load this.
One thing, Anyone can explain me why the damage isn't showed in formula 64?
  • Modding version: PSX
  • Discord username: rfh

Glain

Does the Calculate Highest Party Level routine load the wrong number into r2?  I'm looking at the code and am not really understanding why it wouldn't work.  It also should always be in memory since it's an SCUS function.
  • Modding version: Other/Unknown