2021-09-14

I wanted to make a table (for table of tavern names) that uses *d216* type notation. This is when you roll a *d6* three times (or three diff colours at the same time and declaring one *d6* as high, one as middle and one as low) and instead of adding them you concatenate the numbers.^{1} This produces 216 unique numbers.

As it’s similar to base6 / senary. It has numbers that change the order of magnitude at the 6^{th} digit, for example:

- …
- 165
- 166
- 211
- 212
- …

Here’s a shell one-liner to generate a markdown table for *d216*:

```
printf '| d216 | foo |\n|:----:| --- |\n' ; \
for i in {1..6}{1..6}{1..6} ; do printf '| %4d | |\n' "$i" ; done
```

The above produces:

```
| d216 | foo |
|:----:| --- |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 121 | |
| 122 | |
| 123 | |
...etc
```

A single brace expansion `{1..216}`

wont work, as that uses *base10* and produces numbers that can’t be rolled using *d6*s.