If you want smaller trees with accuseason

Hello.

If you want smaller trees than the short irregular canopy trees of Rex accuseason, you can use this powershell code to change the values min and max in the 10-asobo_species.xml file:


$xmlDoc = New-Object System.Xml.XmlDocument
$xmlDoc.Load(“10-asobo_species.xml”)

$elements = $xmlDoc.SelectNodes(“//*[@min][@max]”)

foreach ($element in $elements) {
$min = [int]$element.GetAttribute(“min”)
$max = [int]$element.GetAttribute(“max”)
if ($min -gt 2.5) {
$element.SetAttribute(“min”, [Math]::Floor($min / 1.5))
}
if ($max -gt 2.5) {
$element.SetAttribute(“max”, [Math]::Ceiling($max / 1.5))
}
}

$xmlDoc.Save(“10-asobo_species_bis.xml”)


Then, rename the file 10-asobo_species_bis to 10-asobo_species in the original folder

It will divide the size of the trees by 1.5.
But I don’t change the size of the trees if the size is less than 2.5

2 Likes