During the weekend i got to mess with biomes and random gen a bit. I thought maybe some of you could use the info i found out. It is possible that all of that is already common knowledge, in that case just ignore this post.
Basically i wanted to do two things:
1. Make random generated biomes smaller
2. Define my own biomes and make the random generator use them
I will explain both of those in this post. How to change biomes manually is already shown in here and here.
The XML-files used are located in "...\7 Days To Die\Data\Config" and as always make a backup before messing with stuff.
1. Change the way the random generator builds biomes
All changes are done to "rwgmixer.xml". Currently the generator used for all map sizes is "vanillaSmall" so this is what we want to change. It's near the bottom of the file, line 921 and should look like this:
This generator uses a Voronoi-Diagram (wikipedia) to build the biomes which basically builds patches from a list of points.
Here are two values to play around with. The first (frequency) represents the distance between the control points. A higher frequency results in a smaller distance between those points and thus in smaller biomes.
Here are some "biomes.png" for a 4096x4096 map (resized for smaller files) with a frequency of 0.0012, 0.0024 and 0.0040:

(Don't mind the turquoise biomes for now, i will get to that later)
The second value (displacement) influences the type of biome created around those points. The following informations are more or less guesses and assumptions but they seem to fit. To understand how a biome gets chosen we have to look a few lines below (line 951):
Basically every generated biome gets the initial value of 0.5. After the initialization a random value in the range +/- "displacement" gets added to that. For a "displacement" of 0.5 that means, each biomes now has a random value between 0 and 1. The "BiomeIDMapper" is now used to set the right biome for this value. If the value for a biome is 0.6 for example, it will be wasteland.
One can alter the values in the "BiomeIDMapper" to get another distribution of biomes. The two numbers in the "Range"-field are the upper and lower limit for that biome. So
means, that a biome with a value between 0.5 and 0.7 is now wasteland.
Lets say we want a 50% chance for pine forest, 20% for snow and 10% for wasteland, burnt forest and desert. The Mapper could then look like this:
A resulting "biomes.png" with a "frequency" of 0.0040:

Q&A:
Why is the upper bound of those ranges at "1.1" instead of "1.0"?
-No idea, but i won't touch that because it works.
What if those ranges overlap?
-I'm not quite sure but it seems that the generations fails (without errors, maybe some infinite loop?). Anyway just make sure they don't overlap.
What if there is a gap/undefined values?
-See "What if those ranges overlap?"
So, what does "displacement" now actually do?
-If i'm right with my assumptions, the "displacement" defines the range of possible values. If it's set to 2 one could get values between -1.5 and 2.5. It now seems that negative values are just not processed, but all the positive values are. That means the actually usable range for a "displacement" of 2 should be 0.0 to 2.5 but i'm really not sure about this. I just stick with 0.5 and ranges between 0.0 and 1.1.
2. Create your own Biomes (and make the random generation use them)
Here we change the "biomes.xml" in which are the definitions for all the biomes. Every definition starts with something like:
Both values are important. The "name" is used to reference the biome in the random biome generation and the "biomemapcolor" is used for the biomes.png and thus for the actual world generation. One can now add and alter biomes. Let's say you want a plains(-ish) biome. You could then copy the pine_forest and just remove the trees. Trees and rocks and other stuff are added to biomes via "decoration" like:
Just remove what you don't want and/or add what you want. Of course you can get creative and change weather, ores and define subbiomes etc.
Finally rename your biome and give it an UNUSED color, for example:
You can now already paint a biome in that color into your "biomes.png" and on world creation it will be in there. Actually that are the turquoise biomes in the first three images. To make the random generator use your biome you just have to adjust the "BiomeIDMapper" in the rwgmixer.xml, for example:
Now, if you generate a new random map, your biome gets used.
I hope someone finds that information useful.
Cheers.


Basically i wanted to do two things:
1. Make random generated biomes smaller
2. Define my own biomes and make the random generator use them
I will explain both of those in this post. How to change biomes manually is already shown in here and here.
The XML-files used are located in "...\7 Days To Die\Data\Config" and as always make a backup before messing with stuff.
1. Change the way the random generator builds biomes
All changes are done to "rwgmixer.xml". Currently the generator used for all map sizes is "vanillaSmall" so this is what we want to change. It's near the bottom of the file, line 921 and should look like this:
Code:
<biome_generators>
<biome_generator name="vanillaSmall">
<module name="voronoi" type="Voronoi">
<property name="frequency" value="0.0012"/>
<property name="displacement" value="0.5"/>
</module>
...
Here are two values to play around with. The first (frequency) represents the distance between the control points. A higher frequency results in a smaller distance between those points and thus in smaller biomes.
Here are some "biomes.png" for a 4096x4096 map (resized for smaller files) with a frequency of 0.0012, 0.0024 and 0.0040:

(Don't mind the turquoise biomes for now, i will get to that later)
The second value (displacement) influences the type of biome created around those points. The following informations are more or less guesses and assumptions but they seem to fit. To understand how a biome gets chosen we have to look a few lines below (line 951):
Code:
<module name="biomeOutput" type="BiomeIDMapper">
<property name="sourceModule" value="clampOutput"/>
<property name="biomemap0.Name" value="pine_forest"/>
<property name="biomemap0.Range" value="0.2,0.5"/>
<property name="biomemap1.Name" value="snow"/>
<property name="biomemap1.Range" value="0,0.2"/>
<property name="biomemap2.Name" value="wasteland"/>
<property name="biomemap2.Range" value="0.5,0.7"/>
<property name="biomemap3.Name" value="burnt_forest"/>
<property name="biomemap3.Range" value="0.7,0.8"/>
<property name="biomemap4.Name" value="desert"/>
<property name="biomemap4.Range" value="0.8,1.1"/>
</module>
One can alter the values in the "BiomeIDMapper" to get another distribution of biomes. The two numbers in the "Range"-field are the upper and lower limit for that biome. So
Code:
<property name="biomemap2.Name" value="wasteland"/>
<property name="biomemap2.Range" value="0.5,0.7"/>
Lets say we want a 50% chance for pine forest, 20% for snow and 10% for wasteland, burnt forest and desert. The Mapper could then look like this:
Code:
<module name="biomeOutput" type="BiomeIDMapper">
<property name="sourceModule" value="clampOutput"/>
<property name="biomemap0.Name" value="pine_forest"/>
<property name="biomemap0.Range" value="0.0,0.5"/>
<property name="biomemap1.Name" value="snow"/>
<property name="biomemap1.Range" value="0.5,0.7"/>
<property name="biomemap2.Name" value="wasteland"/>
<property name="biomemap2.Range" value="0.7,0.8"/>
<property name="biomemap3.Name" value="burnt_forest"/>
<property name="biomemap3.Range" value="0.8,0.9"/>
<property name="biomemap4.Name" value="desert"/>
<property name="biomemap4.Range" value="0.9,1.1"/>
</module>

Q&A:
Why is the upper bound of those ranges at "1.1" instead of "1.0"?
-No idea, but i won't touch that because it works.
What if those ranges overlap?
-I'm not quite sure but it seems that the generations fails (without errors, maybe some infinite loop?). Anyway just make sure they don't overlap.
What if there is a gap/undefined values?
-See "What if those ranges overlap?"
So, what does "displacement" now actually do?
-If i'm right with my assumptions, the "displacement" defines the range of possible values. If it's set to 2 one could get values between -1.5 and 2.5. It now seems that negative values are just not processed, but all the positive values are. That means the actually usable range for a "displacement" of 2 should be 0.0 to 2.5 but i'm really not sure about this. I just stick with 0.5 and ranges between 0.0 and 1.1.
2. Create your own Biomes (and make the random generation use them)
Here we change the "biomes.xml" in which are the definitions for all the biomes. Every definition starts with something like:
Code:
<biome name="snow" biomemapcolor="#FFFFFF">
Code:
<decoration type="block" blockname="treeMountainPine19m" prob="0.0015" rotatemax="7"/>
Finally rename your biome and give it an UNUSED color, for example:
Code:
<biome name="testbiome1" biomemapcolor="#00FFFF">
...
</biome>
Code:
<module name="biomeOutput" type="BiomeIDMapper">
<property name="sourceModule" value="clampOutput"/>
<property name="biomemap0.Name" value="testbiome1"/>
<property name="biomemap0.Range" value="0.0,0.3"/>
<property name="biomemap1.Name" value="snow"/>
<property name="biomemap1.Range" value="0.7,0.8"/>
<property name="biomemap2.Name" value="wasteland"/>
<property name="biomemap2.Range" value="0.8,0.9"/>
<property name="biomemap3.Name" value="burnt_forest"/>
<property name="biomemap3.Range" value="0.6,0.7"/>
<property name="biomemap4.Name" value="desert"/>
<property name="biomemap4.Range" value="0.9,1.1"/>
<property name="biomemap5.Name" value="pine_forest"/>
<property name="biomemap5.Range" value="0.3,0.6"/>
</module>
I hope someone finds that information useful.
Cheers.

