Starbound

Starbound

30 ratings
Modding: Biome Guide
By Ceterai
This guide will tell you how to create your biome, customize it and put it in the game.
WEBSITE[ceterai.github.io] | SUPPORT ME[buymeacoffee.com]
3
   
Award
Favorite
Favorited
Unfavorite
Preface
This guide assumes you know how to unpack game files, although this is not necessary to follow this guide.
This guide is about biomes only, not planets (you can find a guide on planets here).
This guide makes use of .patch files. If you're unsure on how they work, here's a helpful guide.
Let's go!
Creating a new biome
First of all, let's call our new biome my_cool_biome. I will use this name to refer to our biome in this guide.

Every biome is split into 2 different parts: a .biome file and a terrestrial_worlds.config.patch file.

.biome file
Create a .biome file and call it something like my_cool_biome.biome.
This file contains information on how your biome behaves, what things it spawns, etc.
Let's go through some of the parameters:
  1. Main information
    • "name" - your biome's technical name, all lowercase, no spaces. In our case it's my_cool_biome. You can refer to your biome in other files using this name;
    • "friendlyName" - visual, "cosmetic" name of your biome.

  2. Weather
    • "weather" - contains a list of weather config presets. Keep in mind that you only need these if you're going to set this biome as a primary biome of a planet.
      You can create your own weather list or use an existing one, for example the following code sets weather, that is used by the Garden biome in the original game:
      "weather" : [ [0, [ "/weather.config:garden" ]] ],
      Note: if you want to know, how to create/edit weather - go here:
      https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2608845860

  3. Sky
    • "skyOptions" - contains a list of possible sky color sets for day, dusk, night & dawn. Here's an example:
      "skyOptions" : [ { // sunny earth days, red/orange sunrise and purple/red sunset "mainColor" : [255, 255, 255], "morningColors" : [ [242, 120, 0], [255, 230, 176] ], "dayColors" : [ [115, 224, 255], [255, 255, 255] ], "eveningColors" : [ [125, 17, 158], [210, 52, 50] ], "nightColors" : [ [24, 38, 53, 80], [58, 42, 70, 160] ], "morningLightColor" : [140, 71, 0], "dayLightColor" : [200, 200, 200], "eveningLightColor" : [160, 120, 180], "nightLightColor" : [40, 20, 60] }, { // sunny green day, darkgreen/yellow sunrise and purple/blue sunset "mainColor" : [255, 255, 255], "morningColors" : [ [68, 164, 84], [243, 201, 115] ], "dayColors" : [ [115, 255, 204], [255, 255, 255] ], "eveningColors" : [ [43, 17, 118], [244, 161, 231] ], "nightColors" : [ [24, 38, 53, 80], [58, 42, 70, 160] ], "morningLightColor" : [20, 91, 100], "dayLightColor" : [200, 200, 200], "eveningLightColor" : [160, 120, 180], "nightLightColor" : [40, 20, 60] } ],
      Names of the parameters here a self-explanatory.

  4. Background
    • "parallax" - contains a path to a .parallax file. You can create your own or use an already existing one. For example, here's how to use Garden parallax:
      "parallax" : "/parallax/surface/garden.parallax",

  5. Blocks & Ores
    • "mainBlock" - name of the main block of your biome. For exapmle, dirt;
    • "subBlocks" - a list of other possible blocks, that may spawn in patches along with main block. For example, cobblestone;
    • "ores" - a preset for spawning ores and other ore-like objects (like crystals). You can create your own or use one of the original ones, like "surface". You can find all presets in packed/biomes/oredistributions.configfunctions (if you have you game files unpacked).

  6. Colors
    • "hueShiftOptions" - a list of all possible hue values, that are applied to the main block & grass, where 0 is original color (brown for dirt), 1 and greater is shift to the right (dirt starts becoming yellow, then green, etc.),
      -1 and lower is shift to the left (dirt starts becoming red, then pink, etc.).
      The full range of these values is [-360; 360].
      There's rarely a good way to get a result you want first try, so you'll probably have to experiment with this parameter.
      If you just want normal colors, use 0.
      If you want colors like in Garden, use this example:
      "hueShiftOptions" : [-30, -20, -15, -10, -5, 0, 5, 10, 15, 20, 30],

      If you need to test how a block will look with certain color hue, you can spawn it in the game like this: /spawnitem <block> <amount> '{"materialHueShift":<hue>}'
      Example:
      /spawnitem dirtmaterial 1 '{"materialHueShift":100}'

      If you want to know more about hue values, you can visit this reddit thread.

  7. Music & Noises
    • "ambientNoises" - a set of random background noises to use, example:
      "ambientNoises" : { "day" : { "tracks" : [ "/sfx/environmental/forest_day.ogg", "/sfx/environmental/forest_day2.ogg" ] }, "night" : { "tracks" : [ "/sfx/environmental/forest_night.ogg", "/sfx/environmental/forest_night2.ogg" ] } },
    • "musicTrack" - a set of background music to play, example:
      "musicTrack" : { "day" : { "tracks" : [ "/music/epsilon-indi.ogg", "/music/hymn-to-the-stars.ogg", "/music/procyon.ogg", "/music/stellarformation.ogg", "/music/vast-immortal-suns.ogg", "/music/atlas.ogg", "/music/blue-straggler.ogg", "/music/cygnus-x1.ogg", "/music/europa.ogg", "/music/haiku.ogg", "/music/m54.ogg", "/music/on-the-beach-at-night.ogg" ] }, "night" : { "tracks" : [ "/music/jupiter.ogg", "/music/arctic-constellation1.ogg", "/music/arctic-constellation2.ogg", "/music/mercury.ogg", "/music/mira.ogg", "/music/procyon.ogg", "/music/tranquility-base.ogg", "/music/psyche.ogg", "/music/accretion-disc.ogg", "/music/cygnus-x1.ogg", "/music/eridanus-supervoid.ogg", "/music/horsehead-nebula.ogg", "/music/large-magellanic-cloud.ogg", "/music/m54.ogg", "/music/nomads.ogg", "/music/on-the-beach-at-night.ogg" ] } },

  8. Monster Spawn
    • "spawnProfile" - an object, that consists of other parameters:
    • "groups" - a list of spawning groups. Here's a good example:
      "groups" : [ { "select" : 3, "pool" : [ [ 1.0, "gleap" ], [ 1.0, "nutmidge" ], [ 1.0, "poptop" ] ] }, { "select" : 2, "pool" : "nightTerrors" }, ],
      This code makes your biome to select 3 mobs from gleap, nutmidge and poptop, and 2 randomly generated night creatures;
    • "monsterParameters" - different parameters to apply to the monsters, example:
      "monsterParameters" : { "colors" : "garden" }
      This code makes sure, that all randomly generated creatures have colors from garden monster color preset.

  9. Crops, Trees & Microdungeons
    • "surfacePlaceables" - an object, that describes generation of different objects in your biome. You can find good examples in "packed/biomes" (if you have game files unpacked). Unfortunately, I won't show them here, because this section is getting too big.
    • "undergroundPlaceables" - same as "surfacePlaceables", but for undeground placement.

  10. Other parameters
    There are other parameters that are not necessary. You can find a full list here[starbounder.org].

Now let's look at terrestrial_worlds.config.patch.
Creating a new biome. Region Types
Every biome can have multiple region types. A region type describes a set of terrain, liquid and ore generators.
Your biome needs to have at least 1 region type.
All region types are located in a file called terrestrial_worlds.config, so to edit it let's create a file called terrestrial_worlds.config.patch and put it in the root folder of your mod.
Here's what you need to put in this file:
[ { "op" : "add", "path" : "/regionTypes/my_cool_biome", "value" : { // list of liquids that can appear in your biome "caveLiquid" : [ "water", "healingliquid" ], // rarity of appearance. If you want it to be like Swamp or Tar or Oasis, leave [20, 20] "caveLiquidSeedDensityRange" : [20, 20], // list of possible terrain generators. You can find more in packed/terrain/surface "blockSelector" : [ "remixedSwampySurface", "remixedPoolsSurface" ], // list of possible cave generators. You can find more in packed/terrain/cave "fgCaveSelector" : [ "denseCaves" ], // list of possible ore generators. You can find more in packed/terrain "bgOreSelector" : [ "empty" ], "biome" : [ [0, [ "my_cool_biome" ]] ] } } ]

We're almost there. Now let's make your biome appear in the game.
Spawning a biome
There are 3 general ways to make your biome spawn in the game:
  1. Making it a subbiome for other biomes;
  2. Making a planet for it;
  3. Making a terraformer (not included in this guide).

Here's how to make it a subbiome for other biomes.
In this example, We'll make my_cool_biome a subbiome in Garden. This means that you will be able to stumble across your biome while exploring Garden planets.
To do that, we need to edit Garden's planet type entry in terrestrial_worlds.config.
So, you'll need to add the following code to your terrestrial_worlds.config.patch file:
{ "op" : "add", "path" : "/planetTypes/garden/layers/surface/secondaryRegions/-", "value" : "my_cool_biome" }
You can replace "garden" with any other existing biome.

If you want to make a custom planet for your biome, here's a guide for that:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2150025880

That's it! Note that your biome will not spawn on already visited planets.
Editing an existing biome
This section will be short.
If you need to modify any existing biome that's not included in your mod you can do so through JSON-patching a corresponding .biome file.

If this is a standard biome, your .patch file should be located at "your_mod/biomes/biome_name.biome".

Keep in mind that this will not affect already visited planets.
Conclusion
That is all I can share with you on this topic. I will expand it if I find/learn more about it.
If you need full biome examples, you can find them in "packed/biomes" (if you have game files unpacked).

I know that there are guides on this out there, but information in those that I found turned out to be somewhat outdated, which is why I made this guide.

Please let me know if I forgot or mixed up anything.
Thank you for reading!