Difference between revisions of "WORLD.BIN Data Tables"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 23: Line 23:
  
 
  8015327c - Pointer to thread array (WORLD.BIN) (0x80195cd0)
 
  8015327c - Pointer to thread array (WORLD.BIN) (0x80195cd0)
 +
 +
8018a168 - Formation portrait/palette data. Two bytes per Job.
 +
  Right-side Formation Sprite entry in the Patcher.
 +
  Used in [[Find Formation Palette Index]] to determine the formation sprite palettes.
 +
 +
8018a8b8 - Duplicate of formation portrait/palette data. Two bytes per Job.
 +
  Right-side Formation Sprite entry in the Patcher.
 +
  Used in [[Portrait loading routine]] to determine the portrait and the portrait's palette.
 +
 +
8018de34 - NPC Formation Screen Sprites (for jobs 0x00 to 0x49 only), 1 byte per entry.
 +
  Left-side Formation Sprite entry in the Patcher.
 +
  Used in [[Get Formation Graphic Entry]] or [[Get Generic Human Formation Graphic Entry]] to determine the sprite.
  
 
  8018aa98 - WORLD.BIN: Formation unit Preview data
 
  8018aa98 - WORLD.BIN: Formation unit Preview data
 
  Contains some data regarding the unit, such as level, exp, etc., directly from world.bin party data
 
  Contains some data regarding the unit, such as level, exp, etc., directly from world.bin party data
 
  Also contains Bonus stat information, bonus/malus HP/MP/PA/SP etc. to show in blue text when previewing equipment while changing, or movement abilities when changing.
 
  Also contains Bonus stat information, bonus/malus HP/MP/PA/SP etc. to show in blue text when previewing equipment while changing, or movement abilities when changing.
 +
 +
8018ba1c - Current Formation Menu
 +
    0x00 - Main Formation menu
 +
    0x01 - Item menu
 +
    0x02 - Ability menu
 +
    0x03 - Change Job
 +
    0x04 - Remove Unit
 +
    0x05 - Order Unit   
 +
    Item submenus:
 +
        0x06 - Equip
 +
        0x07 - Best
 +
        0x08 - Remove
 +
        0x09 - List
 +
    Ability submenus:
 +
        0x0A - Set
 +
        0x0B - Remove
 +
        0x0C - Learn
 +
        0x0D - View (from just pressing Circle over the character; no Triangle menu)
 +
    0x10 - this flag seems to indicate waiting for a process, like moving the formation sprite for Item/Ability or handling Change Job after selecting one.
 +
  
 
  8018ba20 - Selected formation unit index (WORLD.BIN)
 
  8018ba20 - Selected formation unit index (WORLD.BIN)
 +
 +
8018d0f1 - Selected formation unit index (during Ability screen?)
  
 
  8018cf68 - Status Image Data (8 bytes each, 0x140 total)
 
  8018cf68 - Status Image Data (8 bytes each, 0x140 total)
Line 104: Line 138:
 
   
 
   
 
  8018de34 - NPC Formation Screen Sprites (for jobs 0x00 to 0x49 only), 1 byte per entry
 
  8018de34 - NPC Formation Screen Sprites (for jobs 0x00 to 0x49 only), 1 byte per entry
        0x00 - Formation Sprite, not sure what it references, someone who does spriting should know.
+
  Palettes of these sprites are actually determined by the portrait/palette entries at 8018a168 for whatever reason.
  
 
  80195cd0 - Thread array (WORLD.BIN) (Each thread data block is 0x400 = 1024 bytes, and includes its own stack); 17 entries total
 
  80195cd0 - Thread array (WORLD.BIN) (Each thread data block is 0x400 = 1024 bytes, and includes its own stack); 17 entries total
Line 121: Line 155:
 
     0x50 - 0x68: ? (Set to 0 when thread is initialized)
 
     0x50 - 0x68: ? (Set to 0 when thread is initialized)
 
     0x6c and beyond: Stack for this thread; ~900 bytes available
 
     0x6c and beyond: Stack for this thread; ~900 bytes available
 +
 +
801c83f0 - Number of jobs available (says "Can't change" on job wheel if less than 2)
  
 
  801c83f8 - Job Wheel Bytes(2 bytes each, goes until FF FF is reached)
 
  801c83f8 - Job Wheel Bytes(2 bytes each, goes until FF FF is reached)
Line 388: Line 424:
 
   
 
   
 
  801cd5ec - Formation unit reference array (WORLD.BIN); each entry is a pointer to formation unit data
 
  801cd5ec - Formation unit reference array (WORLD.BIN); each entry is a pointer to formation unit data
 +
 +
801cd738 - Current menu option selected (at least in the base Ability screen).
 
   
 
   
 
  801cd788 - Number of formation screen units (WORLD.BIN)
 
  801cd788 - Number of formation screen units (WORLD.BIN)

Latest revision as of 06:04, 14 November 2024

WORLD.BIN Routines
80093b20 - World Map Month Image Data (WLDCORE.BIN 0x2cb20)
Each month has one entry.
(Size per entry: 0x14 = 20 bytes)
(Entries for the numbers used for the day are located directly after the months.  11 entries corresponding to 0 1 2 3 4 5 6 7 8 9 /)
Offset (bytes): Notes
    0x00 (4): Number of images to display? (Default 1)
    0x04 (4): ? Affects display (Default 0x01000180)
    0x08 (4): ? Affects colors? (Default 0x01e60000)
    0x0c (1): Screen Location Offset X (Default 0x80 = 128)
    0x0d (1): Screen Location Offset Y (Default 0x80 = 128)
    0x0e (1): Palette? (Default 0) (Messed up colors if changed)
    0x0f (1): Flip
        0: Upright
        1: Vertical flipped
        2: Horizontal flipped
        3: Both flipped
    0x10 (1): Pixel Height (Default 12)
    0x11 (1): Pixel Width (Default 24)
    0x12 (1): Source Bitmap Y Location
    0x13 (1): Source Bitmap X Location
8015327c - Pointer to thread array (WORLD.BIN) (0x80195cd0)
8018a168 - Formation portrait/palette data. Two bytes per Job.
 Right-side Formation Sprite entry in the Patcher.
 Used in Find Formation Palette Index to determine the formation sprite palettes.
8018a8b8 - Duplicate of formation portrait/palette data. Two bytes per Job.
 Right-side Formation Sprite entry in the Patcher.
 Used in Portrait loading routine to determine the portrait and the portrait's palette.
8018de34 - NPC Formation Screen Sprites (for jobs 0x00 to 0x49 only), 1 byte per entry.
 Left-side Formation Sprite entry in the Patcher. 
 Used in Get Formation Graphic Entry or Get Generic Human Formation Graphic Entry to determine the sprite.
8018aa98 - WORLD.BIN: Formation unit Preview data
		Contains some data regarding the unit, such as level, exp, etc., directly from world.bin party data
		Also contains Bonus stat information, bonus/malus HP/MP/PA/SP etc. to show in blue text when previewing equipment while changing, or movement abilities when changing.
8018ba1c - Current Formation Menu
   0x00 - Main Formation menu
   0x01 - Item menu
   0x02 - Ability menu
   0x03 - Change Job
   0x04 - Remove Unit
   0x05 - Order Unit    
   Item submenus:
       0x06 - Equip
       0x07 - Best
       0x08 - Remove
       0x09 - List
   Ability submenus:
       0x0A - Set
       0x0B - Remove
       0x0C - Learn
       0x0D - View (from just pressing Circle over the character; no Triangle menu)
   0x10 - this flag seems to indicate waiting for a process, like moving the formation sprite for Item/Ability or handling Change Job after selecting one.


8018ba20 - Selected formation unit index (WORLD.BIN)
8018d0f1 - Selected formation unit index (during Ability screen?)
8018cf68 - Status Image Data (8 bytes each, 0x140 total)
               0x00 - X Load Location
               0x01 - 00
               0x02 - Y Load Location
               0x03 - 00
               0x04 - Image Width
               0x05 - 00
               0x06 - Image Height
               0x07 - 00

               0x00  - "Blank Status"
               0x08  - "Crystal"
               0x10  - "Dead"
               0x18  - "Undead"
               0x20  - "Charging"
               0x28  - "Jump"
               0x30  - "Defending"
               0x38  - "Performing"
               0x40  - "Petrify"
               0x48  - "Invite"
               0x50  - "Blind"
               0x58  - "Confusion"
               0x60  - "Silence"
               0x68  - "Vampire"
               0x70  - "Cursed"
               0x78  - "Treasure"
               0x80  - "Oil"
               0x88  - "Float"
               0x90  - "Reraise"
               0x98  - "Invisible"
               0xa0  - "Berserk"
               0xa8  - "Chicken"
               0xb0  - "Frog"
               0xb8  - "Critical"
               0xc0  - "Poison"
               0xc8  - "Regen"
               0xd0  - "Protect"
               0xd8  - "Shell"
               0xe0  - "Haste"
               0xe8  - "Slow"
               0xf0  - "Stop"
               0xf8  - "Wall"
               0x100 - "Faith"
               0x108 - "Atheist"
               0x110 - "Charm"
               0x118 - "Sleep"
               0x120 - "Immobilize"
               0x128 - "Disable"
               0x130 - "Reflect"
               0x138 - "Doom"


8018d844 - Shop Item Availability Table - 2 bytes per item, 256 items (technically the first 1 and last 2 are unavailable).
       0x00 - First Byte
              0x80 - Lesalia Imperial Castle
              0x40 - Riovanes Castle
              0x20 - Igros Castle
              0x10 - Lionel Castle
              0x08 - Limberry Castle
              0x04 - Zeltennia Castle
              0x02 - Gariland Magic City
              0x01 - Yardow Fort City
       0x01 - Second Byte
              0x80 - Goland Coal City
              0x40 - Dorter Trade City
              0x20 - Zaland Fort City
              0x10 - Goug Machine City
              0x08 - Warjilis Trade City
              0x04 - Bervenia Trade City
              0x02 - Zarghidas Trade City
              0x01 - Unknown


8018de34 - NPC Formation Screen Sprites (for jobs 0x00 to 0x49 only), 1 byte per entry
  Palettes of these sprites are actually determined by the portrait/palette entries at 8018a168 for whatever reason.
80195cd0 - Thread array (WORLD.BIN) (Each thread data block is 0x400 = 1024 bytes, and includes its own stack); 17 entries total
   0x00 - Thread function parameter 1
   0x04 - Thread function parameter 2
   0x08 - Thread function parameter 3
   0x0c - ? (Set to 0 when thread is initialized)
   0x10 - 0x2c: Saved register values for this thread ($s0 - $s7)
   0x30 - 0x34: Kernal register values for this thread ($k0 - $k1)
   0x38 - Global pointer for this thread ($gp)
   0x3c - Stack pointer for this thread ($sp)
   0x40 - Frame pointer for this thread ($fp)
   0x44 - Address of first command for this thread to run upon being started or resumed ($ra)
   0x48 - IsRunning value (boolean; True (1) if thread is currently active/running, false (0) if not)
   0x4c - Task ID (Matches those listed in WaitForInstruction event command)
   0x50 - 0x68: ? (Set to 0 when thread is initialized)
   0x6c and beyond: Stack for this thread; ~900 bytes available
801c83f0 - Number of jobs available (says "Can't change" on job wheel if less than 2)
801c83f8 - Job Wheel Bytes(2 bytes each, goes until FF FF is reached)
       0x4000 - Grey out job on Job Wheel
       0x00xx - Job ID
