Do you mean this? http://ffhacktics.com/wiki/Calculate_Zodiac_Symbol
I would like to change Bad/Good from 20% to 10% and Worst/Best from 50% to 20%
Currently ASM hack is beyond my ability,i have no knowledge of programming prior visiting ffHacktics.I did try to learn from the tutorial from the sticky,but having problem even understanding that(i know it might sound stupid :(,but i'm still trying).Main while when i need some feature i would try to search the entire forum inside out to get it,maybe that explains why i've been finding alot of old threads,and if even that doesn't work,i'll post in the help section(I know that you might think hacking it yourself is much easier than finding luck,but that might only apply to those that are capable :oops:)
Title: Re: Zodiac Compatibility Modify?
Post by: 3lric on September 24, 2018, 10:10:30 am
Being capable comes from years of practice and dedication...
Title: Re: Zodiac Compatibility Modify?
Post by: xjamxx on September 24, 2018, 12:00:58 pm
I don't think so, may be this one: http://ffhacktics.com/wiki/Compatibility
I am still learning MIPS, plus I am trying to follow Glain steps... This is my first patch in asm mode, didn't have time to test it so dunno if it will work, but in theory it does what u ask from 25% to 10% as base. Here:
<Patch name="Zodiac Compatibility Amount Hack"> <Description>Vanilla does 1/4 for bad and good and doubles it for best and worst. Here it does 1/10.</Description> <Location file="BATTLE_BIN" offset="184a30" mode="ASM" offsetMode="RAM"> sll v1,v0,0x03 addu v1,v1,v0 addu a1,v1,v0 nop </Location> </Patch> <!-- (v0 = r2, v1 = r3, a1 = r5) Original code: 00184a30: 00021840 sll r3,r2,0x01 XA * 2 00184a34: 00621821 addu r3,r3,r2 XA * 3 00184a38: 000318c0 sll r3,r3,0x03 XA * 24 00184a3c: 00622821 addu r5,r3,r2 XA * 25 Current code: 00184a30: sll v1,v0,0x03 XA * 8 00184a34: addu v1,v1,v0 XA * 9 00184a38: addu a1,v1,v0 XA * 10 00184a3c: nop -->
Title: Re: Zodiac Compatibility Modify?
Post by: stardragoon9 on September 24, 2018, 01:12:14 pm
I am still learning MIPS, plus I am trying to follow Glain steps... This is my first patch in asm mode, didn't have time to test it so dunno if it will work, but in theory it does what u ask from 25% to 10% as base. Here:
<Patch name="Zodiac Compatibility Amount Hack"> <Description>Vanilla does 1/4 for bad and good and doubles it for best and worst. Here it does 1/10.</Description> <Location file="BATTLE_BIN" offset="184a30" mode="ASM" offsetMode="RAM"> sll v1,v0,0x03 addu v1,v1,v0 addu a1,v1,v0 nop </Location> </Patch> <!-- (v0 = r2, v1 = r3, a1 = r5) Original code: 00184a30: 00021840 sll r3,r2,0x01 XA * 2 00184a34: 00621821 addu r3,r3,r2 XA * 3 00184a38: 000318c0 sll r3,r3,0x03 XA * 24 00184a3c: 00622821 addu r5,r3,r2 XA * 25 Current code: 00184a30: sll v1,v0,0x03 XA * 8 00184a34: addu v1,v1,v0 XA * 9 00184a38: addu a1,v1,v0 XA * 10 00184a3c: nop -->
Thanks for you hack! BTW may i ask what these value after XA * stand for,and whats the formula behind it(like how exactly does Compatibility calculated in that routine link)?
Title: Re: Zodiac Compatibility Modify?
Post by: xjamxx on September 24, 2018, 01:53:15 pm
Before i start, just in case if you see "<!--" in .xml that means it is comment not code or smt that the program will read until "-->". I usually left comments to myself in everything i do (cuz i am lazy and tend to forget things really fast). Sorry if u already knew it. Vanilla
Address
Instruction-hex
Instruction-asm
Comment
00184a30
00021840
sll r3,r2,0x01
XA*2, r2 has XA and 'sll' by 0x01 equals multiply by 2, so r3 stores XA*2
00184a34
00621821
addu r3,r3,r2
XA*3, r2 still has XA and 'addu' adds r2 to r3 and save in r3, so now r3 stores XA*3
00184a38
000318c0
sll r3,r3,0x03
XA*24, r3 has XA*3 and 'sll' by 0x03 equals multiply by 8 (2*2*2), so now r3 stores XA*24
00184a3c
00622821
addu r5,r3,r2
XA*25, r2 still has XA and 'addu' adds r2 to r3 and save in r5, so r5 stores XA*25. After this the game engine will keep reading untouched instructions but it will use the value stored in r5 for calculations
Patch
Address
Instruction-hex
Instruction-asm
Comment
00184a30
????????
sll v1,v0,0x03
XA*8, v0=r2 has XA and 'sll' by 0x03 equals multiply by 8 (2*2*2), so now v1=r3 stores XA*8
00184a34
????????
addu v1,v1,v0
XA*9, v0=r2 still has XA and 'addu' adds v0=r2 to v1=r3 and save in v1=r3, so now v1=r3 stores XA*9
00184a38
????????
addu a1,v1,v0
XA*10, v0=r2 still has XA and 'addu' adds v0=r2 to v1=r3 and save in a1=r5, so a1=r5 stores XA*10. Remember the game engine will use the value stored in r5 for calculations
00184a3c
00000000
nop
No operation. Just for filling, to prevent unwanted code.
Title: Re: Zodiac Compatibility Modify?
Post by: stardragoon9 on September 24, 2018, 02:05:08 pm
Quote from: xjamxx on September 24, 2018, 01:53:15 pm Before i start, just in case if you see "<!--" in .xml that means it is comment not code or smt that the program will read until "-->". I usually left comments to myself in everything i do (cuz i am lazy and tend to forget things really fast). Sorry if u already knew it. Vanilla
Address
Instruction-hex
Instruction-asm
Comment
00184a30
00021840
sll r3,r2,0x01
XA*2, r2 has XA and 'sll' by 0x01 equals multiply by 2, so r3 stores XA*2
00184a34
00621821
addu r3,r3,r2
XA*3, r2 still has XA and 'addu' adds r2 to r3 and save in r3, so now r3 stores XA*3
00184a38
000318c0
sll r3,r3,0x03
XA*24, r3 has XA*3 and 'sll' by 0x03 equals multiply by 8 (2*2*2), so now r3 stores XA*24
00184a3c
00622821
addu r5,r3,r2
XA*25, r2 still has XA and 'addu' adds r2 to r3 and save in r5, so r5 stores XA*25. After this the game engine will keep reading untouched instructions but it will use the value stored in r5 for calculations
Patch
Address
Instruction-hex
Instruction-asm
Comment
00184a30
????????
sll v1,v0,0x03
XA*8, v0=r2 has XA and 'sll' by 0x03 equals multiply by 8 (2*2*2), so now v1=r3 stores XA*8
00184a34
????????
addu v1,v1,v0
XA*9, v0=r2 still has XA and 'addu' adds v0=r2 to v1=r3 and save in v1=r3, so now v1=r3 stores XA*9
00184a38
????????
addu a1,v1,v0
XA*10, v0=r2 still has XA and 'addu' adds v0=r2 to v1=r3 and save in a1=r5, so a1=r5 stores XA*10. Remember the game engine will use the value stored in r5 for calculations
00184a3c
00000000
nop
No operation. Just for filling, to prevent unwanted code.
Yeah,i know these were your notes :D I'm Asking out of curiosity because from that routine link i can't understand whats really going on.
So this "addu a1,v1,v0 XA * 10" is r5 which used for calculation,Can i assume that the 10 here is 10%(please correct me if i misunderstood)? But what does these two lines do "sll v1,v0,0x03 XA * 8,addu v1,v1,v0 XA * 9"?
Title: Re: Zodiac Compatibility Modify?
Post by: xjamxx on September 24, 2018, 02:23:18 pm
Yes the final XA*whatever is the percentage, so if whatever is 25 then 25%, if is 13 =13%. For Bad and Good. Worst and Best doubles the percentage, so 25% goes to 50%, 13% goes to 26%, 10% goes to 20%.
"addu a1,v1,v0" doesn't do XA*10 by itself, is more like "addu r5,r3,r2" == "r5=XA*9+XA", that is why previous line was XA*9.
It may be confusing, but is a low level language not like 'python' or 'ruby' or 'c#', what you are searching is this: mult r5,r2,10 --> r5=r2*10, where r2=XA
Sadly there is no mult like that in MIPS (psx hardware, to put it simple). Before someone shouts, i know, there is a mult instruction in MIPS set but it doesn't behave with that simple syntax. You could use it nonetheless but in this low level language is easier to write this: "r3=XA*8" "r3=r3+XA" "r5=r3+XA" Than this: "r5=XA*10"
Title: Re: Zodiac Compatibility Modify?
Post by: stardragoon9 on September 24, 2018, 03:01:32 pm
Quote from: xjamxx on September 24, 2018, 02:23:18 pm Yes the final XA*whatever is the percentage, so if whatever is 25 then 25%, if is 13 =13%. For Bad and Good. Worst and Best doubles the percentage, so 25% goes to 50%, 13% goes to 26%, 10% goes to 20%.
"addu a1,v1,v0" doesn't do XA*10 by itself, is more like "addu r5,r3,r2" == "r5=XA*9+XA", that is why previous line was XA*9.
It may be confusing, but is a low level language not like 'python' or 'ruby' or 'c#', what you are searching is this: mult r5,r2,10 --> r5=r2*10, where r2=XA
Sadly there is no mult like that in MIPS (psx hardware, to put it simple). Before someone shouts, i know, there is a mult instruction in MIPS set but it doesn't behave with that simple syntax. You could use it nonetheless but in this low level language is easier to write this: "r3=XA*8" "r3=r3+XA" "r5=r3+XA" Than this: "r5=XA*10"
Thank you!I understand it now.This was frustrating to understand without explanation(for a layman like me :P).
Title: Re: Zodiac Compatibility Modify?
Post by: Glain on September 25, 2018, 09:11:40 am
Quote from: xjamxx on September 24, 2018, 02:23:18 pm Yes the final XA*whatever is the percentage, so if whatever is 25 then 25%, if is 13 =13%. For Bad and Good. Worst and Best doubles the percentage, so 25% goes to 50%, 13% goes to 26%, 10% goes to 20%.
"addu a1,v1,v0" doesn't do XA*10 by itself, is more like "addu r5,r3,r2" == "r5=XA*9+XA", that is why previous line was XA*9.
It may be confusing, but is a low level language not like 'python' or 'ruby' or 'c#', what you are searching is this: mult r5,r2,10 --> r5=r2*10, where r2=XA
Sadly there is no mult like that in MIPS (psx hardware, to put it simple). Before someone shouts, i know, there is a mult instruction in MIPS set but it doesn't behave with that simple syntax. You could use it nonetheless but in this low level language is easier to write this: "r3=XA*8" "r3=r3+XA" "r5=r3+XA" Than this: "r5=XA*10"
It's not that mult or multu is hard to use. This is how it would look:
li v1, 10 multu v0, v1 mflo a1
You could even use a variable for the first line that defaults to 10 or whatever.
The reason that you often see bit shifts and adds/subtracts instead of mult or div is that they run faster... but in this case you wouldn't notice a difference anyway. The same can be said about mult being faster than div.