BFEVFL: Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>Leoetlino No edit summary |
imported>Leoetlino No edit summary |
||
Line 1: | Line 1: | ||
<onlyinclude>'''bfevfl''' is a binary file format for [[Event flow|'''ev'''ent '''fl'''ows]].</onlyinclude> | <onlyinclude>'''bfevfl''' is a binary file format for [[Event flow|'''ev'''ent '''fl'''ows]].</onlyinclude> In ''Breath of the Wild'' and other Nintendo games such as Splatoon 2, binary event flows are parsed by Nintendo's EventFlow/evfl library. | ||
== Structures == | == Structures == | ||
Line 52: | Line 52: | ||
| 0x40 || Dictionary* || Timeline name dictionary | | 0x40 || Dictionary* || Timeline name dictionary | ||
|} | |} | ||
Note: 0x0-0x20 are just a standard ore::BinaryFileHeader (which is identical to nn::util::BinaryFileHeader). | |||
=== Relocation table === | === Relocation table === | ||
(The official name for this structure in the EventFlow library is ore::RelocationTable.) | |||
{|class="wikitable" | {|class="wikitable" | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
Line 97: | Line 101: | ||
=== String pool === | === String pool === | ||
(The official name for this structure in the EventFlow library is ore::StringPool.) | |||
The string pool starts with the <code>STR </code> magic and contains 2-byte aligned strings. The magic is not checked at all since strings are directly referred to using pointers. | The string pool starts with the <code>STR </code> magic and contains 2-byte aligned strings. The magic is not checked at all since strings are directly referred to using pointers. | ||
All strings in the pool are Pascal | All strings in the pool are Pascal strings, i.e. length-prefixed strings. The length is an unsigned 16 bit integer. Strings are stored in reverse order of their binary representation. | ||
=== Dictionary === | === Dictionary === | ||
(The official name for this structure in the EventFlow library is ore::ResDic.) | |||
A dictionary is a data structure that is used to quickly look up the index of an element based on its name. Thus, they are always used in conjunction with an array of elements. However, the way the dictionary and the array are associated depends on the structure. | A dictionary is a data structure that is used to quickly look up the index of an element based on its name. Thus, they are always used in conjunction with an array of elements. However, the way the dictionary and the array are associated depends on the structure. | ||
Line 145: | Line 153: | ||
=== Container === | === Container === | ||
(The official name for this structure in the EventFlow library is ore::ResMetadata.) | |||
Containers are key-value mappings with keys being strings. A [[#Dictionary]] is used to store keys. | Containers are key-value mappings with keys being strings. A [[#Dictionary]] is used to store keys. | ||
Line 234: | Line 244: | ||
=== Actor === | === Actor === | ||
(The official name for this structure in the EventFlow library is evfl::ResActor.) | |||
{|class="wikitable" | {|class="wikitable" | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
Line 255: | Line 267: | ||
| 0x34 || u16 || Entry point index for associated entry point (0xffff if none) | | 0x34 || u16 || Entry point index for associated entry point (0xffff if none) | ||
|- | |- | ||
| 0x36 || | | 0x36 || u8 || Cut number? This is set to 1 for flowcharts. Timeline actors sometimes use a different value here. {{check}} | ||
|- | |||
| 0x37 || u8 || Padding | |||
|} | |} | ||
=== Event === | === Event === | ||
==== EventType enum ==== | ==== EventType enum ==== | ||
(The official name for this enum in the EventFlow library is evfl::ResEvent::EventType::Type.) | |||
{|class="wikitable" | {|class="wikitable" | ||
! Value !! Name !! Description | ! Value !! Name !! Description | ||
Line 275: | Line 290: | ||
==== Main event structure ==== | ==== Main event structure ==== | ||
(The official name for this structure in the EventFlow library is evfl::ResEvent.) | |||
{|class="wikitable" | {|class="wikitable" | ||
!rowspan=2|Offset | !rowspan=2|Offset | ||
Line 302: | Line 318: | ||
=== Entry point === | === Entry point === | ||
(The official name for this structure in the EventFlow library is evfl::ResEntryPoint.) | |||
{|class="wikitable" | {|class="wikitable" | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
Line 307: | Line 324: | ||
| 0x0 || u16* || Sub flow event indices | | 0x0 || u16* || Sub flow event indices | ||
|- | |- | ||
| 0x8 || | | 0x8 || Dictionary* || VariableDef names (parsed by the evfl lib, but unused by BotW) | ||
|- | |- | ||
| 0x10 || | | 0x10 || VariableDef* || VariableDefs (parsed by the evfl lib, but unused by BotW) | ||
|- | |- | ||
| 0x18 || u16 || Number of sub flow event indices | | 0x18 || u16 || Number of sub flow event indices | ||
|- | |- | ||
| 0x1a || u16 || | | 0x1a || u16 || Number of variable definitions | ||
|- | |- | ||
| 0x1c || u16 || Main event index | | 0x1c || u16 || Main event index | ||
|- | |- | ||
| 0x1e || u16 || Padding | | 0x1e || u16 || Padding | ||
|} | |} | ||