801c8638 (WORLD.BIN)
   Formation screen unit definition : 0x128 (296) bytes
   Data copies here from party data at routine 0x80120bb0 (WORLD.BIN)
   Offset (bytes): Description
       0x000 (2): Level
       0x002 (2): 2 if unit is Guest, otherwise 0
       
       0x008 (2): Experience
       0x00a (2): Party unit index (controls portrait)
       0x00c (2): Max HP (HP?)
       0x010 (2): Max HP
       0x012 (2): Max MP (MP?)
       
       0x016 (2): Max MP
       0x018 (2): CT
       
       0x01c (2): 100 (Max CT)?
       
       0x022 (2): Party unit index (controls display name)
       0x024 (2): Job ID
       0x026 (2): Brave
       0x028 (2): Faith
       0x02a (2): Birthday (first 4 bits)
       0x02c (2): Party unit index
       
       0x030 (2): Move
       0x032 (2): Speed
       0x034 (2): Jump
       0x036 (2): Right Hand WP
       0x038 (2): Left Hand WP
       0x03a (2): Right Hand W-EV
       0x03c (2): Left Hand W-EV
       0x03e (2): 1 if primary skillset is Monster skillset (between 0xB0 and 0xDF, inclusive), 0 otherwise
       0x040 (2): Two Hands active (1 if active, 0 if inactive)
       0x042 (2): PA
       0x044 (2): C-Ev
       0x046 (2): Physical S-Ev
       0x048 (2): Physical A-Ev
       
       0x04c (2): MA
       0x04e (2): 0 (Magical C-Ev?)
       0x050 (2): Magical S-Ev
       0x052 (2): Magical A-Ev
       0x054 (2): Right Hand Equip
       0x056 (2): Left Hand Equip
       0x058 (2): Head Equip
       0x05a (2): Body Equip
       0x05c (2): Accessory
       0x05e (2): Primary skillset
       0x060 (2): Secondary skillset
       0x062 (2): Reaction ability
       0x064 (2): Support ability
       0x066 (2): Movement ability
       
       0x070 (1): Flags ("Gender" Byte)
           0x80 - Male
           0x40 - Female
           0x20 - Monster
           0x10 - Join after event
           0x08 - Load Formation
           0x04 - ??? Stats
           0x02 - 
           0x01 - Join as Guest
       
       0x072 (1): Base class
       0x073 (1): Equippable Items 1
           0x80 - Barehanded
           0x40 - Knife
           0x20 - Ninja Blade
           0x10 - Sword
           0x08 - Knight's Sword
           0x04 - Katana
           0x02 - Axe
           0x01 - Rod
       0x074 (1): Equippable Items 2
           0x80 - Staff
           0x40 - Flail
           0x20 - Gun
           0x10 - Crossbow
           0x08 - Bow
           0x04 - Instrument
           0x02 - Book
           0x01 - Polearm
       0x075 (1): Equippable Items 3
           0x80 - Pole
           0x40 - Bag
           0x20 - Cloth
           0x10 - Shield
           0x08 - Helmet
           0x04 - Hat
           0x02 - Hair Adornment
           0x01 - Armor
       0x076 (1): Equippable Items 4
           0x80 - Clothing
           0x40 - Robe
           0x20 - Shoes
           0x10 - Armguard
           0x08 - Ring
           0x04 - Armlet
           0x02 - Cloak
           0x01 - Perfume
       0x077 (1): Unlocked Jobs 1
       0x078 (1): Unlocked Jobs 2
       0x079 (1): Unlocked Jobs 3
       0x07a (1): Base Action Abilities 1-8
       0x07b (1): Base Action Abilities 9-16
       0x07c (1): Base R/S/M 1-6
       0x07d (1): Chemist Action Abilities 1-8
       0x07e (1): Chemist Action Abilities 9-16
       0x07f (1): Chemist R/S/M 1-6
       0x080 (1): Knight Action Abilities 1-8
       0x081 (1): Knight Action Abilities 9-16
       0x082 (1): Knight R/S/M 1-6
       0x083 (1): Archer Action Abilities 1-8
       0x084 (1): Archer Action Abilities 9-16
       0x085 (1): Archer R/S/M 1-6
       0x086 (1): Monk Action Abilities 1-8
       0x087 (1): Monk Action Abilities 9-16
       0x088 (1): Monk R/S/M 1-6
       0x089 (1): Priest Action Abilities 1-8
       0x08a (1): Priest Action Abilities 9-16
       0x08b (1): Priest R/S/M 1-6
       0x08c (1): Wizard Action Abilities 1-8
       0x08d (1): Wizard Action Abilities 9-16
       0x08e (1): Wizard R/S/M 1-6
       0x08f (1): Time Mage Action Abilities 1-8
       0x090 (1): Time Mage Action Abilities 9-16
       0x091 (1): Time Mage R/S/M 1-6
       0x092 (1): Summoner Action Abilities 1-8
       0x093 (1): Summoner Action Abilities 9-16
       0x094 (1): Summoner R/S/M 1-6
       0x095 (1): Thief Action Abilities 1-8
       0x096 (1): Thief Action Abilities 9-16
       0x097 (1): Thief R/S/M 1-6
       0x098 (1): Mediator Action Abilities 1-8
       0x099 (1): Mediator Action Abilities 9-16
       0x09a (1): Mediator R/S/M 1-6
       0x09b (1): Oracle Action Abilities 1-8
       0x09c (1): Oracle Action Abilities 9-16
       0x09d (1): Oracle R/S/M 1-6
       0x09e (1): Geomancer Action Abilities 1-8
       0x09f (1): Geomancer Action Abilities 9-16
       0x0a0 (1): Geomancer R/S/M 1-6
       0x0a1 (1): Lancer Action Abilities 1-8
       0x0a2 (1): Lancer Action Abilities 9-16
       0x0a3 (1): Lancer R/S/M 1-6
       0x0a4 (1): Samurai Action Abilities 1-8
       0x0a5 (1): Samurai Action Abilities 9-16
       0x0a6 (1): Samurai R/S/M 1-6
       0x0a7 (1): Ninja Action Abilities 1-8
       0x0a8 (1): Ninja Action Abilities 9-16
       0x0a9 (1): Ninja R/S/M 1-6
       0x0aa (1): Calculator Action Abilities 1-8
       0x0ab (1): Calculator Action Abilities 9-16
       0x0ac (1): Calculator R/S/M 1-6
       0x0ad (1): Bard Action Abilities 1-8
       0x0ae (1): Bard Action Abilities 9-16
       0x0af (1): Bard R/S/M 1-6
       0x0b0 (1): Dancer Action Abilities 1-8
       0x0b1 (1): Dancer Action Abilities 9-16
       0x0b2 (1): Dancer R/S/M 1-6
       0x0b3 (1): Base/Chemist Job Level
       0x0b4 (1): Knight/Archer Job Level
       0x0b5 (1): Monk/Priest Job Level
       0x0b6 (1): Wizard/Time Mage Job Level
       0x0b7 (1): Summoner/Thief Job Level
       0x0b8 (1): Mediator/Oracle Job Level
       0x0b9 (1): Geomancer/Lancer Job Level
       0x0ba (1): Samurai/Ninja Job Level
       0x0bd (1): Calculator/Bard Job Level
       0x0bc (1): Dancer/Mime Job Level
       (Gap for alignment?)
       0x0be (2): Base Job JP
       0x0c0 (2): Chemist Job JP
       0x0c2 (2): Knight Job JP
       0x0c4 (2): Archer Job JP
       0x0c6 (2): Monk Job JP
       0x0c8 (2): Priest Job JP
       0x0ca (2): Wizard Job JP
       0x0cc (2): Time Mage Job JP
       0x0ce (2): Summoner Job JP
       0x0d0 (2): Thief Job JP
       0x0d2 (2): Mediator Job JP
       0x0d4 (2): Oracle Job JP
       0x0d6 (2): Geomancer Job JP
       0x0d8 (2): Lancer Job JP
       0x0da (2): Samurai Job JP
       0x0dc (2): Ninja Job JP
       0x0de (2): Calculator Job JP
       0x0e0 (2): Bard Job JP
       0x0e2 (2): Dancer Job JP
       0x0e4 (2): Mime Job JP
       0x0e6 (2): Total Base Job JP
       0x0e8 (2): Total Chemist Job JP
       0x0ea (2): Total Knight Job JP
       0x0ec (2): Total Archer Job JP
       0x0ee (2): Total Monk Job JP
       0x0f0 (2): Total Priest Job JP
       0x0f2 (2): Total Wizard Job JP
       0x0f4 (2): Total Time Mage Job JP
       0x0f6 (2): Total Summoner Job JP
       0x0f8 (2): Total Thief Job JP
       0x0fa (2): Total Mediator Job JP
       0x0fc (2): Total Oracle Job JP
       0x0fe (2): Total Geomancer Job JP
       0x100 (2): Total Lancer Job JP
       0x102 (2): Total Samurai Job JP
       0x104 (2): Total Ninja Job JP
       0x106 (2): Total Calculator Job JP
       0x108 (2): Total Bard Job JP
       0x10a (2): Total Dancer Job JP
       0x10c (2): Total Mime Job JP
       0x10e-0x11d: Unit Name
       0x11e (1): Graphic
       0x11f (1): Proposition byte
       0x120 (2): Birthday
       0x122 (2): ? (0xd2 party data)
       0x124 (1): Support 1
           0x80 - Equip Armor
           0x40 - Equip Shield
           0x20 - Equip Sword
           0x10 - Equip Katana
           0x08 - Equip Crossbow
           0x04 - Equip Spear
           0x02 - Equip Axe
           0x01 - Equip Gun
       0x125 (1): Support 2
           0x80 - Half of MP
           0x40 - Gained JP-UP
           0x20 - Gained EXP-UP
           0x10 - Attack UP
           0x08 - Defense UP
           0x04 - Magic Attack UP
           0x02 - Magic Defense UP
           0x01 - Concentrate
       0x126 (1): Support 3
           0x80 - Train
           0x40 - Secret Hunt
           0x20 - Martial Arts
           0x10 - Monster Talk
           0x08 - Throw Item
           0x04 - Maintenance
           0x02 - Two Hands
           0x01 - Two Swords
       0x127 (1): Support 4
           0x80 - Monster Skill
           0x40 - Defend
           0x20 - Equip Change
           0x10 - 
           0x08 - Short Charge
           0x04 - Non-Charge
           0x02 - 
           0x01 -

801cd170 - Current thread ID (WORLD.BIN); index into array at 0x80195cd0

801cd330 - Unit Names

801cd43c - Reserve Items array for Fitting Room - Added to inventory after finished (Old equipment replaced with fitted equipment)
   10 bytes per unit (5 item IDs as halfwords)

801cd5ec - Formation unit reference array (WORLD.BIN); each entry is a pointer to formation unit data
801cd738 - Current menu option selected (at least in the base Ability screen).

801cd788 - Number of formation screen units (WORLD.BIN)