Author Topic: Encounters: Monster positions and visibility bits  (Read 852 times)

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Encounters: Monster positions and visibility bits
« on: December 27, 2014, 01:41:26 PM »
Here are a few bits I deciphered from the battle/encounter/formation/arrangement data.  I think Yousei called this "Enemy Combination Data".  Boy we have a few names for things, don't we?

Encounter Table
At 70200 in the ROM.
  byte 4:
        bits 0-1: indicate which of the 3 monster types are initially hidden (eg Shadow dragon, what Alert summons, etc)
              00: normal, all 3 appear
              01: monster type 2 initially hidden
              10: monster types 2 and 3 initially hidden
              11: monster type 3 initially hidden

The 3 bottom bits in byte 0 are still unknown to me.  Bit 0 is on some but not all of the boss battles, bit 1 is on most of the non-boss battles but a few boss ones as well, bit 2 is only on Calbrena and the final Zeromus battles.

Monster Positions:
Indexed by byte 5 in the above table, into the ROM at 71200.  Each entry is 8 bytes, one for each monster in the order they appear (all monster type 1's, then 2's etc).  The high nibble is X, low is Y, in 8-pixel units, with a small additional offset for X:
     xxxxyyyy
            - Final screen X position is (x * 8) + 16
            - Final screen Y position is (y * 8).


To show my work, attached are some images I made using the data above.  They're missing the +16 in X, for those with a detailed eye.  The large bands of color in the background were what I used to look for patterns for the bits.  You can see in the Calbrena image both of the byte 4 bits on (green and dark blue), which means "monster type 3 initially hidden", so the big Calbrena is hidden but the Cal and Brena are present.  For completeness, the byte 0 colors are 0=red, 1=yellow, 2=cyan.


Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Encounters: Monster positions and visibility bits
« Reply #1 on: December 27, 2014, 04:22:37 PM »
This looks wonderful! Being able to see any size monsters (and not just Imps, Zyrthofar's editor!) and place them where you like to see how they would look, would be great!