namespace pkNX.Structures.FlatBuffers.Arceus;
attribute "fs_serializer";

// *.trmmt

table MaterialSwitch {
    Name: string;
    Flags: byte;
}

table MaterialMapper {
    MeshName: string;
    MaterialName: string;
    LayerName: string;
}

table EmbeddedTracm {
    ByteBuffer: [byte] (required);
}

//Appears only on Arceus?
table MaterialProperty {
    Name: string;
    Mappers: [MaterialMapper] (required);
    Field_02: uint;
    Field_03: uint;
    Tracm: EmbeddedTracm;
    Field_05: [uint] (required);
}

table MaterialTable {
    Name: string;
    FileNames: [string] (required);
    MaterialSwitches: [MaterialSwitch] (required);
    MaterialProperties: [MaterialProperty] (required);
} 

table MultiMaterialTable (fs_serializer) {
    Reserved_00: uint; // Always default
    Reserved_01: uint; // Always default
    Material: [MaterialTable] (required);
}

root_type MultiMaterialTable;
