Roll Syntax

There is an incredible amount of variety when it comes to rolling dice for tabletop roleplaying games. To accommodate a wide range of styles and systems, Astral has developed a basic (and powerful) roll syntax that allows you to write any number of dice rolls and perform any series of calculations on the outcomes.

Usage

The roll syntax can be used in Chat and Character Sheet Actions.

Rolls must be surrounded with !() or be preceded by /roll. /roll will only work if it is the first word of the message or action.

Using !(), we can place rolls in the middle of a message, like so:

En garde! !(1d20) Oof! Ouch! Owie! !(1d12)

Syntax

At a glance, the roll syntax looks like this:

Command Result
!(1d20) Rolls 1d20
!(1d20+1) Rolls 1d20 with +1 modifier
!!(1d20) Rolls 1d20 w/ delay, the roll will not complete until the owner clicks to roll
!?(1d20) Rolls a hidden 1d20, it will only be visible to the GMs and the player who rolled it
!!?(1d20) Rolls a hidden and delayed 1d20
i!(1d20) Rolls 1d20 and sends the result to the Initiative Tracker
!(1d20+{dex}) Rolls 1d20 + character dex Stat
!({str}d20) Rolls str number of d20s

Supported Dice

You can roll any of the general RPG dice (i.e. 1d4, 1d6, 1d8, 1d10, 1d12, 1d20, 1d100), but you can also roll any specific numbered dice. Playing Warhammer and need a 1d3? Go for it! If your system supports 42 sided dice, you can easily roll 1d42 and expect a random number between 1 and 42.

We also natively support Fudge dice with 1dF. Internally, this is rolled as a custom die (1d[-1,0,1]).

Custom Dice Faces

Custom dice faces can be rolled by creating an “array” of desired potential results.

!(1d[1, 1, 2, word, ?]) will roll a 5 sided die, which can land on any of those options. If the die lands on word, that will be the result of the roll. Dice do not have to have a number to display roll results.

Examples:

Mixed Side Dice

Challenge dice are a common die type in various game systems. They generally involve some numbered sides, with symbols in place of some numbers. Below are some useful examples. Have some to add to our list? Let us know!

# Conan: Combat Die... That's a phoenix, we swear
1d[1,2,0,0,1 🐦,1 🐦]cl
# From Infinity: Combat Die
1d[1,2,0,0,0,∾]

# Warhammer 40K dice:
# Artillery Direction Die (Might not have a proper probability curve)
1d[←,→,↑,↓,↖,↗,↘,↙,←,→,↑,↓,↖,↗,↘,↙,◎]
# Artillery Distance Die
1d[Misfire,2,4,6,8,10]
# Sustained Fire Die
1d[ϟ,1,1,2,2,3]

Some of these examples use dice flags to help them roll or display correctly. For example, the Conan die has faces with both a symbol and a number. Using the Combine Like flag (cl), we tell the parser to split those sides by spaces, and combine each individual value with its same kind – the 1 would get added to the number total, and the phoenix (🐦) would get tallied separately.

Deck of Cards

A single draw from a deck of cards (This assumes the deck is reshuffled after every draw)

| Cards |                                               |
| ----- | --------------------------------------------- |
| Suit  | !(1d[ ♠, ♥, ♦, ♣])                            |
| Face  | !(1d[A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K]) |

A deck of cards custom die roll