# Obsidian Dice Roller
[repo](https://github.com/valentine195/obsidian-dice-roller)
The Dice Roller plugin for [[Obsidian]] simulates the rolling of dice and takes parameters as to the number and type of dice. It can also randomly select a line from a table.
## Usage
`dice: 1d20*2`
### Roll dice
```
`dice: 1d20+4`
```
Use the syntax above and switch to Preview mode to get a random roll as specified.
`dice: 1d20+4`
- Percentiles: `1d%`
- Min/max: `1d[3,5]`
- Fudge/Fate dice: `4dF`
- FAGE: `1dS`
- Keep highest: `2d20kh1`
- Drop highest: `2d20dh1`
- Keep lowest: `2d20kl1`
- Drop lowest: `2d20dl1`
- Explode: `3d4!1`
- Re-roll: `3d4ri`
- Dice conditions: Determine which ones are considered "successful". `1d20r<6`
- Modifier conditions (for explode, combine, re-roll)
### Roll using Dataview fields
### Roll on a table
#### Retrieve the whole line
```
`dice: [[Random Tables#^npc]]`
```
`dice: [[Random Tables#^npc]]`
#### Retrieve just one column
```
`dice: [[Random Tables#^npc]]|Gender`
```
where `Gender` is the name of the column.
`dice: [[Random Tables#^npc]]|Gender`
- Multiple headers
- Nested tables
- Ex: [[Performance test heuristics]]
- [[kOH 79 - Exploratory testing]]
### Roll by tags
#### Retrieve the link to a random note with given tag
```
`dice: #tag|link`
```
`dice: #tag|link`
### Roll using blocks
- section: `3d[[Software Testing]]`
- paragraph: `3d[[Software Testing]]|paragraph`
#### Other block types
- `blockquote`
- `break`
- `code`
- `delete`
- `emphasis`
- `footnoteReference`
- `footnote`
- `heading`
- `html`
- `imageReference`
- `image`
- `inlineCode`
- `linkReference`
- `link`
- `listItem`
- `list`
- `paragraph`
- `root`
- `strong`
- `table`
- `text`
- `thematicBreak`
- `toml`
- `yaml`
- `definition`
- `footnoteDefinition`
### Replacing note content
`dice-mod`
### Other things
- Graphical dice and interface
- Globally saving results
- Integrations with other TTRPG plugins (Fantasy Statblocks, Initiative Tracker)