Yet another boring tech-related-topic by dziugo.
Related link.Note: All offsets are for 1.02 (I think...) version of ff7.exe.First step - removing the capHere it goes... some offsets and a short description:
0x05C7AE2 - HP check when a person which is not in your party levels-up
0x05CE816 - HP check when entering Battle/Menu
0x05D0671 - setting the maximum damage that a monster can do to each of your party member (called three times when entering battle)
0x05DAA92 - setting the maximum damage that a character can do (called whenever it's your character time to attack)
And some other offsets:
0x5F1AA3 - no idea what it does...
0x5F2147 - same as above
0x65362C - dunno what it does
0x6E46E9 - It sets HP to 1 when it exceeds 9999... don't know when it's called (never happened while testing)
How do we remove the cap? It's simple. We change a value which is used in comparisons to some higher one. I used 0x7FFF (32767 decimal).
Second step - displaying values in gameThis a tricky part... Everything is hardcoded into ff7.exe, so the only way to make it look better is to find all procedures responsible for drawing those values and change them a little bit.
Here are some of them:
Note: Don't try to decode it. It's unreadable even for me (but it looks cool).call at 0066067A
copy_img_to_scr(x, y, xx, yy, src_address)
call at 006F638C
print_bar(&struct, unknown)
struct{
word: x, y, width, height, new_val, max_val, mode, old_val
dword: rgb_color
}//mode: no_change = 0, healing = 1, damage = 2
call at 006F7346
print_gauge(x, y, progress, height, rgb_color, unknown)
call at 006F7BFB
copyimg(x, y, src_x, src_y, width, height, col1, col2, sth)
call at 006F7346
print_gauge(x, y, progress, height, rgb_color, unknown)
call at 006F9739
write_value(x, y, value, digits, color, unknown)
call at 006F9C44
write_value(x, y, value, digits, color, unknown)
call at 006FA12F
print_box(x1, y1, x2, y2)
Offsets which should be changed to make it look good (only few examples):
006C651A CALL 006F9739 ; displaying current HP in menu
Changes:
006C64F9 PUSH 5 ; forcing FF7 to display 5 digits (default: 4)
006C6516 ADD EDX,1B ; moving that value few pixel to the left
006C6555 CALL 006F9739 ; displaying maximum HP in menu
Changes:
006C6534 PUSH 4 ; frocing FF7 to disply 5 digits
006C6551 ADD EDX,5F ; tweaking...
006C664A CALL 006F7BFB ; displaying backslash between act_HP and max_HP
Changes:
006C6646 ADD EAX,56 ; yeah... moving it a little bit
006C632E CALL 006F638C ; health bar
Changes:
006C62C0 ADD EAX,1C ; moving it a little bit...
006C62D1 MOV WORD PTR SS:[EBP-10],7D ; making it longer...
And a screenshot after applying those:
LinkThird step - displaying damageTook me some time to track down the responsible procedures...
Changes:
005BB96B MOV EDX,4
005BB9DF CMP DWORD PTR SS:[EBP-4],5
005BB9F4 MOV EAX,4
005BBA13 MOV EDX,4
005BBA27 MOV EDX,4
005BBA4A CMP DWORD PTR SS:[EBP-4],4
005BBA70 MOV EAX,5
After applying those changes, the damage should be displayed correctly (5-digits when needed).
Last step - Coder needed?Yeah... If anyone feels like making a patch which will do necessary changes, go ahead. I've got other things to do right now.
dziugo