Give tree planters a brain cell

Started by Sirsir, July 14, 2018, 11:28:43 PM

Previous topic - Next topic


It feels like they go out of their way to plant trees in the worst way possible. Give them a 3x3 plot and they find a way to only plant 3 trees...


That would probably actually be relatively hard to do. For simple square or rectangle plots, you could check if it's an evenly-sized or odd-sized plot, then just hard-code planting rows and columns. For any arbitrarily-shaped grow zones, this is probably a fairly difficult optimization problem to solve.


Most trees, except apparently cactus based on a comment from another thread, require 1 space all around. Looking closer, the Treebase definition of the Plant_Bases.xml has a line that says "<blockAdjacentSow>true</blockAdjacentSow>".

This makes sense, because if you plant a 3x3 patch, the things 1 tile just outside of it usually get cut down too.

If you want to make a tree farm for the least work possible, draw a horizontal line 9 tiles long, then vertical lines at the 1,3,5,7 and 9 points. You'll get a nice even grid of trees once your planters are good enough to actually do them in a reasonable time. The larger the farm you make, the less you have to worry about missing that 1 tree because the spacing was offset somewhere.