Grass.extm

From ZeldaMods (Breath of the Wild)
Revision as of 06:10, 28 September 2018 by imported>Zephenryus (Added file specification for grass.extm files)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

grass.extm files describe the height and color of the main field grass and add-on content field.

grass.extm File Specification

grass.extm File Layout

Each file contains a 64×64 grid. For each vertex there is 4 bytes of data that describe the height of the grass and color.

Grass Map Data

Each entry in the water data table is 4 bytes long.

Offset (h) Size Data Type Description
0x00 1 Unsigned Byte Blade height
0x01 1 Unsigned Byte r, red
0x02 1 Unsigned Byte g, green
0x03 1 Unsigned Byte b, blue

x and z[1] can be calculated, while iterating through the data table:

for (int index = 0; index < 256 * 256; index++) {
    uint x = index % 256;
    uint z = index / 256;
}

Material Index

id file name group attribute attribute_sub flag name (en) group (en)
0 Blade_Green A None 0 Grass
1 Blade_Yellow B None 0 Grass
0 WoodChip_00 木くず00 木くず None None 0 Wood Chips 00 Wood Chips
1 WoodChip_01 木くず01 木くず None None 0 Wood Chips 01 Wood Chips
2 WoodChip_02 木くず02 木くず None None 0 Wood Chips 02 Wood Chips
3 WoodChip_03 木くず03 木くず None None 0 Wood Chips 03 Wood Chips
4 WoodChip_04 木くず04葦 木くず None None 0 Wood Chips 04 Reeds Wood Chips
5 WoodChip_05 木くず04葦 木くず None None 0 Wood Chips 05 Leaves Wood Chips
  1. z is expected to be an integer quotient. The floor function can be used if integer division is not supported.