====== randomtables Plugin ====== ---- plugin ---- description: Define and roll on entries from Random Tables author : omerida email : oscar@oscarm.org type : syntax lastupdate : 2023-07-20 compatible : Jack Jackrum depends : sqlite tags : rpg, tables downloadurl: https://github.com/omerida/dokuwiki-randomtables/archive/refs/heads/latest.zip bugtracker : https://github.com/omerida/dokuwiki-randomtables/issues sourcerepo : https://github.com/omerida/dokuwiki-randomtables ---- ===== Installation ===== :!: **External requirements:** This plugin requires the following additional components that must be installed separately: * [[plugin:sqlite|sqlite Plugin]] * PHP 8.0+ Install the plugin using the [[plugin:plugin|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: 1 Hearts 2 Spades 3 Clubs 4 Diamonds You can also embed the roll button on separate pages. 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. **Decription:** {{roll on:card_face}} **Diversion:** {{roll on:card_suit}} 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. Another option is to show a strip of buttons above the results area. ===== 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.