Skip to content

Comments

Added quickdice to extensions.json#83

Open
Robert-Wegner wants to merge 1 commit intoowlbear-rodeo:mainfrom
Robert-Wegner:add-quickdice-extension
Open

Added quickdice to extensions.json#83
Robert-Wegner wants to merge 1 commit intoowlbear-rodeo:mainfrom
Robert-Wegner:add-quickdice-extension

Conversation

@Robert-Wegner
Copy link

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., 2d6fi for fire damage, 1d12co for cold damage, 5ne for necrosis damage). Spaces are ignored.

Examples:

  1. 2n+4 vs 12 dmg 1d6+4
  2. 2a - 3 vs 17 + 1 dmg 1d6fi + 9ne + 4d12pi
  3. 4d+1vs10dmg2d6+1d7+3d4co+1bl

The 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.

@Several-Record7234
Copy link
Collaborator

Hi Robert,

A couple of minor changes needed here please:

  1. tags must be limited to one or more of [dice, fog, tool, content-pack, drawing, audio, combat, automation, other]
  2. 'image' should be a 'hero' image like this one - it doesn't need to be animated, but ideally it should be more than an icon, a static screengrab would be OK
  3. There's a minor typo at the foot of your store.md: "damage is calcualted and broken down"

Once you've made those changes, ping me here and I'll run verification again for you 👍

@Robert-Wegner
Copy link
Author

Hi Several-Record7234,

I've made these changes and also added a lot of new features :).

@Several-Record7234
Copy link
Collaborator

@Robert-Wegner there's a typo in your tags still, it says 'die' and not dice in your store.md file, so it won't pass verification - please amend and let me know, and then I'll re-run it. (Sorry for the recent delay in getting back to you, the PAXU show rather got in the way!)

@Robert-Wegner
Copy link
Author

@Several-Record7234 I finally got around to fixing this typo :)

@Several-Record7234
Copy link
Collaborator

Validation script and image URLs check out fine. Extension functionality and API usage not checked.

@nthouliss
Copy link
Contributor

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 hello or even no command at all. My suggestion here would to have some data sanitation so that GMs or players can't spam the app with nonsense messages. Some rate limiting would probably be good too because I can just load the app in and hold down the Enter key to just start spamming messages (you could also mitigate this by clearing the command bar after the user hits send).

I would also remove the tool and combat categories as I don't think this extension would fall into those.

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 :)

@Robert-Wegner Robert-Wegner force-pushed the add-quickdice-extension branch from c8c4b22 to dee13a2 Compare March 3, 2025 22:04
@Robert-Wegner
Copy link
Author

Robert-Wegner commented Mar 3, 2025

Dear nthouliss,

Thank you for reviewing my extension.

an empty message is broadcasted to other players.

Empty console logs are blocked now.

I can also send general messages such as hello or even no command at all.

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.

can't spam the app with nonsense messages

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.

Some rate limiting would probably be good

I've now added a 0.2s rate limit. I still want it to be quick if the user intends so :)

I would also remove the tool and combat categories as I don't think this extension would fall into those.

Fair enough. Maybe in the future ;)

Last but not least could you please squash your commits in to one commit message

I... think I have fixed it now? I'm not very github so let me know if there is still an issue.

Best, Robert

@nthouliss
Copy link
Contributor

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 :)

@Robert-Wegner
Copy link
Author

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.
Note that with CTRL+S ("select") you can select the input field, so this is how I empty/overwrite the input field. Perhaps one could do it the other way around and empty by default, but I would only like this if I have also added arrow up/arrow down reusing of command history. If it is okay with you I would like to keep it this way for now and then in the future change it depending on user feedback.
Best, Robert

@nthouliss
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

verified by human verified by a person

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants