Author Topic: Random Battles in Field and World  (Read 3759 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Random Battles in Field and World
« on: 2013-04-14 18:49:45 »
http://forums.qhimm.com/index.php?topic=7960.msg95832#msg95832

This is actually what brought me to Qhimm's in the first place.   :P  Back when I had no idea about assembly or FF7 code or anything really.  Kranmer was the first person to help me here.  I Still havent done my story walkthrough for Youtube haha, because I am still waiting for finished retranslation.


For my trainer, I needed to go into this a bit more.  I took Kranmer's values and did a bit of tracing to see how it all works.  I didn't go detailed, because I only needed to do 2 things a. disable battles in world and field and b. Make battles happen all time in world and field.  Obviously enemy away and enemy lure are part of the calculations.  I haven't bothered going into that.

World:

The World map allows you to walk for a certain distance before the random battles are able to be called.  This is presumably so that you don't get random battles anywhere between instant and 10 seconds etc.  The distance you can walk before random battles are able to be called is set at 00767518

Code: [Select]
mov [00E3A87C],ffffff74
When 00E3A87C (4 bytes) is 10h (through walking, because 00E3A87C is added to by 1 as you walk from 007675F4 ), the random battle function (call 00767641) is allowed.  You can see at 007675FC the comparison to 10.  Once 00E3A87C is 10h, the counter comes into play.  The random battle function is only called when 00E3A87C is equal to 10h, and each time it reaches that there is a CHANCE of a random battle.  00E3A87C is returned to 0 at 00767601 and the cycle repeats until you eventually get a battle. 

If you set 007675F4 to add eax,00, you essentially terminate the counter, and thus stop any ability for the random battle function to be called (At least, I think.  There are some other places that write to 00E3A87C, but we will see).

A random battle will occur if a. The initial movement requirement has been met and b. When random battle function has been called, edx is greater or equal to eax at 00767786.  Directly above this, you can see how a further counter of your movement is always increasing your chance of a battle.  In other words, eventually it is inevitable that you will have a battle, even though sheer luck plays a part.

Field:

It is a similar story for field really. The movement counter is found at 00CC1668.  And this again increases the chance of your battle at the comparison at 0060B408.

For reference, each area has a value that affects the chance.  The higher the value, the higher the chance of battle. This seems to be found at 00DBCAD8.  00DBCAD9 is also factored into the calculations, and is increased/decreased by enemy lure/enemy away.

I have done a very rough outline here, but if anyone wants to pick it up from here and do a better reversal, feel free to.

I have done what I needed to do for my trainer.

« Last Edit: 2013-04-14 19:39:21 by DLPB »

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: Random Battles in Field and World
« Reply #1 on: 2013-04-14 23:35:53 »
I'm looking forward for the day you will begin a modded FFVII walkthrough! But I'd be thrilled to watch it by listening to your commentary using your unique English accent and ironic comparison comments on any aspect... As a walkthrough fan I'm supporting every part of this if you make it this way bro... sincerely! :P :P
« Last Edit: 2013-04-15 00:12:14 by LeonhartGR »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Random Battles in Field and World
« Reply #2 on: 2013-04-15 00:33:26 »
No Commentary :)  It is gonna be for people who want to watch the story without battles or anything getting in the way  8)  Most online walkthroughs are bad quality, skip NPC or essential dialogue, and skip dialogue in general too fast.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Random Battles in Field and World
« Reply #3 on: 2013-04-15 01:04:52 »
Did you forget our conversation about this? You can eliminate or fix the Enemy Away/Lure effect magnitudes completely around those addresses. That won't effect event battles or boss battles in any way.

Most online walkthroughs are bad quality, skip NPC or essential dialogue, and skip dialogue in general too fast.
Ain't that the truth! But certain lines, like Bugenhagen's line about monsters being in the cave of the Gi, wouldn't make a lot of sense without battles happening.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Random Battles in Field and World
« Reply #4 on: 2013-04-15 02:56:31 »
True.  I will undo battles using my trainer (Called Ochu) for that  8) and possibly a few other things. And yeah, I remember that convo :)  For the trainer, I didn't need to go into it in any real detail, luckily.  I may need to when I create my own difficulty option.
« Last Edit: 2013-04-15 02:59:54 by DLPB »

ajthedj747

  • *
  • Posts: 305
  • Looking Forward to 2017
    • View Profile
Re: Random Battles in Field and World
« Reply #5 on: 2013-04-15 06:43:12 »
No Commentary :?:  It is gonna be for people who want to watch the story without battles or anything getting in the way  8-)  Most online walkthroughs are bad quality, skip NPC or essential dialogue, and skip dialogue in general too fast.
I am sure @EQ2Alyza would do a good job on commentary for this game. I would like to know what her voice sounds like.

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: Random Battles in Field and World
« Reply #6 on: 2013-04-15 11:19:52 »
You can always record in a different source though and upload it as an optional walkthrough ;)... it would be way too fun to watch :P Best reason I watch Necroscope's walkthroughs is due to his entertaining commentary.