Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Notes on FE13/14 Event Files
- First 0xC Bytes don't change. Altering probably breaks something so don't touch.
- At 0xC is a pointer to the name of the file.
- At 0x1C is a pointer to the list of pointers that point to each event.
- 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.
- Event Pointer Table.
- The event pointer table is what 0x1C points to.
- It is a list of pointers that point to the actual events.
- Can hold as many or as little but must end with a zero pointer to signify the end of the table(probably).
- Actual Events.
- The first four bytes is a pointer to the beginning of the event. Should correspond to the pointer in the event table.
- Next four points to the start of the events.
- 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.
- Next four is what event ID it is. Corresponds to the placement in the event table.
- 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).
- 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).
- When calling an event command, it'll end with XX 21. XX represents the number of inputs it takes in.
- Usually when an event is called that checks an ID like [ev::GetUnitByPID], the called PID is before the event.
- 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.
- Loading units on the map is usually done by calling an ID from the data/dispos/(corresponding chapter file).bin.lz file.
- 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.
- Events will always end with 0x54.
- 46 [Event ID] 21 - Goes to that event. If you want to pass variables to that event, put them before this command.
- 07 [TempID] [Whatever you want stored]
- 01 [TempID] //Use whatever you stored here.
- Types of events.
- Mainly for fates.
- The bytes at 0x4 in the event header indicate what type of event it is.
- 0000 0000 - Plays after every action? Usually used to check if something has happened.
- 0600 0000 -Usually used to set up flags, probably does this before any events start
- 0700 0000 -Used to set up the map. Does it right before the chapter starts? It's after the opening event
- 0800 0000 -Sets up chapter things? Skip prep screen, exp value etc //Right before battle preperations but after opening events
- 0b00 0000 -Last thing the chapter does? Removes everything
- 0c00 0000 -Opening events
- 0f00 0000 -Ending Events
- 1003 0000 -Turn event
- 1706 0100 -Talk Event
- 1406 0000 - Some kind of after event?
- 1806 0000 - Battle Convo
- 1B04 0000 - Death Quote
- [Event type] [can accept this many variables] [uses these many varies] [???]
- Header for events(Size 0x18):
- 0x00 - 0x03: Offset for events
- 0x04 - 0x07: Position of the start of events
- 0x08 - 0x0b: Event Type
- 0x0c - 0x0f: Event ID
- 0x10 - 0x13: Location of where the event name is. If not needed all zeros.
- 0x14 - 0x17: position of "Sub header"//will be the position of the start of events if no 'sub header'
- Sub header for Talk/Battle convo events(Size 0x18):
- Location of Character 1
- four 00 bytes
- Location of character 2
- four 00 bytes
- 01 00 00 00 ?
- Location of flag
- Sub header for Death Convo(Size 0x10):
- Location of Dead Character
- 01 00 00 00
- Location of Killer// Point to a 00 if non-specific death quote
- FF FF FF FF
- Sub header for Turn events(Size 0xc):
- Starting turn
- Ending turn
- 00 00 00 00(Possibly phases.)
- Sub header for the after Event(Size 0x18):
- FF FF FF FF
- FF FF FF FF
- FF FF FF FF
- FF FF FF FF
- Pointer to the event name
- ev::ChapterSetWinRuleEnemyNumberLessThanOrEqualTo - 19 [Number of units] 47 [Event] 01 21
- ev::FadeIn /ev::FadeOut - 19 03 19 00 1A 00 FA 47 [Event] 03 21
- ev::UnitGetByPID - 07 [TempID] 1D [PID] 47 [Event] 01 23
- 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
- ev::UnitMovePosition - 01 [TempID] 19 [XCoor] 19 [YCoor] 19 00 47 [Event] 04 21
- ev::CameraSetPosition - 19 [Xcoor] 19 [YCoor] 47 [Event] 02 21
- ev::Dispos - 1D [Team Label] [Variable] [Event] 02 21
- ev::UnitTransferByIndex - 01 [TempId] 19 [Value] 02 21
- ev::contentsSetFlag - 1A [Value*] 47 01 21 //This is like permanent event Ids. Will persist through after the map.
- *Value is two bytes long.
- Values for ev::UnitTransferByIndex:
- 00 - Player Team
- 01 - Enemy Team
- 02 - NPC?
- 05 - Reserve Player Team
- Variables for Dispos:
- 19 04 // Pop in map
- 19 08 // Walk/Run in map
- 1A 04 08 // Warp into map
- Attack Setup for ev::Battle
- 07 [TempID] 1A 02 41 23 \\ Critical Attack
- 07 [TempID] 19 21 23 \\ Normal Attack First character
- 07 [TempID] 19 22 23 \\ Normal Attack Second character
- 07 [TempID] 19 12 23 \\ Miss Second character
- 07 [TempID] 1A 00 81 23 \\ Dual Guard First Character
- 07 [TempID] 1A 00 82 23 \\ Dual Guard Second Character
- 07 [TempID] 19 00 23 \\ End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement