Error code · a mistake in the document

dt::weight

weight= is a scatter child's share of the mix.

What the program says

dt::weight

  × `weight=` is a scatter child's share of the mix
   ╭─[example.dtile:3:24]
 2 │ tile size="1x1" {
 3 │     stack { dirt; rock weight=2 }
   ·                        ───┬──
   ·                           ╰── not in a scatter
 4 │ }
   ╰────
  help: write `scatter count=… { rock weight=2; pebble }`
        explain: https://shawn-vincent.github.io/dharmatiles/e/weight
        offline: dharmatiles explain dt::weight

What to do

Write weight= only on a thing inside a scatter.

Broken, then fixed

Gives dt::weight
dharmatiles version="1.0.0"
tile size="1x1" {
    stack { dirt; rock weight=2 }
}
Mended, it reads clean
dharmatiles version="1.0.0"
tile size="1x1" {
    stack { dirt; scatter count=3 { rock weight=2 } }
}

The rule

  • id=: a name for the entry, for edits and diagnostics.
  • weight=: only on a child of a scatter, its share of the mix.
  • The place words its element accepts (placement).

Read it in context: The stack · Every stack entry takes id=, weight= and the place words its element accepts