Author Topic: Location Triggers - Decoded  (Read 1480 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Location Triggers - Decoded
« on: July 03, 2012, 05:06:33 PM »
These past few days have been spent completing the Location Triggers.txt created by Yousei and improved upon by Phoenix. In this there is every treasure, map loading, and event in the game for simple and easy modification without having to use external tools to find addresses and the like. The addresses are all present right there, but you will need to use a tool like FFIV Tools to move treasure chests to their new location.

In finishing up this project I used Zyrthofar's map viewer Extensively, since it shows you what is inside each treasure chest and what (hex number) map tiles lead where. In addition to discovering all of the Location Trigger Events and other assorted things was done through FF4kster so I could easily change events and add flags and the like to test certain Required Event Flag - Tile Events.


If you have any questions I'll do the best to answer them, but in the meantime here it is. I hope that this will be of help to PinkPuff in creating a comprehensive and well detailed FFIV Editor.

Oh, before I forget here are the Location Trigger Event Order (since they differ substantially from the normal event order).




Events according to Map Location Triggers -
(*REF - Required Event Flag)
00 -(0B) Open a door (or rather turn 4 tiles into other tiles)
01 -(0B)Same as above it appears
02 - Nothing?
03 - (REF?) Baigan?
04 -(14)Rosa meeting with Cecil in Hallway.
05 -(15) Cecil sleeping, Prologue
06 -(1C) Devil's Road sealed from Mysidia's side.
07 -(17)"Sealed with Unknown Power."
08 -(18) Finding Odin before Land of Monsters.
09 -(27) Message 02 Bank call (00)(Likely Mist Dragon's warnings)
0A -(28) Message 02 Bank call (01)(Likely Mist Dragon's warnings)
0B -(2F)Mist Dragon Dialogue/Battle
0C -(30)Mist Events
0D -(39)Kaipo Events, Rydia Joining
0E -(3C) Waterfall Events
0F -(3D) Octomamm Battle
10 -(42) Redwings Bombing Damcyan
11 -(43)Tellah Fighting Edward, Edward joining
12 -(45)Antlion Battle
13 -(46)(REF 17)Rydia Melting Mt. Hobs Ice, Learning Fire 1 (This was previously "Nothing?" until I realized that some of the tile events were missing. Some tile events require Event Flags to activate, as such I'm not sure what each event flag corresponds to, therefore many of these will likely incorrectly remain "Nothing?")
14 -(47)Yang joining, Mombomb Battle
15 -(48)Fabul Battle
16 -(11)Meeting with Cid
17 -(31)Watery Cave Save Events
18 - Step on Switch (to Open Door)
19 -(52)(REF 27)Discussion about Rescuing Rosa
1A -(5F)(REF 28)Mt. Ordeals Fire put out by Palom
1B -(60)Meeting Tellah on Mt. Ordeals
1C - Message 02 Bank Call (00) (Porom confusing Milon for Palom?)
1D - Message 02 Bank Call (01) (second occurrence of Milon hissing?)
1E -(61)Milon battle first time
1F -(62)Cecil's transformation, Tellah remembering spells
20 -(65)Serpent Road from Mysidia to Baron
21 -(63)Milon battle second time
22 -(6A)Warp to Shrinking Hallway South (Seems to disable guard.)
23 -(6C)Warp to Shrinking Hallway North (Disables guard)
24 -(71)Meeting Edward in Toroia; Receiving Twin Harp
25 - Message 02 Bank Call (00) Tellah telling Cecil to rest up outside.
26 -(79)Magus Sisters' Battle
27 -(7A)Top of Tower of Zot Events
28 -(7C)(REF 12) Barbariccia Battle, Dark Crystals Discussion
29 - Seeing Rosa sick in Kaipo (This is a strange one. In the event files themselves I couldn't find this event. Something I'm missing?)
2A - Magnus Cave entering message
2B - Nothing?
2C - (4A) Returning Earth Crystal?
2D - Nothing?
2E - (93)(REF 5)Load Old Waterway B1
2F - Entering the underworld in the airship, getting shot down
30 - Meeting Giott, Calbrena Battle, Rydia rejoining
31 - Exiting the Tower of Zot
32 - Sleeping in the King's bed. (Resting for Free in Fabul)
33 - Dr. Lugae battles
34 - Super Cannon destruction, Yang leaves
35 - (96)(REF 25) Jumping from Tower of Babil, airship escape
36 - Explosions at right side of screen?
37 - Edge joining, Rubicant Battle
38 - (9B) Edge ninjaing through the Tower of Babil wall.
39 - (A0) Ninjaing back out of the Tower of Babil.
3A - Fighting Edge's Parents
3B - Falling to the Underground
3C - (F4)Portal to the Tower of Wishes.
3D - (F6)Portal to the Northern door of the Mysidia Crystal Room.
3E - (A5)Finding the Falcon
3F - (A7) (REF 56) Cid Meeting Edge, putting on Heat Shield
40 - (A9) "I came here on my way..." at Summon Monster Cave entrance.
41 - (B0) Going down rope
42 - (B1) Going up rope
43 - (B5) Going down rope, then coming back up.
44 - (B3) Going down rope, toggle visibility
45 - (B4) Going up rope, toggle visibility
46 - (B5) Looks the same, could be wrong.
47 - (AA) (REF 64)Demon Wall Battle
48 - (B6) (REF 64)Kain Stealing the Dark Crystal and Leaving
49 - Nothing?
4A - (D0) Meeting FuSoYa and having him join.
4B - (7D) HP Restoring Pot (Tile)
4C - (7E) MP Restoring Pot (Tile)
4D - (DC) "Sealed with unknown power": Crystal Room panel
4E - Nothing?
4F - (ED) Element Fiends Battle
50 - (FC) Obtaining the Ribbon
51 - (E6) Battling the CPU, FuSoYa leaving with Golbez.
52 - (E8) Load Big Whale
53 - (EB) Resting for free (Enertron recovery)
54 - (??) Load Big Whale (from the entrance)
55 - (E7) Zeromus Battle, Ending Events
56 - (04) Battle with Behemoth in Bahamut's Cave
57 - (05) Battle with Behemoth in Bahamut's Cave
58 - (06) Entering Tower of Babil
59 - (F3) Battle with Behemoth in Bahamut's Cave
5A - Nothing?
5B - Nothing?
5C - Nothing?
5D - Nothing?
5E - Nothing?
5F - Nothing?
« Last Edit: July 06, 2012, 02:47:45 PM by Grimoire LD »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Location Triggers - Decoded (for the most part)
« Reply #1 on: July 06, 2012, 02:41:08 PM »
That first part of the post isn't very accurate. It turns out that Phoenix also knocked those out of the way with a much more empirical method than "Test and see" but by finding the data. So here's a more accurate portrayal of tile events and what and when they link to their tiles.


Phoenix's Info on Event Triggers

(*REF - Required Event Flag)

======================================================================================
Event Triggers                                             Phoenix Hacks
                                                   12/22/09
(Filled out in 2012 by Grimoire LD)

======================================================================================

Map tile triggers reference event triggers. The pointers for these triggers are
located from 97460 to 9765F. To find where these point, reverse the bytes and
add 0x97660. The event trigger data is located from 97660 to 9785F.

======================================================================================
FFxx = Load event xx
FEaa = If event flag aa is set...
aa = If event flag aa is clear...

Examples:
aaFFxxFFyy = If event flag aa is clear, then load event xx, else load event yy
FEaabbFFxxFEccFFyyFFzz = If event flag aa is set and bb is clear, then load event xx,
          else if event flag cc is set, load event yy, else load event zz

The event trigger data, like the NPC speech data, utilizes events numbers 01-03,
which are EE message calls: "Show message [hex data xx following event call] (from bank 2)"
For example, the Old Man wandering in the town of Baron has the following data (at 99EDE-99EEA):
   FE 06 FF 03 FE 0B FF 02 FF 01 03 04 05
This translates to:
   Data      Meaning
   --------   ------------------------
   FE 06      If event flag 06 is set,
   FF 03      load event 03 (i.e. message call EE 02 = message 05 of bank 2)
   FE 0B      (else) if event flag 0B is set,
   FF 02      load event 02 (i.e. message call EE 01 = message 04 of bank 2)
   FF 01      (else) load event 01 (i.e. message call EE 00 = message 03 of bank 2)
   03 04 05   [Hex data following event call]
======================================================================================


##   Offset   Pntr   Data
--   ------   ----   -----
00   97660      0000   FF 0B (Door)
01   97660      0000   FF 0B (Door)
02   97662      0200   FF 00 (Nothing)
03   97664      0400   FE 0B 09 FF 1A FF 00 (REEF11"0B" Baigan Battle, REF09 Kill event. )
04   9766B      0B00   22 FF 14 FF 00 (Rosa Greeting Cecil, REF34"22" Kill event.)
05   97670      1000   04 FF 15 FF 68 (Cecil Sleeping Prologue, REF04 Resting in Bed)
06   97675      1500   0B FF 1C FF 1E (Sealed Serpent Road, REF11"0B" Open Serpent Road)
07   9767A      1A00   FE 06 FF 00 FF 17 (Sealed with unknown power, REF06" Kill event.)
08   97680      2000   08 FE 3F FF 19 28 FF 18 FF 00(REF40"28"..., Finding Odin before Land of Summons, REF63"3F" Odin Battle, REF08 Kill event.) 
09   9768A      2A00   0D FF 27 FF 00 (Mist Dragon Warnings - Show bank 2 message00, REF13"0D" Kill event.)
0A   9768F      2F00    0D FF 28 FF 00 (Mist Dragon Warnings - Show bank 2 message01, REF12"0D" Kill event.
0B   97694      3400   0D FF 2F FF 00 (Mist Dragon Battle, REF13"0D" Kill event.)
0C   97699      3900   0E FF 30 FF 00 (Mist events, REF14"0E" Kill event.)
0D   9769E      3E00   0F FF 39 FF 00 (Kaipo events-Rydia Joining, REF15"0F" Kill event.)
0E   976A3      4300   13 FF 3C FF 3E (Watery Cave Waterfall events, REF19"13" The current is too strong!)
0F   976A8      4800   13 FF 3D FF 00 (Octomamm Battle, REF19"13" Kill event.)
10   976AD      4D00   14 FF 42 FF 00 (Redwings bombing Damcyan, REF20"14" Kill event.)
11   976B2      5200   27 FF 43 FF 00 (Tellah fighting Edward-Edward joining, REF39"27" Kill event.)
12   976B7      5700   12 FF 45 FF 00 (Antlion Battle, REF18"12" Kill event.)
13   976BC      5C00   FE 11 15 FF 46 FF 00 (REF17"11"Rydia melting Mt Hobs Ice, REF21"15" Kill event.)
14   976C3      6300   16 FF 47 FF 00 (Yang joining-Mombomb Battle, REF22"16" Kill event.)
15   976C8      6800   1B FF 48 FF 00 (Fabul Battle, REF27"1B Kill event.)
16   976CD      6D00   FE 03 FF 00 FF 11 (Cid Greeting Cecil, REF03 Kill event.)
17   976D3      7300   17 FF 31 FF 00 (Watery Cave save events, REF22"17" Kill event.)
18   976D8      7800   FF 0B (Open a door)
19   976DA      7A00   FE 1B 2C FF 52 FF 00 (REF27"1B" Discussion about Rescuing Rosa, REF44"2C" Kill event.)
1A   976E1      8100   FE 1C 1D FF 5F FF 00 (REF28"1C"Mount Ordeals Fire put out by Palom, REF29"1D" Kill event.)
1B   976E8      8800   1E FF 60 FF 00 (Meeting Tellah on Mt. Ordeals, REF30"1E" Kill event.)
1C   976ED      8D00   1F FF 27 FF 00 ((Milon's Hiss)Show bank 2 message 0, REF31"1F" Kill event.)
1D   976F2      9200   1F FF 28 FF 00 ((Milon's Hiss)Show bank 2 message 1, REF31"1F Kill event.)
1E   976F7      9700   1F FF 61 FF 00 (Milon Battle, REF31"1F" Kill event.)
1F   976FC      9C00   0B FF 62 FF 00 (Cecil becomes a Paladin, REF11,"0B" Kill event.)
20   97701      A100   FF 65 (Serpent Road to Baron)
21   97703      A300   20 FF 63 FF 00 (Second Milon Battle, REF32"20" Kill event.)
22   97708      A800   FE 06 FF 6B FF 69 (REF06 Load Shrinking Hallway (1), Load Shrinking Hallway (3))
23   9770E      AE00   FE 06 FF 6C FF 6A (REF06 Load Shrinking Hallway (4), Load Shrinking Hallway (2))
24   97714      B400   24 25 FF 71 FE 23 25 2F FF 72 FF 00(Edward in Troia receiving TwinHarp, REF36"24" Returning to Troia after defeating the Dark Elf, ?REF37?"25" Kill event.)
25   97720      C000   57 FF F2 FF 00 (Watery Pass-North exiting message from Tellah, REF87"57" Kill event.)
26   97725      C500   2A FF 79 FF 00 (Magus Sisters Battle, REF42"2A" Kill event.)
27   9772A      CA00   2F FF 7A FF 00 (Top of Tower of Zot events, REF47"2F" Kill event.)
28   9772F      CF00   FE 0C FF 7C FF 00 (REF12"0C" Valvalis Battle-Dark Crystals discussion, Kill event.)
29   97735      D500   02 FF 51 FF 00 (Rosa Sick in Kaipo, REF02 Kill event.)
2A   9773A      DA00   2D FF 7F FF 00 (Magnus cave entering Message, REF45"2D" Kill event.)
2B   9773F      DF00   FE 2C 18 FF 83 FF 00 (REF44"2C" Sailing from Fabul-Leviathan attack, REF24"18" Kill event.)
2C   97746      E600   31 FE 23 FF 4A FF 00 (REF35"23"Toroia Clerics event(after obtaining Earth Crystal), REF49"31" Kill event.)
2D   9774D      ED00   0C 26 FE 31 FF 66 0C FE 26 FE 31 FF 8D FF 00 (REF49"31" Boarding the Airship, entering Tower of Zot first time, REF38"26" Entering the Tower of Zot subsequent times, REF12"0C" Kill event.)
2E   9775C      FC00   FE 05 FF 93 FF 00 (REF05 Load Old Waterway (In back of Baron Castle Moat), Kill event.
2F   97762      0201   07 32 FF 8B FF 00 (REF07 Entering the Underworld in the airship-being shot down, REF50"32" Kill event.)
30   97768      0801   FE 3B 3D FF C5 FE 38 3A FF A6 07 FF 8C FF 00 (REF59"3B" Talking to Giott-attaching Drill, REF56"38" Obtaining the Luca Key, Meeting Giott-Calbrena-Rydia Rejoining, REF3D"61"-REF58"3A" Kill event.)
31   97777      1701   FF 8E (Exiting Tower of Zot)
32   97779      1901   FF 67 (Resting for Free in Fabul)
33   9777B      1B01   33 FF 94 FF 00 (Dr. Lugae Battles, REF51"33" Kill event.)
34   97780      2001   19 FF 95 FF 00 (Super Cannon Destruction-Yang Leaves, REF25"19")
35   97785      2501   FE 19 0A FF 96 FF 00 (REF25"19" Jumping from Tower of Babil, Airship escape, REF10"0A" Kill event)
36   9778C      2C01   0A FF FE FF 00 (Visual effect 36 (Dwarves bombing Tower, REF10"0A" Kill event.)
37   97791      3101   34 FF 9A FF 00 (Edge Joining-Rubicant Battle, REF52"34" Kill event.
38   97796      3601   FF 9B (Ninjaing through Tower of Babil Wall entrance)
39   97798      3801   FF A0 (Ninjaing through Tower of Babil Wall exit)
3A   9779A      3A01   53 FF A1 FF 00 (Fighting Edge's Parents, REF83"53" Kill event.)
3B   9779F      3F01   FF A2 (Falling to the Underground)
3C   977A1      4101   FE 48 FF F5 FF F4 (REF72"48" Tower of Wishes with Yang, Cid, Edward praying, Tower of Wishes)
3D   977A7      4701   FF F6 (Load Mysidia Crystal Room)
3E   977A9      4901   FF A5 (Finding the Falcon) (So what this means is if you cheat your way back into the tower you can reacquire the Falcon again)
3F   977AB      4B01   FE 38 39 FF A7 FF 00 (REF56"38" Cid Meeting Edge-Heat Shield, REF57"39" Kill event.)
40   977B2      5201   3F FF A9 FF 00 ("I came here on my way..." Summon Monster Cave, REF63"3F" Kill event.)
41   977B7      5701   FF B0 (Climbing rope down)
42   977B9      5901   FF B1 (Climbing rope up)
43   977BB      5B01   FF B5 (Climbing rope down than up)
44   977BD      5D01   FF B3 (Climbing rope down, toggle visibility)
45   977BF      5F01   FF B4 (Climbing rope  up, toggle visibility)
46   977C1      6101   FF B5 (Climbing rope down than up (repeat? why?)
47   977C3      6301   FE 40 41 FF AA FF 00 (REF64"40" Demon Wall Battle, REF65"41" Kill event.)
48   977CA      6A01   FE 40 3B FF B6 FF 00 (REF64"40" Kain stealing the Dark Crystal, REF59"3B" Kill event.)
49   977D1      7101   FE 3D 43 FF 9E FF 00 (REF61"3D" Big Whale Surfacting, REF67"43" Kill event.)
4A   977D8      7801   47 FF D0 FF 00 (Meeting FuSoYa and him joining, REF67"43" Kill event.)
4B   977DD      7D01   FF 7D (HP Restoring Pot)
4C   977DF      7F01   FF 7E (MP Restoring Pot)
4D   977E1      8101   FE 48 FF DD FF DC (REF72"48" Entering the Lunar Subterrane, "Sealed with Unknown Power"
4E   977E7      8701   FE 47 48 FF 9D FF 00 (REF71"47" Giant of Babil events, REF72"48" Kill event.))
4F   977EE      8E01   49 FF ED FF 00 (Element Fiends Battle, REF73"49" Kill event.)
50   977F3      9301   55 FF FC FF 00 (Obtaining the Ribbon, REF92"5C" Kill event.)
51   977F8      9801   FF E6 (Giant of Babil CPU Battle-FuSoYa and Golbez leaving)
52   977FA      9A01   FF E4 (Load Big Whale)
53   977FC      9C01   FF EB (Enertron Recovery "Resting for Free")
54   977FE      9E01   FF E8 (Load Big Whale-activate Baron Black Chocobo?
55   97800      A001   FF E7 (Zeromus Battle-ending events)
56   97802      A201   51 FF 04 FF 00 (Behemoth in Bahamut's Cave(1), REF81"51" Kill event.)
57   97807      A701   52 FF 05 FF 00 (Behemoth in Bahamut's Cave(2), REF82"52" Kill event.)
58   9780C      AC01   FE 3B FF 00 FF 06 (REF59"3B" Kill event?, Entering Tower of Babil)
59   97812      B201   50 FF F3 FF 00 (Behemoth in Bahamut's Cave 3, REF80"50" Kill event)
5A    97817      B701   FF (Blank)