Expand description
BMD Vegetation file format support.
BMD Vegetation files (.vegetation) are FASTBIN0-format files that define vegetation
placement for battle maps in Total War games. They contain tree and grass placement
data that complements the main BMD file.
§File Format
BMD Vegetation files use the FASTBIN0 binary format:
[8 bytes] FASTBIN0 signature
[u16] serialise_version
[...] version-specific data§Supported Versions
- Version 2: Current format used in Warhammer III
§File Contents
- Tree List: Individual tree placements with species, position, scale, rotation
- Grass List: Grass placement areas with density and appearance settings
§Usage
ⓘ
use rpfm_lib::files::bmd_vegetation::BmdVegetation;
use rpfm_lib::files::Decodeable;
// Decode a vegetation file
let vegetation = BmdVegetation::decode(&mut reader, &None)?;
println!("Version: {}", vegetation.serialise_version());
println!("Trees: {}", vegetation.tree_list().list().len());
println!("Grass patches: {}", vegetation.grass_list().list().len());§Integration with BMD
Vegetation files are referenced from BMD files via:
TreeListReferenceList- Links to tree placement dataGrassListReferenceList- Links to grass coverage data
§Terry Export
Vegetation data can be exported to Terry (CA’s editor) format via the ToLayer
trait implementation, which generates XML entity definitions for trees and grass.
§File Location
Vegetation files are typically found in:
terrain/battles/*.vegetation
terrain/tiles/*.vegetationStructs§
- BmdVegetation
- Represents a BMD Vegetation file decoded in memory.
Constants§
- EXTENSIONS
- File extension for BMD Vegetation files.
- SIGNATURE
- FASTBIN0 file signature.