Difference between revisions of "Script:DiscreteWhisper"
From Roll20 Wiki
Andreas J. (Talk | contribs) (add redirect) |
Andreas J. (Talk | contribs) (change from redirect to full page.) |
||
Line 1: | Line 1: | ||
− | # | + | <noinclude>{{revdate}} {{main|Script Index}}</noinclude> |
+ | |||
+ | * {{fpl|9430875/ DiscreteWhisper}} initial thread, main details | ||
+ | * '''{{fpl|10692759/ DiscreteWhisper 1.1.1}}''' -- multi-recipient whispers with asides and buttons | ||
+ | |||
+ | '''DiscreteWhisper''' is a way to send a single whispered message to multiple recipients while simultaneously giving groups of recipients more or less of that message. Buttons (referencing [[API]] script command lines, character [[abilities]], or [[macros]]) can also be included, and can also be limited to some/all of the recipients. Created by [[timmaugh]] | ||
+ | |||
+ | '''Example Use Case:''' Larry, Moe, and Curly failed to detect an illusion trap and now need to make a perception check. Larry was the most affected by the trap's illusion spell. The GM wants to send a whispered message to all while giving a slightly altered version to Larry. Moe and Curly should receive the message: "There are five jewels on the table. You find it hard to focus on them." At the same time, Larry should receive the message: "There are five jewels on the table. A small child holds a sixth jewel near the far wall." The player who is playing Larry should not know that s/he has received a different message from the other characters. The GM would enter: | ||
+ | |||
+ | <pre> | ||
+ | !w --Larry|Curly|Moe --There are five jewels on the table. {{aside|Moe|Curly}}You find it hard to focus on them.{{aside|Larry}}A small child holds a sixth jewel near the far wall. | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | |||
+ | ==Use== | ||
+ | '''See [https://app.roll20.net/forum/permalink/9430875/ DiscreteWhisper -- multi-recipient whispers with asides and buttons] for full documentation''' | ||
+ | |||
+ | '''Syntax''' | ||
+ | <pre>!w --characters --message --title (optional) --buttons (optional, requires a title argument)</pre> | ||
+ | |||
+ | * {{c|!w}} - command to call the API. ({{c|!discrete}} and {{c|!discretewhisper}} also works, an there is option to change the handle) | ||
+ | * {{c|--characters}} - a pipe-separated list of Character identifiers (name, character_id, or token_id representing a character) that will comprise the list of characters receiving a whispered message | ||
+ | ** <code><nowiki>{{as}}</nowiki></code> can be used for designate that you wish to whisper as that character. If you want the same character to also hear the whisper, they need to be added a second time. | ||
+ | ** ex. <code>--Alice|Bob</code> whisper to Alice & Bob | ||
+ | ** ex. <code>---MoSsbFlnYaTpI4CJ5QQ</code> A character is referenced by character_id. note the 3 {{c|-}} at the start | ||
+ | ** ex. <code><nowiki>--{{as}}Alice|Bob|GM|Alice</nowiki></code> speak as Alice; and Bob, GM, Alice hears the whisper. | ||
+ | * {{c|--message}} must be plain text. sending roll templates doesn't work | ||
+ | ** <code><nowiki>{{aside}}</nowiki></code> -- send message section just to part of the targets, like in the main example. Target doesn't know they hear an aside | ||
+ | ** <code><nowiki>{{Aside}}</nowiki></code> -- same as above, but announces they are getting an aside | ||
+ | ** <code><nowiki>{{all}}</nowiki></code> -- after an aside, use this to switch rest of message to be to all. | ||
+ | * {{c|--title}} (optional) | ||
+ | ** ex. <code><nowiki>!w --{{as}}GM|Prism --You see something shiny on the floor. --PERCEPTION</nowiki></code> | ||
+ | * {{c|--buttons}} (optional) add button to call api command or a character ability. Separate multiple buttons by <code><nowiki>{{all}}</nowiki></code> | ||
+ | ** ex. <code><nowiki>!w --{{as}}GM|Prism --Do you pick up the item? --Yes|!w --GM --Yes, I pick it up.</nowiki></code> | ||
+ | |||
+ | There is also [https://app.roll20.net/forum/post/10692759/script-discretewhisper-thread-2-multi-recipient-differentiated-whispers-with-asides-and-buttons/?pageforid=10692759#post-10692759 option to stop the API from reporting] back the whispers: | ||
+ | |||
+ | <pre>!w#silent --gm --I don't want a report of this message --NO REPORT</pre> | ||
+ | |||
+ | ==Examples== | ||
+ | You could use roll queries to to pick between who hears the message, and to write the message when launched. Here the GM also gets an aside informing who the whisper was intended for. | ||
+ | <pre>!w --?{Who hears the whisper|Charlie|Charlie & GM,Charlie|GM} --{{aside|GM}} (Bob whispers to Charlie):{{all}} ?{Message|} </pre> | ||
+ | |||
+ | Whisper with two buttons to chose from. | ||
+ | <pre>!w --Charlie --Do you pick it up? --Yes|!w --GM --Yes, I pick it up. {{all}} No|!w --GM --No, I don't pick it up.</pre> | ||
+ | <noinclude> | ||
+ | =See Also= | ||
+ | * [[API:Short Community Scripts#Whisper Self]] | ||
+ | |||
+ | [[Category:User API Scripts]]</noinclude> |
Revision as of 13:02, 22 May 2022
Page Updated: 2022-05-22 |
- DiscreteWhisper(Forum) initial thread, main details
- DiscreteWhisper 1.1.1(Forum) -- multi-recipient whispers with asides and buttons
DiscreteWhisper is a way to send a single whispered message to multiple recipients while simultaneously giving groups of recipients more or less of that message. Buttons (referencing API script command lines, character abilities, or macros) can also be included, and can also be limited to some/all of the recipients. Created by timmaugh
Example Use Case: Larry, Moe, and Curly failed to detect an illusion trap and now need to make a perception check. Larry was the most affected by the trap's illusion spell. The GM wants to send a whispered message to all while giving a slightly altered version to Larry. Moe and Curly should receive the message: "There are five jewels on the table. You find it hard to focus on them." At the same time, Larry should receive the message: "There are five jewels on the table. A small child holds a sixth jewel near the far wall." The player who is playing Larry should not know that s/he has received a different message from the other characters. The GM would enter:
!w --Larry|Curly|Moe --There are five jewels on the table. {{aside|Moe|Curly}}You find it hard to focus on them.{{aside|Larry}}A small child holds a sixth jewel near the far wall.
Use
See DiscreteWhisper -- multi-recipient whispers with asides and buttons for full documentation
Syntax
!w --characters --message --title (optional) --buttons (optional, requires a title argument)
-
!w
- command to call the API. (!discrete
and!discretewhisper
also works, an there is option to change the handle) -
--characters
- a pipe-separated list of Character identifiers (name, character_id, or token_id representing a character) that will comprise the list of characters receiving a whispered message-
{{as}}
can be used for designate that you wish to whisper as that character. If you want the same character to also hear the whisper, they need to be added a second time. - ex.
--Alice|Bob
whisper to Alice & Bob - ex.
---MoSsbFlnYaTpI4CJ5QQ
A character is referenced by character_id. note the 3-
at the start - ex.
--{{as}}Alice|Bob|GM|Alice
speak as Alice; and Bob, GM, Alice hears the whisper.
-
-
--message
must be plain text. sending roll templates doesn't work-
{{aside}}
-- send message section just to part of the targets, like in the main example. Target doesn't know they hear an aside -
{{Aside}}
-- same as above, but announces they are getting an aside -
{{all}}
-- after an aside, use this to switch rest of message to be to all.
-
-
--title
(optional)- ex.
!w --{{as}}GM|Prism --You see something shiny on the floor. --PERCEPTION
- ex.
-
--buttons
(optional) add button to call api command or a character ability. Separate multiple buttons by{{all}}
- ex.
!w --{{as}}GM|Prism --Do you pick up the item? --Yes|!w --GM --Yes, I pick it up.
- ex.
There is also option to stop the API from reporting back the whispers:
!w#silent --gm --I don't want a report of this message --NO REPORT
Examples
You could use roll queries to to pick between who hears the message, and to write the message when launched. Here the GM also gets an aside informing who the whisper was intended for.
!w --?{Who hears the whisper|Charlie|Charlie & GM,Charlie|GM} --{{aside|GM}} (Bob whispers to Charlie):{{all}} ?{Message|}
Whisper with two buttons to chose from.
!w --Charlie --Do you pick it up? --Yes|!w --GM --Yes, I pick it up. {{all}} No|!w --GM --No, I don't pick it up.