Table of Contents
randomtables Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
Installation
External requirements: This plugin requires the following additional components that must be installed separately:
- PHP 8.0+
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
This plugin allows you to define a random table like the ones you may see in your favorite RPG books. When rendered, it adds a button and well to pick an entry.
Syntax
A simple table:
<RANDOMTABLE card_suit> 1 Hearts 2 Spades 3 Clubs 4 Diamonds </RANDOMTABLE>
You can also embed the roll button on separate pages.
<ROLL_ON card_suit>
Any entry in your table can also include one or more results from other tables with the following syntax. You can also make a table with a single result to pick from.
<RANDOMTABLE card> **Decription:** {{roll on:card_face}} **Diversion:** {{roll on:card_suit}} </RANDOMTABLE>
Now, you can also add a Select element to pick a table to roll on. Each new line can be a table identifier, or a table identifier and more readable label to show users.
<ROLL_PICK card_suit:Card Suit 2:Table2 3:Table3 4:TableTable4 5:Final Table >
Another option is to show a strip of buttons above the results area.
<ROLL_MULTI card_suit:Card Suit 2:Table2 3:Table3 4:TableTable4 5:Final Table >
Development
I developed this plugin on a PHP 8 based install and don't have any plans to support earlier versions of PHP.
Change Log
- 2022-11-23
- Initial release
- 2022-07-19
- Added select+button markup. Escaped output sent to browser.
Discussion
Please use the GitHub issue queue.