Author Topic: No battles?  (Read 13548 times)

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
No battles?
« on: 2010-04-02 17:56:52 »
Ok, Kramner made me a nice little program before to disable battles by changing memory value.  I am wondering if it is possible to hex edit the FF7.exe or other game file to achieve same result?

Must admit I am not up to speed with these kind of things but surely is is possible?

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: No battles?
« Reply #1 on: 2010-04-02 18:05:10 »
I don't see why this wouldnt be possible. Somehow change the game mechanics to disable random battles altogether. Boss battles and story line battles may be harder to do. Another idea may be to use a save game editor to give you a pile of mastered materia that reduces the rate of encounters.

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #2 on: 2010-04-02 18:10:45 »
I assumed that it only registers one of the "enemy away" materias and that further ones would be useless?  Or will it really work?  16 Enemy Away materias = very low battle rate?  

edit:  tried it....doesn't work.  Seems to have a cap on how much it will reduce it. 
« Last Edit: 2010-04-02 18:15:34 by Colonel Ramsay »

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #4 on: 2010-04-02 18:17:29 »
ahh yeah :)  Still pretty common though in game sadly....  but maybe someone knows where I can alter this in the game files.  oh well..  :-P

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #5 on: 2010-04-02 21:45:00 »
Well its pretty easy to remove the enemy encounters from the game's EXE, all you need to do is patch the instruction at
005CB25C
from
mov byte ptr [00dbcad9],al
to
mov byte ptr [00dbcad9],00
and that will remove random encounters from the game.
If you dont understand this i could proberly just make a patch or just post a screenshot of what you need to hex edit in the EXE.

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #6 on: 2010-04-02 21:53:42 »
Yeah screen shot will have to do it.  Nice one btw :)

I can hex edit, but we are talking as basic as you get :)

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #7 on: 2010-04-02 21:59:44 »
lol ok here it is made extremely simple.

top is the original ff7 EXE and the bottom is the one with no encounters.
the only way i can make it simpler is to make a patch.
let me know how you get on.
« Last Edit: 2010-04-02 22:01:16 by kranmer »

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: No battles?
« Reply #8 on: 2010-04-02 22:24:29 »
That hex editor spaces up the data oddly... I'm used to seeing it byte by byte, 16 bytes per row.

But so basically zero the byte at 0x1CA658. That is pretty simple.

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #9 on: 2010-04-02 22:32:31 »
That hex editor spaces up the data oddly... I'm used to seeing it byte by byte, 16 bytes per row.

But so basically zero the byte at 0x1CA658. That is pretty simple.

I supose it is a little odd, I just sort of got used to it over the years though so to me it doesnt seem it now.
And yes you are right just enter Zero bytes 0x1CA658 and save the EXE and your done,
And hopefully if you enter a different number you can get more or less encounters, (for example 01 would give you very few, but FF would proberly give you none stop)

obesebear

  • *
  • Posts: 1389
    • View Profile
Re: No battles?
« Reply #10 on: 2010-04-02 22:45:26 »
Nice!  This won't mess with non random battles like Jenova right?

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #11 on: 2010-04-02 22:47:00 »
Yeah they are grouped different but I understand that fully.  Very simple. Cheers. Haha I have been altering the world map dialogue byte by byte and pointers too recently :P

Nice!  This won't mess with non random battles like Jenova right?

No, storyline battles etc are different I believe.
« Last Edit: 2010-04-02 22:49:56 by Colonel Ramsay »

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #12 on: 2010-04-02 22:49:51 »
well i havent fully tested but i wouldnt have thought so, I did run into "midgar zolom" and the battle went fine but thats as far as my testing has gone, if anyone else could give feedback i would appreciate it.
« Last Edit: 2010-04-03 07:05:42 by kranmer »

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #13 on: 2010-04-02 22:50:39 »
well i havent fully tested but i wouldnt have thought so, I did run into "midgar zolom" and the battle went fine but thats as far as my testing has gone, if anyone else could give feedback i would appreciate it,
Also i havent ever really used jenova so could you tell me what it mess's up on non random battles ?

It shouldn't do, but I will :)  I have one such battle right near a save.

Edit:  Ultima Weapon attack at Mideel works fine.
« Last Edit: 2010-04-02 22:56:04 by Colonel Ramsay »

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #14 on: 2010-04-02 23:07:41 »
It shouldn't do, but I will :)  I have one such battle right near a save.

Edit:  Ultima Weapon attack at Mideel works fine.

Thanks for confirming that.
I have also confirmed that the first few battles in the game that are scripted work fine (first battle against the soldiers and the scorpion boss)

