<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://zeldamods.org/w_botw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Greenlord</id>
	<title>ZeldaMods (Breath of the Wild) - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://zeldamods.org/w_botw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Greenlord"/>
	<link rel="alternate" type="text/html" href="https://zeldamods.org/wiki/Special:Contributions/Greenlord"/>
	<updated>2026-04-05T19:32:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Water.extm&amp;diff=11717</id>
		<title>Water.extm</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Water.extm&amp;diff=11717"/>
		<updated>2022-10-10T15:16:39Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
[[File:5000000000.water.extm.png|alt=Generated water material map of Hyrule Main Field|thumb|Generated water material map of Hyrule Main Field]]&lt;br /&gt;
&amp;lt;code&amp;gt;water.extm&amp;lt;/code&amp;gt; files describe the water heightmap and the texture of the main field and add-on content field.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==water.extm File Specification==&lt;br /&gt;
&lt;br /&gt;
===water.extm File Layout===&lt;br /&gt;
&lt;br /&gt;
Each file contains a 64×64 grid. For each vertex there is 8 bytes of data that describe the height of the mesh, the material type and flow speed.&lt;br /&gt;
&lt;br /&gt;
===Water Map Data===&lt;br /&gt;
&lt;br /&gt;
Each entry in the water data table is 8 bytes long.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|2&lt;br /&gt;
|Unsigned Short&lt;br /&gt;
|&amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; (Vertex &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; component)&lt;br /&gt;
|-&lt;br /&gt;
|0x02&lt;br /&gt;
|2&lt;br /&gt;
|Unsigned Short&lt;br /&gt;
|&amp;lt;code&amp;gt;xAxisFlowRate&amp;lt;/code&amp;gt; 128 = no flow&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|2&lt;br /&gt;
|Unsigned Short&lt;br /&gt;
|&amp;lt;code&amp;gt;zAxisFlowRate&amp;lt;/code&amp;gt; 128 = no flow&lt;br /&gt;
|-&lt;br /&gt;
|0x05&lt;br /&gt;
|1&lt;br /&gt;
|Unsigned Byte&lt;br /&gt;
|&amp;lt;code&amp;gt;materialIndex + 3&amp;lt;/code&amp;gt;. This may act as a checksum?&lt;br /&gt;
|-&lt;br /&gt;
|0x06&lt;br /&gt;
|1&lt;br /&gt;
|Unsigned Byte&lt;br /&gt;
|&amp;lt;code&amp;gt;materialIndex&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;flowRate&amp;lt;/code&amp;gt; are stored as unsigned shorts, but seem to map to float values. These can be calculated by dividing by the max size of an unsigned short:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;line&amp;quot;&amp;gt;&lt;br /&gt;
32767 / 0xffff = 0.5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; is further multiplied by another constant to get the final height (the constant is unknown at this time, but is close to &amp;lt;code&amp;gt;0x300 / 0xffff&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is expected to be an integer quotient. The &amp;lt;code&amp;gt;floor&amp;lt;/code&amp;gt; function can be used if integer division is not supported.&amp;lt;/ref&amp;gt; can be calculated, while iterating through the data table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;line&amp;quot;&amp;gt;&lt;br /&gt;
for (int index = 0; index &amp;lt; 64 * 64; index++) {&lt;br /&gt;
    uint x = index % 64;&lt;br /&gt;
    uint z = index / 64;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flow Rates are calculated as &amp;lt;code&amp;gt;(flowRate * 2) - 1&amp;lt;/code&amp;gt; and ranges from &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. On the x-axis this changes flow direction from East (&amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;) to West (&amp;lt;code&amp;gt;+1&amp;lt;/code&amp;gt;) and on the z-axis from North (&amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;) to South (&amp;lt;code&amp;gt;+1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Material Index===&lt;br /&gt;
&lt;br /&gt;
This data is stored in Terrain.Tex1.bfres.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!id&lt;br /&gt;
!file&lt;br /&gt;
!name&lt;br /&gt;
!attribute&lt;br /&gt;
!attribute_sub&lt;br /&gt;
!flag&lt;br /&gt;
!Google Translated&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Water&lt;br /&gt;
|水&lt;br /&gt;
|Water&lt;br /&gt;
|Water&lt;br /&gt;
|0&lt;br /&gt;
|Water&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|HotWater&lt;br /&gt;
|熱湯&lt;br /&gt;
|Water&lt;br /&gt;
|Water_Hot&lt;br /&gt;
|0&lt;br /&gt;
|Hot water&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Poison&lt;br /&gt;
|毒水&lt;br /&gt;
|Water&lt;br /&gt;
|Water_Poison&lt;br /&gt;
|0&lt;br /&gt;
|Poison water&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Lava&lt;br /&gt;
|溶岩&lt;br /&gt;
|Lava&lt;br /&gt;
|Lava&lt;br /&gt;
|0&lt;br /&gt;
|Lava&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|IceWater&lt;br /&gt;
|冷たい水&lt;br /&gt;
|Water&lt;br /&gt;
|Water_Ice&lt;br /&gt;
|0&lt;br /&gt;
|Cold water&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Mud&lt;br /&gt;
|泥沼&lt;br /&gt;
|Bog&lt;br /&gt;
|Bog&lt;br /&gt;
|0&lt;br /&gt;
|Bog&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Clear01&lt;br /&gt;
|透明水01&lt;br /&gt;
|Water&lt;br /&gt;
|Water&lt;br /&gt;
|0&lt;br /&gt;
|Clear water 01&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Sea&lt;br /&gt;
|海&lt;br /&gt;
|Water&lt;br /&gt;
|Water&lt;br /&gt;
|0&lt;br /&gt;
|Ocean&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:File extensions]]&lt;br /&gt;
[[Category:File extensions (STERA)]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=TSCB&amp;diff=11071</id>
		<title>TSCB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=TSCB&amp;diff=11071"/>
		<updated>2022-01-10T21:49:40Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: Specify what extra_info_array is for.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;T&#039;&#039;&#039;errain &#039;&#039;&#039;sc&#039;&#039;&#039;ene &#039;&#039;&#039;b&#039;&#039;&#039;inary (TSCB) files describe terrain areas layout and terrain materials.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TSCB File Specification==&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|String&lt;br /&gt;
|TSCB file signature (magic) &amp;lt;code&amp;gt;54 53 43 42&amp;lt;/code&amp;gt; or &amp;quot;TSCB&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|TSCB version? &amp;lt;code&amp;gt;0A 00 00 00&amp;lt;/code&amp;gt; or &amp;quot;10.0.0.0&amp;quot;&amp;lt;ref&amp;gt;U-King.elf:0x024D2F8C-0x024D300A holds two error messages: &amp;quot;【データロード】メジャーバージョンの不一致&amp;quot; (&amp;quot;[Data load] Major version mismatch&amp;quot;) and &amp;quot;【データロード】マイナーバージョンの不一致&amp;quot; (&amp;quot;[Data Load] Minor version mismatch&amp;quot;)&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Game crashes on load screen if not equal to &amp;lt;code&amp;gt;0A 00 00 00&amp;lt;/code&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always &amp;lt;code&amp;gt;00 00 00 01&amp;lt;/code&amp;gt;. Game crashes on load screen if not equal to &amp;lt;code&amp;gt;00 00 00 01&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;file_base&amp;lt;/code&amp;gt; table relative offset&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|&amp;lt;code&amp;gt;world_scale&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;500.0&amp;lt;/code&amp;gt;. Scales the terrain along the x- and z-axis.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Terrain mesh max height &amp;lt;code&amp;gt;800.0&amp;lt;/code&amp;gt;. Used to calculate the actual vertex height with [[HGHT|hght]] data.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;material_info_array&amp;lt;/code&amp;gt; length (number of elements in the array)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;area_array&amp;lt;/code&amp;gt; length (number of elements in the array)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Probably padding&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Probably padding&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|&amp;lt;code&amp;gt;tile_size&amp;lt;/code&amp;gt;. Used by the area array.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown &amp;lt;code&amp;gt;00 00 00 08&amp;lt;/code&amp;gt;. &amp;lt;ref&amp;gt;Values &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;13&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;14&amp;lt;/code&amp;gt; affects textures. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;11&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt; will crash the game.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Material Information Array==&lt;br /&gt;
The material information array references texture data contained in &amp;lt;code&amp;gt;content/Model/Terrain.Tex1.sbfres&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
The material information header is one value, the section size. This includes the index table and the value table, as well as itself.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Material info section size in bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Material Information Array Lookup Table===&lt;br /&gt;
Following the header is a table of relative offsets to each entry in &amp;lt;code&amp;gt;material_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Offset to array entry, relative to the first byte of this offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Material Information Value Table===&lt;br /&gt;
Each entry in the array contains an index and four attributes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Array index (&amp;lt;code&amp;gt;mat_index&amp;lt;/code&amp;gt;) of &amp;lt;code&amp;gt;material_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Texture u-axis (x-axis)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Texture v-axis (y-axis)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Unknown. values range from 0-1.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Unknown. values range from 0.2-1.63&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Area Array==&lt;br /&gt;
&lt;br /&gt;
===Area Array Lookup Table===&lt;br /&gt;
Following the material information section is a table of relative offsets to each entry in area_array&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Offset to array entry, relative to the first byte of this offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Area Array Value Table===&lt;br /&gt;
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail (lod) for the terrain.&lt;br /&gt;
&lt;br /&gt;
Entry size ranges from &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0x58&amp;lt;/code&amp;gt; depending on the size of &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|X Position&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Z Position&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|&amp;lt;code&amp;gt;area_size&amp;lt;/code&amp;gt; (length and width)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Minimum Terrain Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Maximum Terrain Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Minimum Water Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Maximum Water Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Usually &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, crashes on &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt;.&amp;lt;ref&amp;gt;May be a flag for grass and water? &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; seems to indicate no water or grass.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;file_base&amp;lt;/code&amp;gt;. Relative offset to file base name string.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Usually &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Usually &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;ref_extra&amp;lt;/code&amp;gt;. It seems to be a flag to indicate if there is an attached &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Parameters====&lt;br /&gt;
&amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; - Area tile x coordinate (East-West)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; - Area tile z coordinate (North-South)&lt;br /&gt;
&amp;lt;code&amp;gt;area_size&amp;lt;/code&amp;gt; - Determines the length and width of the area. It can be calculated with:&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;(area_size / tile_size * world_scale) * 20&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;code&amp;gt;tile_size&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;world_scale&amp;lt;/code&amp;gt; are in the header.&lt;br /&gt;
&lt;br /&gt;
===Extra Information Array===&lt;br /&gt;
if &amp;lt;code&amp;gt;ref_extra&amp;lt;/code&amp;gt; does not equal &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; there is an &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt; attached to this area. The array is 4 or 8 values long.&lt;br /&gt;
&lt;br /&gt;
Every area includes a [[HGHT|.hght]] and [[MATE|.mate]] file. Entries in the &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt; indicate if there is an additional [[Water.extm|.water.extm]] and / or [[Grass.extm|.grass.extm]] file to look for.&lt;br /&gt;
&lt;br /&gt;
===Terrain and Water Height===&lt;br /&gt;
0x0c through 0x18 are used to determine what height range the terrain and water should render within. This is possibly used to assist with occlusion. If the heightmap moves outside of the range defined here, there will be visual artefacts present at higher viewing angles, usually between 45 and 90 degrees. The range value is multiplied by the max height defined in the TSCB header to determine the final value in &#039;real&#039; co-ordinates.&lt;br /&gt;
&lt;br /&gt;
====Header====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|extra_info_array length. Number of values (not elements) in array.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;(0x04)&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 20, but only present when extra_info_array length is 8.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Extra Information Array Value Table====&lt;br /&gt;
After the Header, there are &amp;lt;code&amp;gt;extra_info_array length / 4&amp;lt;/code&amp;gt; elements of this structure.&lt;br /&gt;
Elements act as flags for presence of [[Water.extm|.water.extm]] or [[Grass.extm|.grass.extm]] files.&lt;br /&gt;
A &amp;quot;water&amp;quot; element indicates that there is water data for the terrain section defined in a [[Water.extm|.water.extm]] file. A &amp;quot;grass&amp;quot; element similarly indicates the presence of a [[Grass.extm|.grass.extm]] file.&lt;br /&gt;
Grass and water are referenced via the &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt; because presence water and grass data for any given terrain area is optional.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 3.&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. 0 or 1.&lt;br /&gt;
|-&lt;br /&gt;
|0x08&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 1.&lt;br /&gt;
|-&lt;br /&gt;
|0x0c&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 0.&lt;br /&gt;
|}&lt;br /&gt;
 [3, 0, 1, 0, 3, 1, 1, 0] = grass, water&lt;br /&gt;
 [3, 1, 1, 0, 3, 0, 1, 0] = water, grass&lt;br /&gt;
 [3, 1, 1, 0]             = water&lt;br /&gt;
 [3, 0, 1, 0]             = grass&lt;br /&gt;
It seems that water is &amp;lt;code&amp;gt;[3, 1, 1]&amp;lt;/code&amp;gt; and grass is &amp;lt;code&amp;gt;[3, 0, 1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;code&amp;gt;stera&amp;lt;/code&amp;gt; File Positions==&lt;br /&gt;
[[File:Stera_File_Positions.png|alt=stera File Positions|thumb|&amp;lt;code&amp;gt;stera&amp;lt;/code&amp;gt; File Positions]]&lt;br /&gt;
&amp;lt;code&amp;gt;stera&amp;lt;/code&amp;gt; files referenced in the area array are positioned using a [[wikipedia:Z-order_curve|z-order curve]] or the [[wikipedia:Moser–de_Bruijn_sequence|Moser-de Bruijn sequence]].&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:File extensions]]&lt;br /&gt;
[[Category:File extensions (STERA)]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Water.extm&amp;diff=11060</id>
		<title>Water.extm</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Water.extm&amp;diff=11060"/>
		<updated>2022-01-08T22:41:38Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: Adjust code snippet to be consistent with water.extm size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
[[File:5000000000.water.extm.png|alt=Generated water material map of Hyrule Main Field|thumb|Generated water material map of Hyrule Main Field]]&lt;br /&gt;
&amp;lt;code&amp;gt;water.extm&amp;lt;/code&amp;gt; files describe the water heightmap and the texture of the main field and add-on content field.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== water.extm File Specification ==&lt;br /&gt;
&lt;br /&gt;
=== water.extm File Layout ===&lt;br /&gt;
&lt;br /&gt;
Each file contains a 64×64 grid. For each vertex there is 8 bytes of data that describe the height of the mesh, the material type and flow speed.&lt;br /&gt;
&lt;br /&gt;
=== Water Map Data ===&lt;br /&gt;
&lt;br /&gt;
Each entry in the water data table is 8 bytes long.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|2&lt;br /&gt;
|Unsigned Short&lt;br /&gt;
|&amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; (Vertex &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; component)&lt;br /&gt;
|-&lt;br /&gt;
|0x02&lt;br /&gt;
|2&lt;br /&gt;
|Unsigned Short&lt;br /&gt;
|&amp;lt;code&amp;gt;xAxisFlowRate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|2&lt;br /&gt;
|Unsigned Short&lt;br /&gt;
|&amp;lt;code&amp;gt;zAxisFlowRate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0x05&lt;br /&gt;
|1&lt;br /&gt;
|Unsigned Byte&lt;br /&gt;
|&amp;lt;code&amp;gt;materialIndex + 3&amp;lt;/code&amp;gt;. This may act as a checksum?&lt;br /&gt;
|-&lt;br /&gt;
|0x06&lt;br /&gt;
|1&lt;br /&gt;
|Unsigned Byte&lt;br /&gt;
|&amp;lt;code&amp;gt;materialIndex&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;flowSpeed&amp;lt;/code&amp;gt; are stored as unsigned shorts, but seem to map to float values. These can be calculated by dividing by the max size of an unsigned short:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;line&amp;quot;&amp;gt;&lt;br /&gt;
32767 / 0xffff = 0.5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; is further multiplied by another constant to get the final height (the constant is unknown at this time, but is close to &amp;lt;code&amp;gt;0x300 / 0xffff&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt;&amp;lt;ref&amp;gt;&amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; is expected to be an integer quotient. The &amp;lt;code&amp;gt;floor&amp;lt;/code&amp;gt; function can be used if integer division is not supported.&amp;lt;/ref&amp;gt; can be calculated, while iterating through the data table:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line=&amp;quot;line&amp;quot;&amp;gt;&lt;br /&gt;
for (int index = 0; index &amp;lt; 64 * 64; index++) {&lt;br /&gt;
    uint x = index % 64;&lt;br /&gt;
    uint z = index / 64;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flow Rates are calculated as &amp;lt;code&amp;gt;(flowRate * 2) - 1&amp;lt;/code&amp;gt; and ranges from &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. On the x-axis this changes flow direction from East (&amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;) to West (&amp;lt;code&amp;gt;+1&amp;lt;/code&amp;gt;) and on the z-axis from North (&amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;) to South (&amp;lt;code&amp;gt;+1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Material Index ===&lt;br /&gt;
&lt;br /&gt;
This data is stored in Terrain.Tex1.bfres.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!id&lt;br /&gt;
!file&lt;br /&gt;
!name&lt;br /&gt;
!attribute&lt;br /&gt;
!attribute_sub&lt;br /&gt;
!flag&lt;br /&gt;
!Google Translated&lt;br /&gt;
|-&lt;br /&gt;
|0 &lt;br /&gt;
|Water &lt;br /&gt;
|水 &lt;br /&gt;
|Water &lt;br /&gt;
|Water &lt;br /&gt;
|0 &lt;br /&gt;
|Water&lt;br /&gt;
|-&lt;br /&gt;
|1 &lt;br /&gt;
|HotWater &lt;br /&gt;
|熱湯 &lt;br /&gt;
|Water &lt;br /&gt;
|Water_Hot &lt;br /&gt;
|0 &lt;br /&gt;
|Hot water&lt;br /&gt;
|-&lt;br /&gt;
|2 &lt;br /&gt;
|Poison &lt;br /&gt;
|毒水 &lt;br /&gt;
|Water &lt;br /&gt;
|Water_Poison &lt;br /&gt;
|0 &lt;br /&gt;
|Poison water&lt;br /&gt;
|-&lt;br /&gt;
|3 &lt;br /&gt;
|Lava &lt;br /&gt;
|溶岩 &lt;br /&gt;
|Lava &lt;br /&gt;
|Lava &lt;br /&gt;
|0 &lt;br /&gt;
|Lava&lt;br /&gt;
|-&lt;br /&gt;
|4 &lt;br /&gt;
|IceWater &lt;br /&gt;
|冷たい水 &lt;br /&gt;
|Water &lt;br /&gt;
|Water_Ice &lt;br /&gt;
|0 &lt;br /&gt;
|Cold water&lt;br /&gt;
|-&lt;br /&gt;
|5 &lt;br /&gt;
|Mud &lt;br /&gt;
|泥沼 &lt;br /&gt;
|Bog &lt;br /&gt;
|Bog &lt;br /&gt;
|0 &lt;br /&gt;
|Bog&lt;br /&gt;
|-&lt;br /&gt;
|6 &lt;br /&gt;
|Clear01 &lt;br /&gt;
|透明水01 &lt;br /&gt;
|Water &lt;br /&gt;
|Water &lt;br /&gt;
|0 &lt;br /&gt;
|Clear water 01&lt;br /&gt;
|-&lt;br /&gt;
|7 &lt;br /&gt;
|Sea &lt;br /&gt;
|海 &lt;br /&gt;
|Water &lt;br /&gt;
|Water &lt;br /&gt;
|0 &lt;br /&gt;
|Ocean&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:File extensions]]&lt;br /&gt;
[[Category:File extensions (STERA)]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Terminal&amp;diff=11032</id>
		<title>Terminal</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Terminal&amp;diff=11032"/>
		<updated>2021-11-07T20:16:28Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Subsystem infobox|name=Terminal|is_name_official=1|description=Debug tool?|init_addr_switch150=000000710109CC44|init_addr_wiiu150=035eb994}}&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Internals]]&lt;br /&gt;
