The tile language · guide

Cheat sheet

Every word of the language on one page: the units, functions, weightings, coordinates and $ names, the library’s heights and the seam words. Nothing here is typed: cargo xtask docs writes it from the program’s own word tables, so it cannot say what the program does not.

Units

UnitIs
sqa square of the grid; 35 mm on DungeonBlocks, 25.4 mm on OpenLOCK
mma printed millimetre: the same on every system
ina printed inch, 25.4 mm: the same on every system
dmmdesign millimetre: 1/35 of a square; 1 mm on DungeonBlocks, 0.73 mm on OpenLOCK
layerone printed layer: the printer's layer height
dega degree
rada radian: 180/pi degrees
pithe 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

WordTakesKind
sin1of numbers
cos1of numbers
abs1of numbers
min2of numbers
max2of numbers
clamp3of numbers
smooth1of numbers
x2of a region and a unit, or a frame and two numbers
y2of a region and a unit, or a frame and two numbers
d2of a region and a unit, or a frame and two numbers
a2of a region and a unit, or a frame and two numbers
point3of a region and a unit, or a frame and two numbers
polar3of a region and a unit, or a frame and two numbers
parent1the region that holds a region

The coordinates are x y d a parent.

Read it in Squares, cells and points.

Weightings

WordNumbers after the range
flat0
low1
high1
bell2
peak2
ends2
stepsthe weight of each step
mixparts and their weights in pairs

Read it in Weighted ranges.

$ names

What an element sets where it works a height out: a body, a tree, any other element.

NameBodyTreeOther
$xsetssets
$ysetssets
$dsetssets
$asetssets
$bottomsetssets
$tile
$regionsetssetssets

Read it in Names.

The library’s heights

NameIs
$waterBedHeight0.4dmmthe bottom of standing water: two print layers
$waterSurfaceHeight2.6dmmcalm water
$waterEdgeHeight$waterSurfaceHeight + 0.6dmm * cos(720deg * ($x - $y))water at a tile edge: two waves a square
$dirtEdgeHeight3.4dmmwhere dirt meets a tile edge
$groundHeight5dmmopen land
$floorHeight7.4dmma built floor's top
$floorEdgeHeight$floorHeightwhere a built floor meets a tile edge: flush
$shortWallHeight16.55dmmhalf the wall top
$wallHeight33.1dmmthe standard wall top
$tallWallHeight72.3dmm

Read it in Heights.

Seam words

Along a square’s edgenorthsouthwesteast
1/3 (a third)nnwsswwnwene
1/2 (half)nswe
2/3 (two thirds)nnessewswese

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 slope24°: how steeply dirt eases unless an entry says slope=
Water settle9 mm: how far water settles over what is under it