Advertisement
Tildehat

Event Notes

Jan 4th, 2016
832
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.06 KB | None | 0 0
  1. Notes on FE13/14 Event Files
  2.  
  3. First 0xC Bytes don't change. Altering probably breaks something so don't touch.
  4. At 0xC is a pointer to the name of the file.
  5. At 0x1C is a pointer to the list of pointers that point to each event.
  6. At 0x20 are bytes that correspond to how labels are read in the file. Take the bytes, reverse them then subtract that to where the label is. Eg. In the X012.cmb file(Morgan twins paralogue) The label "MID_X012_OP_Female" is located at 0x9FF. The bytes are 0x20 reversed are 0x97A. Subtracting those two gets 0x85. Search for 0x0085 to get where this label is called in the event file.
  7.  
  8. Event Pointer Table.
  9. The event pointer table is what 0x1C points to.
  10. It is a list of pointers that point to the actual events.
  11. Can hold as many or as little but must end with a zero pointer to signify the end of the table(probably).
  12.  
  13. Actual Events.
  14. The first four bytes is a pointer to the beginning of the event. Should correspond to the pointer in the event table.
  15. Next four points to the start of the events.
  16. Next four seem to change what type of event it is. 12 04 01 00 seems to be a talk event. Need to research this more.
  17. Next four is what event ID it is. Corresponds to the placement in the event table.
  18. Next four is either a pointer to the name of the event(can be anything) or something else. Depends on what kind of event it is(also need to research).
  19. Once you get to the actual events it's mostly just pointers to the label with the subtraction rule applied. 0x47 signifies calling an "event"(like ev::Talk) while 0x1D signifies calling an "ID"(Like a PID or MID).
  20. When calling an event command, it'll end with XX 21. XX represents the number of inputs it takes in.
  21. Usually when an event is called that checks an ID like [ev::GetUnitByPID], the called PID is before the event.
  22. Can do conditions. I think it starts out with the two bytes 0x01 and 0x4C. They following two bytes is the amount of bytes that the game should skip when reading the events if the condition is not met. After those two bytes follows whatever you want to call if the condition is met. At the end a 0x49 will signify the end of the condition and proceed to skip the amount of bytes listed after 0x49. Usually what's skipped is what is called if the if condition fails.
  23. Loading units on the map is usually done by calling an ID from the data/dispos/(corresponding chapter file).bin.lz file.
  24. You can add as many flags as you want and can load them any time. Flags can be named anything and they are set in the game by using the [ev::FlagEntry] code. Switching the flag on and off is done by the [ev::FlagSet] code. Look at examples from the game to see how to do this. Flags are usually there for talk conversations(game doesn't want you to activate that more than once.), battle conversations and maybe some other things. You can get creative with this.
  25. Events will always end with 0x54.
  26.  
  27. 46 [Event ID] 21 - Goes to that event. If you want to pass variables to that event, put them before this command.
  28. 07 [TempID] [Whatever you want stored]
  29. 01 [TempID] //Use whatever you stored here.
  30.  
  31.  
  32. Types of events.
  33. Mainly for fates.
  34. The bytes at 0x4 in the event header indicate what type of event it is.
  35. 0000 0000 - Plays after every action? Usually used to check if something has happened.
  36. 0600 0000 -Usually used to set up flags, probably does this before any events start
  37. 0700 0000 -Used to set up the map. Does it right before the chapter starts? It's after the opening event
  38. 0800 0000 -Sets up chapter things? Skip prep screen, exp value etc //Right before battle preperations but after opening events
  39. 0b00 0000 -Last thing the chapter does? Removes everything
  40. 0c00 0000 -Opening events
  41. 0f00 0000 -Ending Events
  42. 1003 0000 -Turn event
  43. 1706 0100 -Talk Event
  44. 1406 0000 - Some kind of after event?
  45. 1806 0000 - Battle Convo
  46. 1B04 0000 - Death Quote
  47.  
  48. [Event type] [can accept this many variables] [uses these many varies] [???]
  49.  
  50.  
  51. Header for events(Size 0x18):
  52. 0x00 - 0x03: Offset for events
  53. 0x04 - 0x07: Position of the start of events
  54. 0x08 - 0x0b: Event Type
  55. 0x0c - 0x0f: Event ID
  56. 0x10 - 0x13: Location of where the event name is. If not needed all zeros.
  57. 0x14 - 0x17: position of "Sub header"//will be the position of the start of events if no 'sub header'
  58.  
  59. Sub header for Talk/Battle convo events(Size 0x18):
  60. Location of Character 1
  61. four 00 bytes
  62. Location of character 2
  63. four 00 bytes
  64. 01 00 00 00 ?
  65. Location of flag
  66.  
  67. Sub header for Death Convo(Size 0x10):
  68. Location of Dead Character
  69. 01 00 00 00
  70. Location of Killer// Point to a 00 if non-specific death quote
  71. FF FF FF FF
  72.  
  73. Sub header for Turn events(Size 0xc):
  74. Starting turn
  75. Ending turn
  76. 00 00 00 00(Possibly phases.)
  77.  
  78. Sub header for the after Event(Size 0x18):
  79. FF FF FF FF
  80. FF FF FF FF
  81. FF FF FF FF
  82. FF FF FF FF
  83. Pointer to the event name
  84.  
  85. ev::ChapterSetWinRuleEnemyNumberLessThanOrEqualTo - 19 [Number of units] 47 [Event] 01 21
  86. ev::FadeIn /ev::FadeOut - 19 03 19 00 1A 00 FA 47 [Event] 03 21
  87. ev::UnitGetByPID - 07 [TempID] 1D [PID] 47 [Event] 01 23
  88. ev::Battle - 01 [TempID of Main unit] 19 [TempID of backup] 01 [TempID of main unit] 19 [TempID of backup] 19 00 09 [TempID of attacks] 47 [Event] 05 21
  89. ev::UnitMovePosition - 01 [TempID] 19 [XCoor] 19 [YCoor] 19 00 47 [Event] 04 21
  90. ev::CameraSetPosition - 19 [Xcoor] 19 [YCoor] 47 [Event] 02 21
  91. ev::Dispos - 1D [Team Label] [Variable] [Event] 02 21
  92. ev::UnitTransferByIndex - 01 [TempId] 19 [Value] 02 21
  93. ev::contentsSetFlag - 1A [Value*] 47 01 21 //This is like permanent event Ids. Will persist through after the map.
  94. *Value is two bytes long.
  95.  
  96. Values for ev::UnitTransferByIndex:
  97. 00 - Player Team
  98. 01 - Enemy Team
  99. 02 - NPC?
  100. 05 - Reserve Player Team
  101.  
  102. Variables for Dispos:
  103. 19 04 // Pop in map
  104. 19 08 // Walk/Run in map
  105. 1A 04 08 // Warp into map
  106.  
  107. Attack Setup for ev::Battle
  108. 07 [TempID] 1A 02 41 23 \\ Critical Attack
  109. 07 [TempID] 19 21 23 \\ Normal Attack First character
  110. 07 [TempID] 19 22 23 \\ Normal Attack Second character
  111. 07 [TempID] 19 12 23 \\ Miss Second character
  112. 07 [TempID] 1A 00 81 23 \\ Dual Guard First Character
  113. 07 [TempID] 1A 00 82 23 \\ Dual Guard Second Character
  114. 07 [TempID] 19 00 23 \\ End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement