Skip to content

Roll reason support#21

Open
gitsang wants to merge 1 commit into
moussetc:mainfrom
gitsang:main
Open

Roll reason support#21
gitsang wants to merge 1 commit into
moussetc:mainfrom
gitsang:main

Conversation

@gitsang
Copy link
Copy Markdown

@gitsang gitsang commented Aug 16, 2023

Summary

Closes #20

Screenshots

image

Checklist

  • updated/completed the unit tests
  • tested on a Mattermost server: indicate tested version(s) here (you can use the mattermost-preview Docker image for a quick and painless install)
  • updated the docs
  • cleaned the branch git history
  • rebased branch on the target branch (must be up-to-date at the time of merge)

@gitsang gitsang marked this pull request as ready for review August 18, 2023 03:06
@gitsang
Copy link
Copy Markdown
Author

gitsang commented Aug 30, 2024

@moussetc Is there any plan to merge?

@moussetc moussetc force-pushed the main branch 2 times, most recently from 19076c6 to 5cac9c1 Compare May 4, 2025 12:49
@moussetc
Copy link
Copy Markdown
Owner

moussetc commented May 4, 2025

Hi @gitsang ,
Thank you for opening the Pull Request and sorry for the considerable delay. Updating those MM plugins has taken a lower priority in my life those last years, for diverse reasons. I will dedicate some time in the coming week to them, including handling this PR.
I'm aware you might not be interested in talking about this feature 2y later, or not have time in the coming week and that's OK. If I have no answer in a while, I'll handle it myself.

I'd be interested in knowing more about your use case for the roll reason: are you playing a RPG or some other context?

Personally I thought about the dice in term of rolling skill checks and damages rolls in RPGs such as Pathfinder, and I had in mind to add the possibility to add info about each kind of roll because complex attacks can have different types of damages (2D12(bludgeoning)+1d6(fire), etc.), and you could see those notes in the roll details to help the GM knowing which applies:

XYZ rolls d25(bludgeoning) 3d8(fire) = 20

  • d25(bludgeoning): 10
  • 3d8(fire): 4 3 3

However, that might not be your own use case, which is why I'm interested in knowing what you had in mind specifically :)

@gitsang
Copy link
Copy Markdown
Author

gitsang commented May 7, 2025

We play COC or DNS, using voice chat and mm to share info and roll dice.

For example, in COC, which I play more often, I might ask players through voice to do an inspiration check or a sancheck, or have some players do inspiration checks and others do sanchecks., players will directly enter commands to roll dice, like: /roll 5d3. The final result might look like this. When we look back, we'll find the roll info is super messy, and we don't know why the rolls were made.

image

So, I might want players to add some info when rolling dice to help us understand more details during review.

@moussetc
Copy link
Copy Markdown
Owner

Hi @gitsang , thanks a LOT for the feedback. In the end I didn't get to use my own plugin for role playing so having a real life example is very precious. Especially as you've put a finger on something obviously missing!

I have some additional questions which I will leave as PR comments, but if you don't mind answering a question unrelated to the change you propose: would you find it better if the roll messages were posted with the avatar and username of the poster instead of the dice bot?

Comment thread server/plugin.go

// Display roll reason
if reason != "" {
text += fmt.Sprintf("\n```\n%s\n```", reason)
Copy link
Copy Markdown
Owner

@moussetc moussetc May 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering, is it be better to show the roll reason before or after the roll? Eg.
image
VS
image

Instinctively, I think I would prefer have it before but may be missing something!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't seem to care about this; it makes no difference to me. :)

Comment thread server/plugin.go

// Display roll reason
if reason != "" {
text += fmt.Sprintf("\n```\n%s\n```", reason)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another look and feel question: why the codeblock with empty lines around?
Codeblock means we lose any formatting that might be added to the roll, and it takes a lot more height. I see you use a compact mode of chat display, so maybe that is on purpose to better read the rolls, in which case, I'd like to mention that as a plugin, we can do nifty attachments such as:
image

You'll find more examples on this documentation page. Do tell if that looks interesting for your use case.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the codeblock with empty lines around?

This might just be my habit—my Markdown auto-formatting and linting tools (based on MD031 rule) require me to add blank lines around code blocks.

I'd like to mention that as a plugin, we can do nifty attachments

This looks really cool—I wasn’t aware of this plugin before. It appears much better-looking than Codeblock. Maybe I’ll switch from Codeblock to Message Attachments later, though it’s probably not a priority for me right now (for various reasons, In fact, it's been a long time since I last played an RPG.).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all your answers.
I can take over the PR to switch to Message Attachments, if that's ok with you.

Copy link
Copy Markdown
Author

@gitsang gitsang May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is certainly ok, thank you for the effort. If you have submitted the code, feel free to close this PR.

@gitsang
Copy link
Copy Markdown
Author

gitsang commented May 12, 2025

If the roll messages were posted with the avatar and username of the poster instead of the dice bot?

I think this would be better. This was also one of the issues that troubled me.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Roll reason support

3 participants