Element ยท the document

use

Brings named definitions in from a parts file, so a reader knows where every name came from. use lines go above the tile.

A one-square tile with a broad oak and a lawn under it.
use "parts/trees" oak and use "parts/grass" lawn, then oak top="$bottom + 40dmm" and lawn in the stack. From docs/elements/demo/use.dtile.

Writing it

dharmatiles version="1.0.0"

use "parts/grass" lawn long-grass
use "./my-parts" mossy-bank

tile size="2x2" { stack { base; dirt; lawn } }

Reference

PathMeans
"parts/grass"The bundled library's parts/grass.dtile. "lib:parts/grass" says so explicitly.
"./mine", "../shared/x"A file in your own project, relative to this one.
names after the pathThe definitions to bring in. Only these can be called.

The path is written without .dtile. Anything else is an error that says what to write. A tile and the parts it uses are written in the format the program reads; a part of format 0 is refused (dt::format-0).

Notes

The library's parts: parts/grass (lawn, long-grass), parts/trees, and two every document sees without a use: parts/heights and parts/edges. See let for writing your own.

Seen from the language

The guide pages that use use: The tile document, Parts.