Wiki

Clone wiki

WorldCreator / Getting_Started

Getting Started

WorldCreator relies on textures and an optional configuration to generate your worlds. This page will step you through the process of setting up your worlds and creating each type of texture to generate your terrain.

Setup

Before we can begin generating any terrain we first need to create a world that uses our generator. I will show you two methods of doing this. The first will work with plain Bukkit, whereas the second depends on Multiverse-Core.

Method 1 (Bukkit only)

This method requires editing of the bukkit.yml file. In this file we need to define our world as well as the generator to use for it. If it doesn't exist currently add a worlds node like so:

worlds:

Under this node we then define the name of our world. In this example I'm going to choose the default world named "world".

worlds:
  world:

Next we need to define what generator to use. Since the world is going to be generated using WorldCreator the generator needs to be so:

worlds:
  world:
    generator: WorldCreator

Before you run the server you may want to make one final alteration to change the default gamemode to creative. This can be found in the server.properties file. If you don't do this then when the initial world generates as a void you will fall straight through.

Method 2 (Multiverse)

If you have multiverse installed then you can use it to configure your world for you.

Start by running your server with the default world. Once you are in your world you can then generate a new one by using the command /mv crete <name> <environment> <-g generator> . If for example you wanted to create a world test using the generator then you would type

/mv create test normal -g WorldCreator

Multiverse will then crete the appropriate folders for you.

Configuration

Once you have your world setup you can now stop the server. Navigate to the data folder in your newly created world. This can be found at <bukkit-home>/<world-name>/data . Inside this folder you should notice a new file called config.json. WorldCreator uses JSON instead of YAML for it's configuration files, although it still does the same job. To get started with the JSON syntax check out this helpful tutorial http://www.elated.com/articles/json-basics/.

Inside this configuration you should see something like the following:

{
  "biomes": {
    "69a41b": "FOREST",
    "c9c3b7": "TAIGA",
    "f8f55f": "DESERT",
    "3f47f2": "OCEAN",
    "b26a9b": "MUSHROOM_ISLAND",
    "1ca52a": "JUNGLE"
  },
  "blocks": {
    "4c853c": {
      "middle": 1,
      "blocks": [
        "bedrock",
        "stone",
        "dirt",
        "dirt",
        "dirt",
        "dirt",
        "grass"
      ]
    },
    "209900": {
      "middle": 1,
      "blocks": [
        "bedrock",
        "dirt",
        "grass"
      ]
    },
    "e9ea33": {
      "middle": 1,
      "blocks": [
        "bedrock",
        "stone",
        "sandstone",
        "sandstone",
        "sandstone",
        "sandstone",
        "sand",
        "sand",
        "sand",
        "sand"
      ]
    },
    "c2c441": {
      "middle": 1,
      "blocks": [
        "bedrock",
        "sandstone",
        "sand",
        "sand",
        "sand",
        "sand"
      ]
    }
  }
}

For now we can leave this file as-is. Later on I will show you how to customise your generation more.

Textures

The next stage of generating your world is to create a heightmap. A heightmap is essentially a texture where each pixel corresponds to the height of the terrain. The heightmaps consist of three channels each with a diffent purpose:

  • Red - This channel specifies the terrain height. 0 is no blocks, and 255 is the heighest blocks
  • Green - This channel specifies a lower height boundary. This allows you to create terrain with islands floating in the void
  • Blue - This specifies the water height. This allows for creation of oceans as well as rivers and lakes at any height you want.

To start with we will just create a texture using the red channel only. All the others will be set to black. Open up your favourite image editor and create a bland 512*512 image. We choose this size since that's how many blocks there are in a region. Next choose the color with the value #140000 (rgb[20,0,0]). Fill the entire image with this color. This will generate terrain with a constant height of 20.

The image now needs to be saved as a png image. Textures in WorldCreator follow a naming scheme. For heightmap textures they have the name "heightmap_<x>_<z>.png" where <x> and <z> are the x and z coordinate. So for the region 0,0 the texture would be named "heightmap_0_0.png". This file needs to be saved in the data folder of your world.

Generating the terrain

Once we have the texture created we now need to generate the new terrain. There are two ways to go about doing this. The first method is to simply delete the "region" folder of your world. Unfortunatley you have to stop the server to be able to do this. An alternative (but slower) method is to regenerate whilst the server is running.

With the server running teleport to your currently blank world. Make sure you're in creative as to not fall through the world. Next you need to navigate to anywhere within region (0,0). This region expands from block (0,0) to (512,512). Using f3 position yourself anywhere within this region.

Next we will use the region regenerate command. This command will regenerate every chunk within the region. The operation is designed not to lag your server, so you can do this whilst players are online (but preferably not in the world you're regenerating). Because of this the regen command may take a long time to execute. To do this execute the command:

/wcr regen region

You may notice parts of the chunks being generated, but not all of it. Fear not, simply log in and out to see the results. Once you have logged back in you should see your brand new flat world.

That's the end of the basic tutorial. In fact you've only barely scraped the surface of what this generator can do. To learn more check out some of the following tutorials:

Advanced Heightmaps

The Block map

The Biome map

Advanced Configuration

Updated