[[Category: Subsystems (BotW)]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Havok&amp;diff=11031</id>
		<title>Havok</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Havok&amp;diff=11031"/>
		<updated>2021-10-28T11:15:09Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: Relative offsets tend to be relative to the provided absolute offset.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Havok&#039;&#039;&#039; is a middleware software suite developed by the Irish company Havok. Havok provides a physics engine component and related functions to video games.&lt;br /&gt;
&lt;br /&gt;
On September 14, 2007, Intel announced it had signed a definitive agreement to acquire Havok Inc.&amp;lt;ref&amp;gt;[http://www.intel.com/pressroom/archive/releases/2007/20070914corp.htm Intel To Acquire Havok]&amp;lt;/ref&amp;gt; In 2008, Havok was honored at the 59th Annual Technology &amp;amp; Engineering Emmy Awards for advancing the development of physics engines in electronic entertainment. On October 2, 2015, Microsoft announced it had acquired Havok.&amp;lt;ref&amp;gt;[http://blogs.microsoft.com/blog/2015/10/02/havok-to-join-microsoft Havok to join Microsoft]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products==&lt;br /&gt;
The Havok middleware suite consists of the following modules:&amp;lt;ref&amp;gt;[http://www.havok.com/products Product Overview]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Havok Physics&#039;&#039;&#039;: It is designed primarily for video games, and allows for real-time collision and dynamics of rigid bodies in three dimensions. It provides multiple types of dynamic constraints between rigid bodies (e.g. for ragdoll physics), and has a highly optimized collision detection library. By using dynamical simulation, Havok Physics allows for more realistic virtual worlds in games. The company was developing a specialized version of Havok Physics called Havok FX that made use of ATI and NVIDIA GPUs for physics simulations;&amp;lt;ref&amp;gt;[https://web.archive.org/web/20081205092623/http://www.xbitlabs.com/news/multimedia/display/20051028224421.html Havok Intros Havok FX Engine to Compute Physics Effects on GPUs]&amp;lt;/ref&amp;gt; however, the goal of GPU acceleration did not materialize until several years later.&amp;lt;ref&amp;gt;[https://www.youtube.com/watch?v=v1hoVCZZOd0&amp;amp;list=UUfcEdH66zmcp8JEz5NkwJuw&amp;amp;index=6 Havok Physics Playstation 4 Demo]&amp;lt;/ref&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Havok AI&#039;&#039;&#039;: In 2009, Havok released Havok AI, which provides advanced pathfinding capabilities for games. Havok AI provides navigation mesh generation, pathfinding and path following for video game environments.&lt;br /&gt;
*&#039;&#039;&#039;Havok Cloth&#039;&#039;&#039;: Released in 2008, Havok Cloth deals with efficient simulation of character garments and soft body dynamics.&lt;br /&gt;
*&#039;&#039;&#039;Havok Destruction&#039;&#039;&#039;: Also released in 2008, Havok Destruction provides tools for creation of destructible and deformable rigid body environments.&lt;br /&gt;
*&#039;&#039;&#039;Havok Animation Studio (discontinued)&#039;&#039;&#039;: Havok Animation Studio is formally known as Havok Behavior and Havok Animation. Havok Behavior is a runtime SDK for controlling game character animation at a high level using finite state machines. Havok Animation provides efficient playback and compression of character animations in games, and features such as inverse kinematics.&lt;br /&gt;
*&#039;&#039;&#039;Havok Script (discontinued)&#039;&#039;&#039;: Havok Script is a Lua-compatible virtual machine designed for video game development. It is shipped as part of the Havok Script Studio.&lt;br /&gt;
*&#039;&#039;&#039;Havok Vision Engine&#039;&#039;&#039; &#039;&#039;&#039;(discontinued):&#039;&#039;&#039; On August 8, 2011, Havok announced their acquisition of German game engine development company Trinigy and their Vision Engine and toolset.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
{{Expand section}}&lt;br /&gt;
&#039;&#039;Breath of the Wild&#039;&#039; uses the &#039;&#039;&#039;Havok Physics&#039;&#039;&#039;, &#039;&#039;&#039;Havok AI&#039;&#039;&#039; and &#039;&#039;&#039;Havok Cloth&#039;&#039;&#039;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+File Extensions&lt;br /&gt;
!Extension&lt;br /&gt;
!Product&lt;br /&gt;
!Description&lt;br /&gt;
!Locations&lt;br /&gt;
|-&lt;br /&gt;
|[[hknm2]]&lt;br /&gt;
|Havok AI&lt;br /&gt;
|Navigation meshes (used by AI for path finding)&lt;br /&gt;
|&amp;lt;code&amp;gt;NavMesh/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[hkrb]]&lt;br /&gt;
|Havok Physics&lt;br /&gt;
|Rigid body physics&lt;br /&gt;
|&amp;lt;code&amp;gt;Physics/RigidBody/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[hkcl]]&lt;br /&gt;
|Havok Cloth&lt;br /&gt;
|Cloth physics&lt;br /&gt;
|&amp;lt;code&amp;gt;Physics/Cloth/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[hkrg]]&lt;br /&gt;
|Havok Physics&lt;br /&gt;
|Rag doll physics&lt;br /&gt;
|&amp;lt;code&amp;gt;Physics/Ragdoll/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[hksc]]&lt;br /&gt;
|Havok Physics&lt;br /&gt;
|Static compound physics&lt;br /&gt;
|&amp;lt;code&amp;gt;Physics/StaticCompound/&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|[[hktmrb]]&lt;br /&gt;
|Havok Physics&lt;br /&gt;
|Terrain mesh rigid body physics&lt;br /&gt;
|&amp;lt;code&amp;gt;Physics/TeraMeshRigidBody/&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===File Types===&lt;br /&gt;
&lt;br /&gt;
====hknm2====&lt;br /&gt;
{{Expand section}}Used in shrines and field sections.&lt;br /&gt;
&lt;br /&gt;
====hkrb====&lt;br /&gt;
{{Expand section}}Used in actors.&lt;br /&gt;
&lt;br /&gt;
====hkcl====&lt;br /&gt;
{{Expand section}}Used in actors.&lt;br /&gt;
&lt;br /&gt;
====hkrg====&lt;br /&gt;
{{Expand section}}Used in actors.&lt;br /&gt;
&lt;br /&gt;
====hksc====&lt;br /&gt;
{{Expand section}}Used in shrines and field sections.&lt;br /&gt;
&lt;br /&gt;
====hktmrb====&lt;br /&gt;
{{Expand section}}Used in field sections.&lt;br /&gt;
&lt;br /&gt;
==Havok File Specification==&lt;br /&gt;
Havok files serve as a data container for multiple Havok classes per file and sometimes multiple Havok files per file&amp;lt;ref&amp;gt;Static Compound files ([[hksc]]) include two Havok file definitions. The first file defines &amp;lt;code&amp;gt;StaticCompoundInfo&amp;lt;/code&amp;gt; and the second defines &amp;lt;code&amp;gt;hkpPhysicsData&amp;lt;/code&amp;gt; (which includes &amp;lt;code&amp;gt;hkpRigidBody&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hkpStaticCompoundShape&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hkpBvCompressedMeshShape&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hkpConvexVerticesShape&amp;lt;/code&amp;gt;, et. al.).&amp;lt;/ref&amp;gt;. The class names are defined in each file.&lt;br /&gt;
&lt;br /&gt;
Note that this specification only applies to version 2014.2.0-r1&lt;br /&gt;
&lt;br /&gt;
===File Structure===&lt;br /&gt;
[[File:Havok-file-structure.png|thumb|File structure]]&lt;br /&gt;
Each file contains a header and three sections: classnames, types and data&lt;br /&gt;
&lt;br /&gt;
====classnames====&lt;br /&gt;
The classnames section (&amp;lt;code&amp;gt;__classnames__&amp;lt;/code&amp;gt; internally) contains a list of Havok classes used by the file to correctly decompile the binary data into a usable data structure.&lt;br /&gt;
&lt;br /&gt;
====types====&lt;br /&gt;
The types section (&amp;lt;code&amp;gt;__types__&amp;lt;/code&amp;gt; internally) does not appear to be used by &#039;&#039;Breath of the Wild&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====data====&lt;br /&gt;
the data section (&amp;lt;code&amp;gt;__data__&amp;lt;/code&amp;gt; internally) contains binary data to be serialized into Havok data structures for use by the Havok engine.&lt;br /&gt;
&lt;br /&gt;
==Header==&lt;br /&gt;
The header seems to have a 16-byte alignment and can be 64-bytes (short header) or 80-bytes (long header) in length, depending on if &#039;&#039;&#039;Section offset&#039;&#039;&#039; equals 0 (short header) or 16 (long header).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
Header Specification&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|8&lt;br /&gt;
|Bytes&lt;br /&gt;
|Havok file signature (magic) &amp;lt;code&amp;gt;57 E0 E0 57 10 C0 C0 10&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|User tag (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Version (always 11)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|1&lt;br /&gt;
|Byte&lt;br /&gt;
|Pointer size (always 4 on Wii U, 8 on Switch)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x11&amp;lt;/code&amp;gt;&lt;br /&gt;
|1&lt;br /&gt;
|Byte&lt;br /&gt;
|Endian (always 0 on WiiU, 1 on Switch)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x12&amp;lt;/code&amp;gt;&lt;br /&gt;
|1&lt;br /&gt;
|Byte&lt;br /&gt;
|Padding option (always 0 on WiiU, 1 on Switch)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x13&amp;lt;/code&amp;gt;&lt;br /&gt;
|1&lt;br /&gt;
|Byte&lt;br /&gt;
|Base class (always 1)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Section count (always 3)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Contents section index (always 2)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Contents section offset (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Contents classname section index (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Contents classname section offset (always 75)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|16&lt;br /&gt;
|String&lt;br /&gt;
|Havok version &amp;lt;code&amp;gt;hk_2014.2.0-r1&amp;lt;/code&amp;gt; for BotW files&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x38&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Flags (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt;&lt;br /&gt;
|2&lt;br /&gt;
|Short&lt;br /&gt;
|Unknown (always 21)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x3e&amp;lt;/code&amp;gt;&lt;br /&gt;
|2&lt;br /&gt;
|Short&lt;br /&gt;
|Section offset (0 or 16; if 16, the header is 16 bytes longer)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Optional Header Bytes===&lt;br /&gt;
There are optional header bytes for a long header. If Section offset equals 16, an additional 16 bytes are added to the header for a total of 80 bytes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Optional Header Bytes&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x40&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Unknown (always 20)&lt;br /&gt;
|-&lt;br /&gt;
|0x44&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Unknown (always 0; probably padding for alignment)&lt;br /&gt;
|-&lt;br /&gt;
|0x48&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Unknown (always 0; probably padding for alignment)&lt;br /&gt;
|-&lt;br /&gt;
|0x4c&lt;br /&gt;
|4&lt;br /&gt;
|Int&lt;br /&gt;
|Unknown (always 0; probably padding for alignment)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Section Headers==&lt;br /&gt;
[[File:Havok-class-header-delimits.png|thumb|&amp;lt;code&amp;gt;FF&amp;lt;/code&amp;gt; bytes indicate section header boundaries]]&lt;br /&gt;
Each section has a 64-byte header which includes the section name, absolute offset to the section start and six relative offsets to segments within the section. These relative offsets are often relative to the absolute offset. {{check}} All three section headers follow the file header and are delimited by 16 delimiter bytes (&amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt;).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Section Header Specification&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|20&lt;br /&gt;
|String&lt;br /&gt;
|Section name&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Absolute offset&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Relative offset 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Relative offset 2&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Relative offset 3&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Relative offset 4&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Relative offset 5&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Relative offset 6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Section Name===&lt;br /&gt;
There are only three section names: &amp;lt;code&amp;gt;__classnames__&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;__types__&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;__data__&amp;lt;/code&amp;gt;. The section name is a null-terminated string with a delimiter byte (&amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt;) in byte 20.&lt;br /&gt;
&lt;br /&gt;
===Absolute Offset===&lt;br /&gt;
The absolute offset to the section.&lt;br /&gt;
&lt;br /&gt;
===Relative Offsets===&lt;br /&gt;
The relative offsets point to different large structures within the section.&lt;br /&gt;
&lt;br /&gt;
For example, given the following section header:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
5F 5F 64 61 74 61 5F 5F 00 00 00 00 00 00 00 00 | __data__........&lt;br /&gt;
00 00 00 FF 00 00 01 60 00 00 3C 00 00 00 3C 10 | .......`..&amp;lt;...&amp;lt;.&lt;br /&gt;
00 00 3C 10 00 00 3C 20 00 00 3C 20 00 00 3C 20 | ..&amp;lt;...&amp;lt; ..&amp;lt; ..&amp;lt; &lt;br /&gt;
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | ................&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The section name is &amp;lt;code&amp;gt;__data__&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The absolute offset is the beginning of the data section, right after the class names.&lt;br /&gt;
&lt;br /&gt;
This following tables shows to which sections the offsets are pointing:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Data Header Specification&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description / Section&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|20&lt;br /&gt;
|String&lt;br /&gt;
|Section name&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Beginning of data section&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Pointer - Data Pointer&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Pointer - Linked Entries&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Pointer - Class Mapping&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|EOF&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|EOF&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|EOF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Class Names Section==&lt;br /&gt;
[[File:Havok-class-names.png|thumb|Class names binary data]]&lt;br /&gt;
The classnames section header includes the absolute offset to the class names data and a single unique relative offset to the end of the section. The section is made up of an array of hash ids and a null-terminated string class name.&lt;br /&gt;
&lt;br /&gt;
===Class Name===&lt;br /&gt;
Class names are read until the end of the section or a delimiter byte (&amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt;) is is reached.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Class Name Specification&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|An integer associated with the class type&lt;br /&gt;
|-&lt;br /&gt;
|0x05&lt;br /&gt;
|1&lt;br /&gt;
|Byte&lt;br /&gt;
|Unknown (always &amp;lt;code&amp;gt;0x09&amp;lt;/code&amp;gt;)&amp;lt;ref&amp;gt;It is assumed to be a delimiter between the id and the class name string. However, &amp;lt;code&amp;gt;0x09&amp;lt;/code&amp;gt; is also the tab character and could imply something to the engine.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0x06&lt;br /&gt;
|n&lt;br /&gt;
|String&lt;br /&gt;
|Class name (null-terminated string)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Types Section==&lt;br /&gt;
The types section is unused in &#039;&#039;Breath of the Wild&#039;&#039;. The absolute offset points to the beginning of the data section with all null (&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;) relative offsets.&lt;br /&gt;
&lt;br /&gt;
==Data Section==&lt;br /&gt;
[[File:Havok-data-structure.png|thumb|390x390px|Data structure]]&lt;br /&gt;
&lt;br /&gt;
===Data===&lt;br /&gt;
The bulk of the file is devoted to the data section which is divided into smaller segments dependent on the file type.&lt;br /&gt;
All files follow a general structure as you can see in the picture.&lt;br /&gt;
&lt;br /&gt;
Right after the header begins the data section which contains multiple chunks, luckily, the first four chunks are always the same.&lt;br /&gt;
&lt;br /&gt;
After that, several more chunks can be found depending on the file.&lt;br /&gt;
&lt;br /&gt;
===Pointer===&lt;br /&gt;
The next section, at the end of the file, contains three different pointer arrays.&lt;br /&gt;
It is used to connect the whole file together, and should be used as an entry point while reading the file.&lt;br /&gt;
&lt;br /&gt;
The offsets to these three sections can be found in the header.&lt;br /&gt;
&lt;br /&gt;
====Data Pointer====&lt;br /&gt;
An array of offsets relative to the beginning of the data section, pointing into various chunks.&lt;br /&gt;
&lt;br /&gt;
Which offsets ends up in this list, depends completely on the chunks used in the data section.&lt;br /&gt;
&lt;br /&gt;
However, since the first four classes are always the same, the first 14 offsets will be the constant.&lt;br /&gt;
[[File:Havok_data_pointer.png|none|thumb|Data Pointer]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Linked Entries====&lt;br /&gt;
Contains pointer-pairs to connect chunks together.&lt;br /&gt;
&lt;br /&gt;
Each pair has the following format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Pointer Pair&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Type&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|base&lt;br /&gt;
|Offset somewhere in the parent chunk&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|flags&lt;br /&gt;
|Unknown (always &amp;lt;code&amp;gt;0x00000002)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0x08&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|target&lt;br /&gt;
|Target chunk (always beginning of the chunk)&lt;br /&gt;
|}&lt;br /&gt;
To connect a chunk with another, a base pointer somewhere inside the base-chunk (depending on the class/type) is used as the first pointer.&lt;br /&gt;
&lt;br /&gt;
Then, the target pointer is the offset of the beginning of the target chunk.&lt;br /&gt;
[[File:Havok_pointer_linked.png|none|thumb|Linked Entries]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Mapping====&lt;br /&gt;
The last section contains the mapping between the chunks and the classes they are using.&lt;br /&gt;
&lt;br /&gt;
They, again, use pointer pairs:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Class Mapping Pointer&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Type&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|data&lt;br /&gt;
|Offset to the start of an chunk, relative to data-section&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|flags&lt;br /&gt;
|Unknown (always &amp;lt;code&amp;gt;0x00000000)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|0x08&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|class&lt;br /&gt;
|Offset to the class name, relative to class-section&lt;br /&gt;
|}&lt;br /&gt;
To link a chunk to a class, the data pointer is set to the beginning of the chunk.&lt;br /&gt;
&lt;br /&gt;
The class pointer is set to the first character of the class name found in the header section.&lt;br /&gt;
[[File:Havok_class_mapping.png|none|thumb|Class Mapping]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This also marks the end of the file, if the offset is not aligned to 16 bytes, the rest is filled with &amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Data Classes==&lt;br /&gt;
{{Expand section}}&lt;br /&gt;
All known classes that chunks can use are listed here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Generally used classes&lt;br /&gt;
!Signature&lt;br /&gt;
!Name&lt;br /&gt;
|-&lt;br /&gt;
|0x2772c11e&lt;br /&gt;
|hkRootLevelContainer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Havok Animation classes&lt;br /&gt;
!Signature&lt;br /&gt;
!Name&lt;br /&gt;
|-&lt;br /&gt;
|0x26859f4c&lt;br /&gt;
|hkaAnimationContainer&lt;br /&gt;
|-&lt;br /&gt;
|0xfec1cedb&lt;br /&gt;
|hkaSkeleton&lt;br /&gt;
|-&lt;br /&gt;
|0xace9849c&lt;br /&gt;
|hkaSkeletonMapper&lt;br /&gt;
|-&lt;br /&gt;
|0x5448f464&lt;br /&gt;
|hkaRagdollInstance&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Havok Physics classes&lt;br /&gt;
!Signature&lt;br /&gt;
!Name&lt;br /&gt;
|-&lt;br /&gt;
|0x47a8ca83&lt;br /&gt;
|hkpPhysicsData&lt;br /&gt;
|-&lt;br /&gt;
|0xb3cc6e64&lt;br /&gt;
|hkpPhysicsSystem&lt;br /&gt;
|-&lt;br /&gt;
|0xcd2e69e5&lt;br /&gt;
|hkpRigidBody&lt;br /&gt;
|-&lt;br /&gt;
|0xfda179f3&lt;br /&gt;
|hkpCapsuleShape&lt;br /&gt;
|-&lt;br /&gt;
|0xda4ce91e&lt;br /&gt;
|hkpConstraintInstance&lt;br /&gt;
|-&lt;br /&gt;
|0xed9648f7&lt;br /&gt;
|hkpRagdollConstraintData&lt;br /&gt;
|-&lt;br /&gt;
|0x75aae5a3&lt;br /&gt;
|hkpLimitedHingeConstraintData&lt;br /&gt;
|-&lt;br /&gt;
|0x143dd400&lt;br /&gt;
|hkpPositionConstraintMotor&lt;br /&gt;
|-&lt;br /&gt;
|0xabab6bb3&lt;br /&gt;
|hkpBvCompressedMeshShape&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Havok Cloth classes&lt;br /&gt;
!Signature&lt;br /&gt;
!Name&lt;br /&gt;
|-&lt;br /&gt;
|0x3512912b&lt;br /&gt;
|hclClothContainer&lt;br /&gt;
|-&lt;br /&gt;
|0xf14068be&lt;br /&gt;
|hclCollidable&lt;br /&gt;
|-&lt;br /&gt;
|0xdd03f524&lt;br /&gt;
|hclCapsuleShape&lt;br /&gt;
|-&lt;br /&gt;
|0xd779f2c5&lt;br /&gt;
|hclSphereShape&lt;br /&gt;
|-&lt;br /&gt;
|0x92f3edba&lt;br /&gt;
|hclClothData&lt;br /&gt;
|-&lt;br /&gt;
|0xe6105187&lt;br /&gt;
|hclSimClothData&lt;br /&gt;
|-&lt;br /&gt;
|0x426b3354&lt;br /&gt;
|hclStandardLinkConstraintSet&lt;br /&gt;
|-&lt;br /&gt;
|0x426b3354&lt;br /&gt;
|hclStretchLinkConstraintSet&lt;br /&gt;
|-&lt;br /&gt;
|0x82567805&lt;br /&gt;
|hclLocalRangeConstraintSet&lt;br /&gt;
|-&lt;br /&gt;
|0x9cfe2c7d&lt;br /&gt;
|hclTransitionConstraintSet&lt;br /&gt;
|-&lt;br /&gt;
|0x26824757&lt;br /&gt;
|hclBendLinkConstraintSet&lt;br /&gt;
|-&lt;br /&gt;
|0x1b254ca1&lt;br /&gt;
|hclSimClothPose&lt;br /&gt;
|-&lt;br /&gt;
|0xa0130a2c&lt;br /&gt;
|hclScratchBufferDefinition&lt;br /&gt;
|-&lt;br /&gt;
|0x7f4a5bfc&lt;br /&gt;
|hclBufferDefinition&lt;br /&gt;
|-&lt;br /&gt;
|0x18fd4565&lt;br /&gt;
|hclTransformSetDefinition&lt;br /&gt;
|-&lt;br /&gt;
|0x6171b106&lt;br /&gt;
|hclObjectSpaceSkinPOperator&lt;br /&gt;
|-&lt;br /&gt;
|0xe65a701c&lt;br /&gt;
|hclMoveParticlesOperator&lt;br /&gt;
|-&lt;br /&gt;
|0x75c72f0f&lt;br /&gt;
|hclSimulateOperator&lt;br /&gt;
|-&lt;br /&gt;
|0x80d9769f&lt;br /&gt;
|hclSimpleMeshBoneDeformOperator&lt;br /&gt;
|-&lt;br /&gt;
|0xda737296&lt;br /&gt;
|hclGatherAllVerticesOperator&lt;br /&gt;
|-&lt;br /&gt;
|0x7b02cd1b&lt;br /&gt;
|hclClothState&lt;br /&gt;
|-&lt;br /&gt;
|0xe6db074c&lt;br /&gt;
|hclCopyVerticesOperator&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Havok AI classes&lt;br /&gt;
!Signature&lt;br /&gt;
!Name&lt;br /&gt;
|-&lt;br /&gt;
|0x6d493bdb&lt;br /&gt;
|hkaiNavMesh&lt;br /&gt;
|-&lt;br /&gt;
|0x2f02d92c&lt;br /&gt;
|hkaiDirectedGraphExplicitCost&lt;br /&gt;
|-&lt;br /&gt;
|0x433a1e61&lt;br /&gt;
|hkaiStaticTreeNavMeshQueryMediator&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Havok Compound classes&lt;br /&gt;
!Signature&lt;br /&gt;
!Name&lt;br /&gt;
|-&lt;br /&gt;
|0x99e8d0cb&lt;br /&gt;
|hkcdStaticAabbTree&lt;br /&gt;
|-&lt;br /&gt;
|0x33735476&lt;br /&gt;
|hkcdStaticTreeDefaultTreeStorage6&lt;br /&gt;
|-&lt;br /&gt;
|0x5115a202&lt;br /&gt;
|StaticCompoundInfo&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=TSCB&amp;diff=11030</id>
		<title>TSCB</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=TSCB&amp;diff=11030"/>
		<updated>2021-10-18T21:09:12Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: Material information header value should include itself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;T&#039;&#039;&#039;errain &#039;&#039;&#039;sc&#039;&#039;&#039;ene &#039;&#039;&#039;b&#039;&#039;&#039;inary (TSCB) files describe terrain areas layout and terrain materials.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TSCB File Specification==&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|String&lt;br /&gt;
|TSCB file signature (magic) &amp;lt;code&amp;gt;54 53 43 42&amp;lt;/code&amp;gt; or &amp;quot;TSCB&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|TSCB version? &amp;lt;code&amp;gt;0A 00 00 00&amp;lt;/code&amp;gt; or &amp;quot;10.0.0.0&amp;quot;&amp;lt;ref&amp;gt;U-King.elf:0x024D2F8C-0x024D300A holds two error messages: &amp;quot;【データロード】メジャーバージョンの不一致&amp;quot; (&amp;quot;[Data load] Major version mismatch&amp;quot;) and &amp;quot;【データロード】マイナーバージョンの不一致&amp;quot; (&amp;quot;[Data Load] Minor version mismatch&amp;quot;)&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Game crashes on load screen if not equal to &amp;lt;code&amp;gt;0A 00 00 00&amp;lt;/code&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always &amp;lt;code&amp;gt;00 00 00 01&amp;lt;/code&amp;gt;. Game crashes on load screen if not equal to &amp;lt;code&amp;gt;00 00 00 01&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;file_base&amp;lt;/code&amp;gt; table relative offset&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|&amp;lt;code&amp;gt;world_scale&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;500.0&amp;lt;/code&amp;gt;. Scales the terrain along the x- and z-axis.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Terrain mesh max height &amp;lt;code&amp;gt;800.0&amp;lt;/code&amp;gt;. Used to calculate the actual vertex height with [[HGHT|hght]] data.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;material_info_array&amp;lt;/code&amp;gt; length (number of elements in the array)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;area_array&amp;lt;/code&amp;gt; length (number of elements in the array)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Probably padding&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Probably padding&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|&amp;lt;code&amp;gt;tile_size&amp;lt;/code&amp;gt;. Used by the area array.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown &amp;lt;code&amp;gt;00 00 00 08&amp;lt;/code&amp;gt;. &amp;lt;ref&amp;gt;Values &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;13&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;14&amp;lt;/code&amp;gt; affects textures. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;11&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt; will crash the game.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Material Information Array==&lt;br /&gt;
The material information array references texture data contained in &amp;lt;code&amp;gt;content/Model/Terrain.Tex1.sbfres&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
The material information header is one value, the section size. This includes the index table and the value table, as well as itself.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Material info section size in bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Material Information Array Lookup Table===&lt;br /&gt;
Following the header is a table of relative offsets to each entry in &amp;lt;code&amp;gt;material_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Offset to array entry, relative to the first byte of this offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Material Information Value Table===&lt;br /&gt;
Each entry in the array contains an index and four attributes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Array index (&amp;lt;code&amp;gt;mat_index&amp;lt;/code&amp;gt;) of &amp;lt;code&amp;gt;material_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Texture u-axis (x-axis)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Texture v-axis (y-axis)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Unknown. values range from 0-1.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Unknown. values range from 0.2-1.63&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Area Array==&lt;br /&gt;
&lt;br /&gt;
===Area Array Lookup Table===&lt;br /&gt;
Following the material information section is a table of relative offsets to each entry in area_array&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Offset to array entry, relative to the first byte of this offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Area Array Value Table===&lt;br /&gt;
Each entry contains meta data for one tile in the terrain scene. There are multiple levels of detail (lod) for the terrain.&lt;br /&gt;
&lt;br /&gt;
Entry size ranges from &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0x58&amp;lt;/code&amp;gt; depending on the size of &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|X Position&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Z Position&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|&amp;lt;code&amp;gt;area_size&amp;lt;/code&amp;gt; (length and width)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x0c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Minimum Terrain Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Maximum Terrain Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x14&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Minimum Water Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Float&lt;br /&gt;
|Maximum Water Height - ranges from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x1c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Usually &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, crashes on &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt;.&amp;lt;ref&amp;gt;May be a flag for grass and water? &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; seems to indicate no water or grass.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;file_base&amp;lt;/code&amp;gt;. Relative offset to file base name string.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Usually &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Usually &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|&amp;lt;code&amp;gt;ref_extra&amp;lt;/code&amp;gt;. It seems to be a flag to indicate if there is an attached &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Parameters====&lt;br /&gt;
&amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; - Area tile x coordinate (East-West)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; - Area tile z coordinate (North-South)&lt;br /&gt;
&amp;lt;code&amp;gt;area_size&amp;lt;/code&amp;gt; - Determines the length and width of the area. It can be calculated with:&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;(area_size / tile_size * world_scale) * 20&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;code&amp;gt;tile_size&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;world_scale&amp;lt;/code&amp;gt; are in the header.&lt;br /&gt;
&lt;br /&gt;
===Extra Information Array===&lt;br /&gt;
if &amp;lt;code&amp;gt;ref_extra&amp;lt;/code&amp;gt; does not equal &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; there is an &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt; attached to this area. The array is 4 or 8 values long.&lt;br /&gt;
&lt;br /&gt;
Every area includes a [[HGHT|.hght]] and [[MATE|.mate]] file. The &amp;lt;code&amp;gt;extra_info_array&amp;lt;/code&amp;gt; indicates if there is an additional [[Water.extm|.water.extm]] and / or [[Grass.extm|.grass.extm]] file&lt;br /&gt;
&lt;br /&gt;
===Terrain and Water Height===&lt;br /&gt;
0x0c through 0x18 are used to determine what height range the terrain and water should render within. This is possibly used to assist with occlusion. If the heightmap moves outside of the range defined here, there will be visual artefacts present at higher viewing angles, usually between 45 and 90 degrees. The range value is multiplied by the max height defined in the TSCB header to determine the final value in &#039;real&#039; co-ordinates.&lt;br /&gt;
&lt;br /&gt;
====Header====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|extra_info_array length. Number of values (not elements) in array.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;(0x04)&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 20, but only present when extra_info_array length is 8.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Extra Information Array Value Table====&lt;br /&gt;
After the Header, there are &amp;lt;code&amp;gt;extra_info_array length / 4&amp;lt;/code&amp;gt; elements of this structure.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset (h)&lt;br /&gt;
!Size&lt;br /&gt;
!Data Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 3.&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. 0 or 1.&lt;br /&gt;
|-&lt;br /&gt;
|0x08&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 1.&lt;br /&gt;
|-&lt;br /&gt;
|0x0c&lt;br /&gt;
|4&lt;br /&gt;
|Unsigned Int&lt;br /&gt;
|Unknown. Always 0.&lt;br /&gt;
|}&lt;br /&gt;
 [3, 0, 1, 0, 3, 1, 1, 0] = grass, water&lt;br /&gt;
 [3, 1, 1, 0, 3, 0, 1, 0] = water, grass&lt;br /&gt;
 [3, 1, 1, 0]             = water&lt;br /&gt;
 [3, 0, 1, 0]             = grass&lt;br /&gt;
It seems that water is &amp;lt;code&amp;gt;[3, 1, 1]&amp;lt;/code&amp;gt; and grass is &amp;lt;code&amp;gt;[3, 0, 1]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;code&amp;gt;stera&amp;lt;/code&amp;gt; File Positions==&lt;br /&gt;
[[File:Stera_File_Positions.png|alt=stera File Positions|thumb|&amp;lt;code&amp;gt;stera&amp;lt;/code&amp;gt; File Positions]]&lt;br /&gt;
&amp;lt;code&amp;gt;stera&amp;lt;/code&amp;gt; files referenced in the area array are positioned using a [[wikipedia:Z-order_curve|z-order curve]] or the [[wikipedia:Moser–de_Bruijn_sequence|Moser-de Bruijn sequence]].&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:File extensions]]&lt;br /&gt;
[[Category:File extensions (STERA)]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Map_unit&amp;diff=10917</id>
		<title>Map unit</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Map_unit&amp;diff=10917"/>
		<updated>2020-11-25T14:46:46Z</updated>

		<summary type="html">&lt;p&gt;Greenlord: Some clarification for Pulse Linktags. (Footnote)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Not to be confused with [[map]]s, [[Stage|stages]] or [[Scene|scenes]]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&#039;&#039;&#039;Map units&#039;&#039;&#039; contain placement data for game maps (e.g. MainField/A-1). In other words, they are used to configure fixed object spawns on maps for actors such as scenery and enemies for example, in contrast to the [[AutoPlacement]] system, which dynamically spawns actors.&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Types ==&lt;br /&gt;
Two types of map units exist: &#039;&#039;Static&#039;&#039; and &#039;&#039;Dynamic&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Static map units&#039;&#039;&#039; are loaded during stage generation (see [[GameScene]] for more details). Their name is suffixed with &amp;lt;code&amp;gt;_Static&amp;lt;/code&amp;gt;. They can contain both map rails and map objects; furthermore objects can be linked to each other to implement custom game logic using the [[#Link system]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dynamic map units&#039;&#039;&#039; are loaded and unloaded on-the-fly. Their name is suffixed with &amp;lt;code&amp;gt;_Dynamic&amp;lt;/code&amp;gt;. The dynamic loading capability is only really put to good use for open-world type stages (e.g. MainField and AocField). In such map units, the link system cannot be used and only map objects can be specified.&lt;br /&gt;
&lt;br /&gt;
== Contents ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LocationPosX&amp;lt;/code&amp;gt; ===&lt;br /&gt;
X coordinate of the center of the map unit.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LocationPosZ&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Y coordinate of the center of the map unit.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LocationSize&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Size of the map unit (side length of the square).&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Objs&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{expand section}}&lt;br /&gt;
Array of object structures. &#039;&#039;&#039;Must be sorted by HashId&#039;&#039;&#039;&amp;lt;ref&amp;gt;Technically, sorting is only required for Dynamic (non-group 0) map units. However, not sorting causes the game to fall back to a slower linear search.&amp;lt;/ref&amp;gt; because the placement subsystem performs binary searches on the object array in various cases&amp;lt;ref&amp;gt;0x7101256E14&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Rails&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{{expand section}}&lt;br /&gt;
Array of rail structures. Can only appear in group 0 maps (Static); this section is completely ignored for non-static map units.&lt;br /&gt;
&lt;br /&gt;
== Link system ==&lt;br /&gt;
&#039;&#039;&#039;In static map units only&#039;&#039;&#039;, map objects can be linked to other objects (up to 255 in a single generation group&amp;lt;ref&amp;gt;&amp;quot;一つの生成グループに 255 以上のアクタが指定されています。テストで無ければプログラマに相談&amp;quot;&amp;lt;/ref&amp;gt;). These links allow implementing custom logic and callbacks. For example, DeadUp signals the destination object when the source object dies. This is used to implement enemy chests that only unlock after clearing an enemy camp.&lt;br /&gt;
&lt;br /&gt;
LinkTags and other tag objects are lightweight actors that are used to link objects together.&lt;br /&gt;
&lt;br /&gt;
Objects that are linked together, either directly or via indirect links, are put into the same &#039;&#039;&#039;generation group&#039;&#039;&#039; and loaded at the same time{{check}}. If the placement system fails to load an actor, the entire generation group is discarded.&lt;br /&gt;
&lt;br /&gt;
===Definitions===&lt;br /&gt;
{{expand section}}&lt;br /&gt;
Cs means Constraint&amp;lt;ref&amp;gt;SliderCs links are handled by a function {{addr|a=0x7100F70D60|ver=nx-1.5.0}} that is also called by [[AIDef:Action/SwitchStepSliderConstraint]]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! ID !! Name !! Description !! Official description&lt;br /&gt;
|-&lt;br /&gt;
| 4 || -AxisX || - || マイナスX軸シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 5 || -AxisY || - || マイナスY軸シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 6 || -AxisZ || - || マイナスZ軸シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 24 || AreaCol || Area collision (link target is an Area object) || エリア(センサ)指定&lt;br /&gt;
|-&lt;br /&gt;
| 1 || AxisX || - || X軸シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 2 || AxisY || - || Y軸シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AxisZ || - || Z軸シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 37 || BAndSCs || Ball &amp;amp; Socket constraint || ボール＆ソケットCS&lt;br /&gt;
|-&lt;br /&gt;
| 38 || BAndSLimitAngYCs || Y angular velocity limited Ball &amp;amp; Socket constraint || Y角速度制限付ボール＆ソケットCS&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BasicSig || Basic signal || 基本シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 9 || BasicSigOnOnly || Basic signal [only emits ON signals] || オンのみ基本シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 14 || ChangeAtnSig || Signal on Attention change (e.g. picking up a weapon) || アテンション変更時シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 39 || CogWheelCs || Gear/cogwheel constraint || 歯車CS&lt;br /&gt;
|-&lt;br /&gt;
| 21 || CopyWaitRevival || Activate links when the revival flag of the CopyWaitRevival target is set (e.g. can be used with LinkTagAnd to trigger basic signals when a chest is opened) || 配置自動セーブ継承&lt;br /&gt;
|-&lt;br /&gt;
| 15 || Create || Create a map object. Target objects are not created unless this link is activated. || 生成&lt;br /&gt;
|-&lt;br /&gt;
| 11 || DeadUp || Signal on death || 死んだらオン&lt;br /&gt;
|-&lt;br /&gt;
| 16 || Delete || Delete a map object. Target objects are created and stay spawned until this link is activated. Note: the corresponding collision is disabled even for objects that have their collision data extracted to separate Static Compound files. || 削除&lt;br /&gt;
|-&lt;br /&gt;
| 29 || DemoMember || - || デモ参加&lt;br /&gt;
|-&lt;br /&gt;
| 32 || FixedCs || - || 固定CS&lt;br /&gt;
|-&lt;br /&gt;
| 26 || ForSale || Links a shop item to its seller (target is the seller NPC). || 売り物&lt;br /&gt;
|-&lt;br /&gt;
| 19 || ForbidAttention || Prevent attention (i.e. interacting with an object, for example picking up a weapon) || アテンションタイプ変更&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Freeze || Freeze the target object || 凍結&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GimmickSuccess || Success signal (used for minigames) || ネタ成功シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 33 || HingeCs || Hinge constraint || ヒンジCS&lt;br /&gt;
|-&lt;br /&gt;
| 12 || LifeZero || Emit a LifeZero signal when the life of the source object is 0 || ライフ0&lt;br /&gt;
|-&lt;br /&gt;
| 34 || LimitHingeCs || Limited hinge constraint || 制限付ヒンジCS&lt;br /&gt;
|-&lt;br /&gt;
| 27 || ModelBind || - || モデルバインド&lt;br /&gt;
|-&lt;br /&gt;
| 17 || MtxCopyCreate || - || 位置継承生成&lt;br /&gt;
|-&lt;br /&gt;
| 22 || OffWaitRevival || Reset the revival flag of the target object || 配置自動セーブオフ&lt;br /&gt;
|-&lt;br /&gt;
| 30 || PhysSystemGroup || - || 物理システムグループ&lt;br /&gt;
|-&lt;br /&gt;
| 28 || PlacementLOD || Replace the source object with the link target object at lower level of details || 配置LOD&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PulleyCs || - || 滑車CS&lt;br /&gt;
|-&lt;br /&gt;
| 40 || RackAndPinionCs || Rack-and-pinion constraint || ラック＆ピニオンCS&lt;br /&gt;
|-&lt;br /&gt;
| 23 || Recreate || Recreates the target object || 再生成&lt;br /&gt;
|-&lt;br /&gt;
| 41 || Reference || - || 参照&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Remains || Divine Beast signal || 遺物シグナル&lt;br /&gt;
|-&lt;br /&gt;
| 25 || SensorBind || - || センサバインド&lt;br /&gt;
|-&lt;br /&gt;
| 35 || SliderCs || Slider constraint || スライダーCS&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Stable || - || 安定&lt;br /&gt;
|-&lt;br /&gt;
| 31 || StackLink || - || スタック&lt;br /&gt;
|-&lt;br /&gt;
| 20 || SyncLink || Put the destination object and any object that is linked to it into the same generation group || 生成グループ&lt;br /&gt;
|-&lt;br /&gt;
| 8 || VelocityControl || Velocity control signal || 速度制御シグナル&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Link tags ===&lt;br /&gt;
&#039;&#039;Not to be confused with [[actor tag]]s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LinkTagAnd, LinkTagOr, LinkTagNAnd, LinkTagNOr, LinkTagXOr, LinkTagCount, LinkTagPulse, LinkTagNone are small objects that are used to implement a basic logic system in map units.&lt;br /&gt;
&lt;br /&gt;
AND, OR, NAND, NOR, XOR LinkTags are logical operators. They can be used to conditionally set or clear GameData flags, or conditionally spawn objects, trigger other objects, etc. A basic signal is emitted when the LinkTag has been triggered by &#039;&#039;all&#039;&#039; of the source links (for LinkTagAnds) or by one of them (for LinkTagOrs), etc.&lt;br /&gt;
&lt;br /&gt;
Count LinkTags are used to increment a GameData flag every time the link tag itself is signalled.&lt;br /&gt;
&lt;br /&gt;
Pulse LinkTags continuously emit a basic signal with a configurable signal duration (PulseLength)&amp;lt;ref&amp;gt;This appears to require a BasicSig input and does not repeat automatically. In order to get this behavior, fire it with a SwitchTimer.&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
None LinkTags have no effect. They are only used to put different map unit objects into the same placement generation group.&lt;br /&gt;
&lt;br /&gt;
Internally, they are all implemented by the same actor class (&amp;lt;code&amp;gt;LinkTag&amp;lt;/code&amp;gt;) since they share most of their core functionality, with only small differences in effects. A single link tag can only handle 0x60 incoming links&amp;lt;ref&amp;gt;0x7100D388C4&amp;lt;/ref&amp;gt;. Only incoming links with defType &amp;lt;= 0xe are processed&amp;lt;ref&amp;gt;0x7100D389DC&amp;lt;/ref&amp;gt;; other links are ignored.&lt;br /&gt;
&lt;br /&gt;
Parameters are documented in [[AIDef:Action/LinkTagBaseAction#MapUnitInstParams]].&lt;br /&gt;
&lt;br /&gt;
== File formats ==&lt;br /&gt;
&lt;br /&gt;
=== Map unit binary ===&lt;br /&gt;
In &#039;&#039;Breath of the Wild&#039;&#039;, map units are stored in a binary format and given the &#039;&#039;mubin&#039;&#039; (Map Unit Binary) file extension. All map object IDs are replaced with CRC32 hashes as a space optimisation. [[BYML]] is used as the serialisation format.&lt;br /&gt;
&lt;br /&gt;
Map units can be found in the [[Content/Map|Map]] content directory, and use the following naming convention: &amp;lt;code&amp;gt;Map/%s/%s/%s%s.mubin&amp;lt;/code&amp;gt; (map type, map name, map name, suffix).&lt;br /&gt;
&lt;br /&gt;
Despite the file extension, &amp;lt;code&amp;gt;Map/%s/Location.mubin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Map/%s/LazyTraverseList.mubin&amp;lt;/code&amp;gt; are not actually map units.&lt;br /&gt;
&lt;br /&gt;
=== Source map unit ===&lt;br /&gt;
Source map units have muunt&amp;lt;ref&amp;gt;The executable has remnants of error logging functions that print paths to development map units of the following type: &amp;lt;code&amp;gt;Map/Project/%s/Data/%s/%s.muunt&amp;lt;/code&amp;gt;&amp;lt;/ref&amp;gt; as their file extension and use strings for map object IDs such as &amp;lt;code&amp;gt;F-5_challenge.muunt/obj760&amp;lt;/code&amp;gt; instead of CRC32 hashes of the IDs in map unit binaries.&lt;br /&gt;
[[Category:Internals]]&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Greenlord</name></author>
	</entry>
</feed>