Added quickdice to extensions.json#83
Added quickdice to extensions.json#83Robert-Wegner wants to merge 1 commit intoowlbear-rodeo:mainfrom
Conversation
|
Hi Robert, A couple of minor changes needed here please:
Once you've made those changes, ping me here and I'll run verification again for you 👍 |
|
Hi Several-Record7234, I've made these changes and also added a lot of new features :). |
|
@Robert-Wegner there's a typo in your tags still, it says 'die' and not |
|
@Several-Record7234 I finally got around to fixing this typo :) |
|
Validation script and image URLs check out fine. Extension functionality and API usage not checked. |
|
Hi, The extension looks great! Just a few things. I'm not sure if it was the intention but everything inputted into the command bar will be sent regardless of if it is a dice command or not. For instance if I'm saving a command then an empty message is broadcasted to other players. I can also send general messages such as I would also remove the Last but not least could you please squash your commits in to one commit message and ensure that you've met all the requirements as part of the form that appears when you raise a PR? Thanks, appreciate your patience :) |
c8c4b22 to
dee13a2
Compare
|
Dear nthouliss, Thank you for reviewing my extension.
Empty console logs are blocked now.
This is a good point. Currently the idea is that quickdice tries to interpret whatever you put in. So "1" is intepreted as an AC and "hello" as a damage type, specifically resistance. Now it is true that there should maybe be some better output sanitation since there is nothing for the console to really show. Yet those are a valid commands and the console should show some feedback. To be honest, the input parsing is pretty spaghetti at the moment and I would like to rewrite it at a future point, but doing this now would maybe delay the release of quickdice more than necessary.
There is some better control now over what is shown in the log, i.e. you can hide log messages from other players now or turn them off completely. Perhaps that mitigates the issue.
I've now added a 0.2s rate limit. I still want it to be quick if the user intends so :)
Fair enough. Maybe in the future ;)
I... think I have fixed it now? I'm not very github so let me know if there is still an issue. Best, Robert |
|
Thanks for all those. Could you please clear the input field after the message is sent? If there's a reason that you don't do this please let me know :) |
|
The reason I chose to not clear the input field is that I felt like it happens pretty often that I want to reuse or modify a command. For example if every round the ogre attacks, you are always running the same command. Or maybe you realized he has multiattack after you rolled the first attack. Or you might have to "debug" a command to do what you want. |
|
@Robert-Wegner I know it's been a long while. I wanted to wait until we had some rate limiting on the broadcast api and this took longer than expected. I'd recommend just checking against the broadcast api limits that are now on the site (you'll see if you get rate limited on the Dev Console). Let me know if you're happy and I'll accept this extension 😄 As general feedback (not needed for submission), I would recommend putting in a loading state for the physical dice on the initial load (maybe a spinner on the button or just disable the inputs while they're being loaded). Just something to let the user know that they're being loaded in. I had to wait a little and wasn't sure if my input was accepted or if it had broken. |
Quickdice is a simple CLI-style application designed for executing complex d20 attack rolls quickly.
Author: Robert Wegner
Contact: robert.wegner4@outlook.de
Usage:
A command for Quickdice should follow this format:
(number of attack rolls)(n/a/d for normal, advantage, or disadvantage) + (attack bonus) vs (AC) + (AC bonus>) dmg (damage breakdown)
The damage breakdown consists of one or more damage instances separated by
+. Damage instances can be simple numbers (e.g.,3), dice rolls (e.g.,1d6), or specific types (e.g.,2d6fifor fire damage,1d12cofor cold damage,5nefor necrosis damage). Spaces are ignored.Examples:
2n+4 vs 12 dmg 1d6+42a - 3 vs 17 + 1 dmg 1d6fi + 9ne + 4d12pi4d+1vs10dmg2d6+1d7+3d4co+1blThe tool calculates the number of attacks, compares each to the AC, and breaks down the damage by type. Natural 20 rolls are treated as automatic hits, doubling the dice rolled for that attack.