### Author Topic: FF7 Battle Flags  (Read 7298 times)

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### FF7 Battle Flags
« on: 2016-03-10 02:22:12 »
Ok, I'm trying to work out what the battle flags correspond to within offset 0x10 of the battle setup. The documented description within the qhimm wiki battle scenes reads "Escapable Flag (Along with other flags)". This topic tells me a small amount, as does this topic, however this video explains a little more.

Long story short, I'm writing an in-depth FAQ about damage overflow, and I need to cite every single enemy in which back damage is possible. I can find the side attack formations easily enough, however the preemptive chance uses a different flag.

Here are the 16-bit values that are being used (that I've seen, anyway):

(much later) EDIT - now that i know definitely what the flags do, I've changed the info in the coding tag below to display the correct info. I'm still unsure of the 0x02 flag, although this is primarily used against enemies with multiple limbs:
Code: [Select]
`FD = Normal fightED = Preemptive OFFF9 = Can't EscapeF7 = No Victory poseFF = 0x02 ONF1 = Can't Escape & No Victory poseE9 = Can't Escape & Preemptive OFFFB = Can't Escape & 0x02 ONEF = Preemptive OFF, and 0x02 ONF3 = Can't Escape, No Victory Pose and 0x02 ONEB = Can't Escape, Preemptive OFF and 0x02 ONE3 = Can't Escape, Preemptive OFF, No Victory Pose and 0x02 ON`
Now, I haven't done much raw testing yet, I was hoping maybe someone would be able to tell me not to bother, it's already been figured out, but anyway, here are my current predictions of the 4 bits that are in use:

(much later) EDIT - These are now correct:

Bit 1  ON = ? used on enemies with multiple limbs
Bit 2 OFF = Can't Run
Bit 3 OFF = Fanfare/Victory pose won't play
Bit 4 OFF = Preemptive off

Also, does anyone know of a list that cites the formations that the game actually uses? If not, I'll be able to go through each field map with Makou Reactor to determine know which Side Attack formations are actually being used, and if someone can confirm/deny my battle flag hypothesis, then I'll be able to accurately cite each enemy that can take back damage for the field maps....

What about the World Map encounters? Do we know precisely which formations are used and which are unused? picklejar uploaded the world map scripts, and while I've been able to find scripts that engage forced battle encounters 01D5 (Midgar Zolom), 03D6 (Ruby Weapon), and all of the Ultimate encounters, I haven't been able to find any of the random encounter scenes.
« Last Edit: 2016-03-30 21:07:09 by DynamixDJ »

#### JBedford128

• Posts: 107
##### Re: FF7 Battle Flags
« Reply #1 on: 2016-03-10 09:39:46 »
This should be an accurate list of enemy formations and where they are fought-- the absence of location information indicating an unused encounter. WM event encounters aren't noted though. I believe for each of them the first listed is the used one (e.g. Ruby Weapon: 982 used; 983, 984, and 985 unused). For Ultimate Weapon they're all used except the one on the black background, and for Mystery Ninja 296, 297, and 298 aren't used but the rest are.

(Edit: another explanation of WM encounters)

WM encounters are in enc_w.bin in the wm LGP. Blocks are 6 normal encounters, 2 back attack, 1 side attack, 1 both sides, 4 chocobo encounters. Each encounter is two bytes, First byte is encounter ID, second byte is encounter rate, although it only uses the first six bits (apparently the remaining two bits are also for the encounter ID, although all encounters used on the WM have an ID < 256). Each block starts with two bytes, first byte is 0x01 if encounters are set, 0x00 if not. Second byte is the area's enc rate, which does take into account all eight bits.

There are four blocks to an area of WM (the WM pole-placing place in Great Glacier is with the Icicle Area lot).

For example, this is the first four (starts at offset 0xA0) for Midgar
Code: [Select]
`01 20 26 40 27 40 28 40 29 40 00 00 00 00 2a 08 \ Midgar - Grass2a 08 00 00 2b 10 00 00 00 00 00 00 00 00 00 00 \-------01 14 20 40 21 40 22 40 24 40 00 00 00 00 23 10 \ Midgar - Dirt23 10 25 28 00 00 00 00 00 00 00 00 00 00 00 00 \-------00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \ Midgar - Jungle/desert? unused00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \--------01 40 2c 58 2d 54 2e 54 00 00 00 00 00 00 00 00 \ Midgar - Beach00 00 00 00 2f 20 00 00 00 00 00 00 00 00 00 00 \-------`
Breakdown of Midgar Grass (EDIT: corrected after response)
Code: [Select]
`01 -- Encounters on20 -- Encounter value 2026 40 -- 1st normal encounter 038, enc value 1627 40 -- 2nd normal encounter 039, enc value 1628 40 -- 3rd normal encounter 040, enc value 1629 40 -- 4th normal encounter 041, enc value 1600 00 -- 5th normal encounter N/A00 00 -- 6th normal encounter N/A2a 08 -- 1st back attack encounter 042, enc value 22a 08 -- 2nd back attack encounter 042, enc value 200 00 -- 1st side attack encounter N/A2b 10 -- 1st both sides encounter 043, enc value 400 00 -- 1st chocobo encounter N/A00 00 -- 2nd chocobo encounter N/A00 00 -- 3rd chocobo encounter N/A00 00 -- 4th chocobo encounter N/A00 00 -- Unknown (always 0x0000)`
« Last Edit: 2016-03-10 23:52:59 by JBedford128 »

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #2 on: 2016-03-10 23:21:09 »
Hey, thanks for this, I've already had the wikia enemy formations bookmarked, however your link provides a little bit more detail. Additionally, I was messing around with Ochu the other day, and I noticed how DLPB has kindly included 2 .txt files listing all Battle Encounter formation with IDs, and all Field Maps with IDs. All this time that's been sitting on my computer, I could have done with it a while ago, too!

Excellent! So now I can accurately detail which world map encounters are being used. I decided to look at the encounters for Wutai Dirt area:
Code: [Select]
`01 40 A8 40 A9 40 AA 40 AB 40 00 00 00 00 AC 08AD 08 AE 28 AF 10 A2 20 A3 20 A6 20 A7 20 00 00Wutai Area - Dirt                              Encounter Value:  64  Normal Battle #1:  16/64 Chance       Back Attack #1:     2/64 Chance     Row 1: 2x Thunderbird                RUN DIFFICULTY:  2     Row 2: 2x Thunderbird                 Row 1: 3x Thunderbird  Normal Battle #2:  16/64 Chance       Back Attack #1:     2/64 Chance     Row 1: 2x Bizarre Bug                RUN DIFFICULTY:  2     Row 2: 3x Thunderbird                 Row 1: 2x Tail Vault  Normal Battle #3:  16/64 Chance       Side Attack:       10/64 Chance     Row 1: 2x Tail Vault                  Row 1: 3x Bizarre Bug        Row 2: 1x Tail Vault               Ambush:             4/64 Chance     Normal Battle #4:  16/64 Chance          Grp 1: 1x Tail Vault,     Row 1: 1x Tail Vault,                           1x Thunderbird               2x Bizarre Bug              Grp 2: 2x Bizarre Bug`
By cross referencing the work that Terrence has done in his Enemy Mechanics FAQ, I can be sure that I am deciphering the values correctly. Which I am  Nice one JBed! Also, thanks for posting that link to Aali's explanation of how the bitmasking works; now I understand why the encounter rate wants to be divided by 4 - because effectively a right bit shift of 2 is taking place (as only 6 bits are looked at).

So that solves that puzzle, now I just need someone to confirm my battle flag speculation, and I'm away. I will be able to confirm for myself though eventually, but it would be nice to know in advance if my theory is correct.
One other thing to ask, does anyone know of a good (free) hex analyzing software? Basic functions such as searching for differences between two hex tables, and offset (column) searching would be ideal. I figured this would be the best place to ask!
« Last Edit: 2016-03-11 17:58:36 by DynamixDJ »

#### DLPB_

• Banned
• Posts: 11008
##### Re: FF7 Battle Flags
« Reply #3 on: 2016-03-11 09:59:52 »
Yeah those encounters of course match up to the scene.bin formations (from field battle ID shift 2 places to right).  Field Map IDs are in order of flevel ID, which you can also view through Makou Reactor

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #4 on: 2016-03-11 10:45:15 »
Yeah, I've already started mapping out which field encounters are actually used thgrough MR, however I didn't know that the field map encounters IDs are listed in the same sequence that the field maps themselves are listed. Handy to know!

#### NFITC1

• Posts: 2944
• I just don't know what went wrong.
##### Re: FF7 Battle Flags
« Reply #5 on: 2016-03-11 15:10:18 »
Not that this is pertinent:

Quote
Karma: -32768

Wow, DDJ! You really ticked some admin off. I motion for a vote of no confidence in our leaders. Even if that's not a thing.

#### Kaldarasha

• Posts: 2438
• Prince of Model Editing
##### Re: FF7 Battle Flags
« Reply #6 on: 2016-03-11 15:26:37 »
Quote
Karma: -32768

At first I thougth:
Then I felt:
And then I looked closer and ...:

#### DLPB_

• Banned
• Posts: 11008
##### Re: FF7 Battle Flags
« Reply #7 on: 2016-03-11 15:37:26 »
I'll donate you some of my stack and get you wrapped back around to positivity.

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #8 on: 2016-03-11 15:59:00 »
Not that this is pertinent:

Wow, DDJ! You really ticked some admin off. I motion for a vote of no confidence in our leaders. Even if that's not a thing.
To the contrary; I actually amassed soooo much karma in such a short space of time that I overflowed into the minus! Thanks DLPB, now I'm on -32767
« Last Edit: 2016-03-11 21:27:14 by DynamixDJ »

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #9 on: 2016-03-13 14:19:32 »
OK, I've finished looking at which formations are used within the World Map, and from what I can see there are three formations that aren't in use:

- Battle #87 (57h) Grangalan (Beach)
- Battle #138 (8Ah) Crown Lance (Cosmo Canyon)
- Battle '139 (8Bh) Crown Lance x2 (Cosmo Canyon)

Also, I'm pretty certain now that the 0x10 setup flag handles Preemptive Strikes, still more testing to be done, but it's been fairly consistent so far. the 0x08 seems to disable the victory pose from playing out (Diamond Weapon), and I'm really not sure what 0x02 does. The only difference I can make out in-battle is the characters could not target each other when attacking.

Haven't done any 0x04 tests yet, but I highly suspect that this is the 'can't run' flag.

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #10 on: 2016-03-16 01:22:24 »
I've also found 1 more WM encounter that isn't used - #103 (066h) which is a Side Attack against a Harpy.

Here's what I now know for definite about the setup flags after testing (this topic should've been called FF7 Setup Flags, as those are the flags I'm referring to, not the Battle Flags):

0x02 OFF = ? ? ? ? (according to NFITC1 this affects the animations for multiple enemies)
0x04 OFF = Can't Escape
0x08 OFF = Fanfare/victory pose won't play
0x10 OFF = Preemptive chance disabled

So, I'm a little bit confused about the Mystery Ninja. Each Forest should have 6 different potential battles formations to call upon, based on Cloud's current level. i can't find these anywhere within world_fr.lgp. Take the Junon forests for example. According to Terrence's Enemy Mechanics FAQ, the Yuffie Encounter rate is 32/256 (so 8 ). Each Yuffie scene has 2 identical formations, the only difference being the background (Forest or Jungle). Take the lowest leveled Yuffie Lv 17 (Enemy 161h), these are formations #268 (10Ch) Forest & #269 (10Dh) Jungle.

With 8 encounter rate, I'm believe I'm searching for either 0C21 or 0D21. I can't seem to find these values that handle the Yuffie encounters. Any help?

Additionally, Terence was unable to work out what GlobalVar:0x02 was. This is what sets Yuffie's initial level after the battle has ended I suspect.

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #11 on: 2016-03-19 02:51:54 »
I've finished with the World Map encounters now, I thought I might as well share this in case anyone's interested:

-EDIT- I've updated the formation listings below to include Attack Type as well as formation positioning.

WORLD MAP ENCOUNTER FORMATIONS:

Code: [Select]
`* = Incorrectly placed formation____ Midgar Area Grass: (32)01 20 26 40 27 40 28 40 29 40 00 00 00 00 2A 082A 08 00 00 2B 10 00 00 00 00 00 00 00 00 00 00NB 1 - 26h (16) - #38  3x Kalm Fang (NB)NB 2 - 27h (16) - #39  2x Kalm Fang, 1x Prowler (NB)NB 3 - 28h (16) - #40  2x Devil Ride (NB)NB 4 - 29h (16) - #41  3x Kalm Fang (NB)NB 5 - NB 6 - BA 1 - 2Ah  (2) - #42  1x Kalm Fang, 2x Prowler (BA)BA 2 - 2Ah  (2) - #42  1x Kalm Fang, 2x Prowler (BA)SA   -AFBS - 2Bh  (4) - #43  2x Kalm Fang, 1x Prowler (AFBS) Midgar Area Dirt: (20)01 14 20 40 21 40 22 40 24 40 00 00 00 00 23 1023 10 25 28 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 20h (16) - #32  1x Devil Ride (NB)NB 2 - 21h (16) - #33  2x Custom Sweeper (NB)NB 3 - 22h (16) - #34  2x Kalm Fang, 1x Devil Ride (NB)NB 4 - 24h (16) - #36  1x Kalm Fang, 2x Prowler (NB)NB 5 - NB 6 - BA 1 - 23h  (4) - #35  2x Devil Ride (BA)BA 2 - 23h  (4) - #35  2x Devil Ride (BA)SA   - 25h (10) - #37  2x Custom Sweeper (SA)AFBS -  Midgar Area Forests: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Midgar Area Beach: (64)01 40 2C 58 2D 54 2E 54 00 00 00 00 00 00 00 0000 00 00 00 2F 20 00 00 00 00 00 00 00 00 00 00NB 1 - 2Ch (22) - #44  3x Kalm Fang (NB)NB 2 - 2Dh (21) - #45  2x Kalm Fang (NB)NB 3 - 2Eh (21) - #46  2x Kalm Fang, 1x Prowler (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   -AFBS - 2Fh  (8) - #47 1x Kalm Fang, 2x Prowler (AFBS)____ Grasslands Area Grass: (32)01 20 30 34 31 34 32 34 33 34 34 30 00 00 35 0836 08 00 00 37 10 38 60 39 60 3C 60 3D 60 00 00NB 1 - 30h (13) - #48  1x Levrikon, 2x Mu  (NB)NB 2 - 31h (13) - #49  3x Levrikon  (NB)NB 3 - 32h (13) - #50  2x Levrikon  (BA) *NB 4 - 33h (13) - #51  3x Levrikon  (BA) *NB 5 - 34h (12) - #52  4x Mandragora  (NB)NB 6 - BA 1 - 35h  (2) - #53  2x Elfadunk (NB) *BA 2 - 36h  (2) - #54  2x Elfadunk, 1x Levrikon (NB) *SA   -AFBS - 37h  (4) - #55  2x Elfadunk, 1x Levrikon, 2x Mandragora (NB) *CT 1 - 38h (24) - #56  2x Mandragora, 1x Chocobo Lv 13 (CH)CT 2 - 39h (24) - #57  1x Mandragora, 1x Levrikon, 1x Chocobo Lv 19 (CH)CT 3 - 3Ch (24) - #60  2x Levrikon, 1x Chocobo Lv 16 (CH)CT 4 - 3Dh (24) - #61  2x Elfadunk, 1x Chocobo Lv 16 (CH) Grasslands Area Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Grasslands Area Forests: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Grasslands Area Beach: (64)01 40 3A 40 3B 40 3E 40 3F 40 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 3Ah (16) - #58  1x Levrikon (NB)NB 2 - 3Bh (16) - #59  2x Levrikon (NB)NB 3 - 3Eh (16) - #62  1x Elfadunk (NB)NB 4 - 3Fh (16) - #63  2x Elfadunk (NB)NB 5 - NB 6 - ____  Junon Area Grass: (32)01 20 40 40 41 40 42 40 43 40 00 00 00 00 44 1045 10 00 00 00 00 4E 40 4F 40 50 40 51 40 00 00NB 1 - 40h (16) - #64  2x Nerosuferoth  (NB)NB 2 - 41h (16) - #65  2x Nerosuferoth, 1x Formula (NB)NB 3 - 42h (16) - #66  1x Zemzelett (NB)NB 4 - 43h (16) - #67  2x Nerosuferoth, 1x Zemzelett (NB)NB 5 - NB 6 - BA 1 - 44h  (4) - #68  2x Nerosuferoth (BA)BA 2 - 45h  (4) - #69  3x Nerosuferoth (BA)SA   -AFBS - CT 1 - 4Eh (16) - #78  3x Capparwire, 1x Chocobo Lv 19 (CH)CT 2 - 4Fh (16) - #79  2x Capparwire, 1x Chocobo Lv 19 (CH)CT 3 - 50h (16) - #80  2x Nerosuferoth, 1x Chocobo Lv 19 (CH)CT 4 - 51h (16) - #81  2x Capparwire, 1x Chocobo Lv 19 (CH) Junon Area Dirt: (20)01 14 46 58 47 54 48 54 00 00 00 00 00 00 49 1049 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 46h (22) - #70  1x Hell Rider VR2 (NB)NB 2 - 47h (21) - #71  2x Formula (NB)NB 3 - 48h (21) - #72  1x Zemzelett (NB)NB 4 - NB 5 - NB 6 - BA 1 - 49h  (4) - #73  1x Zemzelett (BA)BA 2 - 49h  (4) - #73  1x Zemzelett (BA)SA   -AFBS -  Junon Area Forests: (12)01 0C 4A 40 4A 40 4B 40 4B 40 00 00 00 00 4C 104C 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 4Ah (16) - #74  3x Formula (NB)NB 2 - 4Ah (16) - #74  3x Formula (NB)NB 3 - 4Bh (16) - #75  5x Capparwire (NB)NB 4 - 4Bh (16) - #75  5x Capparwire (NB)NB 5 - NB 6 - BA 1 - 4Ch  (4) - #76  2x Capparwire (BA)BA 2 - 4Ch  (4) - #76  2x Capparwire (BA)SA   -AFBS - (WHERE ARE THE YUFFIE ENCOUNTERS STORED???????) Junon Area Beach: (64)01 40 4D 58 52 54 53 54 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 4Dh (22) - #77  2x Capparwire (NB)NB 2 - 52h (21) - #82  2x Nerosuferoth (NB)NB 3 - 53h (21) - #83  2x Capparwire, 1x Nerosuferoth (NB)NB 4 - NB 5 - NB 6 - ____ Corel Area Grass: (32)01 20 54 58 54 54 54 54 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 54h (22) - #84  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 2 - 54h (21) - #84  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 3 - 54h (21) - #84  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 4 - NB 5 - NB 6 -  Corel Area Mountain Path: (32) 01 20 56 58 58 54 59 54 00 00 00 00 00 00 5A 105A 10 5B 40 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 56h (22) - #86  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 2 - 58h (21) - #88  2x Needle Kiss (NB)NB 3 - 59h (21) - #89  2x Needle kiss, 1x Cokatolis (NB)NB 4 - NB 5 - NB 6 - BA 1 - 5Ah  (4) - #90  2x Needle Kiss (BA)BA 2 - 5Ah  (4) - #90  2x Needle Kiss (BA)SA   - 5Bh (16) - #91  2x Needle Kiss (SA)AFBS -  Corel Area Dirt (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Corel Area Beach: (64)01 40 55 40 5C 40 5D 40 5E 40 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 55h (16) - #85  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 2 - 5Ch (16) - #92  3x Beachplug (NB)NB 3 - 5Dh (16) - #93  4x Beachplug (NB)NB 4 - 5Eh (16) - #94  3x Beachplug (SA) *NB 5 - NB 6 - ____ Gold Saucer Area Grass: (32) 01 20 60 58 61 54 64 54 00 00 00 00 00 00 65 1065 10 00 00 00 00 62 14 63 14 68 2C 69 2C 00 00NB 1 - 60h (22) - #96   3x Spencer, 1x Flapbeat (NB)NB 2 - 61h (21) - #97   3x Flapbeat (NB)NB 3 - 64h (21) - #100  2x JokeR  (NB)NB 4 -NB 5 - NB 6 - BA 1 - 65h  (4) - #101  2x Flapbeat, 1x Joker (BA)BA 2 - 65h  (4) - #101  2x Flapbeat, 1x Joker (BA)SA   -AFBS - CT 1 - 62h  (5) - #98   2x Flapbeat, 1x Chocobo Lv 29 (CH)CT 2 - 63h  (5) - #99   2x Spencer, 1x Chocobo Lv 29 (CH)CT 3 - 68h (11) - #104  2x Flapbeat, 1x Chocobo Lv 29 (CH)CT 4 - 69h (11) - #105  1x Harpy, 1x Chocobo Lv 29 (CH) Gold Saucer Area Dirt (unused): (20)01 14 66 80 66 80 00 00 00 00 00 00 00 00 00 0000 00 67 28 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 66h (32) - #102  1x Harpy (NB)NB 2 - 66h (32) - #102  1x Harpy (NB)NB 3 - NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - 67h (10) - #103  1x harpy (SA)AFBS -    Gold Saucer Area Desert: (32)01 20 6A 80 6B 80 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 6Ah (32) - #106  1x Harpy (NB)NB 2 - 6Bh (32) - #107  4x Flapbeat (NB)NB 3 - NB 4 - NB 5 - NB 6 -  Gold Saucer Area Beach: (64)01 40 55 40 5C 40 5D 40 5E 40 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 55h (16) - #85  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 2 - 5Ch (16) - #92  3x Beachplug (NB)NB 3 - 5Dh (16) - #93  4x Beachplug (NB)NB 4 - 5Eh (16) - #94  3x Beachplug (SA) *NB 5 - NB 6 - ____ Gongaga Area Grass: (32)01 20 6C 58 6D 54 6E 54 00 00 00 00 00 00 6F 086F 08 00 00 70 10 00 00 00 00 00 00 00 00 00 00NB 1 - 6Ch (22) - #108  1x Grand Horn (NB)NB 2 - 6Dh (21) - #109  2x Gagighandi (NB)NB 3 - 6Eh (21) - #110  2x Grand Horn (NB)NB 4 - NB 5 - NB 6 - BA 1 - 6Fh  (2) - #111  1x Grand Horn (BA)BA 2 - 6Fh  (2) - #111  1x Grand Horn (BA)SA   - AFBS - 70h  (4) - #112  3x Gagighandi (AFBS) Gongaga Area Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Gongaga Area Jungle: (20)01 14 71 58 72 54 73 54 00 00 00 00 00 00 00 0000 00 00 00 74 20 00 00 00 00 00 00 00 00 00 00NB 1 - 71h (22) - #113  3x Gagighandi (NB)NB 2 - 72h (21) - #114  2x gagighandi (NB)NB 3 - 73h (21) - #115  1x Gagighandi, 2x Touch Me (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - 74h  (8) - #116  6x Touch Me (AFBS) Gongaga Area Beach: (64)01 40 55 40 5C 40 5D 40 5E 40 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 55h (16) - #85  1x Grangalan, 1x Grangalan Jr, 3x Grangalan Jr Jr (NB)NB 2 - 5Ch (16) - #92  3x Beachplug (NB)NB 3 - 5Dh (16) - #93  4x Beachplug (NB)NB 4 - 5Eh (16) - #94  3x Beachplug (SA) *NB 5 - NB 6 - ____ Cosmo Area Grass: (32)01 20 6C 58 6D 54 6E 54 00 00 00 00 00 00 6F 086F 08 00 00 70 10 00 00 00 00 00 00 00 00 00 00NB 1 - 6Ch (22) - #108  1x Grand Horn (NB)NB 2 - 6Dh (21) - #109  2x Gagighandi (NB)NB 3 - 6Eh (21) - #110  2x Grand Horn (NB)NB 4 - NB 5 - NB 6 - BA 1 - 6Fh  (2) - #111  1x Grand Horn (BA)BA 2 - 6Fh  (2) - #111  1x Grand Horn (BA)SA   - AFBS - 70h  (4) - #112  3x Gagighandi (AFBS) Cosmo Area Dirt: (20)01 14 78 58 79 54 7A 54 00 00 00 00 00 00 7B 107B 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 78h (22) - #120  3x Bagrisk (NB)NB 2 - 79h (21) - #121  1x Griffin (NB)NB 3 - 7Ah (21) - #122  2x Desert Sahagin (NB)NB 4 - NB 5 - NB 6 - BA 1 - 7Bh  (4) - #123  3x Bagrisk (BA)BA 2 - 7Bh  (4) - #123  3x Bagrisk (BA)SA   - AFBS -  Cosmo Area Canyon: (32)01 20 7C 2C 7D 2C 7E 2C 7F 2C 80 28 81 28 82 0883 08 84 28 85 10 00 00 00 00 00 00 00 00 00 00NB 1 - 7Ch (11) - #124  3x Skeeskee (NB)NB 2 - 7Dh (11) - #125  1x Griffin (NB)NB 3 - 7Eh (11) - #126  1x Golem (NB)NB 4 - 7Fh (11) - #127  2x Skeeskee, 1x Griffin (NB)NB 5 - 80h (10) - #128  3x Desert Sahagin (NB)NB 6 - 81h (10) - #129  2x Desert Sahagin (NB)BA 1 - 82h  (2) - #130  2x Desert Sahagin (BA)BA 2 - 83h  (2) - #131  3x Skeeskee (BA)SA   - 84h (10) - #132  3x Skeeskee (SA)AFBS - 85h  (4) - #133  2x Desert Sahagin (AFBS) Cosmo Area Beach: (64)01 40 86 58 87 54 88 54 00 00 00 00 00 00 00 0000 00 00 00 89 20 00 00 00 00 00 00 00 00 00 00NB 1 - 86h (22) - #134  2x Crown Lance (NB)NB 2 - 87h (21) - #135  3x Crown lance (NB)NB 3 - 88h (21) - #136  1x Crown Lance (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - 89h  (8) - #137  2x Crown Lance (AFBS)____ Nibel Area Grass: (32)01 20 8C 58 8D 54 8E 54 00 00 00 00 00 00 8F 108F 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 8Ch (22) - #140  2x Nibel Wolf (NB)NB 2 - 8Dh (21) - #141  2x Nibel Wolf, 1x Valron (NB)NB 3 - 8Eh (21) - #142  1x Valron (NB)NB 4 - NB 5 - NB 6 - BA 1 - 8Fh  (4) - #143  2x Nibel Wolf (BA)BA 2 - 8Fh  (4) - #143  2x Nibel Wolf (BA)SA   - AFBS -  Nibel Area Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Nibel Area Forests: 1201 0C 90 58 91 54 92 54 00 00 00 00 00 00 00 0000 00 00 00 93 20 00 00 00 00 00 00 00 00 00 00NB 1 - 90h (22) - #144  2x Bahba Velamyu (NB)NB 2 - 91h (21) - #145  4x Battery Cap, 1x Valron (NB)NB 3 - 92h (21) - #146  6x Battery Cap  (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - 93h  (8) - #147  2x Bahba Velamyu (AFBS)(WHERE ARE THE YUFFIE ENCOUNTERS STORED???????) Nibel Area Beach: (64)01 40 86 58 87 54 88 54 00 00 00 00 00 00 00 0000 00 00 00 89 20 00 00 00 00 00 00 00 00 00 00NB 1 - 86h (22) - #134  2x Crown Lance (NB)NB 2 - 87h (21) - #135  3x Crown lance (NB)NB 3 - 88h (21) - #136  1x Crown Lance (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - 89h  (8) - #137  2x Crown Lance (AFBS)____ Rocket Launch Pad Area Grass: (32)01 20 94 58 95 54 96 54 00 00 00 00 00 00 00 0000 00 00 00 97 20 98 14 99 14 9C 2C 9D 2C 00 00NB 1 - 94h (22) - #148  3x Nibel Wolf (NB)NB 2 - 95h (21) - #149  2x Velcher Task (NB)NB 3 - 96h (21) - #150  2x Nibel Wolf, 1x Velcher Task (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - 97h  (8) - #151  2x Nibel Wolf, 1x Velcher Task (AFBS)CT 1 - 98h  (5) - #152  2x Valron, 1x Chocobo Lv 22 (CH)CT 2 - 99h  (5) - #153  2x Kyuvilduns, 1x Chocobo Lv 22 (CH)CT 3 - 9Ch (11) - #156  1x Velcher Task, 1x Kyuvilduns, 1x Chocobo Lv 22 (CH)CT 4 - 9Dh (11) - #157  2x Velcher Task, 1x Chocobo Lv 22 (CH) Rocket Launch Pad Area Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Rocket Launch Pad Area Forests: (12)01 0C 9A 58 9B 54 9E 54 00 00 00 00 00 00 9F 109F 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - 9Ah (22) - #154  4x Kyuvilduns (NB)NB 2 - 9Bh (21) - #155  3x Valron (NB)NB 3 - 9Eh (21) - #158  2x Velcher Task (NB)NB 4 - NB 5 - NB 6 - BA 1 - 9Fh  (4) - #159  2x Velcher Task (BA)BA 2 - 9Fh  (4) - #159  2x Velcher Task (BA)SA   - AFBS - (WHERE ARE THE YUFFIE ENCOUNTERS STORED???????) Rocket Launch Pad Area Beach: (64)01 40 86 58 87 54 88 54 00 00 00 00 00 00 00 0000 00 00 00 89 20 00 00 00 00 00 00 00 00 00 00NB 1 - 86h (22) - #134  2x Crown Lance (NB)NB 2 - 87h (21) - #135  3x Crown lance (NB)NB 3 - 88h (21) - #136  1x Crown Lance (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - 89h  (8) - #137  2x Crown Lance (AFBS)____ Wutai Area Grass: (64)01 40 A0 40 A1 40 A4 40 A5 40 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - A0h (16) - #160  2x Razor Weed, 1x Tail Vault (NB)NB 2 - A1h (16) - #161  4x Razor Weed (NB)NB 3 - A4h (16) - #164  2x Tail Vault, 1x Edgehead (NB)NB 4 - A5h (16) - #165  2x Tail Vault (NB)NB 5 - NB 6 -  Wutai Area Dirt: (64)01 40 A8 40 A9 40 AA 40 AB 40 00 00 00 00 AC 08AD 08 AE 28 AF 10 A2 20 A3 20 A6 20 A7 20 00 00NB 1 - A8h (16) - #168  4x Thunderbird (NB)NB 2 - A9h (16) - #169  3x Thunderbird, 2x Bizarre Bug (NB)NB 3 - AAh (16) - #170  3x Tail Vault (NB)NB 4 - ABh (16) - #171  2x Bizarre Bug, 1x Tail Vault (NB)NB 5 - NB 6 - BA 1 - ACh  (2) - #172  3x Thunderbird (BA)BA 2 - ADh  (2) - #173  2x Tail Vault (BA)SA   - AEh (10) - #174  3x Bizarre Bug (SA)AFBS - AFh  (4) - #175  2x Bizarre Bug, 1x Tail Vault, 1x Thunderbird (AFBS)CT 1 - A2h  (8) - #162  2x Tail Vault, 1x Chocobo Lv 30 (CH)CT 2 - A3h  (8) - #163  3x Razor Weed, 1x Chocobo (CH)CT 3 - A6h  (8) - #166  3x Tail Vault, 1x Chocobo Lv 30 (CH)CT 4 - A7h  (8) - #167  2x Tail Vault, 1x Chocobo Lv 30 (CH) Wutai Area Wooden Bridge (unused): (20)01 14 B0 80 B1 80 00 00 00 00 00 00 00 00 00 0000 00 00 00 B2 20 00 00 00 00 00 00 00 00 00 00NB 1 - B0h (32) - #176  5x Bizarre Bug (NB)NB 2 - B1h (32) - #177  2x bizarre Bug, 1x Tail Vault (NB)NB 3 - NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - B2h  (8) - #178  3x Bizarre Bug, 2x Tail Vault (AFBS) Wutai Area Beach: (96)01 60 B3 80 B3 80 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - B3h (32) - #179  1x Adamantaimai (NB)NB 2 - B3h (32) - #179  1x Adamantaimai (NB)NB 3 - NB 4 - NB 5 - NB 6 - ____ Woodlands Area Grass: (32)01 20 B4 58 B5 54 B6 54 00 00 00 00 00 00 B7 10B7 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - B4h (22) - #180  1x Under Lizard (NB)NB 2 - B5h (21) - #181  1x Dual Horn (NB)NB 3 - B6h (21) - #182  2x Dual Horn (NB)NB 4 - NB 5 - NB 6 - BA 1 - B7h  (4) - #183  1x Dual Horn (BA)BA 2 - B7h  (4) - #183  1x Dual Horn (BA)SA   - AFBS -  Woodlands Area Dirt: (32)01 20 B8 58 B9 54 BA 54 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - B8h (22) - #184  1x Under Lizard (NB)NB 2 - B9h (21) - #185  2x Under Lizard (NB)NB 3 - BAh (21) - #186  1x Tonadu (NB)NB 4 - NB 5 - NB 6 -  Woodlands Area Jungle: (12)01 0C BC 58 BD 54 BE 54 00 00 00 00 00 00 00 0000 00 00 00 BF 20 00 00 00 00 00 00 00 00 00 00NB 1 - BCh (22) - #188  3x Slaps (NB)NB 2 - BDh (21) - #189  5x Slaps (NB)NB 3 - BEh (21) - #190  2x Kelzmelzer (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - AFBS - BFh  (8) - #191  4x Slaps (AFBS) Woodlands Area Beach: (96)01 60 BB 80 BB 80 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - BBh (32) - #187  1x Tonadu (NB)NB 2 - BBh (32) - #187  1x Tonadu (NB)NB 3 - NB 4 - NB 5 - NB 6 - ____ Icicle Area Grass: (32)01 20 C0 58 C1 54 C2 54 00 00 00 00 00 00 C3 10C4 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - C0h (22) - #192  1x Vlakorados (NB)NB 2 - C1h (21) - #193  1x Trickplay (NB)NB 3 - C2h (21) - #194  2x Trickplay (NB)NB 4 - NB 5 - NB 6 - BA 1 - C3h  (4) - #195  2x Trickplay (BA)BA 2 - C4h  (4) - #196  1x Vlakorados (BA)SA   - AFBS -  Icicle Area Snow: (32)01 20 C5 34 C6 34 C7 34 C8 34 C9 30 00 00 CC 08CC 08 00 00 CD 10 CA 0C CB 0C CE 34 CF 34 00 00NB 1 - C5h (13) - #197  1x Bandersnatch (NB)NB 2 - C6h (13) - #198  2x Bandersnatch (NB)NB 3 - C7h (13) - #199  3x Bandersnatch (NB)NB 4 - C8h (13) - #200  1x Jumping (NB)NB 5 - C9h (12) - #201  2x Jumping (NB)NB 6 - BA 1 - CCh  (2) - #204  2x bandersnatch (BA)BA 2 - CCh  (2) - #204  2x Bandersnatch (BA)SA   - CDh  (4) - #205  2x Bandersnatch (AFBS)AFBS - CT 1 - CAh  (3) - #202  1x Jumping, 1x Chocobo Lv 33 (CH)CT 2 - CBh  (3) - #203  2x Jumping, 1x Chocobo lv 33 (CH)CT 3 - CEh (13) - #206  1x Bandersnatch, 1x Jumping, 1x Chocobo Lv 33 (CH)CT 4 - CFh (13) - #207  2x Bandersnatch, 1x Chocobo Lv 33 (CH) Icicle Area Snowstorm (Great Glacier): (96)01 60 D0 58 D1 54 D2 54 00 00 00 00 00 00 00 0000 00 D3 28 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - D0h (22) - #208  1x Lessaloploth (NB)NB 2 - D1h (21) - #209  2x Ice Golem (NB)NB 3 - D2h (21) - #210  3x Jumping (NB)NB 4 - NB 5 - NB 6 - BA 1 - BA 2 - SA   - D3h (10) - #211  3x Jumping (SA)AFBS -  Icicle Area Beach: (96)01 60 BB 80 BB 80 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - BBh (32) - #187  1x Tonadu (NB)NB 2 - BBh (32) - #187  1x Tonadu (NB)NB 3 - NB 4 - NB 5 - NB 6 - ____ Mideel Area Grass: (32)01 20 D4 40 D5 40 D8 40 D9 40 00 00 00 00 00 0000 00 00 00 00 00 D6 1C D7 1C DA 24 DB 24 00 00NB 1 - D4h (16) - #212  1x Hippogriff (NB)NB 2 - D5h (16) - #213  2x Spiral (NB)NB 3 - D8h (16) - #216  3x Head Hunter (NB)NB 4 - D9h (16) - #217  4x Head Hunter (NB)CT 1 - D6h  (7) - #214  1x Spiral, 1x Chocobo Lv 36 (CH)CT 2 - D7h  (7) - #215  2x Spiral, 1x Chocobo Lv 36 (CH)CT 3 - DAh  (9) - #218  2x Head Hunter, 1x Chocobo Lv 36 (CH)CT 4 - DBh  (9) - #219  1x Head Hunter, 1x Chocobo Lv 36 (CH) Mideel Area Dirt: (20)01 14 DC 58 DD 54 DE 54 00 00 00 00 00 00 DF 10DF 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - DCh (22) - #220  3x Spiral (NB)NB 2 - DDh (21) - #221  2x Spiral (NB)NB 3 - DEh (21) - #222  1x Hippogriff (NB)NB 4 - NB 5 - NB 6 - BA 1 - DFh  (4) - #223  2x Spiral (BA)BA 2 - DFh  (4) - #223  2x Spiral (BA)SA   - AFBS -  Mideel Area Forests: (12)01 0C E0 58 E1 54 E2 54 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - E0h (22) - #224  3x Crysales  (NB)NB 2 - E1h (21) - #225  4x Head Hunter (NB)NB 3 - E2h (21) - #226  3x Head Hunter (NB)NB 4 - NB 5 - NB 6 - (WHERE ARE THE YUFFIE ENCOUNTERS STORED???????) Mideel Area Beach: (96)01 60 E3 80 E3 80 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - E3h (32) - #227  Sea Worm (NB)NB 2 - E3h (32) - #227  Sea Worm (NB)NB 3 - NB 4 - NB 5 - NB 6 - ____ North Corel Area Grass: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 North Corel Area Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 North Corel Area Desert: (96)01 60 E8 50 E9 50 E4 40 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - E8h (20) - #232  1x Sea Worm (NB)NB 2 - E9h (20) - #233  1x Tonadu (NB)NB 3 - E4h (16) - #228  1x Cactuer (NB)NB 4 - NB 5 - NB 6 -  North Corel Area Beach: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00____ Cactus Island Grass: (64)01 40 E5 58 E6 54 E7 54 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - E5h (22) - #229  1x Dual Horn (NB)NB 2 - E6h (21) - #230  2x Dual Horn (NB)NB 3 - E7h (21) - #231  1x Under Lizard (NB)NB 4 - NB 5 - NB 6 -  Cactus Island Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Cactus Island Desert: (96)01 60 E4 A0 E4 60 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - E4h (40) - #228  1x Cactuer (NB)NB 2 - E4h (24) - #228  1x Cactuer (NB)NB 3 - NB 4 - NB 5 - NB 6 -  Cactus Island Beach: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00____ Goblin Island Grass: (64)01 40 E5 58 E6 54 E7 54 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00NB 1 - E5h (22) - #229  1x Dual Horn (NB)NB 2 - E6h (21) - #230  2x Dual Horn (NB)NB 3 - E7h (21) - #231  1x Under Lizard (NB)NB 4 - NB 5 - NB 6 -  Goblin Island Dirt: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Goblin & Round Island Forest: (64)01 40 EA 58 EB 54 EC 54 00 00 00 00 00 00 ED 08ED 08 EE 28 EF 10 00 00 00 00 00 00 00 00 00 00NB 1 - EAh (22) - #234  2x Goblin (NB)NB 2 - EBh (21) - #235  3x Goblin (NB)NB 3 - ECh (21) - #236  1x Goblin (NB)NB 4 - NB 5 - NB 6 - BA 1 - EDh  (2) - #237  1x Goblin (BA)BA 2 - EDh  (2) - #237  1x Goblin (BA)SA   - EEh (10) - #238  2x Goblin (SA)AFBS - EFh ( 4) - #239  3x Goblin (AFBS)(WHERE ARE THE YUFFIE ENCOUNTERS STORED???????) Goblin island Beach: (unused)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00`
Also, if anyone has any pointers where the Yuffie encounters are kept Id be grateful!
« Last Edit: 2016-04-03 16:13:45 by DynamixDJ »

#### NFITC1

• Posts: 2944
• I just don't know what went wrong.
##### Re: FF7 Battle Flags
« Reply #12 on: 2016-03-19 03:15:20 »
That's a fantastic list!

Yuffie encounters, as well as starting Battle Arena formations, are hard-coded in the executable. I don't know where that is on the PSX.

#### JBedford128

• Posts: 107
##### Re: FF7 Battle Flags
« Reply #13 on: 2016-03-19 05:51:58 »
Aren't the starting Battle Arena formations in flevel.lgp? They're all in clsin2_1's main script. It randomises a number between 0 and 7 (random byte + bitwise AND 7), and checks for GM/PPV<=560, elseif <=1008, and else (>1008) to determine the set.
« Last Edit: 2016-03-19 20:37:02 by JBedford128 »

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #14 on: 2016-03-19 15:18:01 »
Yes, I'd clocked that. There are 3 "sets" chosen based on game moment, and you'l have one of 8 starting battles chosen at random for each set. Plus the Special battle. I'm creating a chart that looks like this:

Code: [Select]
`  ________ ____________________ ________ ___________ _____________ ___________|        |                    |        |           |             |           || BATTLE |      ENEMIES:      | ATTACK | BACKGRND: |     MAP:    |  BATTLE   ||   ID:  |                    | TYPE:  |           |             |  REWARDS: ||________|____________________|________|___________|_____________|___________|\============================================================================/  \                                                                          /  \                 [000] êúô0(äñ)                                         /   |  Scene 0:      [001] êúô1()                                          |    /                 [002] êúô2(ñ)                                 (S 00h)  \ /                                                                          \/============================================================================\| UNUSED | 1 êúô0(äñ)         | AT 00  | Debug     | ----------- | EXP:  1000||R1   #0 |                    | Normal | (blank)   |             |  AP:   100||FD 000h |                    | Attack | B 00 OGDA |             | GIL: 10000||--------o--------------------o--------o-----------o-------------o-----------|| UNUSED | 1 êúô0(äñ) x 4     | AT 00  | Forest    | ----------- | EXP:  4000||R1   #1 |                    | Normal |           |             |  AP:   400||FD 001h |                    | Attack | B 04 OKDA |             | GIL: 40000||--------o--------------------o--------o-----------o-------------o-----------|| UNUSED | 1 êúô0(äñ)         | AT 00  | Debug     | ----------- | EXP:  1000||R1   #2 |                    | Normal | (blank)   |             |  AP:   100||FD 002h |                    | Attack | B 00 OGDA |             | GIL: 10000||--------o--------------------o--------o-----------o-------------o-----------|| UNUSED | 1 êúô0(äñ)         | AT 00  | Train     | ----------- | EXP:101012||R1   #3 | 2 êúô1()           | Normal | Graveyard |             |  AP:  2101||FD 003h |   êúô2(ñ)          | Attack | B 31 QDDA |             | GIL:110012|\============================================================================/ \                                                                          /  \                 [063] Beachplug                                        /   |  Scene 23:     [071] Spencer                                         |    /                 [   ] (empty)                                 (S 17h)  \ /                                                                          \/============================================================================\|** USED | 1 Beachplug        | AT 00  | Beach     | Corel    16 | EXP:   285||R1  #92 | 2 Beachplug x2     | Normal |           | Gld Sauc 16 |  AP:    30||FD 05Ch |                    | Attack | B 05 OLDA | Gongaga  16 | GIL:   465||--------o--------------------o--------o-----------o-------------o-----------||** USED | 1 Beachplug x3     | AT 00  | Beach     | Corel    16 | EXP:   380||R1  #93 | 2 Beachplug <C>    | Normal |           | Gld Sauc 16 |  AP:    40||FD 05Dh |                    | Attack | B 05 OLDA | Gongaga  16 | GIL:   620||                                                                            || Special - Battle Square: Set 1 - Group A - Battle 7  Next Arenas:          ||           #70 (046h)   #85 (055h)   #497 (1F1h)   or   #102 (066h)         ||--------o--------------------o--------o-----------o-------------o-----------|| * USED | 1 Beachplug x3     | AT 05  | Beach     | Corel    16 | EXP:   285||R1  #94 |                    | Side   |           | Gld Sauc 16 |  AP:    30||FD 05Eh |                    | Attack | B 05 OLDA | Gongaga  16 | GIL:   465||--------o--------------------o--------o-----------o-------------o-----------||   USED | 1 Spencer x2       | AT 00  | Battle    | clsin2_1  F | EXP:   220||R1  #95 |                    | Normal | Square    |             |  AP:    22||FD 05Fh |                    | Attack | B 25 PRDA |             | GIL:   350||                                                                            || Special - Battle Square Initial Battle: Set 2 - Group A - Battle 1         || Next Arenas:   #108 (06Ch)   #109 (06Dh)   #110 (06Eh)   or   #136 (088h)  ||         - Used in the Battle Square only                                   |\============================================================================/`
I've filled out the canvas for all 999 battles, and now that I've finished with the WM encounters, I'm going through Makou Reactor to cite the "used" formations. I've just finished doing a search all for op code 70 - "BATTLE" (forced encounters), now I'm going through the random encounters, screen by screen.

Thanks again for your help JBed!! BTW, I'm loving the work you're doing to the Wikia!!

#### Vgr

• Global moderator
• Posts: 2163
• If it quacks like a duck, it must be a duck
##### Re: FF7 Battle Flags
« Reply #15 on: 2016-03-20 16:19:37 »
That's really some great findings! Good job!

I wonder if it's actually possible to manually set one's karam

#### Kaldarasha

• Posts: 2438
• Prince of Model Editing
##### Re: FF7 Battle Flags
« Reply #16 on: 2016-03-20 16:28:12 »

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #17 on: 2016-03-26 19:04:31 »
I've just discovered something interesting. The official description regarding the 0x0002 battle flag at offset 0x0C within the Formtion set-up reads: "Indicates initial direction facing if players get a side attack". This is false.

When receiving a "Pincer Attack", or "Attack from both sides" (which is how the description should read), the Can't Run flag is enabled by default. Within the Battle Formation enemy data, two groups of enemies will be selected via the 0x0002 Flag. Those on the left are given FFFD and those on the right are given FFFF. Once one groups has been destroyed, the Can't Run flag is disabled.

The 0x0002 Flag is being used to purely group the enemies together on one side so the game knows when to let you escape. I tried changing all enemies to have FFFF, and I was able to escape straight away. the same thing happened when I changed them all to FFFD.

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #18 on: 2016-03-27 15:31:23 »
Thinking on it a little further, the FFFD flag must also be used as so that the game know when you have been back attacked or not. If the last time you were hit was from an enemy with the FFFD flag, and now you're hit by an enemy with the normal FFFF flag then you shall receive 2x damage I'd imagine.

Perhaps a similar flag is used for the characters during a side attack, so the game knows when you're causing back damage to the enemy?

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #19 on: 2016-04-03 16:16:32 »
OK, I've updated the listings in reply #11 to include Attack types and also formation positioning.

#### DynamixDJ

• Posts: 239
• 1111 1111 0111
##### Re: FF7 Battle Flags
« Reply #20 on: 2016-04-11 18:57:33 »
So yeah, last for this topic i think, I've finished my Formation Charts now:

http://forums.qhimm.com/index.php?topic=16896.msg239740

#### DLPB_

• Banned
• Posts: 11008
##### Re: FF7 Battle Flags
« Reply #21 on: 2016-06-19 23:16:58 »
009A8760 holds the 2 byte battle flags
009A8762 holds the 1 byte battle mode (00 normal, 01 pre-emptive, 02 back attack and so on)

The battle mode flag is checked at battle start and 9A88A6 is set depending on the value.  For example, FFF9 will set 9A88A6 to 08 (cannot escape)

The "bug" [it isnt a bug at all, it was intended by the programmers] that exists in the game (that you can run away deliberately to make the chars face the correct way when back attacked) can be remedied somewhat by nopping 420578.

Quote
However, in Final Fantasy VII, the player's party does not take extra damage from behind. The only thing a back attack does in this game is switch the party characters' rows, which this glitch does not affect. The effect of the glitch, therefore, is purely cosmetic.

So there you have it... back attack in FF7 just changes your chars row. So using l1 and r1 doesnt help you.  It just makes your chars face the correct way, which the above fix can remedy (poorly). A better way is probably to just disable the silly wrong direction thing altogether (42B5CA = EB 14) and change "back attack" text to "Enemy preemptive attack" or something....
« Last Edit: 2016-06-20 01:14:04 by DLPB »