EDIT-
Also 1 thing you should note is that if you equip Enemy Lure materia Random battles will come back (i just tested this)
« Last Edit: 2010-04-02 23:11:18 by kranmer »

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #15 on: 2010-04-02 23:41:54 »
yeah that is because it alters memory again overriding the default setting you set in the exe :)  Noted.  Hopefully nothing else does this....like going in and out of towns/areas.

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #16 on: 2010-04-02 23:50:36 »
yeah that is because it alters memory again overriding the default setting you set in the exe :)  Noted.  Hopefully nothing else does this....like going in and out of towns/areas.

well i have tested going in and out of some of the town's in the game and it doesn't seem to make any difference but if anyone is finding this a problem i may be able to just NOP the whole instruction for random battles but i would rather not do this if possible incase it breaks anything.

EDIT-
Ok i have now just completely stopped the instruction for random battles so even materia wont make any difference, I also ran into a few scripted battles and everything still seems to be working fine,
I even tried saving the game with the encounters off EXE then loading the save with the original EXE and hey presto the save worked fine and random battles are back, here are the new Hex values
« Last Edit: 2010-04-03 00:14:45 by kranmer »

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #17 on: 2010-04-03 00:23:19 »
Very nice!

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #18 on: 2010-04-03 01:13:35 »
ok here is a quick patcher to do this for you (only tested on the original 1.02 EXE)
http://www.mediafire.com/?mwzkmgjt2zw
(NOD32 + VBA32 virus scanners detect this patch as a virus but it isnt, All other virus scanners dont detect it as a virus)

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #19 on: 2010-04-03 10:57:46 »
cheers! 1 thing though ;)  maybe add an unpatcher too :-P  (hides)

No seriously I am grateful as it is for all you have done :)


Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #20 on: 2010-04-03 12:43:03 »
cheers! 1 thing though ;)  maybe add an unpatcher too :-P  (hides)

No seriously I am grateful as it is for all you have done :)

A unpatcher shouldnt be needed if you used the Backup option at the bottom of the patcher but i have made one for you anyway
Unpatcher 0.1
http://www.mediafire.com/?txzmodhjgzv

Also here is somthing that might be even more usefull, I made a quick loader so that you wont need to patch your Original ff7.exe,
All you do is run my loader instead of ff7.exe from the "Final Fantasy VII" folder and my loader will launch the game with No Random Battles WITHOUT making any changes to the ff7.exe so when you want random battles again all you need to do is launch the game as normal.
Loader 0.1
http://www.mediafire.com/?mjgjuyh2dw3

also i wonder if i should post this is the "game tweaking" section when testing is done.
« Last Edit: 2010-04-03 12:46:58 by kranmer »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: No battles?
« Reply #21 on: 2010-04-03 13:01:33 »
Kranmer, this isn't entirely related per se, but I am interested in how you reverse-engineered the executable. Did you use some sort of decompiler?

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: No battles?
« Reply #22 on: 2010-04-03 14:20:04 »
Kranmer, this isn't entirely related per se, but I am interested in how you reverse-engineered the executable. Did you use some sort of decompiler?
sort of hard to explain how i did it (not hard to do, just to explain) but basically i used Cheat Engine 5.6 to find the virtual memory value for random battles, then i used its browse memory function to see what was happening everytime i used a enemy lure materia, then i traced where the game writes from and to and looked at the code in the "assembly code" (basically the same as a decompiler but allows editing) and it looked easy enough and thats where i came up with this.

I also tried doing other things like removing the black bar at the bottom of the screen, and was sort of successfull to an extent but it had serious problems (because i had messed with the coordinates it made all NPC's etc off their original points so basicly NPC's would be in the middle of walls etc and exit points would be a little off, which made the game very unplayable).

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: No battles?
« Reply #23 on: 2010-04-03 16:11:43 »
Yeah I think you should release this Kranmer properly :)  A good tool!
« Last Edit: 2010-04-04 14:29:59 by Colonel Ramsay »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: No battles?
« Reply #24 on: 2010-04-03 18:30:28 »
Kranmer, this isn't entirely related per se, but I am interested in how you reverse-engineered the executable. Did you use some sort of decompiler?
sort of hard to explain how i did it (not hard to do, just to explain) but basically i used Cheat Engine 5.6 to find the virtual memory value for random battles, then i used its browse memory function to see what was happening everytime i used a enemy lure materia, then i traced where the game writes from and to and looked at the code in the "assembly code" (basically the same as a decompiler but allows editing) and it looked easy enough and thats where i came up with this.

Aha. So, you used a cheat engine / memory tracker to see which addresses were involved, and then you just looked for the asm that wrote data to that offset. From there, you just traced the logic. Very clever.