-
Notifications
You must be signed in to change notification settings - Fork 161
Your first custom biome
In this tutorial we are going to create our first custom biome. In the previous tutorial we modified the standard desert to be more hilly and to have sandstone instead of stone. We will now create a hilly area with a lot of flowers and some trees.
You can continue working on the world of the previous tutorial. Alternatively, you can create a new world with the seed 12
. Make sure that the GenerationDepth
setting (found in the WorldConfig.ini) is set to 12
too. This will make the biomes bigger. If you have done that correctly, the coordinates found in the tutorial will work for you. If not, you will find yourself lost in some other biome and you'll have to search around a lot.
We'll start by adding the custom biome to the biome lists. The first list we are going to modify is the CustomBiomes
list. Open up the WorldConfig.ini file and search for that setting. Edit the line with CustomBiomes
to look like this:
CustomBiomes:Flowerfield:40
This will make Terrain Control generate and read the config files for the biome called Flowerfield
. The biome will have the id 40. Biome ids work just like block ids, except that they are separate lists and that 254 is the highest possible biome id. Just like block ids, two biomes may not share the same id.
If you restart the server/game now, you'll see that a new file in the BiomeConfigs directory has popped up: FlowerfieldBiomeConfig.ini
. However, your world looks still the same. We need to add our biome to one of the biome lists. NormalBiomes
, found in the WorldConfig.ini, is a good choice, as it lets the biome generate as a normal biome, just like most of Minecraft's biomes. Add your biome to the NormalBiomes
list:
NormalBiomes:Desert,Forest,Extreme Hills,Swampland,Plains,Taiga,Jungle,Flowerfield
Make sure the server is closed/world is unloaded, remove the region folder inside the world folder and start the server/load the world again. If use the command /tp -1010 78 -11
to teleport to that location, you can see the custom biome. It doesn't look very nice yet, but hey, we haven't yet changed any settings of the biome:
If you aren't using the Terrain Control mod on singleplayer, the colors will look a little bit different.
First of all, we are going to make the biome a lot greener. Open up the FlowerfieldBiomeConfig.ini
. Scroll down until you see the Visuals and weather
section. You can change the colors of the biome here. However, if you don't have the Terrain Control client mod, you won't see any effect. If you are going to use the map on singleplayer, this is of course no problem, but if you are going to use the world on a Bukkit server, most of your players will only see the standard Minecraft colors. All colors are hexadecimal. You can Google around a bit to find a color picker. Please note that most color pickers will prefix the color with a #
, which is common in the webdesign-world. Terrain Control however requires you to use 0x
instead, which is common in the Java-world.
For this tutorial, we aren't going to use the color settings. Terrain Control has a cool option to save the biome with the id of another biome. This will cause the colors, weather and mobs of the biome to look like the other biome. Luckily, the terrain shape and features will still look the same. We are going to use the mushroom isle biome for this, as it has nice green grass (normally you can't see that, as the biome is covered in mycelium, but try placing down a block of grass there and you'll see it). As an added bonus, no hostily mobs will spawn in our flower field, as the mushroom biome has them disabled. Scroll up to find the ReplaceToBiomeName
setting and set it to MushroomIsland
.
Make sure the server is closed/world is unloaded, remove the region folder inside the world folder and start the server/load the world again. If use the command /tp -1010 78 -11
to teleport to that location, you can now see that the biome is a lot greener:
Now we are going to make the biome a bit more hilly. Open up the FlowerfieldBiomeConfig.ini
again and set BiomeVolatility
to 0.5
. If you would take a look now, you'll see that the land drops below sea level now on some places. We don't want this, so to fix this we raise the biome a bit, without making it more hilly. Set BiomeHeight
to 0.5
to make the biome a bit higher.
Close the server/world, remove the region folder and open the server/world again. You should now see some hills:
Now we are going to add some resources to the biome. Terrain Control has a powerful resource system. It consists of a long list of resources. Each resource can be an ore, a plant, a tree, a small lake, etc. Almost all resources have a frequency setting which tells how many times that resource must be processed for the chunk. Almost all resources also have a rarity setting, which determines the chance of success for each attempt. Usually the terrain is another limiting factor: if there is not enough space for a tree there, it simply won't spawn, regardless of a rarity of 100.
Resources use the function syntax, which is also used on some other places in the configs. It works like this:
NameOfFunction(parameter,parameter,parameter,...)
If you already have experience with a spreadsheet program like Microsoft Excel, this syntax should be familiar. Each parameter does affects something in the resource.
All resources placed together form a list, called the resources queue. It is out of the scope of this tutorial to explain every possible resource (see this page for that), but some interesting resources for our plant biome will be described.
Flowers are single block resources in Minecraft. In the resources queue there are two resources designed for single-block things. Grass
is easier to work with than Plant, but it can only spawn on top of the terrain. Plant
chooses a random height between it' min and max height and then looks whether the location is suitable. Grass
simply places itself on the highest block, which it can look up from the heightmap.
For some reason Mojang placed flowers using the Plant
resource in Minecraft. There is no reason for us to do the same, we are going to use the Grass
resource. The syntax of the Grass
resource is as follows:
Grass(Block,BlockData,Frequency,Rarity,BlockSource[,BlockSource2,BlockSource3.....])
Block
is the id or name of the block to spawn. BlockData
is the block data from 0 to 15. Frequency
and Rarity
were just explained a few paragraphs back. BlockSource
is the block to spawn on.
First of all, we remove the standard lines with flowers, as we are not going to use the Plant
resource for them. Remove these two lines from the resources queue:
Plant(RED_ROSE,2,100.0,0,128,GRASS,DIRT,SOIL)
Plant(YELLOW_FLOWER,2,100.0,0,128,GRASS,DIRT,SOIL)
And add the following Grass
resources at the end of the resources queue:
Grass(RED_ROSE,0,40,100,GRASS)
Grass(YELLOW_FLOWER,0,80,100,GRASS)
This should add 40 red roses and 80 yellow flowers to each chunk. Of course, the terrain is not always suitable, so we'll see less flowers. Another thing is that on each attempt a random location in the chunk is choses, which means that it can choose a location that already has a flower!
Nevertheless, if you close the server/world, remove the region folder and open the server/world again, you should see this:
That are a lot of flowers! Let's add some tall grass as well to the biome. There is already a tall grass resource in the resources queue, so let's just increase the frequency of that resource. Change this line:
Grass(LONG_GRASS,1,10,100.0,GRASS,DIRT)
To this line: (note that the 10 is replaced with the 80)
Grass(LONG_GRASS,1,80,100.0,GRASS,DIRT)
Close the server/world, remove the region folder and open the server/world again. Looks a lot better, doesn't it:
We're almost done with this tutorial, but we still want to add some trees. Without trees, it is very difficult to survive in a biome. The syntax of the tree resource is as follows:
Tree(Frequency,TreeType,TreeType_Chance[,Additional_TreeType,Additional_TreeType_Chance.....])
It has a nifty syntax to specify what trees you want. For each attempt (there are Frequency
attempts), it first chooses the first TreeType
. If this Treetype
fails to spawn, either because of the TreeType_Chance
(this is a success percentage) or because of unsuitable terrain, it continues to the next one, the Additional_TreeType
. If that tree also fails to spawn, it continues to the next one. This continues until all tree types in the list have been processed.
Some tree types have bad names. For example, Forest
is actually a birch tree. Tree
is simply an oak tree.
Add this line to the end of the resources queue:
Tree(1,Forest,4,Tree,4)
This means that there is just one attempt in each chunk. In that attempt, there is a 4% chance that the birch spawns (provided the terrain is suitable for that tree). If the birch tree doesn't spawn, there is a 4% chance that a normal oak tree will spawn.
Close the server/world, remove the region folder and open the server/world again. Our biome is now technically finished:
However, if you are on Bukkit and use the command /tc map
, the biome will show up as a block biome. You can change this by choosing another color for the BiomeColor
setting. We will use 0xb8e65c
. Close the server/world, remove the region folder and open the server/world again. Execute the command /tc map
. You should get a map like this one:
If you had any problems recreating this world, you can download the completed version here.
Congratulations, you have just created your own custom biome! You can now create as many custom biomes as you want. You know how to create hills, forests, grass, flowers, etc. Some additional tips:
-
BiomeTemperature:0
will cause the biome to be covered by snow. However, people without the TC mod on the client will see snow on the ground, but rain in the air. To fix this you can useReplaceToBiomeName:Taiga
. - Water is generated when the terrain falls under the sea level. Using the
BiomeVolatility
andBiomeHeight
settings you can best control how the land is shaped. - Take a look in the configs of the default biomes to see how a certain effect is achieved. The downloads thread in the TC forums is also a valuable resource.
Good luck!