Page 1 of 1

[TOGoS][0.17.7] autoplace peak: 3+ climate dimension ranges breaks distribution

Posted: Thu Mar 07, 2019 2:05 pm
by Earendel
When using an autoplace peak on trees, if I have 2 climate dimensions specified, such as water_ and aux_ or water_ and temperature_ then the resulting distribution is as expected.

If a 3rd dimension range specified ( water_ aux_ and temperature_) then the distribution breaks and it vastly overshoots the specified water range.

In the game the most obvious sigh that things are wrong (apart from the mass rainbow forest) is that wetland trees are spawning heavily in dryland, but a screenshot doesn't illustrate the problem very well if you don't know where the trees are supposed to be. A crude diagram is attached showing roughly what happens.

I have removed most of the noise influence to rule that out, also the fact that if I remove aux_ from the equation it behaves more as expected.
This behavior is different to 0.16 where I could use 3 climate dimensions without problems.

I've tried using a probability_expression for the placement and trees go in the right general area, but the density is way too high but max_probability and random_probability_penalty don't seem to affect it if a probability_expression is used.

Re: [TOGoS][0.17.7] autoplace peak: 3+ climate dimension ranges breaks distribution

Posted: Thu Mar 07, 2019 5:13 pm
by TOGoS
The peak/dimension-based autoplace specifications being hard to control are the reason probability_expression was added to bypass all of that stuff.

max_probability and random_probability_penalty do not have any effect if probability_expression is provided. That is by design.

That said, the behavior of otherwise identical autoplace specifications wasn't supposed to change between 0.16 and 0.17. Could you provide the data for the autoplace specification that demonstrates the discrepancy?

Re: [TOGoS][0.17.7] autoplace peak: 3+ climate dimension ranges breaks distribution

Posted: Thu Mar 07, 2019 8:28 pm
by TOGoS
Derp. Integer division of 2 by the number of peaks when calculating peak influence results in 0 when there are more than 2 peaks.

None of the autoplace specifications in vanilla use more than 2 peaks, apparently, which is why this wasn't caught.

Should be fixed for 0.17.9.

Thanks for the report!

Re: [TOGoS][0.17.7] autoplace peak: 3+ climate dimension ranges breaks distribution

Posted: Thu Mar 07, 2019 10:48 pm
by Earendel
That's great news, thanks.