Skip to content

Prepare stat rolls using roll data in a dedicated chat message#55

Open
teroparvinen wants to merge 3 commits intoasacolips-projects:mainfrom
teroparvinen:chat-based-rolls
Open

Prepare stat rolls using roll data in a dedicated chat message#55
teroparvinen wants to merge 3 commits intoasacolips-projects:mainfrom
teroparvinen:chat-based-rolls

Conversation

@teroparvinen
Copy link
Contributor

Here's a proof of concept MVP version of having stat rolls be configurable using a chat message to house the data for the roll. This is still quite rough around the edges, but should illustrate the principle.

Features:

  • The creation of the chat message does not complicate the existing roll flow for the player (open sheet -> click stat roll button -> configure -> roll)
  • Deleting the chat message aborts the roll sequence, also closing any open sheets (using core Foundry functionality as the document gets deleted).
  • The GM can open the configuration sheet for any roll. The rolling player and the GM see the configuration update at their respective ends when a change is made by either.
  • The GM can adjust difficulty directly from the chat message prior to rolling. Difficulty has been used as the proof of concept test case and there are buttons for setting the difficulty shown directly in the chat message. For any proper version, I would convert this e.g. to a row of three discrete icons the GM can use.
  • The final rolled message is the same as it is in the existing version

Holding down shift when clicking the character sheet stat roll button uses the old flow for comparison.

Limitations:

  • All things do not work, such as assists, conditions, duplicate thorn prevention from marks and harm, spark deduction after the roll...
  • There is no ownership check for the chat message and the configuration sheet. If multiple players are connected, everyone probably sees the configure button and can open the roll configuration sheet. This is a trivial fix in any further versions.

@teroparvinen
Copy link
Contributor Author

Here's a more polished version.

  • Improved the layout of the roll configuration message and made the configure button available only to message owners (i.e. rolling character and GM)
  • Made the rest of the functionality of the roll sheet work
  • Added a die option for setup (+1d)
  • Added an option for a potent action (ignores difficulty)
  • Conditions appear as a selectable list in the roll sheet
  • Implemented assists
    • An assist button appears to actors who are not participants of a roll yet. An active actor is determined to be either the user's primary character or an owned selected token that represents a PC. This creates a chat message indicating the assist.
    • Assists can be cancelled by deleting the assist chat message
    • The roll sheet shows the list of active assisting characters
    • Assists can and must be rolled separately by the assisting player. Once rolled, they are visibile in the target roll's message
    • If a roll has missing assist rolls, a "waiting for assists" message is displayed
  • Fixed some text alignment issues with dice roll result icons

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.

1 participant