Jump to content

Creating Custom Biomes


Wognif
 Share

Recommended Posts

This tutorial assumes you've already looked up my previous guide to making custom models spawn naturally, and have taken a look in STUFF/TERRAFORM/CELLTYPES.txt.
If you haven't yet looked at my guide to making custom models naturally spawn, here's the link:
http://www.rockraidersunited.com/topic/6621-getting-custom-models-to-naturally-spawn/

In order to make a custom BIOME, you must first make a custom THEME.
Go to STUFF/TERRAFORM/THEMES and pick a theme to use as a template. I just used CANDYTHEME for when I experimented.
The file should generally look something like this:

DayTimeAmbienceTrack     = 'Amb_Forest_Day'
NightTimeAmbienceTrack     = 'Amb_Forest_Night'
Characters
{
    AddCharacter = "Skeleton"
        Weight = 1.0
    EndCharacter
}
Props
{
    Density = 0.01
    StartProp = "Functional/TreasureChestSmall"
        Weight = 0.005
    EndProp
}


Not showing the TerrainLandscape bit as that was covered in my previous guide.
This is where my previous tutorial comes in handy. Pick what characters and props you want to spawn and what models, and save it (in ALL CAPS). For this example, I named the file INFOTHEME.txt.
Now, go to STUFF/TERRAFORM/THEMES/INDEX.txt
and add it to the index.
 

InfoTheme.txt 40


Not exactly sure what the purpose of having a number by the filename is, but just to be safe, put a number beside it.
Now, we have make the biome.
Go to STUFF/TERRAFORM/BIOMES/DEFINITIONS and pick the biome to use as template. Again, I used CANDYLAND for the experiment.
It generally looks something similar to this.

 

TemperatureRange    0.3 0.8
RainfallRange        0.0 0.15
HeightRange            0.0    0.5
SelectionWeight        1.0
DefaultTheme "InfoTheme" 1.0
Stage "HeightMap"
{
    //OversampleScale        = 1.5
    NoiseFunction "BaseNoise"
    {
        NoiseGen        = #PerlinV2
        Frequency        = 8.7
        Scale            = 1.0
        PostScaleOffset    = 4.0
    }
    NoiseFunction "mtn"
    {
        NoiseGen        = #PerlinV2
        Frequency        = 10.0 //5.0
        Scale            = 30.0 //35.0
        PostScaleOffset    = -15.0
        LowerClamp        = 0.0
    }
    AddModifier "Noise"
    {
        Input            = "BaseNoise"
        BlendMode        = #Add
    }
    AddModifier "Quantise"
    {
    }
    
    AddModifier "Noise"
    {
        Input            = "mtn"
        BlendMode        = #Add
    }
}
Stage "Composition"
{
    NoiseFunction "ColourComposition"
    {
        NoiseGen        = #RidgedMultifractal
        Frequency        = 8
        Octaves            = 2
        PostScaleOffset = -0.35
        LowerClamp        = 0.0
        UpperClamp        = 1.0
        NoiseMapWidth    = 4096.0
        NoiseMapDepth   = 4096.0
    }
    NoiseFunction "ChocolateCoating"
    {
        NoiseGen        = #PerlinV2
        Frequency        = 30.0 //20.0
        Scale            = 85.0 //30.0
        PostScaleOffset = 245.0
    }
    AddModifier "BrickComposition"
    {
        input = "ColourComposition"
        DefaultWaterType = #Lava
        DefaultGroundType = #LegoBrick_Solid_BrightGreen
            BeginLayer
                MinDepth    = 5
                MaxDepth    = 10
                AddBrickType    = #LegoBrick_Solid_DarkGreen
                Chance            = 0.5
                AddBrickType    = #LegoBrick_Solid_BrightRed
                Chance            = 0.4
            EndLayer
            BeginLayer
                MinDepth    = 11
                MaxDepth    = 11
                AddBrickType    = #LegoBrick_Solid_BrightGreen
            EndLayer
            BeginLayer
                MinDepth    = 5
                MaxDepth    = 5
                AddBrickType    = #LegoBrick_Solid_NewDarkRed
            EndLayer
            BeginLayer
                MinDepth    = 11
                MaxDepth    = 11    
                AddBrickType    = #LegoBrick_Solid_BrightGreen
            EndLayer
            StartBlendOutHeight    = 220
            EndBlendOutHeight    = "ChocolateCoating"
        BeginHeightRange
            StartBlendInHeight    =  "ChocolateCoating" //250
            BeginLayer
                MinDepth    = 5
                MaxDepth    = 10
                AddBrickType    = #LegoBrick_Solid_BrightGreen
            EndLayer
            BeginLayer
                MinDepth    = 20
                MaxDepth    = 32
                AddBrickType    = #LegoBrick_Solid_BrightRed
            EndLayer
        EndHeightRange
    }
    NoiseFunction "CliffNoise"
    {
        NoiseGen        = #WhiteNoise
        Scale            = 1.0
    }
    AddModifier "MechBiomeCliffCreationMod"
    {
        Input = "CliffNoise"
    }
}
Stage "PostComposition"
{
    NoiseFunction "SlopeNoise"
    {
        NoiseGen        = #WhiteNoise
        Scale            = 1.0
    }
    AddModifier "SlopeCreation"
    {
        // See hills biome for a more detailed setup
        Input = "SlopeNoise"
        AllBricks // Adds every brick type at chance 1.0
    }
    AddModifier "BrickMatching"
    {
        // Make larger bricks than 1x1x1
    }
    NoiseFunction "PropNoise"
    {
        NoiseGen        = #WhiteNoise
        Scale            = 1.0
    }
}


 


 

Reference the theme you made where it says: DefaultTheme "InfoTheme" 1.0
Lines like AddBrickType    = #LegoBrick_Solid_BrightRed are where you define a material by its name in CELLTYPES.txt
Save your in the same way you did the theme, except with a different name. (such as INFOLAND.txt)
Add it into STUFF/TERRAFORM/BIOMES/DEFINITIONS/INDEX.txt. No numbers this time.
Then, go to STUFF/TERRAFORM/BIOMES/GROUPS/NORMAL.txt
Add in the following lines
AddBiome
{
    Type                 = "InfoLand" //name of the biome
    Weight                = 0.9    //chance of biome spawning
}


Save it, and make a new world, find your biome, and you're done!

Here's an example of what it might look like in-game:

large.2015-06-17_00007.jpg.2a895640f3fb4

Edited by Wognif
Link to comment
Share on other sites

Impressive! Does it just break if you remove the day/night stuff? =P A little more seriously, I'm guessing you figured out the Legobrick_solid_color from some of the existing files? Or is that tucked away a little elsewhere?

Edited by Gmr_Leon
Link to comment
Share on other sites

Impressive! Does it just break if you remove the day/night stuff? =P A little more seriously, I'm guessing you figured out the Legobrick_solid_color from some of the existing files? Or is that tucked away a little elsewhere?

​Not sure if it breaks if I take away the day/night bit.

The Legobrick_solid_colors are in CELLTYPES.txt. You just have to look very deep in there, as CELLTYPES defines both terrain colors and colors used in build mode. :P

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.