Compatible XF Versions:
Dice Bb Code
- This is a demo Bb Code to show how to use the preCache system of the BBM addon. So no need to ask me custom modifications on it, I will not do them. But if you want to modify it, feel free to use the "CC by" licence. The only thing I will add will be a TinyMCE Quattro user interface to help users to throw the dice.
- If you don't use the Bbm preCache system, each Bb Code will use one database request. It doesn't seem fine, doesn't it? But if you use the preCache system, no matter how many "dice" Bb Codes are in the view, they will only use one database request ; which is far more better.
- You will find in the first paragraph of the FAQ what has to be done to enable this preCache system. So read it.
Let's say it again: this Bb Code is a demo to show how to use the preCache system of theBBM addon. But it's functional. You can throw the following dice: D4, D6, D8, D10, D12, D20, D40 & D100.
Each dice is given a shape that you can configure. Here are the different available shapes: square, circle, triangle, pentagon, hexagon, diamond-square, diamond-shield, burst-8, burst-12. These shapes are done with css (thanks to this website) and don't use any images. You can also customize the background color and the text color of these shapes.
How to use
The dice can only be thrown in posts. A post can only have one "dice" Bb codes. Well it can have several, but only the first thrown will be saved, so the other will show the results of the first thrown. Which mean, it doesn't matter if the user edits his message, the results of his thrown will remain the same.
The "dice" Bb Codes can have several dice it it. To use it, it's simple: each dice must be separated with ";". So if you want to throw one D20 and one d8, just write:
If you want throw several of the same dice, you can write like this:Code:[dice]d20; d8[/dice]
This will throw three d20. The sign "x" is not important, you can write what you want or simple ignore it.Code:[dice]3xd20[/dice]
- BBM addon (version 3.0.3 minimum)
- Do like always, just be sure to have the needed addons installed first
- Import the Bbm Bb Code (available in the extra directory of the archive) using the Bbm Bb Codes Manager
None, if you still want to submit bugs, just do iton github, but before be sure to have read the Faq.