# Forests¶

OFP used so-called forest block objects for forests. It was one model that consisted of several trees and bushes.

It is recommended to replace these for ArmA island for performance reasons and forest blocks which partially fly on slopes cannot be fitted to the ground in ArmA.

Roller offers a great feature to replace the forest block objects with single vegetation objects with the parameter `--replace-forests`. The mapping is defined in a YAML file. It is a standard text file and most text editors will be able to highlight the syntax.

    --replace-forests ofp_forest_blocks_to_aceip_single_object_forest.yaml,ofp_forest_blocks_to_arma_single_object_forest.yaml

You need to supply the parameter with at least one YAML file. If you attach multiple YAML files, they will be processed sequentially one after another.

## Forest to object mappings files¶

     1 data3d\les ctverec pruchozi_t1.p3d:
     2   :sectors: [:N, :E]
     3   :min: 15
     4   :max: 30
     5   :models:
     6     ca\plants\smrk_velky.p3d: 0.3
     7     ca\plants\les_singlestrom.p3d: 10
     8     ca\plants\smrk_siroky.p3d: 0.5
     9     ca\plants\dd_bush01.p3d: 0.8
    10
    11 # pathToFile\nameOfFile.p3d:
    12 #   :sectors: [:orientation, :orientation]
    13 #   :min: minmumNumberOfObjects
    14 #   :max: maximumNumberOfObjects
    15 #   :models:
    16 #     pathToReplacementFile\subfolder\nameOfReplacementFile.p3d: relativeDistribution

sectors defines the orientation of the forest block object. Most forest block objects have a triangular shapes so the orientation defines witch sectors of the quadrangle is covered by the forest block object. For a square forest block object all forest possible orientations are listed in the sectors definition.

### Diagram of block sectors¶

    -------
    |\ N /|
    |W\ /E|
    | / \ |
    |/ S \|
    -------

min and max define the minimum and maximum number of objects Roller should generate in the area.

The models section defines which objects should be placed in the area by Roller. The integer value after each object is added up for the one replacement and is the relative distribution compared to the other objects listed in the models section.

Roller has three forest block object replacement templates integrated. Roller will find the file automatically, if you there is no YAML file called the same way in the TODO location.

ofp_forest_blocks_to_arma_single_object_forest.yaml is to replace the OFP forest block objects with ArmA vegetation.

ofp_forest_blocks_to_aceip_single_object_forest.yaml is to replace the OFP forest block objects with OFP Resistance vegetation converted as part of the ACEIP.

ofp_forest_blocks_to_ofp_single_object_forest.yaml is to replace the OFP forest block objects with somewhat same type of OFP CWC and Resistance vegetation converted as part of the ACEIP.

Back to the overview (home)