Author Topic: Breaking the 9999 limit  (Read 18194 times)

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« on: 2005-10-11 21:20:22 »
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 cap

Here it goes... some offsets and a short description:
Code: [Select]
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:
Code: [Select]
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 game

This 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 :P (but it looks cool).
Code: [Select]
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):
Code: [Select]
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:
Link

Third step - displaying damage

Took me some time to track down the responsible procedures...
Code: [Select]
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

MaTiAz

  • *
  • Posts: 31
    • View Profile
Breaking the 9999 limit
« Reply #1 on: 2005-10-13 19:00:02 »
Cool, you've helped us a lot :)
If you save the game with the hacks on and then load it, will the game crash? I tried manually patching the FF7 save file and calculated the checksum, but the game crashed after loading the game. Or actually after I entered the menu, since in the field you won't see the character stats.

hay

  • *
  • Posts: 211
  • If I had a buggy, I'd cross the southern desert
    • View Profile
Breaking the 9999 limit
« Reply #2 on: 2005-10-14 16:18:34 »
So we'll see soon patch for breaking those limits? ;]
I've got related question. What software have you used to trace this offsets. I guess that it's skill in first place but I won't believe if you tell me that you used Photoshop or FL Studio ;]
I'm not good at programming/coding but maybe I could find myself useful in your great mission :] (I've a knack for computers ;)) ... And I'm kinda curious how do you do all this 'miracles' ;].


P.S.: Yeah! I'm Cool Newbie! I like that ;]... Better don't post anymore...  :D

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« Reply #3 on: 2005-10-14 17:25:38 »
Quote from: hay
So we'll see soon patch for breaking those limits? ;]
When I'm done with fixing FMVs crashes.
Quote from: hay
I've got related question. What software have you used to trace this offsets. I guess that it's skill in first place but I won't believe if you tell me that you used Photoshop or FL Studio ;]
Can't afford Photoshop (for now :roll:). I used ollydbg but any debugger will do. Right now I'm testing MemoryHackingSoftware by L.Spiro and I must admit, that it has some cool unique features (things that I had to do manually with ollys can be done with few mouseclicks in MHS), so if you want to start (and help the community), get a hand on it and some tutorial which will introduce you into assembler and/or debugging programs.
Quote from: hay
I'm not good at programming/coding but maybe I could find myself useful in your great mission :] (I've a knack for computers ;)) ... And I'm kinda curious how do you do all this 'miracles' ;].
If you're curious, then it's more than enough to start. Get some debugger and try to modify the code (you can use offsets that I posted), see what is changing and how... Just mess with it. When you're ready or have any questions/problems gimme a shout.

dziugo

P.S. Good to see another person from Poland :P

hay

  • *
  • Posts: 211
  • If I had a buggy, I'd cross the southern desert
    • View Profile
Breaking the 9999 limit
« Reply #4 on: 2005-10-15 11:56:32 »
Quote from: dziugo
so if you want to start (and help the community), get a hand on it and some tutorial which will introduce you into assembler and/or debugging programs.

I'll give it a try, thx.

Quote from: dziugo
Just mess with it. When you're ready or have any questions/problems gimme a shout.

So better be ready for my attack in near future ;]

Quote from: dziugo
P.S. Good to see another person from Poland

And vice versa :)

valis

  • Guest
Breaking the 9999 limit
« Reply #5 on: 2005-10-27 23:57:03 »
I'd be happy to write the patch (if it hasn't already been done or started), I'll probably start it sometime in the next 2 days (my day off).

edit: oops, just realized l.spiro developed memory hacking software, not you, sorry.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Breaking the 9999 limit
« Reply #6 on: 2005-10-28 02:37:43 »
Speaking of which, my site moved to http://www.memoryhacking.com so it will be there now.

And thank you for the support.


L. Spiro

Extreme184X

  • *
  • Posts: 18
    • View Profile
Breaking the 9999 limit
« Reply #7 on: 2005-10-28 03:02:32 »
valis wrote:
I'd be happy to write the patch (if it hasn't already been done or started), I'll probably start it sometime in the next 2 days (my day off).

That be great for confused people myself who doesnt understand the above.  Don't give up please, make that patch.

valis

  • Guest
Breaking the 9999 limit
« Reply #8 on: 2005-10-28 03:14:45 »
thankyou L. Spiro, I'd been searching everywhere for a copy of it but all the links I had come across were broken.  (I don't know why google didn't turn up memoryhacking.com)

