World Map Instructions

From Final Fantasy Hacktics Wiki
Jump to: navigation, search

Legend

== : Equal to
<  : Lesser than
<= : Lesser than or Equal to
>  : Greater than
>= : Greater than or Equal to

0001: Variable is ==

0001 AAAA BBBB

AAAA = Variable ID
BBBB = Value
If Variable 0xAAAA == 0xBBBB { Continue }
Else { Stop Parsing }

0002: Variable is >=

0002 AAAA BBBB

A = Variable ID
B = Value
If Variable 0xAAAA >= 0xBBBB { Continue }
Else { Stop Parsing }

0003: Variable is <=

0002 AAAA BBBB

A = Variable ID
B = Value
If Variable 0xAAAA <= 0xBBBB { Continue }
Else { Stop Parsing }

0004: Unit is present is Roster

0004 00AA

A = Unit ID
If Unit 0xAA is present in Player Roster { Continue }
Else { Stop Parsing }
  • It doesn't matter if the unit is a guest or not

000E: War Funds are >=

000E AAAA

A = War Funds (gil amount)
If War Funds >= 0xAAAA { Continue }
Else { Stop Parsing }

000F: War Funds are <=

000F AAAA

A = War Funds (gil amount)
If War Funds <= 0xAAAA { Continue }
Else { Stop Parsing }

0010: Current Month is >=

0010 00AA 0000

A = Month
If Current Month >= 0x00AA { Continue }
Else { Stop Parsing }
  • Current Month = Variable 0x002E
    • 0x00 = January
    • 0x01 = February
    • 0x02 = March
    • 0x03 = April
    • 0x04 = May
    • 0x05 = June
    • 0x06 = July
    • 0x07 = August
    • 0x08 = September
    • 0x09 = October
    • 0x0A = November
    • 0x0B = December

0011: Current Month is <

0011 00AA 0000

A = Month
If Current Month < 0x00AA { Continue }
Else { Stop Parsing }

0012: Casualties are >=

0012 AAAA

