Request a roll from a player
request-player-rollsSend a private roll request to a specific player in Foundry VTT, placing a button in chat that only they and the Gamemaster can press. Ask the user to confirm public or private visibility before creating the request.
Instructions
Put a roll button into the chat so a player rolls on their own device. Only that player and a Gamemaster can press it, and it rolls once. Whether the roll is PUBLIC (visible to all players) or PRIVATE (visible to the target player and the Gamemaster only) is a game decision: if the user did not say it, ask "Do you want this to be a PUBLIC roll or a PRIVATE roll?" and wait for the answer, then set isPublic and userConfirmedVisibility. targetPlayer is a player name or a character name. The formula comes from the adapter of the game system; without one, only rollType "custom" with a formula in rollTarget works. A player who is offline gets no request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flavor | No | The occasion, shown as context in the chat | |
| isPublic | Yes | true: everyone sees the roll; false: only the target player and the Gamemaster | |
| rollType | Yes | ability, skill, save, attack, initiative or custom, as far as the game system offers them; custom takes a formula in rollTarget | |
| rollTarget | Yes | What is rolled: an ability like "dex", a skill like "perception", or the formula for custom like "1d100" | |
| rollModifier | No | Added to the formula, e.g. "+2", "-1" or "+1d4" | |
| targetPlayer | Yes | Name of the player or of their character | |
| userConfirmedVisibility | Yes | Must be true: the user chose public or private, or was asked |