<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://zeldamods.org/w_la/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Glan</id>
	<title>ZeldaMods (Link&#039;s Awakening) - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://zeldamods.org/w_la/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Glan"/>
	<link rel="alternate" type="text/html" href="https://zeldamods.org/las/Special:Contributions/Glan"/>
	<updated>2026-04-22T16:11:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=711</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=711"/>
		<updated>2021-11-05T07:20:01Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening. This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
Note that many properties in these files define measurements in 3D space (X, Y, Z). X is horizontal across the screen, Y is perpendicular to the ground (the axis on which gravity acts), and Z is vertical across the screen.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
Holds 3 bytes of data, which seem to always be 0x1001D4. Given the name, it&#039;s probably just a version marker and has no functional purpose.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
Holds 4 bytes of data. The purpose of this is unknown.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It defines relevant co-ordinate points for actors in the room to use. Examples of this include points which actors can force Link to walk to during events, where a seashell should land from bonking a tree, and more.&lt;br /&gt;
&lt;br /&gt;
There is one entry per point. Points have data blocks of 0x18 bytes each. This block consists of 3 floats (4 bytes each) representing the (X, Y, Z) of the point. It appears that this is always followed by 0xC bytes of FF to fill out the block, but the reason for this is not known.&lt;br /&gt;
&lt;br /&gt;
====Rail Section====&lt;br /&gt;
This is another FixedHash child. The exact purpose of this section is not understand but it seems to work in conjunction with &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;. There is one entry per rail.&lt;br /&gt;
&lt;br /&gt;
Each rail has a data block of variable size, typically 0x32 or more bytes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|&lt;br /&gt;
|Appears to always be 0xC null bytes?&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|&lt;br /&gt;
|Block of 4 structures with a parameter-like structure (see actor section) except for using 0xFFFFFF04 instead of 0x4. So far only observed to be blocks of [0x19, 0xFFFFFF04].&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u16&lt;br /&gt;
|Number of entries in following list&lt;br /&gt;
|-&lt;br /&gt;
|0x2E&lt;br /&gt;
|u16&lt;br /&gt;
|Number of indexes per entry? Only observed to ever be 0x01 so far, so no clear purpose.&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u16[...]&lt;br /&gt;
|Indexes of points used per rail (in the &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; section). The logic behind how points are grouped into rails is not understood, but always seems to line up with how actors reference points. So, an actor that refers to (rail 0, point 0) and (rail 0, point 1) means that rail 0 references points 0 and 1. An actor referring only to (rail 2, point 2) and nothing else with rail 2 means that rail 2 only references point 2.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Y, Z]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Z axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Y, Z] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Y, Z] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
The types are as follows:&lt;br /&gt;
&lt;br /&gt;
*0: the parameter is not used? Mainly observable in lighting actors.&lt;br /&gt;
*2: Float&lt;br /&gt;
*3: Unsigned integer (u32)&lt;br /&gt;
*4: String, where the parameter value define the offset of the string in the top-level names section.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are generally entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 12 bytes which define the structure and purpose of the data in the section, where the latter 6 bytes are always null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ee kk bb xx&#039;&#039;&#039; &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for any enemy actor and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 for an enemy that appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 2. (This is not a typo, for some reason it defines the group sizes in the order 1, 3, 2.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039; defines a list of points the actor knows about. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s, which respectively index into the &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; section and the &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; section. This is used for various things, for example the Link:MoveToTargetLinkedPoint event action, or the location for item drops from the actor to land, or the location to dynamically spawn other actors (e.g. pickups in rapids rush).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define properties for each tile of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|bit field&lt;br /&gt;
|The 4 bytes here seem to make up a bit field with a number of flags defining various tile properties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first two bytes are set in a pattern that is consistent with the terrain collision of the room, but editing it does not seem to have any actual effect on the collision of the room. Will require more testing.&lt;br /&gt;
&lt;br /&gt;
Byte 1 (bits 76543210):&lt;br /&gt;
&lt;br /&gt;
7: indicates that there is solid collision to the south of this tile&lt;br /&gt;
&lt;br /&gt;
6: unused?&lt;br /&gt;
&lt;br /&gt;
5: indicates that there is solid collision to the east of this tile&lt;br /&gt;
&lt;br /&gt;
4: unused?&lt;br /&gt;
&lt;br /&gt;
3: indicates there is solid collision to the north of this tile&lt;br /&gt;
&lt;br /&gt;
2: unused?&lt;br /&gt;
&lt;br /&gt;
1: indicates that this tile contains solid collision&lt;br /&gt;
&lt;br /&gt;
0: indicates that the tile is deep water or lava (as opposed to shallow)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Byte 2:&lt;br /&gt;
&lt;br /&gt;
7-2: unused?&lt;br /&gt;
&lt;br /&gt;
1: indicates that there is collision to the west of this tile&lt;br /&gt;
&lt;br /&gt;
0: unused?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that in considering if there is collision next to a tile, it doesn&#039;t consider adjacent rooms. Tiles at the edge of a room will not &amp;quot;see&amp;quot; any collision past that edge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Byte 3:&lt;br /&gt;
&lt;br /&gt;
7: Appears to always be 0&lt;br /&gt;
&lt;br /&gt;
6: Unknown. Set for the vast majority of tiles, but unset in a few specific cases. This is observable in overworld screens around the graveyard, and the bottom left of Signpost Maze (where the stairs to Mamu are). &lt;br /&gt;
&lt;br /&gt;
5: Appears to indicate whether the tile is allowed to &amp;quot;refresh its state&amp;quot; when you move away from the room. Most tiles have this bit set. This bit is set to 0 for every tile which contains a seashell under a rock, bush, or dig spot, and also the tile of the Slime Key (also a dig spot). Something these tiles have in common is being able to retain the state of the item on the ground for longer than other tiles&#039; states (e.g. simple grass being cut). Oddly, every walkable tile in Lv1TailCave_04B (the spike turtle room) does not have this bit set, which differs from literally every other dungeon room.&lt;br /&gt;
&lt;br /&gt;
4: Whether or not the tile is a valid respawn point from loading a save file&lt;br /&gt;
&lt;br /&gt;
3: Whether or not the tile is a valid respawn point from voiding out&lt;br /&gt;
&lt;br /&gt;
2: Set if the tile is water/lava. Whether or not the tile is deep water seems to depend on something else. If set, the elevation for this tile does not appear to impact collision, only the height above the ground where splashing effects appear.&lt;br /&gt;
&lt;br /&gt;
1: Appears to always be 0&lt;br /&gt;
&lt;br /&gt;
0: Whether you can use the shovel to dig on the tile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last fourth byte appears to always be 0x80, or 0b10000000.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|&lt;br /&gt;
|Unknown, seems to always be identical to the 4 bytes starting at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains. The data is stored in the same structures as the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Z co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=710</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=710"/>
		<updated>2021-11-05T06:58:28Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Grid Section */ expanded info on grid data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening. This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
Note that many properties in these files define measurements in 3D space (X, Y, Z). X is horizontal across the screen, Y is perpendicular to the ground (the axis on which gravity acts), and Z is vertical across the screen.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
Holds 3 bytes of data, which seem to always be 0x1001D4. Given the name, it&#039;s probably just a version marker and has no functional purpose.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
Holds 4 bytes of data. The purpose of this is unknown.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It defines relevant co-ordinate points for actors in the room to use. Examples of this include points which actors can force Link to walk to during events, where a seashell should land from bonking a tree, and more.&lt;br /&gt;
&lt;br /&gt;
There is one entry per point. Points have data blocks of 0x18 bytes each. This block consists of 3 floats (4 bytes each) representing the (X, Y, Z) of the point. It appears that this is always followed by 0xC bytes of FF to fill out the block, but the reason for this is not known.&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. The exact purpose of this section is not understand but it seems to work in conjunction with &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;. There is one entry per rail.&lt;br /&gt;
&lt;br /&gt;
Each rail has a data block of variable size, typically 0x32 or more bytes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|&lt;br /&gt;
|Appears to always be 0xC null bytes?&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|&lt;br /&gt;
|Block of 4 structures with a parameter-like structure (see actor section) except for using 0xFFFFFF04 instead of 0x4. So far only observed to be blocks of [0x19, 0xFFFFFF04].&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u16&lt;br /&gt;
|Number of entries in following list&lt;br /&gt;
|-&lt;br /&gt;
|0x2E&lt;br /&gt;
|u16&lt;br /&gt;
|Number of indexes per entry? Only observed to ever be 0x01 so far, so no clear purpose.&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u16[...]&lt;br /&gt;
|Indexes of points used per rail (in the &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; section). The logic behind how points are grouped into rails is not understood, but always seems to line up with how actors reference points. So, an actor that refers to (rail 0, point 0) and (rail 0, point 1) means that rail 0 references points 0 and 1. An actor referring only to (rail 2, point 2) and nothing else with rail 2 means that rail 2 only references point 2.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Y, Z]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Z axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Y, Z] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Y, Z] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
The types are as follows:&lt;br /&gt;
&lt;br /&gt;
*0: the parameter is not used? Mainly observable in lighting actors.&lt;br /&gt;
*2: Float&lt;br /&gt;
*3: Unsigned integer (u32)&lt;br /&gt;
*4: String, where the parameter value define the offset of the string in the top-level names section.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are generally entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 12 bytes which define the structure and purpose of the data in the section, where the latter 6 bytes are always null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ee kk bb xx&#039;&#039;&#039; &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for any enemy actor and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 for an enemy that appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 2. (This is not a typo, for some reason it defines the group sizes in the order 1, 3, 2.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039; defines a list of points the actor knows about. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s, which respectively index into the &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; section and the &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; section. This is used for various things, for example the Link:MoveToTargetLinkedPoint event action, or the location for item drops from the actor to land, or the location to dynamically spawn other actors (e.g. pickups in rapids rush).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define properties for each tile of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|bit field&lt;br /&gt;
|The 4 bytes here seem to make up a bit field with a number of flags defining various tile properties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first two bytes are set in a pattern that is consistent with the terrain collision of the room, but editing it does not seem to have any actual effect on the collision of the room. Will require more testing.&lt;br /&gt;
&lt;br /&gt;
Byte 1 (bits 76543210):&lt;br /&gt;
&lt;br /&gt;
7: indicates that there is solid collision to the south of this tile&lt;br /&gt;
&lt;br /&gt;
6: unused?&lt;br /&gt;
&lt;br /&gt;
5: indicates that there is solid collision to the east of this tile&lt;br /&gt;
&lt;br /&gt;
4: unused?&lt;br /&gt;
&lt;br /&gt;
3: indicates there is solid collision to the north of this tile&lt;br /&gt;
&lt;br /&gt;
2: unused?&lt;br /&gt;
&lt;br /&gt;
1: indicates that this tile contains solid collision&lt;br /&gt;
&lt;br /&gt;
0: indicates that the tile is deep water or lava (as opposed to shallow)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Byte 2:&lt;br /&gt;
&lt;br /&gt;
7-2: unused?&lt;br /&gt;
&lt;br /&gt;
1: indicates that there is collision to the west of this tile&lt;br /&gt;
&lt;br /&gt;
0: unused?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that in considering if there is collision next to a tile, it doesn&#039;t consider adjacent rooms. Tiles at the edge of a room will not &amp;quot;see&amp;quot; any collision past that edge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Byte 3:&lt;br /&gt;
&lt;br /&gt;
7: Appears to always be 0&lt;br /&gt;
&lt;br /&gt;
6: Unknown. Set for the vast majority of tiles, but unset in a few specific cases. This is observable in overworld screens around the graveyard, and the bottom left of Signpost Maze (where the stairs to Mamu are). &lt;br /&gt;
&lt;br /&gt;
5: Appears to indicate whether the tile is allowed to &amp;quot;refresh its state&amp;quot; when you move away from the room. Most tiles have this bit set. This bit is set to 0 for every tile which contains a seashell under a rock, bush, or dig spot, and also the tile of the Slime Key (also a dig spot). Something these tiles have in common is being able to retain the state of the item on the ground for longer than other tiles&#039; states (e.g. simple grass being cut). Oddly, every walkable tile in Lv1TailCave_04B (the spike turtle room) does not have this bit set, which differs from literally every other dungeon room.&lt;br /&gt;
&lt;br /&gt;
4: Whether or not the tile is a valid respawn point from loading a save file&lt;br /&gt;
&lt;br /&gt;
3: Whether or not the tile is a valid respawn point from voiding out&lt;br /&gt;
&lt;br /&gt;
2: Set if the tile is water/lava. Whether or not the tile is deep water seems to depend on something else. If set, the elevation for this tile does not appear to impact collision, only the height above the ground where splashing effects appear.&lt;br /&gt;
&lt;br /&gt;
1: Appears to always be 0&lt;br /&gt;
&lt;br /&gt;
0: Whether you can use the shovel to dig on the tile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last fourth byte appears to always be 0x80, or 0b10000000.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|&lt;br /&gt;
|Unknown, seems to always be identical to the 4 bytes starting at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains. The data is stored in the same structures as the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Z co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=709</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=709"/>
		<updated>2021-11-03T22:59:34Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening. This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
Note that many properties in these files define measurements in 3D space; since Link&#039;s Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
Holds 3 bytes of data, which seem to always be 0x1001D4. Given the name, it&#039;s probably just a version marker and has no functional purpose.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
Holds 4 bytes of data. The purpose of this is unknown.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It defines relevant co-ordinate points for actors in the room to use. Examples of this include points which actors can force Link to walk to during events, where a seashell should land from bonking a tree, and more.&lt;br /&gt;
&lt;br /&gt;
There is one entry per point. Points have data blocks of 0x18 bytes each. This block consists of 3 floats (4 bytes each) representing the (X, Z, Y) of the point. It appears that this is always followed by 0xC bytes of FF to fill out the block, but the reason for this is not known.&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. The exact purpose of this section is not understand but it seems to work in conjunction with &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;. There is one entry per rail.&lt;br /&gt;
&lt;br /&gt;
Each rail has a data block of variable size, typically 0x32 or more bytes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|&lt;br /&gt;
|Appears to always be 0xC null bytes?&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|&lt;br /&gt;
|Block of 4 structures with a parameter-like structure (see actor section) except for using 0xFFFFFF04 instead of 0x4. So far only observed to be blocks of [0x19, 0xFFFFFF04].&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u16&lt;br /&gt;
|Number of entries in following list&lt;br /&gt;
|-&lt;br /&gt;
|0x2E&lt;br /&gt;
|u16&lt;br /&gt;
|Number of indexes per entry? Only observed to ever be 0x01 so far, so no clear purpose.&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u16[...]&lt;br /&gt;
|Indexes of points used per rail (in the &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; section). The logic behind how points are grouped into rails is not understood, but always seems to line up with how actors reference points. So, an actor that refers to (rail 0, point 0) and (rail 0, point 1) means that rail 0 references points 0 and 1. An actor referring only to (rail 2, point 2) and nothing else with rail 2 means that rail 2 only references point 2.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Z, Y]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Z, Y] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Z, Y] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
The types are as follows:&lt;br /&gt;
&lt;br /&gt;
*0: the parameter is not used? Mainly observable in lighting actors.&lt;br /&gt;
*2: Float&lt;br /&gt;
*3: Unsigned integer (u32)&lt;br /&gt;
*4: String, where the parameter value define the offset of the string in the top-level names section.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are generally entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 12 bytes which define the structure and purpose of the data in the section, where the latter 6 bytes are always null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ee kk bb xx&#039;&#039;&#039; &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for any enemy actor and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 for an enemy that appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 2. (This is not a typo, for some reason it defines the group sizes in the order 1, 3, 2.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039; defines a list of points the actor knows about. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s, which respectively index into the &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; section and the &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; section. This is used for various things, for example the Link:MoveToTargetLinkedPoint event action, or the location for item drops from the actor to land, or the location to dynamically spawn other actors (e.g. pickups in rapids rush).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define collision properties of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown. The most significant byte appears to always be 0x80.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown, seems to always be identical to the 4 bytes starting at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains. The data is stored in the same structures as the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Y co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=708</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=708"/>
		<updated>2021-11-03T19:05:06Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along the three axes; since Link&#039;s Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Z, Y]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Z, Y] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Z, Y] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
The types are as follows:&lt;br /&gt;
&lt;br /&gt;
*0: the parameter is not used? Mainly observable in lighting actors.&lt;br /&gt;
*2: Float&lt;br /&gt;
*3: Unsigned integer (u32)&lt;br /&gt;
*4: String, where the parameter value define the offset of the string in the top-level names section.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are generally entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 12 bytes which define the structure and purpose of the data in the section, where the latter 6 bytes are always null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ee kk bb xx&#039;&#039;&#039; &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for any enemy actor and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 for an enemy that appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 2. (This is not a typo, for some reason it defines the group sizes in the order 1, 3, 2.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define collision properties of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown. The most significant byte appears to always be 0x80.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown, seems to always be identical to the value at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Y co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=707</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=707"/>
		<updated>2021-11-03T19:02:03Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */ Update relationship section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along the three axes; since Link&#039;s Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Z, Y]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Z, Y] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Z, Y] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0, which indicates the parameter is not used?&lt;br /&gt;
*2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 12 bytes which define the structure and purpose of the data in the section, where the latter 6 bytes are always null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ee kk bb xx&#039;&#039;&#039; &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for any enemy actor and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 for an enemy that appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 2. (This is not a typo, for some reason it defines the group sizes in the order 1, 3, 2.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define collision properties of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown. The most significant byte appears to always be 0x80.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown, seems to always be identical to the value at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Y co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=706</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=706"/>
		<updated>2021-11-03T18:54:35Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along the three axes; since Link&#039;s Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Z, Y]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Z, Y] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Z, Y] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0, which indicates the parameter is not used?&lt;br /&gt;
*2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 2. (This is not a typo, for some reason it defines the group sizes in the order 1, 3, 2.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define collision properties of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown. The most significant byte appears to always be 0x80.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown, seems to always be identical to the value at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Y co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=705</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=705"/>
		<updated>2021-11-03T06:30:09Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Grid Section */ added info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along the three axes; since Link&#039;s Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Z, Y]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Z, Y] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Z, Y] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0, which indicates the parameter is not used?&lt;br /&gt;
*2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Unused parameters are entered as offsets to a null byte in the names section, as a type 4 parameter.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
This section is a child FixedHash which appears to define collision properties of the room. It has two or three entries: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, sometimes &amp;lt;code&amp;gt;chain&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains blocks 0x10 bytes each which define some properties for every tile on the screen, for a total of 0x500 bytes for top-down rooms and 0x140 bytes for sidescroller rooms. The format of these is not fully understood yet. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown. The most significant byte appears to always be 0x80.&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|u32?&lt;br /&gt;
|Unknown, seems to always be identical to the value at 0x0.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Chain index&#039;&#039;&#039;. Defines which chain to use as an index into the sequence of chains. If the tile doesn&#039;t refer to a chain tile, or there is no chain table defined, this will be 0xFFFFFFFF.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|&#039;&#039;&#039;Elevation&#039;&#039;&#039;. Specifies the height of the surface that Link walks on over this tile. It is still unclear what causes tiles&#039; elevations to be gradient (a ramp) or a sudden increase or decrease (a wall).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The chain section is used for when there needs to be a higher walkable surface directly above a lower one. This is common in sidescroller rooms, but is also used in some overworld areas; mainly in Tal Tal Mountains where there are some walkable surfaces inside cliff faces which can be reached with out of bounds methods. Chain entries can still index to other chains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The info block is always 0x10 bytes and holds some essentially metadata about the room, probably to be used alongside the other data here to determine collision.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles tall the room is. Will always be 0x8 for top-down rooms and 0x2 for sidescroller rooms.&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|u16&lt;br /&gt;
|How many tiles wide the room is. Seems to always be 0xA (10)&lt;br /&gt;
|-&lt;br /&gt;
|0x4&lt;br /&gt;
|float&lt;br /&gt;
|The size of 1 tile in units. Seems to always be 1.5.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|float&lt;br /&gt;
|X co-ordinate of the left edge of the room.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|float&lt;br /&gt;
|Y co-ordinate of the top edge of the room. For sidescroller rooms this seems to always be -1.5.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=704</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=704"/>
		<updated>2021-11-03T00:44:08Z</updated>

		<summary type="html">&lt;p&gt;Glan: Updated actor section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, a block with a minimum size of 0x90 bytes, but can be longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along the three axes; since Link&#039;s Awakening is a top-down game we will call the vertical axis Z (i.e. the axis perpendicular to the plane of the floor), and X and Y will be as normal for a 2D game.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Co-ordinates&#039;&#039;&#039; as [X, Z, Y]. One in-game &amp;quot;tile&amp;quot; is 1.5 units. &lt;br /&gt;
The co-ordinate system spans entire maps and is not specific to each room. [0, 0, 0] is the very top left corner of the map, at the elevation of the main floor plane of the map.&lt;br /&gt;
&lt;br /&gt;
Each room is 10x8 tiles, so they span 15 units along the X axis and 12 along the Y axis.&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Rotation&#039;&#039;&#039; about the [X, Z, Y] axes respectively, in degrees.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|float[3]&lt;br /&gt;
|&#039;&#039;&#039;Scaling&#039;&#039;&#039; along the [X, Z, Y] axes respectively. Note that scaling doesn&#039;t seem to affect collision for every actor and only scales the model in some cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of entries in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of entries in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of entries in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. It seems like the block of data for the &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; entry is also 0x10 bytes, and the data for the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section is almost always 0x500 bytes, except in some cases (like the aforementioned room with an extra entry in this fixed hash).&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains 80 blocks 0x10 bytes each which define some properties for every tile on the screen (which is 10 by 8). The exact format is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=703</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=703"/>
		<updated>2021-11-02T23:13:53Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows. Some properties are related to measurements along certain axes; since this is a top-down game we will call the vertical axis Z (i.e. the axis toward the camera), and X and Y will be as normal for a 2D game.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Most likely rotation about the X axis. This is primarily only used with lighting actors.&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Rotation about the Z (vertical) axis. The scaling of this value is uncertain, but 0xC2B40000 is 90° clockwise, 0x43340000 is 180°, and 0x42B40000 is 270° clockwise (90° counterclockwise).&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Most likely rotation about the Y axis. This is primarily only used with lighting actors.&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X-axis scaling&#039;&#039;&#039;. 0x3F800000 is the normal scale.&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Z-axis scaling&#039;&#039;&#039;. 0x3F800000 is the normal scale.&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y-axis scaling&#039;&#039;&#039;. 0x3F800000 is the normal scale.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. It seems like the block of data for the &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; entry is also 0x10 bytes, and the data for the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section is almost always 0x500 bytes, except in some cases (like the aforementioned room with an extra entry in this fixed hash).&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains 80 blocks 0x10 bytes each which define some properties for every tile on the screen (which is 10 by 8). The exact format is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=702</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=702"/>
		<updated>2021-10-31T17:24:01Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Mostly only used on lighting actors&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors can call upon use of this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. It seems like the block of data for the &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; entry is also 0x10 bytes, and the data for the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section is almost always 0x500 bytes, except in some cases (like the aforementioned room with an extra entry in this fixed hash).&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains 80 blocks 0x10 bytes each which define some properties for every tile on the screen (which is 10 by 8). The exact format is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=701</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=701"/>
		<updated>2021-10-31T08:22:38Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Grid Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Mostly only used on lighting actors&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors are using this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. It seems like the block of data for the &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; entry is also 0x10 bytes, and the data for the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section is almost always 0x500 bytes, except in some cases (like the aforementioned room with an extra entry in this fixed hash).&lt;br /&gt;
&lt;br /&gt;
The data in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section contains 80 blocks 0x10 bytes each which define some properties for every tile on the screen (which is 10 by 8). The exact format is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=700</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=700"/>
		<updated>2021-10-31T08:03:48Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Grid Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Mostly only used on lighting actors&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors are using this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. It seems like the block of data for the &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; entry is also 0x10 bytes, and the data for the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; section is almost always 0x500 bytes, except in some cases (like the aforementioned room with an extra entry in this fixed hash).&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=699</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=699"/>
		<updated>2021-10-31T07:31:09Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Mostly only used on lighting actors&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors are using this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=698</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=698"/>
		<updated>2021-10-31T07:05:37Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the (top-level) names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the (top-level) names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Mostly only used on lighting actors&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A among other rooms, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is an integer parameter, taken as just the value of the first u32.&lt;br /&gt;
*0x4, which indicates that the parameter is a string parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors are using this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=697</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=697"/>
		<updated>2021-10-31T07:01:08Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */ More info on some sections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x28&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Mostly only used on lighting actors&lt;br /&gt;
|-&lt;br /&gt;
|0x2C&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x30&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x34&lt;br /&gt;
|u32&lt;br /&gt;
|Unknown. Commonly 0x3F800000&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Relationships.&#039;&#039;&#039; Defines the relationship this actor has with other actors in the room, primarily for use with events. This section uses a lot of actor indexes, which are the based on the order the actors are defined in the room. That is, the first defined actor is 0, the second is 1, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sections starts with 8 bytes which define the structure and purpose of the data in the section, followed by 4 null bytes, and then followed by 3 sections of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;xx bb kk ee&#039;&#039;&#039; 00 00 &#039;&#039;&#039;yy zz&#039;&#039;&#039; 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;x&#039;&#039;&#039; indicates the number of actors in section 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;y&#039;&#039;&#039; indicates the number of actors in section 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;z&#039;&#039;&#039; indicates the number of actors in section 3.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;b&#039;&#039;&#039; appears to be 01 if the enemy appears from the +enemies tile in a chamber dungeon and 00 otherwise.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;k&#039;&#039;&#039; is 01 only for TagHolocaustChecker actors. Probably indicates looking at enemy spawns/kills.&lt;br /&gt;
&#039;&#039;&#039;e&#039;&#039;&#039; is 01 for all enemies and 00 for anything else.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 1&#039;&#039;&#039; defines which other actors have behaviors controlled by this actor. This includes actors which get used by this actor&#039;s event, enemies that a TagHolocaustChecker watches for, that an AreaEventBox/AreaLevelOpen/etc will trigger this actor, and possibly other uses. It consists of a sequence of 20-byte structures, which are each 2 parameters (8 bytes each, same format as parameter section) and a 4-byte actor index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 2&#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;s purpose is not yet known. It consists of a sequence of 24-byte structures, which are each 2 parameters (8 bytes each), and 2 u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Section 3&#039;&#039;&#039; defines which actors are using this actor. It is simply a sequence of 4-byte actor indexes. This should line up with section 1 of other actors. As an example, if actor[2] defines control of actor[5] in its section 1, then actor[5]&#039;s section 3 should contain 0x02.&lt;br /&gt;
|}&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=696</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=696"/>
		<updated>2021-10-31T02:03:16Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: Appears to define an index in set a of local flags for the room. For example, whether a torch is lit or not, a bush is cut or not, etc.&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Unknown&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|0x90&lt;br /&gt;
|&lt;br /&gt;
|For actors that are longer than 0x90 bytes, this section is used for more data. The purpose so far is not clear, but often seems to be similar in structure to the parameters section.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=695</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=695"/>
		<updated>2021-10-30T17:59:50Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the behavior of many things like small keys, chests, NPCs, loading zones, doors, blocks, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: uncertain purpose. Observable on dungeon torches (ObjDungeonFaceLamp)&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Unknown&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|0x90&lt;br /&gt;
|&lt;br /&gt;
|For actors that are longer than 0x90 bytes, this section is used for more data. The purpose so far is not clear, but often seems to be similar in structure to the parameters section.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=694</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=694"/>
		<updated>2021-10-30T17:49:21Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the spawn behavior of many things like small keys, chests, NPCs, loading zones, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: uncertain purpose. Observable on dungeon torches (ObjDungeonFaceLamp)&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: Used only on actors in panel dungeon rooms. Appears to be an index for a flag system specific to panel dungeons.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Unknown&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|0x90&lt;br /&gt;
|&lt;br /&gt;
|For actors that are longer than 0x90 bytes, this section is used for more data. The purpose so far is not clear, but often seems to be similar in structure to the parameters section.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=693</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=693"/>
		<updated>2021-10-30T08:54:49Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the spawn behavior of many things like small keys, chests, NPCs, loading zones, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: uncertain purpose. Observable on dungeon torches (ObjDungeonFaceLamp)&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: So far unknown purpose.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Unknown&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|0x90&lt;br /&gt;
|&lt;br /&gt;
|For actors that are longer than 0x90 bytes, this section is used for more data. The purpose so far is not clear, but often seems to be similar in structure to the parameters section.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=692</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=692"/>
		<updated>2021-10-30T07:29:10Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the spawn behavior of many things like small keys, chests, NPCs, loading zones, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
*0: uncertain purpose. Observable on dungeon torches (ObjDungeonFaceLamp)&lt;br /&gt;
*1: The actor switch is the index of a global flag.&lt;br /&gt;
*2: Defines a hardcoded value for the switch, usually 1. For example, while some treasure chests appear based on a global flag being set, some don&#039;t; these ones would just use this hardcoded 1 instead of a flag index.&lt;br /&gt;
*3: So far not seen.&lt;br /&gt;
*4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Unknown&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|0x90&lt;br /&gt;
|&lt;br /&gt;
|For actors that are longer than 0x90 bytes, this section is used for more data. The purpose so far is not clear, but often seems to be similar in structure to the parameters section.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=691</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=691"/>
		<updated>2021-10-30T01:19:03Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Actor Switches&#039;&#039;&#039;. Defines 4 actor switches for the event. These are used for the spawn behavior of many things like small keys, chests, NPCs, loading zones, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First there is 4 bytes which define the usage of actor switches 0-3 respectively:&lt;br /&gt;
&lt;br /&gt;
* 0: uncertain purpose. Observable on dungeon torches (ObjDungeonFaceLamp)&lt;br /&gt;
* 1: The actor switch is the index of a global flag.&lt;br /&gt;
* 2: Unknown. Usually the corresponding switch is 0x01. Possibly used to indicate the value to use for something else, e.g. setting a flag. Can be observed on most(?) loading zones, TagHolocaustChecker, etc.&lt;br /&gt;
* 3: So far not seen.&lt;br /&gt;
* 4: The switch is unused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this are the four actor switch definitions, each 2 bytes (u16).&lt;br /&gt;
|-&lt;br /&gt;
|0x84&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Unknown&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|0x90&lt;br /&gt;
|&lt;br /&gt;
|For actors that are longer than 0x90 bytes, this section is used for more data. The purpose so far is not clear, but often seems to be similar in structure to the parameters section.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=690</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=690"/>
		<updated>2021-10-22T04:22:34Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x2, unknown purpose. Observable on the small key in Lv04AnglersTunnel_06A, but the parameters appear to not do anything.&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Control section.&#039;&#039;&#039; Used to define actor-specific behavior, including actors which appear from switches, enemy kill tags, etc., as well actors which use flags to mark a state, e.g. whether you&#039;ve picked it up yet or not.&lt;br /&gt;
Every value in this section is a u16.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actors affected by these (e.g. a chest that appears after killing enemies, or a door that opens when pressing a switch) have the value 0x0101.&lt;br /&gt;
&lt;br /&gt;
Actors which control this behavior (e.g. the switch, enemy kill tag, etc.) have the value 0x0201.&lt;br /&gt;
&lt;br /&gt;
Actors not intended to be a part of this behavior omit this value. Other values have been observed here but aren&#039;t yet understood. (e.g. 0x0202)&lt;br /&gt;
&lt;br /&gt;
The value 0x0401 here indicates conditional spawning based on the value of a flag. If the flag at the specified index (specified a few values later) is not set, this actor will not exist in the game world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this value, or immediately after the parameters if it hasn&#039;t been used, holds the value 0x0404.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following that is a list of game flag indices. &lt;br /&gt;
&lt;br /&gt;
Listed first, if applicable, is the flag for whether the actor has been made to appear (for falling keys/spawn chests). &lt;br /&gt;
&lt;br /&gt;
Next, if applicable, is the flag for whether the actor has been picked up/opened (for fallen keys, chests, doors, etc).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The rest of the section will be 0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=689</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=689"/>
		<updated>2021-06-09T22:13:23Z</updated>

		<summary type="html">&lt;p&gt;Glan: mroe info on actor data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Control section.&#039;&#039;&#039; Used to define actor-specific behavior, including actors which appear from switches, enemy kill tags, etc., as well actors which use flags to mark a state, e.g. whether you&#039;ve picked it up yet or not.&lt;br /&gt;
Every value in this section is a u16.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actors affected by these (e.g. a chest that appears after killing enemies, or a door that opens when pressing a switch) have the value 0x0101.&lt;br /&gt;
&lt;br /&gt;
Actors which control this behavior (e.g. the switch, enemy kill tag, etc.) have the value 0x0201.&lt;br /&gt;
&lt;br /&gt;
Actors not intended to be a part of this behavior omit this value. Other values have been observed here but aren&#039;t yet understood. (e.g. 0x0202)&lt;br /&gt;
&lt;br /&gt;
The value 0x0401 here indicates conditional spawning based on the value of a flag. If the flag at the specified index (specified a few values later) is not set, this actor will not exist in the game world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this value, or immediately after the parameters if it hasn&#039;t been used, holds the value 0x0404.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following that is a list of game flag indices. &lt;br /&gt;
&lt;br /&gt;
Listed first, if applicable, is the flag for whether the actor has been made to appear (for falling keys/spawn chests). &lt;br /&gt;
&lt;br /&gt;
Next, if applicable, is the flag for whether the actor has been picked up/opened (for fallen keys, chests, doors, etc).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The rest of the section will be 0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=688</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=688"/>
		<updated>2021-06-09T04:37:04Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Section */ added info on last section of actor data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains 16 u32&#039;s, which are grouped into 8 pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x78&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;Control section.&#039;&#039;&#039; Used to define actor-specific behavior, including actors which appear from switches, enemy kill tags, etc., as well actors which use flags to mark a state, e.g. whether you&#039;ve picked it up yet or not.&lt;br /&gt;
Every value in this section is a u32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actors affected by these (e.g. a chest that appears after killing enemies, or a door that opens when pressing a switch) have the value 0x0101.&lt;br /&gt;
&lt;br /&gt;
Actors which control this behavior (e.g. the switch, enemy kill tag, etc.) have the value 0x0201.&lt;br /&gt;
&lt;br /&gt;
Actors not intended to be a part of this behavior omit this value. Other values have been observed here but aren&#039;t yet understood. (e.g. 0x0202)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following this value, or immediately after the parameters if it hasn&#039;t been used, holds the value 0x0404.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following that is a list of game flag indices. &lt;br /&gt;
&lt;br /&gt;
Listed first, if applicable, is the flag for whether the actor has been made to appear (for falling keys/spawn chests). &lt;br /&gt;
&lt;br /&gt;
Next, if applicable, is the flag for whether the actor has been picked up/opened (for fallen keys, chests, doors, etc).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The rest of the section will be 0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=687</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=687"/>
		<updated>2021-06-09T03:28:25Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[N]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x38 + N*0x8&lt;br /&gt;
|&lt;br /&gt;
|Exact formatting is still unknown, but in this section it lists the indices of game flags that this actor looks at. e.g. whether a chest is open, whether a door is open, whether a small key has fallen, etc.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=686</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=686"/>
		<updated>2021-06-07T22:16:44Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Data Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to version section&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to infomation&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to point section&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to rail section&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to actor section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to grid secion&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Version Section====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data, which seem to always be 0x1001D4. Whether it has a purpose is unclear. Given the name, it could just be a version marker. Following this is five empty bytes.&lt;br /&gt;
====Infomation Section====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Point Section====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Rail Section=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actor Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[N]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x38 + N*0x8&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Grid Section====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=685</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=685"/>
		<updated>2021-06-07T21:56:46Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actors Section */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 1&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 2&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 3&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 4&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to Actors Section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 5&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Section 1====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data. Its purpose is unknown. Following this is five empty bytes.&lt;br /&gt;
====Section 2====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Section 3====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Section 4=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
====Actors Section====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry points to non-node data, usually blocks of 0x90 bytes, but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[N]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x38 + N*0x8&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Section 6====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=684</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=684"/>
		<updated>2021-06-07T20:53:54Z</updated>

		<summary type="html">&lt;p&gt;Glan: Large update of info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv07EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Name Hash&lt;br /&gt;
!Next entry offset&lt;br /&gt;
!Data Offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 1&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;in the names section [sic]&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;infomation&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 2&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 3&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 4&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;&lt;br /&gt;
|0x10&lt;br /&gt;
|Offset to Actors Section&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|Hash of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|Offset to section 5&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains one subsection for each entry (usually six). &lt;br /&gt;
&lt;br /&gt;
====Section 1====&lt;br /&gt;
This section holds a u64 with the value 0x3 (specifying 3 bytes of data), followed by the 3 bytes of data. Its purpose is unknown. Following this is five empty bytes.&lt;br /&gt;
====Section 2====&lt;br /&gt;
This section holds a u64 with the value 0x4 (specifying 4 bytes of data), followed by the 4 bytes of data. Its purpose is unknown. Following this is four empty bytes.&lt;br /&gt;
====Section 3====&lt;br /&gt;
This is a FixedHash child. It&#039;s usually empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
=====Section 4=====&lt;br /&gt;
This is another FixedHash child. Usually it&#039;s empty and has 1 bucket and no child nodes. The names section is empty. Purpose unknown.&lt;br /&gt;
&lt;br /&gt;
An example of a room which has a non-empty FixedHash here is Lv01TailCave_04G (Moldorm boss room).&lt;br /&gt;
&lt;br /&gt;
==== Actors Section ====&lt;br /&gt;
This section is a FixedHash which holds actor data. Each entry corresponds to one actor. Every entry is non-node data, usually 0x90 bytes but sometimes longer. The names section is empty. The data block for each actor is formatted as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20-0x37&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x38&lt;br /&gt;
|u32[N]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x38 + N*0x8&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Section 6====&lt;br /&gt;
Another child FixedHash. It has a name section which usually contains two strings: &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. Some have other strings in between, such as Lv08TurtleRock_01H (right half of the sidescroller leading to the boss). This FixedHash has one Entry for each of these strings in the names section. Each entry holds a block of data. The purpose of this is still unknown. The final entry seems to always have a data block of 0x10 bytes.&lt;br /&gt;
&lt;br /&gt;
The purpose of this section is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=683</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=683"/>
		<updated>2021-06-06T03:59:17Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Data Section */ added ending code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv7EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Next entry offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;information&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0x10&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|}&lt;br /&gt;
The Name Hashes of each should not be touched. The purpose of the DataOffsets is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains nine subsections. Only some of these have a known purpose so far.&lt;br /&gt;
&lt;br /&gt;
====Section 1====&lt;br /&gt;
Appears to always consist of 0x2C bytes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|Always 0x4&lt;br /&gt;
|-&lt;br /&gt;
|0x8-0xF&lt;br /&gt;
|&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u64&lt;br /&gt;
|Always 0x3&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|Remaining bytes from here are always &amp;lt;code&amp;gt;3D 01 01 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;. Probably a termination marker.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Section 2====&lt;br /&gt;
Unknown purpose. Always ends in &amp;lt;code&amp;gt;3D 01 01 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Section 3====&lt;br /&gt;
Unknown purpose. Always ends in &amp;lt;code&amp;gt;3D 01 01 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Actor Entries Section=====&lt;br /&gt;
This section is preceded by a u64 which specifies the length of the section in bytes.&lt;br /&gt;
&lt;br /&gt;
This section holds a list of entry-like data, 16 bytes for each actor, which look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the last 4 bytes store the offset of each actor&#039;s data block in the actor data section.&lt;br /&gt;
&lt;br /&gt;
====Actor Entry Offsets Section====&lt;br /&gt;
Similar to the regular FixedHash entry offsets section, but corresponding to the previous section (Actor Entries)&lt;br /&gt;
&lt;br /&gt;
====Actor Data Section====&lt;br /&gt;
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of data for each actor in the room. Usually these are 0x98 bytes but for some actors are longer, and in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Group.&#039;&#039;&#039; For most actors, this will be 0x90, but in some cases it will be different. For example, rooms with Three-of-a-Kind enemies have 0xC4 for those enemies. Does not seem to functionally matter in most cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0x16&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x28-0x3F&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x40&lt;br /&gt;
|u32[N]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x40 + N*0x8&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
Following all of these data blocks, the section ends with &amp;lt;code&amp;gt;00 00 00 00 3D 01 02 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
====Section 7====&lt;br /&gt;
Unknown purpose. Usually short (16 bytes), but sometimes longer.&lt;br /&gt;
&lt;br /&gt;
====Section 8====&lt;br /&gt;
Another section filled with entry-like data. The purpose of it is still unknown.&lt;br /&gt;
&lt;br /&gt;
====Section 9====&lt;br /&gt;
Preceded by a u32 specifying the length of this section. Contains a few strings in plain ASCII, usually &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. The purpose of this is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=682</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=682"/>
		<updated>2021-06-06T03:56:32Z</updated>

		<summary type="html">&lt;p&gt;Glan: Fleshed out info on data section structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv7EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Next entry offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;information&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0x10&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|}&lt;br /&gt;
The Name Hashes of each should not be touched. The purpose of the DataOffsets is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
The data section contains nine subsections. Only some of these have a known purpose so far.&lt;br /&gt;
&lt;br /&gt;
==== Section 1 ====&lt;br /&gt;
Appears to always consist of 0x2C bytes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|Always 0x4&lt;br /&gt;
|-&lt;br /&gt;
|0x8-0xF&lt;br /&gt;
|&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u64&lt;br /&gt;
|Always 0x3&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|&lt;br /&gt;
|Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|Remaining bytes from here are always &amp;lt;code&amp;gt;3D 01 01 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;. Probably a termination marker.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Section 2 ====&lt;br /&gt;
Unknown purpose. Always ends in &amp;lt;code&amp;gt;3D 01 01 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Section 3 ====&lt;br /&gt;
Unknown purpose. Always ends in &amp;lt;code&amp;gt;3D 01 01 00 00 00 00 FF FF FF FF FF&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Actor Entries Section =====&lt;br /&gt;
This section is preceded by a u64 which specifies the length of the section in bytes.&lt;br /&gt;
&lt;br /&gt;
This section holds a list of entry-like data, 16 bytes for each actor, which look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the last 4 bytes store the offset of each actor&#039;s data block in the actor data section.&lt;br /&gt;
&lt;br /&gt;
==== Actor Entry Offsets Section ====&lt;br /&gt;
Similar to the regular FixedHash entry offsets section, but corresponding to the previous section (Actor Entries)&lt;br /&gt;
&lt;br /&gt;
====Actor Data Section====&lt;br /&gt;
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of data for each actor in the room. Usually these are 0x98 bytes but for some actors are longer, and in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Group.&#039;&#039;&#039; For most actors, this will be 0x90, but in some cases it will be different. For example, rooms with Three-of-a-Kind enemies have 0xC4 for those enemies. Does not seem to functionally matter in most cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0x16&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x28-0x3F&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x40&lt;br /&gt;
|u32[N]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type]. For most actors, there are 8 parameters (and so this section is 64 bytes long).&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x40 + N*0x8&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Notes on Parameters for Specific Actors=====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
==== Section 7 ====&lt;br /&gt;
Unknown purpose. Usually short (16 bytes), but sometimes longer.&lt;br /&gt;
&lt;br /&gt;
==== Section 8 ====&lt;br /&gt;
Another section filled with entry-like data. The purpose of it is still unknown.&lt;br /&gt;
&lt;br /&gt;
==== Section 9 ====&lt;br /&gt;
Preceded by a u32 specifying the length of this section. Contains a few strings in plain ASCII, usually &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt;. The purpose of this is unknown.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=681</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=681"/>
		<updated>2021-06-04T20:28:15Z</updated>

		<summary type="html">&lt;p&gt;Glan: /* Actor Data Block */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv7EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Entries Section===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Next entry offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;information&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0x10&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|}&lt;br /&gt;
The Name Hashes of each should not be touched. The purpose of the DataOffsets is still unknown.&lt;br /&gt;
&lt;br /&gt;
===Data Section===&lt;br /&gt;
Much of the data section is still unknown.&lt;br /&gt;
&lt;br /&gt;
Early in the section is a list of entry-like data, 16 bytes for each actor, which look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the last 4 bytes store the offset of each actor&#039;s data block in the actor data section.&lt;br /&gt;
&lt;br /&gt;
====Actor Data Block====&lt;br /&gt;
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of data for each actor in the room. Usually these are 0x98 bytes but for some actors are longer, and in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Group.&#039;&#039;&#039; For most actors, this will be 0x90, but in some cases it will be different. For example, rooms with Three-of-a-Kind enemies have 0xC4 for those enemies. Does not seem to functionally matter in most cases.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0x16&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x28-0x3F&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x40-0x7F&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x80-0x97&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Notes on Parameters for Specific Actors====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
===Names Section===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=680</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=680"/>
		<updated>2021-06-04T02:20:47Z</updated>

		<summary type="html">&lt;p&gt;Glan: More info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section. There is consistency in how the FixedHash is built for &#039;&#039;&#039;LEB&#039;&#039;&#039; files, with the exception of Lv7EagleTower_05E (the lower part of the Eagle boss room), which for some reason is different than all other rooms. Aside from this room, LEBs always have 0x17 hash table buckets and 0x4 child FixedHash nodes. The buckets are always the same, so the start of LEB files always look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;3d01 1700 0400 0000 ffff ffff 0000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;2000 0000 ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff 4000 0000 ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff 5000 0000 ffff ffff 3000 0000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff ffff ffff ffff ffff ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ffff ffff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Entries Section ===&lt;br /&gt;
There are 6 entries in most LEB files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Node Index&lt;br /&gt;
!Name Offset&lt;br /&gt;
!Next entry offset&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0xFFF0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;information&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x1&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
|0x2&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;actor&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0x10&lt;br /&gt;
|-&lt;br /&gt;
|0x3&lt;br /&gt;
|Offset of &amp;lt;code&amp;gt;grid&amp;lt;/code&amp;gt;in the names section&lt;br /&gt;
|0xFFFFFFFF&lt;br /&gt;
|}&lt;br /&gt;
The Name Hashes of each should not be touched. The purpose of the DataOffsets is still unknown.&lt;br /&gt;
&lt;br /&gt;
=== Data Section ===&lt;br /&gt;
Much of the data section is still unknown.&lt;br /&gt;
&lt;br /&gt;
Early in the section is a list of entry-like data, 16 bytes for each actor, which look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F0 FF 00 00 00 00 00 00 FF FF FF FF xx xx xx xx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the last 4 bytes store the offset of each actor&#039;s data block in the actor data section.&lt;br /&gt;
&lt;br /&gt;
==== Actor Data Block ====&lt;br /&gt;
This section starts is preceded by a u64 which specifies the number of bytes the actor data section takes. The section contains blocks of 0x98 bytes, one for each actor in the room, in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Magic&#039;&#039;&#039;. Appears to always be 0x90, but changing it appears to not have any effect.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0x16&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x28-0x3F&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x40-0x7F&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x80-0x97&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Notes on Parameters for Specific Actors ====&lt;br /&gt;
&#039;&#039;&#039;ObjCaveRock:&#039;&#039;&#039; (and other blocks?), the first four parameters correspond to whether you can push them in a certain direction, ordered as RIGHT, LEFT, DOWN, UP. 0x0 is not pushable in that direction, 0x1 is pushable.&lt;br /&gt;
&lt;br /&gt;
=== Names Section ===&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there seems to always be one separator that 2 null bytes instead of 1. Depending on the file, this is either between &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rail&amp;lt;/code&amp;gt; at the start of the names section, or between the 1st and 2nd listed actors (it is more commonly the latter).&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=679</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=679"/>
		<updated>2021-06-04T00:37:04Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there are 2 null bytes separating the first and second actor labels, instead of 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. Preceding this is a u64 which specifies the number of bytes the actor data section takes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Magic&#039;&#039;&#039;. Appears to always be 0x90, but changing it appears to not have any effect.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0x16&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it. Generally this should be consistent across all actors in the file, since each room has its own file.&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x28-0x3F&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x40-0x7F&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
*0x0, which indicates the parameter is not used?&lt;br /&gt;
*0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
*0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in as offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x80-0x97&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=678</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=678"/>
		<updated>2021-06-04T00:23:46Z</updated>

		<summary type="html">&lt;p&gt;Glan: Filled in more info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
All labels in the names section are separated by null bytes. Of note, there are 2 null bytes separating the first and second actor labels, instead of 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. Preceding this is a u64 which specifies the number of bytes the actor data section takes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Magic&#039;&#039;&#039;. Appears to always be 0x90, but changing it appears to not have any effect.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0x16&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it.&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x24&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x28-0x3F&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|-&lt;br /&gt;
|0x40-0x7F&lt;br /&gt;
|u32[16]&lt;br /&gt;
|&#039;&#039;&#039;Parameters&#039;&#039;&#039;. This section contains multiple u32&#039;s, which appear to be grouped into pairs of [parameter, parameter type].&lt;br /&gt;
For any pair, the first 4 bytes make up the value of the parameter. This can be basically anything (will include some known parameters for certain actor types below).&lt;br /&gt;
&lt;br /&gt;
The second 4 bytes indicate what the purpose of the parameter is. There are only 3 observed values so far:&lt;br /&gt;
&lt;br /&gt;
* 0x0, which indicates the parameter is not used?&lt;br /&gt;
* 0x3, which indicates that the parameter is a direct parameter. e.g., the parameter 0x1 is used to indicate being able to push a block actor.&lt;br /&gt;
* 0x4, which indicates that the parameter is a plaintext parameter specified in the names section. The value in the previous u32 is the offset in the names section for this parameter.&lt;br /&gt;
&lt;br /&gt;
Most actors have &amp;quot;blank &amp;quot; parameters filled in offsets to the 2nd null byte after the first label in the names section; however, this seems to be functionally equivalent to leaving the parameter as 0.&lt;br /&gt;
|-&lt;br /&gt;
|0x80-0x97&lt;br /&gt;
|&lt;br /&gt;
|Unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=677</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=677"/>
		<updated>2021-06-03T01:50:00Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. These store most of the information for the actors and are in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20 and beyond&lt;br /&gt;
|&lt;br /&gt;
|So far unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=676</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=676"/>
		<updated>2021-06-03T01:44:44Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. These store most of the information for the actors and are in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor. Seems to be irrelevant since it can be modified without breaking anything.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20 and beyond&lt;br /&gt;
|&lt;br /&gt;
|So far unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=675</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=675"/>
		<updated>2021-06-03T01:41:58Z</updated>

		<summary type="html">&lt;p&gt;Glan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. These store most of the information for the actors and are in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20 and beyond&lt;br /&gt;
|&lt;br /&gt;
|So far unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=674</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=674"/>
		<updated>2021-06-03T01:36:01Z</updated>

		<summary type="html">&lt;p&gt;Glan: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. These store most of the information for the actors and are in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|&#039;&#039;&#039;Actor key&#039;&#039;&#039;. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32(?)&lt;br /&gt;
|&#039;&#039;&#039;Names section offset&#039;&#039;&#039;. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|&#039;&#039;&#039;Actor ID&#039;&#039;&#039;]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32(?)&lt;br /&gt;
|&#039;&#039;&#039;Room ID&#039;&#039;&#039;. The actor loads when entering the specified room and unloads when leaving it.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;X coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|&#039;&#039;&#039;Y coordinate&#039;&#039;&#039;. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20 and beyond&lt;br /&gt;
|&lt;br /&gt;
|So far unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=673</id>
		<title>LEB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_la/index.php?title=LEB&amp;diff=673"/>
		<updated>2021-06-03T01:34:36Z</updated>

		<summary type="html">&lt;p&gt;Glan: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;LEB&#039;&#039;&#039; is a custom format used to store room data in Link&#039;s Awakening.&lt;br /&gt;
&lt;br /&gt;
This format is still in the process of being reverse engineered and so this page is currently incomplete.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&#039;&#039;&#039;LEB&#039;&#039;&#039; files are in a [[FixedHash]] format, with the data for actors stored in the data section and the names section.&lt;br /&gt;
&lt;br /&gt;
The names section contains a list of actors by name, followed by a hyphen (-), followed by a 16-digit hexadecimal number. This also includes some plaintext parameters for some objects, such as the contents of a chest (ObjTreasureBox) or the destination of a loading zone (AreaLevelOpen). Note that these do not define what actors exist, in fact it seems like the actual labels here are meaningless aside from the aforementioned parameters.&lt;br /&gt;
&lt;br /&gt;
The data section contains, among other things, blocks of 0x98 bytes, one for each actor in the room. These store most of the information for the actors and are in the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Offset&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x0&lt;br /&gt;
|u64&lt;br /&gt;
|Actor key. This value must match the hex value of the corresponding actor label in the names section.&lt;br /&gt;
|-&lt;br /&gt;
|0x8&lt;br /&gt;
|u32(?)&lt;br /&gt;
|Names section offset. This stores the offset in the names section for the start of the label that corresponds to this actor.&lt;br /&gt;
|-&lt;br /&gt;
|0xC&lt;br /&gt;
|u16&lt;br /&gt;
|[[Actors|Actor ID]]&lt;br /&gt;
|-&lt;br /&gt;
|0xE&lt;br /&gt;
|u16&lt;br /&gt;
|Padding?&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|u32(?)&lt;br /&gt;
|Room ID. The actor loads when entering the specified room and unloads when leaving it.&lt;br /&gt;
|-&lt;br /&gt;
|0x14&lt;br /&gt;
|u32&lt;br /&gt;
|X coordinate. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x18&lt;br /&gt;
|u32&lt;br /&gt;
|Appears to be Z coordinate (height). However it scales very strangely, maybe not linear?&lt;br /&gt;
|-&lt;br /&gt;
|0x1C&lt;br /&gt;
|u32&lt;br /&gt;
|Y coordinate. One “tile” is 0xC0000 units, so using the lower 2 bytes here is going to generally be pretty insignificant. Hence them usually being 0&lt;br /&gt;
|-&lt;br /&gt;
|0x20 and beyond&lt;br /&gt;
|&lt;br /&gt;
|So far unknown.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Glan</name></author>
	</entry>
</feed>