AAMP: Difference between revisions

→‎Structure: fix struct definitions (offsets and counts are packed as a single u32; they are not separate fields)
imported>Leoetlino
mNo edit summary
(→‎Structure: fix struct definitions (offsets and counts are packed as a single u32; they are not separate fields))
 
(7 intermediate revisions by one other user not shown)
Line 7: Line 7:
AAMP is a (typically) little endian format.
AAMP is a (typically) little endian format.


Unlike some other file formats, AAMP files have the exact same structure and endianness on Wii U and Switch, so these files are interchangeable between the consoles.
Unlike some other file formats, AAMP files in ''Breath of the Wild'' have the exact same structure and endianness on Wii U and Switch, so these files are interchangeable between the consoles.


=== Introduction ===
=== Introduction ===
Line 17: Line 17:
=== Section order ===
=== Section order ===
* Header
* Header
* Parameter lists, objects, parameters (the official ordering algorithm is unknown)
* Parameter lists
* Parameter objects
* Parameters
* Data section (to store parameter data)
* Data section (to store parameter data)
* String section (to store strings)
* String section (to store strings)
* Unknown uint32 section (unused?)
* Unknown uint32 section (unused?)
For more information on the ordering, refer to the [https://github.com/zeldamods/oead/blob/v0.9.0-2/src/aamp.cpp#L262 oead source code].


=== Header ===
=== Header ===
Line 36: Line 40:
| 0x10 || u32 || Parameter IO version
| 0x10 || u32 || Parameter IO version
|-
|-
| 0x14 || u32 || Offset to parameter IO (multiple of 4)
| 0x14 || u32 || Offset to parameter IO relative to 0x30
|-
|-
| 0x18 || u32 || Number of lists (including parameter IO)
| 0x18 || u32 || Number of lists (including parameter IO)
Line 59: Line 63:
| 0x0 || u32 || Name CRC32
| 0x0 || u32 || Name CRC32
|-
|-
| 0x4 || u16 || Offset to child lists, divided by 4 and relative to parameter list start
| 0x4 || u32 ||
|-
* Bits 0-15: Offset to child lists, divided by 4 and relative to parameter list start
| 0x6 || u16 || Number of child lists
* Bits 16-31: Number of child lists
|-
| 0x8 || u16 || Offset to child objects, divided by 4 and relative to parameter list start
|-
|-
| 0xa || u16 || Number of child objects
| 0x8 || u32 ||
* Bits 0-15: Offset to child objects, divided by 4 and relative to parameter list start
* Bits 16-31: Number of child objects
|}
|}


Line 74: Line 78:
| 0x0 || u32 || Name CRC32
| 0x0 || u32 || Name CRC32
|-
|-
| 0x4 || u16 || Offset to child parameters, divided by 4 and relative to parameter object start
| 0x4 || u32 ||
|-
* Bits 0-15: Offset to child parameters, divided by 4 and relative to parameter object start
| 0x6 || u16 || Number of child parameters
* Bits 16-31: Number of child parameters
|}
|}


Line 85: Line 89:
| 0x0 || u32 || Name CRC32
| 0x0 || u32 || Name CRC32
|-
|-
| 0x4 || u24 || Offset to data, divided by 4 and relative to parameter start.<br>For strings, this points to a string in the string section. For other parameter types, this points to the data section.
| 0x4 || u32 ||
|-
* Bits 0-23: Offset to data, divided by 4 and relative to parameter start.<br>For strings, this points to a string in the string section. For other parameter types, this points to the data section.
| 0x7 || ParameterType (u8) || Type
* Bits 24-31: Parameter type
|}
|}


Line 188: Line 192:


== Usage in ''Breath of the Wild'' ==
== Usage in ''Breath of the Wild'' ==
AAMP files are used in ''Breath of the Wild'' to store parameters that define the game's behaviour. They are very frequently used inside [[bactorpack]] archives, where they define most of an Actor's characteristics.
AAMP files are used in ''Breath of the Wild'' to store parameters that define the game's behaviour. They are very frequently used inside [[actor pack]] archives, where they define most of an Actor's characteristics.


=== Naming conventions for arrays ===
=== Naming conventions for arrays ===
Line 243: Line 247:
== Tools ==
== Tools ==
The following tools can be used to convert AAMP files to an editable format, and back again:
The following tools can be used to convert AAMP files to an editable format, and back again:
 
{{Tool table|category=Tools (AAMP)}}
* [https://github.com/leoetlino/aamp <code>aamp</code>]
* [https://github.com/Zer0XoL/BotW-aampTool/releases aampTool] (doesn't display root nodes correctly)
[[Category:File formats]]
[[Category:File formats]]