This plugin provides the Dice Roller block, which can be used to roll different polyhedral dice for use in Table-Top Role-Playing Games.
Built with WDS Block Starter.
- Upload the
dice-roller
folder to the/wp-content/plugins
directory. - Activate the Dice Roller plugin through the 'Plugins' menu in WordPress.
- Add the 'Dice Roller' block in a post or page.
- Select the type and number of dice you want in your block. Optionally, if you select to include two or more of one die, select what function to use on the dice (e.g., Add all rolls together).
- Save and view your page or post.
- Click 'Roll these dice!' to generate die results.
Use this block anytime you want to simulate rolling some dice (or a coin flip)! If you're building a character for a Role-Playing Game, try using this block for attack rolls. Each block instance can represent a different weapon or attack, including the attack roll itself, damage, and any bonus or penalty rolls.
Feel free to create an issue or PR in the Github repo here.
- Fixed: Centered die list to align elements properly when result text length exceeds width of dice.
- Updated: Simplified dice list styling to avoid size jumps after rolling.
- Fixed: Updated webpack config and js setup to work with wp-scripts v12.
- Updated: Brought npm packages up to latest versions.
- Fixed: Removed duplicate block wrapper
div
on frontend display.
- Added: Added additional Multi-die handling options for returning sum resulting from dropping the highest or lowest roll.
- Added: Created data attribute for roll result values.
- Updated: Cleaned up code, comments to be more in line with similar blocks (e.g., Initiative Tracker).
- Fixed: Added stroke property to icons with contrast color for darker screens.
- Added: Create Dice Roller block with frontend polyhedral rolling and custom multi-die handling.
- "D100" polyhedron icon by emilegraphics from the Noun Project.
- "D20" icosahedron icon by Alessandro Bertoni from the Noun Project.
- "D12" dodecahedron icon by Alessandro Bertoni from the Noun Project.
- "D10" decahedron icon by Alessandro Bertoni from the Noun Project.
- "D8" octahedron icon by Alessandro Bertoni from the Noun Project.
- "D6" cube icon by Alessandro Bertoni from the Noun Project.
- "D4" tetrahedron icon by Alessandro Bertoni from the Noun Project.
- "D2" coin icon by Bakunetsu Kaito from the Noun Project.