Hello everybody,
I was recently creating worlds with advanced parameters, and noticed that the information about
mesh sizes didn't seem to fit. Well, one thing led to another, I was taken by a fey mood and did some science with weighted ranges and variances. The result is
this piece of work.
Now, I really hope this isn't all common knowledge yet, but since the wiki says something else I assume it's not. Given the warning that I don't consider myself a good writer, I suspect many of you don't necessarily want to read through the whole thing so I'll paste the abstract and conclusion below. If you want to know exactly how I came to the conclusion you'll have to look at the report. I also uploaded most of the worlds I generated and my "lab journal"
here.Feel free to suggest improvements to my writing or whatever and ask questions if anything is unclear.
I'm not familiar with wiki editing of any sort, so I hope someone else will include the new information in the wiki.
Without further ado:
Abstract:
At the time of this writing the Dwarf Fortress wiki's information about mesh sizes and weighted ranges is false, or at least incomplete and misleading. In this work, I systematically try to find out exactly how weighted ranges work and how they interact with variances. For this purpose I created many different worlds where I changed single parameters and analysed the results. I describe the process of how I understand world generation with weighted ranges works and hope that other people can profit from this knowledge.
Conclusion (slightly edited):
The basic steps of world generation with weighted ranges are as follows:
- Create a grid with 2^(MeshSize - 1) tiles in both X and Y direction.
- Set the intersection points of the grid lines to a random value according to the parameters set with the weighted ranges.
- Interpolate between the intersection points.
- Add noise according to the variance parameters.
MeshSize is here the raw parameter value found in the world_gen.txt. Note that the highest possible value will always create grid tiles that are 8 * 8 world tiles large.
There are still several things that are unclear about how the noise is added but some things are quite certain:
- Setting the variance too high means that the effect of the weighted ranges can be completely negated.
- A larger mesh size means a larger variance is necessary to have a visible effect.
- The variance's effect is constant across world sizes with the same mesh size. It is NOT dependent on the absolute number of world tiles between grid lines.
- A larger mesh size seems to make the variance affect smaller areas overall. For elevation, this means that large oceans and mountain ranges (relative to map size) can only be created with smaller mesh sizes.
In conclusion, if you want to use weighted ranges effectively, you should always consider adjusting the corresponding variances. Especially low mesh sizes mean that variances should be set rather low (I'd personally recommend no higher than 500 for mesh size 2).
EDIT: I updated the wiki. Feel free to offer any suggestions for improvement.