A = Casualties (# of foes permanently dying)
If Casualties >= 0xAAAA { Continue }
Else { Stop Parsing }

0013: Casualties are <=

0013 AAAA

A = Casualties (# of foes permanently dying)
If Casualties <= 0xAAAA { Continue }
Else { Stop Parsing }

0019: Load Scenario

0019 AAAA BBBB

A = Scenario ID
B = Screen Transition Style
    0x0000: "Hard" Battle push-in
    0x0001: "Normal" Battle push-in
    0x0002: Fade in (used for non-battle events)
If landing at location OR attempting to cross over location over OR attempting to leave location
{
    Load Scenario 0xAAAA with Screen Transition Style 0xBBBB
}

Stop Parsing

001A: Scenario List

001A AAAA BBBB CCCC DDDD EEEE FFFF GGGG HHHH

A = Item 1 Name
B = Item 1 Scenario

C = Item 2 Name
D = Item 2 Scenario

E = Item 3 Name
F = Item 3 Scenario

G = Item 4 Name
H = Item 4 Scenario
If Current Location's colour == red
{
    Create Menu
    {
        If 0xBBBB > 0x0000 { Add Event option 0xBBBB with Map Name 0xAAAA }
        If 0xDDDD > 0x0000 { Add Event option 0xDDDD with Map Name 0xCCCC }
        If 0xFFFF > 0x0000 { Add Event option 0xFFFF with Map Name 0xEEEE }
        If 0xHHHH > 0x0000 { Add Event option 0xHHHH with Map Name 0xGGGG }
    }
}

Stop Parsing
  • Location colours can be found at variables 0x0267 to 0x0292. Only works if set to red (0x0000).
  • Always performs a fade-in Screen Transition.
  • Map Names can be found under file WORLD.LZW, section "Map Names" in FFTactext.
  • The Menu cannot be closed, you have to pick one of the options. It display the location's image and creates a selection window.

001C: Set Variable to

001C AAAA BBBB

A = Variable ID
B = Value
Variable 0xAAAA = 0xBBBB

001D: Display Text

001D AAAA

A = Message ID
If returning to the world map (from an event or loading a save)
{
    Display Message 0xAAAA in a "check" box on screen
    Variable 0x006D = 0x0001
}
  • Messages can be found under file WORLD.LZW, section "Help text" in FFTactext

001E: Deep Dungeon Choice

001E AAAA BBBB CCCC

A = Deep Dungeon Random battle slot
B = Scenario ID
C = Randomization Range
If An item from the Deep Dungeon's list was selected
{
    Load Scenario 0xBBBB
    Force Random Battle ENTD/Squad/Etc. 0xAAAA
    Variable 0x0068 = random number between 0x0000 and ( 0xCCCC - 0x0001 )
}

Stop Parsing
  • The Deep Dungeon menu is not created through instructions; it is hard coded by forcing a certain amount of items to be displayed by the value stored in Variable 0x0065 and adding 1. The selected item is stored in Variable 0x005C. The list names can be found under file WORLD.LZW, section "Tavern text" in FFTactext.
  • For more information about the Deep Dungeon random battles, see the Random Battle Editor spreadsheet.
  • The randomized value is originally used to determine a Deep Dungeon exit. It will randomly generate any value under C, unless C = 0; then it will just write 0. For example, C = 0x0025 will generate a value between 0x0000 and 0x0024.

001F: Unknown

001F AAAA BBBB
  • This only seems to write 0xAAAA and 0xBBBB to the buffer and never use them. Even though this instruction is used in the Deep Dungeon, it seems to be completely useless even after looking at the code.

0020: Draw Path

0020 00AA 00BB

A = From Location ID
B = To Location ID
If returning to the world map (from an event or loading a save) OR attempting to leave location OR exiting a menu
{
    If some path data exists featuring locations 0xAA and 0xBB { Draw a path from 0xAA to 0xBB }
    Else { Freeze the game }
}

Stop Parsing
  • Cannot be used without verifying if the Path isn't drawn first, or it will erase the path indefinitely.

0021: Erase Path

0021 00AA 00BB

A = From Location ID
B = To Location ID
If returning to the world map (from an event or loading a save) OR attempting to leave location OR exiting a menu
{
    If some path data exists featuring locations 0xAA and 0xBB { Erase path from 0xAA to 0xBB }
    Else { Freeze the game }
}

Stop Parsing
  • Cannot be used without verifying if the Path is drawn first, or it will draw the path indefinitely.

0022: Draw Location

0022 00AA

A = Location ID
If returning to the world map (from an event or loading a save) OR attempting to leave location OR exiting a menu
{
    Draw Location 0xAA
}

Stop Parsing
  • Cannot be used without verifying if the Location isn't drawn first, or it will draw the location indefinitely.

0023: Erase Location

0023 00AA

A = Location ID
If returning to the world map (from an event or loading a save) OR attempting to leave location OR exiting a menu
{
    Erase Location 0xAA
}

Stop Parsing
  • Cannot be used without verifying if the Location is drawn first, or it will erase the location indefinitely.

0024: Focus on Location

0024 00AA

A = Location ID
If returning to the world map (from an event or loading a save) OR attempting to leave location OR exiting a menu
{
    Center the camera on Location 0xAA
}

Stop Parsing
  • Only use to draw/erase paths/locations.

0025: Main Character's Brave is >=

0025 00AA

A = Brave
If Main Character's Brave >= 0xAA { Continue }
Else { Stop Parsing }

0026: Main Character's Brave is <=

0026 00AA

A = Brave
If Main Character's Brave <= 0xAA { Continue }
Else { Stop Parsing }

0027: Main Character's Faith is >=

0027 00AA

A = Faith
If Main Character's Faith >= 0xAA { Continue }
Else { Stop Parsing }

0028: Main Character's Faith is <=

0028 00AA

A = Faith
If Main Character's Faith <= 0xAA { Continue }
Else { Stop Parsing }

????: Unused

0000
0005 0000 0000
0006 0000 0000
0007 0000 0000
0008 0000 0000
0009 0000 0000
000A 0000 0000
000B 0000 0000
000C 0000
000D 0000
0014 0000
0015 0000
0016 0000 0000
0017
0018 0000 0000 0000 0000
001B 0000 0000
Continue

Routine Addresses

This list of Addresses can be found at Address 0x8009EE50

ID     Routine Address
0000 - 0x80091380
0001 - 0x800913F8
0002 - 0x800914BC
0003 - 0x80091518
0004 - 0x80091574
0005 - 0x800913A4
0006 - 0x800913A4
0007 - 0x800913A4
0008 - 0x800913A4
0009 - 0x800913A4
000A - 0x800913A4
000B - 0x800913A4
000C - 0x80091630
000D - 0x8009164C
000E - 0x80091668
000F - 0x800916DC
0010 - 0x80091750
0011 - 0x80091874
0012 - 0x800918F0
0013 - 0x80091964
0014 - 0x80091388
0015 - 0x80091388
0016 - 0x80091380
0017 - 0x800913C0
0018 - 0x800913DC
0019 - 0x800919D8
001A - 0x80091A48
001B - 0x800913A4
001C - 0x80091AE4
001D - 0x80091B18
001E - 0x80091B64
001F - 0x80091BF8
0020 - 0x80091C68
0021 - 0x80091CD8
0022 - 0x80091D48
0023 - 0x80091D88
0024 - 0x80091DC8
0025 - 0x80091E84
0026 - 0x80091F74
0027 - 0x80091FF0
0028 - 0x8009206C