How to add a new Cell Type to Voxel Garden.
[[TOC]]
You’ll need the following tools:
We’ll assume:
You will have to edit files in:
PACK/
├── cell_types.cfg
├── cell_models.cfg
└── textures/
└── NAME.png
Each section in this file defines the properties of one cell in the world:
[NAME]
solid = true ; has collision
opaque = true ; is not see-through
drop = PACK.NAME ; drops the PACK.NAME item
Each section in this file defines how a cell displays, both graphically and audio-wise:
[NAME]
texture = NAME.png ; uses PACK/textures/NAME.png for all faces
Cells can’t be stored in an inventory or held in your hand to place them; that’s what items do; to make the cell you just made placeable you’ll want to define an item for it.
Container cells are made by adding an inventory to them and by setting their interaction type to ‘container’; both of these things are added to PACK/cell_types.cfg
:
[NAME]
; other cell properties here
capacity = N ; has an inventory with N items
interact = container ; allows access to its inventory when used
Door cells are made by setting their interaction type to ‘door’; this is added to PACK/cell_types.cfg
:
[NAME]
; other cell properties here
interact = door ; attempts to warp the player when used
Crafting benches are made by setting their interaction type to ‘recipes’; this is added to PACK/cell_types.cfg
:
[NAME]
; other cell properties here
interact = recipes
The recipes for this bench are configured separately by adding entries to PACK/recipes.cfg
, all of them with the [PACK.NAME]
section:
[PACK.NAME]
result = something
from = ingredient
from = ingredient
[PACK.NAME]
result = something else
from = ingredient
from = ingredient