> For the complete documentation index, see [llms.txt](https://bothelp.hktrpg.com/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bothelp.hktrpg.com/guide/en/trpg-features/kai-shi-jin-hang-trpg/ji-ben-zhi-tou.md).

# Basic Rolling

Basic dice rolling in HKTRPG.

{% hint style="info" %}
**Tip:** In most TRPG and board-game docs, dice are written as xDy — x dice with y sides each.\
Example: the bluffing game Liar’s Dice uses five six-sided dice, i.e. 5D6.
{% endhint %}

### xDy

Roll x dice with y sides each.\
Example: `1D100` rolls one hundred-sided die; the result is 1–100.

Example with flavor text: `1D100 攻撃！`\
Output: `1D100：攻撃！ 38[38] = 38`

\
As above, add a space after the dice expression to attach a message.

### Multiple Rolls

`.5 3D6` — roll 3d6 five times (up to 30 times)\
![](https://1571859488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUjtESJSBC6vWnLnVGfed%2Fuploads%2Fgit-blob-e08607bdb08e0e5314a1974deaf506d7377cf42e%2Fimage.png?alt=media)

### Math

Supports parentheses, + − × ÷, and comparisons (>, <, >=, <=).

![](https://1571859488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUjtESJSBC6vWnLnVGfed%2Fuploads%2Fgit-blob-5bd269a32c6f1a6c68e2d145fb137f5d6cb92f51%2Fimage.png?alt=media)

### kh | kl | dh | dl

{% hint style="info" %}
Common in DND and PF.
{% endhint %}

k = keep, d = drop, h = highest, l = lowest\
Example: `3d6kh` — keep the highest one die\
![](https://1571859488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUjtESJSBC6vWnLnVGfed%2Fuploads%2Fgit-blob-6d9cb5751e8c0eebaf9239d9eb3c6a859233361d%2Fimage.png?alt=media)\
\
`3D6dl2` — drop the lowest two dice<br>
