Expand description
Tree placement list for BMD vegetation files.
This module defines the tree placement data structures used in BMD vegetation files. Trees are organized by their model path, with each model containing multiple individual tree instances with positions, rotations, and scales.
§Structure
TreeList: Top-level container for all tree placement dataBattleTreeItemVector: Groups trees by their model pathBattleTreeItem: Individual tree instance with transform data
§Supported Versions
- Versions 1 to 3: Total War: Attila (scale as a byte, no rotation, version 2 adds
is_burnable) - Version 4: Current format used in Total War: Warhammer III
§Examples
ⓘ
use rpfm_lib::files::bmd_vegetation::tree_list::*;
// Decode a tree list from binary data
let tree_list = TreeList::decode(&mut data, &extra_data)?;
// Iterate through tree models
for tree_vector in tree_list.tree_list() {
println!("Model: {}", tree_vector.key());
for tree in tree_vector.value() {
println!(" Position: ({}, {}, {})", tree.x(), tree.y(), tree.z());
}
}Structs§
- Battle
Tree Item - Individual tree instance with position, rotation, and scale.
- Battle
Tree Item Vector - A group of tree instances sharing the same model.
- Tree
List - Tree placement list for a battle map.