Skip to content
rutgerkok edited this page Dec 23, 2012 · 37 revisions

BO3 objects will be the successor of the BO2 objects. They can be found in the latest dev builds.

Getting BO3s

Currently, the only way to make a BO3 is to create an empty file with the extension .bo3, like example.bo3. Place it in one of the custom object folders and start the server. You will notice that Terrain Control has added some default settings.

Two simple example BO3s can be found here.

Placing the BO3s in your world

Works exactly like the BO2s, but spawnInBiome is now ExcludedBiomes. If you want your BO3 in just a few biomes, it is recommend to not use UseWorld, but to write the BO3 name directly in the Tree or CustomObject resources, or the BiomeObjects list.

The settings in the BO3 file

BO3 object

Author:Unknown

The author of the BO3 object. Not used by Terrain Control, but it can be used by an external application.

Description:No description given

A short description of the BO3 object. Not used by Terrain Control, but it can be used by an external application.

Version:3

BO3s have version number three. Don't change this! It can be used by external applications to do a version check.

SettingsMode:WriteAll

Normally, each time Terrain Control reads the BO3 object, it also writes to it. With this setting you can change how Terrain Control writes to this BO3. Possible modes:

  • WriteAll - Autoupdate settings from old versions, order them, add comments, reset invalid settings and remove custom comments.
  • WriteWithoutComments - Same as WriteAll, but removes all comments, both the ones of Terrain Control and your own.
  • WriteDisable - Don't write to the comment files. Errors are not corrected, old settings are read, but they are also not corrected. Custom comments won't be removed with this mode.

Main settings

Tree:true

This needs to be set to true to spawn the object in the Tree and Sapling resources.

Frequency:1

The frequency of the BO3 from 1 to 200. Tries this many times to spawn this BO3 in a chunk when using the CustomObject(...) resource.

Rarity:100.0

The rarity of the BO3 from 0 to 100. Each spawn attempt has rarity% chance to succeed when using the CustomObject(...) resource.

The rarity can be very small. 0.0001 is possible.

RotateRandomly:false

If you set this to true, the BO3 will be placed with a random rotation.

SpawnHeight:highestBlock

The spawn height of the BO3 - randomY, highestBlock or highestSolidBlock.

MinHeight:0

MaxHeight:256

The minimum and maximum height for the BO3 to spawn.

ExcludedBiomes:

When spawned with the UseWorld keyword, this BO3 should NOT spawn in the following biomes.

If you write the BO3 name directly in the BiomeConfigs, this will be ignored.

ExcludedBiomes:All will make this object not spawn in UseWorld.

Source block settings

SourceBlock:0

The id of the block the BO3 should spawn in.

OutsideSourceBlock:placeAnyway

What to do when the BO3 should do when it is about to place a block on a location where there is no source block.

dontPlace - cancel the block placement on that location.

placeAnyway - place the block anyway.

MaxPercentageOutsideSourceBlock:100

A percentage of how much block of the BO3 can be outside the source block.

 

Some examples:

A tree should spawn inside air blocks, so we set SourceBlock to 0, the id of air. Leaves shouldn't replace stone, so we set OutsideSourceBlock to dontPlace. We don't want the tree to be covered too much with terrain, so we set MaxPercentageOutsideSourceBlock to 10, so that at least 90% of our tree will spawn.

An ore should spawn in stone, so we set SourceBlock to 1, the id of stone. The ore shouldn't stick out of the stone, so we set OutsideSourceBlock to dontPlace. We don't mind only a small part of our ore spawning, so we set MaxPercentageOutsideSourceBlock to 90.

Blocks

All the blocks used in the BO3 are listed here.

Syntax: Block(id[.data],x,y,z[,nbtfile.nbt,chance[,anothernbtfile.nbt,chance[,...]]])

So Block(CHEST,0,0,0,chest.nbt,50,anotherchest.nbt,100) will spawn a chest at the BO3 origin, and give it a 50% chance to have the contents of chest.nbt, or, if that fails, a 100% percent chance to have the contents of anotherchest.nbt.

The NBT file needs to contain a compound tag, which should contain a properly structured Tile Entity:

chest.nbt > Compound tag Data > some other tags. with (String) id set to Chest

You can use relative paths in your BO3. So chests/chest.nbt will search for chest.nbt inside the chests folder, which should be placed next to the BO3. Absolute paths are not accepted. Windows is case-insensitive and also allows you to use the blackslash(\), other operating systems don't.

BO3 checks

You can add as many checks to the BO3 as you want. If any of these checks fails, the BO3 will fail to spawn. Everything is checked before the BO3 spawns.

BlockCheck(x,y,z,id[.data][,id[.data][,...]])

Require a block to be on this location before the BO3 spawns there. Examples:

BlockCheck(0,-1,0,GRASS,DIRT) - require grass or dirt one block below the origin of the BO3.

BlockCheck(0,-1,0,GRASS)
BlockCheck(0,-2,0,DIRT)

Require grass one block below the origin of the BO3, and dirt one block below that.

LightCheck(x,y,z,minLight,maxLight)

Require a certain light level on a certain position. Light values are inclusive, so LightCheck(0,0,0,5,7) requires a light level of 5, 6 or 7 at the BO3 origin.