- Joined
- Feb 23, 2013
- Messages
- 4,624
- Reaction score
- 1,155
- Status
Dice Roller for the RP Forums:
A simple way to keep rolls and RP posts together.
A simple way to keep rolls and RP posts together.
Hey Lord of Kaos, Skorm brought up adding a dice roller, so I looked into how it could work on AnimeBase. Is that something staff would consider for the RP forums?
Members could click a dice button beside the post editor, choose their dice and any allowed modifier, and have the result attached to the post. For example, a D20 roll of 14 with a +3 bonus would display a total of 17. Just an example, obviously—the RP rules would determine what that result means.
There’s a XenForo add-on called [DD] Dice Roller that supports custom dice, rules and forum permissions:
You must be registered for see links
It requires [DD] Core, and whoever handles installation would need to check compatibility first. I’d also want to check how it handles rerolls and edited posts so the results stay trustworthy.
I made a separate working demo to show the idea. Could something like this be worth trying in one RP forum?
How I’d fit this into AnimeBase:
I put together a coded example using the forum’s layout so it’s easier to picture. The image below shows where the dice controls and result could go. It’s a preview of the idea; the feature hasn’t been installed on AnimeBase.
What members would see:
- Choose a roll. Click a Dice roll button beside the reply controls, then choose the dice, purpose, and any bonus the RP rules allow. Staff would set the available options.
- Submit the post. The roll request goes with the message. The server generates the result only when the post successfully submits.
- See the result in the thread. The post shows the roll, bonus, total, and a saved reference. For example: D20: 14 + 3 = 17. The RP rules still decide what that means.
Layout preview:
Example D20 roll · 14 + 3 = 17
Example D20 roll · 14 + 3 = 17
You must be registered to see images
Keeping the rolls fair:
This is the part I’d want checked properly. Members should be able to fix a typo without changing their roll, and clicking submit twice shouldn’t give them another chance at a better result.
- Post edits: Keep the original dice result even if the wording changes.
- Repeated submissions: Return the same saved result if someone clicks twice or their connection retries.
- Allowed rerolls: Use a separate action with the right permissions. Keep the original result and record who authorised the reroll and why.
- Moderation: Keep the roll history staff need to review, even if a post is deleted or moderated.
A small code example:
For anyone handling the technical side, this PHP example shows how the number itself could be generated on the server. It isn’t the complete XenForo add-on. The dice and bonus limits are just examples; staff would set those around the RP rules.
PHP:
function generateRoll(int $sides, int $modifier): array
{
if (!in_array($sides, [6, 20, 100], true)
|| $modifier < -5 || $modifier > 5) {
throw new InvalidArgumentException('Invalid dice request.');
}
$result = random_int(1, $sides);
return [
'sides' => $sides,
'result' => $result,
'modifier' => $modifier,
'total' => $result + $modifier,
];
}
The server would also check the member’s permissions and the allowed options, then save the post and its roll together. The displayed result needs to come from that saved record, so members can’t change it by typing a different number into the editor.
What the record would include:
The post and member IDs, the dice preset and its version, each roll, the bonus, total, time, and a unique submission reference. That last reference is what stops a connection retry from creating another roll.
How staff could try it:
I’d start small and see how it works in practice:
- Check compatibility. Confirm AnimeBase’s XenForo version and the add-on requirements. The [DD] listing I linked is for XF 2.3 and requires [DD] Core.
- Test it on a staging copy. Set the allowed dice, RP rules, forums, and user-group permissions before trying it live.
- Check edits and rerolls. Verify the behavior above, including repeated submissions and moderator actions. If anything is missing, extend it through an add-on rather than changing XenForo’s core files.
- Try one RP forum first. Start with one simple preset, check desktop and mobile in both site themes, and expand it if it works well.
The add-on lists dice and rule configuration, forum permissions, and styling. The saved-roll and history requirements above are what I’d want checked against it before relying on it for RP.
Where else it could help:
I agree this could help more than just NRP. Other play-by-post games could use their own dice options and permissions too. It would keep more of the experience on AnimeBase and make it more convenient for everyone using it.
Could we try it in one RP forum and see how people get on with it?
[UPDATED: 10/07/2026]
Last edited:
