dragonbane

FLW1 and FLI1 (+MHint, Rpat Stuff)

Jan 17th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Flags: 7825
  2.  
  3. 150D0000
  4. FF000000
  5. 1F1F0400
  6.  
  7.  
  8. 7825
  9. 37.96
  10. 0000
  11.  
  12. 4BA
  13. 568: Input Flag = 25; 569: Output Flag = 78
  14.  
  15. 0x574
  16. 0x57C
  17.  
  18. 0x01 - 7F (global flags)
  19. 80 - BF (global flags2)
  20. C0 - DF (zone flags)
  21. E0 - FE (one zone flags)
  22.  
  23.  
  24. FLI1 Format:
  25.  
  26. Header Size: 16 Bytes
  27.  
  28. FLI1 Tag (4 Byte)
  29.  
  30. Tag+4: FLI1 Size aka offset to next (usually end of file) Table (4 Byte)
  31. Tag+8: Num Elements in Index Table (2 Byte)
  32. Tag+10: Usually 0x0800 (2 Byte)
  33. Tag+12: Padding (4 Byte)
  34.  
  35. Each Index in Table is 8 bytes
  36.  
  37. Index+0 = Msg Flow ID (2 bytes) (as provided by the SCOB entry under Unknown Param2/3)
  38. Index+4 = Start Node ID (2 bytes)
  39.  
  40.  
  41. FLW1 Format:
  42.  
  43. Header Size: 16 Bytes
  44.  
  45. FLW1 Tag (4 Byte)
  46.  
  47. Tag+4: FLW1 Size aka offset to next (usually FLI1) Table (4 Byte)
  48. Tag+8: Num Elements/Nodes in Table (2 Byte)
  49. Tag+10: Usually 0x0910 (2 Byte)
  50. Tag+12: Padding (4 Byte)
  51.  
  52. Each Node Entry is 8 bytes long
  53.  
  54. Tag+16 = Start of FLW1 Node Table
  55.  
  56. Start of FLW1 Node Table + (Node ID * 8) = Node Entry
  57.  
  58.  
  59. Node Entry+0 = Node Type (1 = Message Node, 2 = Branch Node, 3 = Event Node)
  60. Node Entry+1 = Control Byte (used by Branch/Event Node) (Event Node = mEventList Index)
  61. Node Entry+2 = Dynamic Offset1 (2 byte) (Message Node = points to a Message ID entry in the INF table) (Branch Node = mQueryList Index) (Event Node = Offset to associated Node ID in the bottom jump table)
  62. Node Entry+4 = Dynamic Offset2 (2 byte) (Message/Branch Node = Linked/Next Node ID or FFFF if final) (Event Node = Associated/Next Msg Flow ID)
  63. Node Entry+6 = Additional Offset (2 Byte) (only used by Branch Node it seems, is added to mQueryList result for bottom jump table lookup)
  64.  
  65. Start of FLW1 Node Table + (Num Nodes * 8) = Start of Node ID Jump Table (no header)
  66. Each entry in the jump table is 2 bytes long and just contains the Node ID to jump to
  67. No defined end, often contains a lot of garbage/deleted data at the very end
  68.  
  69. Start of Node ID Jump Table + (Associated Node ID Offset * 2) = Node ID entry in the jump table
  70.  
  71.  
  72.  
  73. 4(r28) //ptr to flw1 tag
  74. 8(r28) //ptr to fli1 tag
  75. 0xC(r28) //ptr to begin of flw1 index table
  76. 0x10(r28) //currently used node index table ID (2 byte)
  77. 0x14(r28) //ptr to begin of flw1 data table (num elements * 8)
  78. 0x18(r28) //ptr to end maybe? (ptr to flw1 data + (num elements * 2))
  79. 0x1C(28) //flow message id or global ID
  80. 0x20(28) //special msg id???
  81. 0x25(r28) //current node index (1 byte) (set to 1 now)
  82. 0x46(r28) //controls whether select or single msg is invoked
  83.  
  84. control codes for second byte of index node:
  85.  
  86. 0x09
  87. 0x13
  88. 0x20
  89. 0x21
  90. 0x15
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97. FLI1 Format (Flow Index):
  98.  
  99. Header Size: 16 Bytes
  100.  
  101. FLI1 Tag (4 Byte)
  102. Section Size (4 Byte)
  103. Num Elements in Table (2 Byte)
  104. Unknown (Usually 0x0800) (2 Byte)
  105. Padding (4 Byte)
  106.  
  107. Each Entry in Table is 8 bytes:
  108.  
  109. Msg Flow ID (2 bytes) (as provided by the SCOB entry under Unknown Param2/3)
  110. Start Node ID (2 bytes)
  111.  
  112.  
  113. FLW1 Format:
  114.  
  115. Header Size: 16 Bytes
  116.  
  117. FLW1 Tag (4 Byte)
  118. Section Size (4 Byte)
  119. Num Nodes in Table (2 Byte)
  120. Unknown (Usually 0x0910) (2 Byte)
  121. Padding (4 Byte)
  122.  
  123. Each Node Entry is 8 bytes long
  124.  
  125. Node Type (1 byte) (1 = Message Node, 2 = Branch Node, 3 = Event Node)
  126. Control Byte (1 byte) (used by Branch/Event Node) (Event Node refers to global mEventList)
  127. Dynamic Offset1 (2 byte) (Message Node = points to a Message ID entry in the INF table) (Branch Node refers to global mQueryList) (Event Node = Offset to associated Node ID in the bottom "jump" table)
  128. Dynamic Offset2 (2 byte) (Message/Branch Node = Linked/Next Node ID or FFFF if final) (Event Node = Associated/Next Msg Flow ID)
  129. Additional Offset (2 Byte) (only used by Branch Node it seems, is added to mQueryList result for bottom jump table lookup)
  130.  
  131. Game looks up entries here by doing: (Node ID * 8) + section start ptr = Node Entry
  132. Game accesses the jump table at the bottom by doing: (NumNodes * 8) + section start ptr = Beginning of the jump table (no header)
  133.  
  134. Each entry in the jump table is 2 bytes long and just contains the Node ID to jump to
  135. No defined end, often contains a lot of garbage/deleted data at the very end
  136.  
  137. Entries in the jump table are accessed by doing: (Associated Node ID Offset * 2) + jump table start ptr = Node ID entry in the jump table
  138.  
  139.  
  140.  
  141.  
  142.  
  143. Mhint:
  144. FFFFFFFF (FF = Type, FFFFFF = identifier) (FF Type is instant activation when in trigger, 7F triggers with Z button)
  145. Unknown1: 7741 (77 = Flag to set when dialog is done, 41 = Flag that activates/deactivates the trigger)
  146. RotationY: Event ID, Generic Event ID
  147. Unknown2: Dialog Flow ID
  148.  
  149. Wljump: Wolf Jump
  150. Parameters: 000F2145 (000F = identifier, 21 = activation flag, 45 = RPAT ID (from 0 to end of RPAT list)
  151.  
  152. RPAT Group Entry:
  153.  
  154. numPoints: num of RPPN path nodes in this group
  155. Unk1: FFFF
  156. Unk2: FF
  157. Unk3: 00
  158. firstEntryOffset: Offset to first RPPN path node. All the others have to follow behind! 0x0 refers to the first RPPN node in the table
  159.  
  160. Midna Jumps (RPPN path nodes):
  161.  
  162. 3201FF00 Z trigger /init or 4BFFFF00 or 14FFFF05
  163.  
  164. folgt 1401FF00 nodes and 1400FF00 and 0A01FF00
  165.  
  166. 0001FF00 finished (or 00FFFF00) (or 00FFFF01)
Add Comment
Please, Sign In to add comment