BIOME AND SPECIES EXAMPLES

This section contains examples of the contents of the [species].xml and [biome].xml files that are used to define the types of vegetation and their distribution within the simulation.

 

 

Species Example

The following is an example of the contents of the file used to create one or more species to be used within biomes, including extra comments to explain certain features:

<?xml version="1.0" encoding="utf-8"?>
<!--
    Defines a list of individual plant species.
    Multiple files can have a SpeciesList root node. Files are loaded in lexicographic order.
-->
<SpeciesList>
    <Species name="big_cactus">
        <!--
            The name attribute is used to refer to this species.
            It must be unique or it will override a previously loaded species of the same name.
        -->
        <Variations>
            <!--
                A variation of this species.
                Attributes:
                    - spawnRatio: the rate at which this variation is picked over others. Default 1
                Contents:
                    - Size: the size range in meters of the variation. Defines using "min" and "max" attributes
                    - Imposter: the imposter used for this variation
                        Attributes:
                            - stiffness: the resistance to wind
                            - frames: the number of frames in the imposter texture
                            - textureIndex: the index of the texture in the species material
                            - relativeOffsetY: optional vertical offset to apply to the imposter.
                - MaskColor: optional color mask.
                    This color and similar colors will be ignored when applying color correction to the imposter.
            -->
            <Variation spawnRatio="0.75">
                <Size min="5" max="7"/>
                <Imposter stiffness="0.9" frames="8" textureIndex="0"/>
            </Variation>
            <Variation>
                <Size min="15" max="30"/>
                <Imposter stiffness="0.9" frames="8" textureIndex="1"/>
            </Variation>
        </Variations>
        <!-- The material used for imposters in this species -->
        <Material name="VEGETATION_CACTUS"/>
    </Species>
    <Species name="conifercool_example">
        <Variations>
            <Variation spawnRatio="1">
                <Size min="15" max="25"/>
                <Imposter stiffness="0.0" frames="10" textureIndex="0" relativeOffsetY="-0.075"/>
                <MaskColor r="0.30" g="0.00" b="0.30" maxDistSquared=".1"/>
            </Variation>
            <Variation spawnRatio="1">
                <Size min="20" max="25"/>
                <Imposter stiffness="0.0" frames="10" textureIndex="1" relativeOffsetY="-0.075"/>
                <MaskColor r="0.30" g="0.00" b="0.30" maxDistSquared=".1"/>
            </Variation>
            <Variation spawnRatio="0.5">
                <Size min="30" max="40"/>
                <Imposter stiffness="0.0" frames="10" textureIndex="2" relativeOffsetY="-0.1"/>
                <MaskColor r="0.30" g="0.00" b="0.30" maxDistSquared=".1"/>
            </Variation>
            <Variation spawnRatio="0.5">
                <Size min="40" max="50"/>
                <Imposter stiffness="0.0" frames="10" textureIndex="3" relativeOffsetY="-0.1"/>
                <MaskColor r="0.30" g="0.00" b="0.30" maxDistSquared=".1"/>
            </Variation>
        </Variations>
        <Material name="VEGETATION_CONIFERCOOL"/>
    </Species>
</SpeciesList>

 

 

Biome Example

The following is an example of the contents of the file used to create one or more biome rules using pre-defined species and including extra comments to explain certain features:

<?xml version="1.0" encoding="utf-8"?>
<!-- Defines a list of biome rules -->
<BiomeRules>
    <BiomeRule name="LFLJ_cactus_artificial" speciesInstancesPerHectar="200" onlyArtificialAreas="true">
        <!--
            A single biome rule.
            Attributes:
                - name: Unique name
                - speciesInstancesPerHectar: the number of trees in this biome per hectare
                - onlyArtificialAreas: optional - indicates this biome will only be used in artificial areas.
                - hideInEditor: optional - this biome will not show in the scenery editor's biome picker
        -->
        <SpeciesList>
            <!--
                Species attributes:
                    - name: the name used to define this species
                    - spawnRatio: optional spawn ration for this species in this biome.
            -->
            <Species name="big_cactus" spawnRatio="1">
                <!-- Optional color multiplier tag to apply to this species -->
                <Color r="15" g="0.5" b="0.5"/>
            </Species>
        </SpeciesList>
        <!-- An optional list of EcoRegions where this biome will be used. -->
        <EcoRegionList>
            <EcoRegion name="Alps conifer and Mixed Forests"/>
        </EcoRegionList>
        <!-- An optional list of PotentialNaturalVegetation where this biome will be used. -->
        <PotentialNaturalVegetationList>
            <PotentialNaturalVegetation name="Cold Evergreen Needleleaf Forest"/>
            <PotentialNaturalVegetation name="Cool Evergreen Needleleaf Forest"/>
        </PotentialNaturalVegetationList>
        <!-- If both EcoRegions and PotentialNaturalVegetations are specified, the biome must match one of each list -->
    </BiomeRule>
    <BiomeRule name="LFLJ_cactus" speciesInstancesPerHectar="200">
        <SpeciesList>
            <Species name="big_cactus" spawnRatio="1">
                <Color r="0.3" g="15" b=".2"/>
            </Species>
        </SpeciesList>
        <EcoRegionList>
            <EcoRegion name="Alps conifer and Mixed Forests"/>
        </EcoRegionList>
    </BiomeRule>
    <BiomeRule name="LFLJ_cactus_cold" speciesInstancesPerHectar="200">
        <SpeciesList>
            <Species name="big_cactus" spawnRatio="1"/>
        </SpeciesList>
        <EcoRegionList>
            <EcoRegion name="Alps conifer and Mixed Forests"/>
        </EcoRegionList>
        <PotentialNaturalVegetationList>
            <PotentialNaturalVegetation name="Cold Evergreen Needleleaf Forest"/>
        </PotentialNaturalVegetationList>
    </BiomeRule>
</BiomeRules>