It sounds like a great piece of software, I'm eager to try it out.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« Reply #9 on: 2005-10-28 05:51:15 »
Quote from: valis
I'd be happy to write the patch (if it hasn't already been done or started), I'll probably start it sometime in the next 2 days (my day off).
AFAIK, it hasn't been done (or started), so go ahead :P.

dziugo

Breaking the 9999 limit
« Reply #10 on: 2005-11-10 11:28:38 »
I really did like to try this out, but Im no good with hacking stuff.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« Reply #11 on: 2005-11-10 12:25:05 »
Actually I was planning to do it myself, since I have some free time :P.

dziugo

Breaking the 9999 limit
« Reply #12 on: 2005-11-10 13:19:46 »
Hey, are you using a program called resource hacker?

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Breaking the 9999 limit
« Reply #13 on: 2005-11-28 15:52:41 »
Did anyone make a patch or tutorial of this yet?
Ijusttried this, butdidnt manage it.
I have the olly debugger and applied those things you said (dzuigo) but what next?
I dunno how to save or sth like that the changes.
Pls help me,
Grisu

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Breaking the 9999 limit
« Reply #14 on: 2005-12-01 16:33:03 »
Noone?

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Breaking the 9999 limit
« Reply #15 on: 2005-12-01 16:52:52 »
check the Dialog Box Transparency Thread, I think he put the two patches together

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« Reply #16 on: 2005-12-01 17:38:38 »
Quote from: The Skillster
check the Dialog Box Transparency Thread, I think he put the two patches together
I put a patcher there (Skerb.exe) which will be used to apply this modification. Let's just call it a demo of what it's capable of :P. The patch itself will be released when it's done... Sorry, but you'll have to wait if you want to see it...

dziugo or dzuigo, whatever...

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Breaking the 9999 limit
« Reply #17 on: 2005-12-01 19:10:13 »
So, doies the skerb have the function to break the 9999 limit?

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« Reply #18 on: 2005-12-01 19:48:51 »
Quote from: Grisu
So, doies the skerb have the function to break the 9999 limit?
dziugo's reply:
I believe that I've already mentioned, that it doesn't. It won't even touch your ff7.exe without a patch file. While Skerb.exe is a patcher, it requires *.srb file to patch other files.

dziugo's reply translated for Grisu:
No, it doesn't have that function.

dziugo

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Breaking the 9999 limit
« Reply #19 on: 2005-12-02 17:58:32 »
Sorry that i didnt understand this, im not english...

Cyberman

  • *
  • Posts: 1572
    • View Profile
Breaking the 9999 limit
« Reply #20 on: 2005-12-02 19:03:38 »
Quote from: Grisu
Sorry that i didnt understand this, im not english...

Skerb can't be used to break the 9999 HP limit

Cyb

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Breaking the 9999 limit
« Reply #21 on: 2005-12-02 19:22:15 »
i just understood what he said last but i meant i didnt understand
dziugo's reply:
I believe that I've already mentioned, that it doesn't. It won't even touch your ff7.exe without a patch file. While Skerb.exe is a patcher, it requires *.srb file to patch other files.
sry, im really not good at english..

Kenizark

  • *
  • Posts: 12
    • View Profile
Breaking the 9999 limit
« Reply #22 on: 2005-12-02 22:08:47 »
Looks pretty cool. Can you go over the 999 mp limit (not that yoiu need it)? lol

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Breaking the 9999 limit
« Reply #23 on: 2005-12-02 23:04:06 »
Quote from: Kenizark
Looks pretty cool. Can you go over the 999 mp limit (not that yoiu need it)? lol
Even above 9999.

BTW: the patch is coming :). It just needs some tests.

dziugo

Phyltre

  • *
  • Posts: 84
    • View Profile
Breaking the 9999 limit
« Reply #24 on: 2005-12-03 01:29:21 »
Quote from: dziugo
Quote from: Kenizark
Looks pretty cool. Can you go over the 999 mp limit (not that yoiu need it)? lol
Even above 9999.

BTW: the patch is coming :). It just needs some tests.

dziugo


The power of all that is good compels you to release the patch!  (shakes mountain-priest prayer beads)

Seriously though, I can't thank you enough for just taking my suggestion like this.  It's like a dream come true.