Keywords
| Word | Is |
|---|---|
tile | the one tile of a file: its size, seed and stack |
use | bring definitions in from another file |
let | name a value, a thing or a layer: its body tells which |
override | replace a library name for this file |
param | a value a definition takes from its caller |
point | a named point of a tile |
line | a line drawn through points |
region | an area of the tile |
stack | what the tile is made of, in the order it is built |
defaults | values every element of a kind starts from |
printer | a printer profile |
seams | the edge contract: the seam words along a square edge |
within | a clause of a region: all that lies within a distance of a place |
except | a clause of a region: regions taken out of it |
kind | what kind of value a param takes |
at | where an entry goes: a region, a line, a point or a place word |
id | a name an entry is edited by |
weight | how often a child of a scatter is drawn |
dharmatiles | the header line that says a file is a dharmatiles document |
Read it in Syntax.
Units
| Unit | Is |
|---|---|
sq | a square of the grid; 35 mm on DungeonBlocks, 25.4 mm on OpenLOCK |
mm | a printed millimetre: the same on every system |
in | a printed inch, 25.4 mm: the same on every system |
dmm | design millimetre: 1/35 of a square; 1 mm on DungeonBlocks, 0.73 mm on OpenLOCK |
layer | one printed layer: the printer's layer height |
deg | a degree |
rad | a radian: 180/pi degrees |
pi | the number pi: 2 pi rad is a turn |
% | a plain fraction: 50% is 0.5 (a length only inside a point) |
Read it in Units and kinds.
Functions
| Word | Takes | Is |
|---|---|---|
sin | 1 | the sine of an angle |
cos | 1 | the cosine of an angle |
abs | 1 | the size of a number without its sign |
min | 2 | the lesser of two numbers |
max | 2 | the greater of two numbers |
clamp | 3 | a number held between two bounds |
smooth | 1 | smoothstep: an easing from 0 to 1 |
x | 2 | across: where a point is, or the across of a region in a unit |
y | 2 | down: where a point is, or the down of a region in a unit |
d | 2 | how far from the middle |
a | 2 | the angle round the middle |
point | 3 | a point in a frame, from two numbers |
polar | 3 | a point in a frame, from a distance and an angle |
parent | 1 | the region that holds a region |
The coordinates are x y d a parent.
Read it in Squares, cells and points.
Weightings
| Word | Numbers after the range | Is |
|---|---|---|
flat | 0 | a weighting: every value equally likely |
low | 1 | a weighting: low values likelier |
high | 1 | a weighting: high values likelier |
bell | 2 | a weighting: values near the middle likelier |
peak | 2 | a weighting: values near a chosen peak likelier |
ends | 2 | a weighting: values near the ends likelier |
steps | the weight of each step | a weighting: one weight for each step |
mix | parts and their weights in pairs | a weighting: parts drawn by weight |
Read it in Weighted ranges.
$ names
What an element sets where it works a height out: a body, a tree, any other element.
| Name | Body | Tree | Other |
|---|---|---|---|
$x | sets | sets | |
$y | sets | sets | |
$d | sets | sets | |
$a | sets | sets | |
$bottom | sets | sets | |
$tile | |||
$region | sets | sets | sets |
Read it in Names.
The library’s heights
| Name | Is | |
|---|---|---|
$waterBedHeight | 0.4dmm | the bottom of standing water: two print layers |
$waterSurfaceHeight | 2.6dmm | calm water |
$waterEdgeHeight | $waterSurfaceHeight + 0.6dmm * cos(720deg * ($x - $y)) | water at a tile edge: two waves a square |
$dirtEdgeHeight | 3.4dmm | where dirt meets a tile edge |
$groundHeight | 5dmm | open land |
$floorHeight | 7.4dmm | a built floor's top |
$floorEdgeHeight | $floorHeight | where a built floor meets a tile edge: flush |
$shortWallHeight | 16.55dmm | half the wall top |
$wallHeight | 33.1dmm | the standard wall top |
$tallWallHeight | 72.3dmm |
Read it in Heights.
Seam words
| Along a square’s edge | north | south | west | east |
|---|---|---|---|---|
| 1/3 (a third) | nnw | ssw | wnw | ene |
| 1/2 (half) | n | s | w | e |
| 2/3 (two thirds) | nne | sse | wsw | ese |
The tile’s corners: nw (north-west), ne (north-east), se (south-east), sw (south-west). They take no number.
Read it in Lines.
Numbers
| Land slope | 24°: how steeply dirt eases unless an entry says slope= |
|---|---|
| Water settle | 9 mm: how far water settles over what is under it |