Topic: tree planting locations
GunChleoc![]() |
Posted at:
2016-04-27, 18:48 UTC+2.0
And possible future scenarios/campaigns.... by that time, we will have forgotten this discussion and wonder where the bugs come from... so, storing the terrain properties in memory is a bad idea. We already have a bug related to terrain change, let's not add to them Busy indexing nil values ![]() ![]() |
GunChleoc![]() |
Posted at:
2016-04-27, 18:54 UTC+2.0
<snip>
I seem to remember that there was an idea somewhere to give tribe immovables like fields terrain affinity as well - I can't find it right now though. So, when we implement something here, we should make it global enough to fit that too. Busy indexing nil values ![]() ![]() |
Tibor |
Posted at:
2016-04-27, 19:28 UTC+2.0
good comment, but it will not be straightforward to code though ![]() ![]() |
Tibor |
Posted at:
2016-04-28, 07:46 UTC+2.0
I can imagine new attribute 'consider' for lua config, the line would look like:
And poor man implementation would be to pick x (f.e. 5) random fields, and from them pick one with best fertility/whatever. ![]() ![]() |
kaputtnik![]() |
Posted at:
2016-04-28, 08:51 UTC+2.0
It is this bug Such an implementation has to be considered well. IMHO it would bring more complexity but less fun. Remembering all the problems with the trees until now, making terrain affinities for tribe immovables would cause similar problems, beginning with the editor (f.e restrictions about placing terrain in conjunction with build size/height of terrain). Just a side note, back to topic ![]() ![]() |
GunChleoc![]() |
Posted at:
2016-04-28, 08:56 UTC+2.0
We can still keep the implementation flexible though, in case we ever want it. Whether or not it is used can then be decided entirely by the lua files, which will also allow easy modding. I was thinking of something like
Then work with attributes on the immovables to filter which immovables are filtered for probability to grow, rank them and use that as the field's ranking.
Edited:
2016-04-28, 08:57 UTC+2.0
Busy indexing nil values ![]() ![]() |
DragonAtma![]() |
Posted at:
2016-04-28, 09:05 UTC+2.0
Why not have them recalculate nearby land when they go out to plant a tree? Foresters only go out once every half-minute or so, so that should not be a slowdown, and it'll correct for scripted terrain change (except, of course, for the rare nearby changes that occur between when they leave the hut and plant the tree). ![]() ![]() |
Tibor |
Posted at:
2016-04-28, 09:31 UTC+2.0
Well, still the basic question is: will we pick random field that meets condition like "grows:sapling", or pick a filed that "grows:sapling" the best (has highest fertility/whatever number for saplings) ![]() ![]() |
einstein13![]() |
Posted at:
2016-04-28, 09:34 UTC+2.0
For me calculating 5 (or less) possible spots and pick randomly one of them (according to their fertility) is one of the best idea here. It will bring all approaches to the problem: less trees will die before being mature; but you can still make a green wall of defence; also it will avoid possible bugs on terrain change (scenarios). I like the idea very much! einstein13 ![]() ![]() |
Tibor |
Posted at:
2016-04-28, 09:43 UTC+2.0
Just be more precise, not "randomly", but the one with best number (fertility) ![]() ![]() |