Server packs are sets of data files that determine how a world behaves; in an (hypothetical) multiplayer environment, all players must share the same set of server files.

Data is split into packs, each one being a folder under packs/PACK; objects defined inside them have names automatically prefixed by PACK..

[[TOC]]

Cell Types

Description of every type of cell that can be used in a world.

packs/PACK/cell_types.cfg
[NAME]
empty = false
solid = true
opaque = true
slow = false
drop = PACK.NAME
capacity = 0
interact = none
light = 0

The file contains any number of [NAME] sections, defining the cell type named PACK.NAME

key type default explanation
empty bool false can’t be rendered or selected
solid bool false have collision
opaque bool false prevent cells behind them from being seen
slow bool false dampen the speed of mobs passing through
drop Item none item dropped by the cell
capacity int 0 size of the attached inventory
interact Interaction none what happens when a player interacts
light int 0 amount of spot light emitted

Interaction

Interaction type determines how the cell responds to the player attempting to interact with it.

If interaction type is anything other than ‘none’ the crosshairs will change shape when hovering over the cell.

name explanation
none does nothing
container accesses the cell’s inventory
recipes opens a recipe list corresponding to the cell
door attempts to warp to the other side of the cell

Mob Types

Description of every type of mob that can be used in a world.

packs/PACK/mob_types.cfg
[NAME]
size = 0.5 0.5
drop = PACK.NAME
solid = false
persistent = false
items = 0
interact = none
state = ...
signal = ...

The file contains any number of [NAME] sections, defining the mob type named PACK.NAME

key type default explanation
size float float 0 0 half size (horizontal vertical)
drop Item none item dropped/picked
solid bool false if true, other solid mobs collide with it
persistent bool false if true, the mob is saved to disk
items int 0 size of the mob inventory
interact Interaction none effect when a player interacts
state State - state description
signal Signal - signal description

Interaction

Interaction type determines how the mob responds to the player attempting to interact with it.

If interaction type is anything other than ‘none’ the crosshairs will change shape when hovering over the mob.

name explanation
none does nothing
container accesses the mob’s inventory
poke each consecutive interaction will succeed and fail

State

States determines mob behavior. State descriptions are lines of the form:

state = TASK FRAMES [then SUCCESS] [else FAILURE]

Valid tasks for mobs are:

task explanation
idle does nothing, always returns true

Signal

Signals allow the mob state machine to jump states in response to an external condition. Signal descriptions are lines of the form:

signal = SIGNAL STATE

This would cause the mob to jump to ‘STATE’ in response to a signal of type ‘SIGNAL’ regardless of what it was doing at that moment.

signal explanation
tick send on a semi-random period (60–120 frames)
interact send when interaction succeeds (requires interact != none)
fail send when interaction fails (requires interact != none)

Item Types

Description of every type of item that can be used in a world.

packs/PACK/item_types.cfg
[NAME]
place = ...
spawn = ...

The file contains any number of [NAME] sections, defining the item type named PACK.NAME

key type default explanation
place Cell none cell placed when using the item
spawn Mob none mob spawned when using the item

Recipes

Description of the ways items can be crafted into different items

packs/PACK/recipes.cfg
[BENCH]
result = item amount
from = item amount
from = item amount

The section name is not the name of the recipe (recipes do not have names), but the name of the bench block (full name of a cell declared on a cell_types.cfg file).

The bench block determines which cell (if any) must be interacted with to use the recipe. If the value is empty ([]) the recipe can be used from the default inventory.

Section names can and will repeat in the recipes file, each one defining a different recipe with the same bench.

key type default explanation
result Item [count] - result of crafing the recipe
from Item [count] - ingredient required for crafting. Multiple from lines can be added and each one counts as a separate ingredient.

Both result and from entries have values consisting on an item type name of the form PACK.NAME that must correspond to the section [NAME] at packs/PACK/item_types.cfg, and an optional integer that determines the amount of items of that type, and defaults to 1 if not specified.

World Generation

Equation describing how terrain height is calculated.

worldgen/basic.expr
(+
 60
 (*
  (^ (* (+ 1 (noise 0.0625 1)) (noise 0.125 1)) 2)
  (+ 16 (noise 2 4) (noise 8 2)))
 (* -2 (< (abs (noise -1 1)) 0.2)))

The file contains only an expression; an expression is either:

function arguments explanation
+ 2 or more adds together all the arguments
- 2 or more substract the second to last values from the first
* 2 or more multiplies all the arguments
/ 2 or more divides the first value by the second to last
^ 2 raises the first argument to the power of the second
== 2 returns 1 if two values are equal, 0 otherwise
!= 2 returns 1 if two values are different, 0 otherwise
< 2 returns 1 if the first value is less than the second, 0 otherwise
> 2 returns 1 if the first value is greater than the second, 0 otherwise
<= 2 returns 1 if the first value is less or equal than the second, 0 otherwise
>= 2 returns 1 if the first value is greater or equal than the second, 0 otherwise
abs 1 absolute value of the argument
noise 2 generates noise by multiplying the x and z coordinates of the cell by the second argument, then multuplies the result by the first argument