Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] DiscreteWhisper (Thread 2) -- multi-recipient, differentiated whispers with asides and buttons

1644850980
timmaugh
Pro
API Scripter
Update to: DiscreteWhisper New Version (and link):  1.1.1   and in the Roll20 One-Click install Original Thread : Here Concept Abstract : 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. 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. Original Thread You can find the instructions for use at the original thread , including example messages with buttons. For instance, sending a request for Perception rolls to players, providing them with a button that links to their character's Perception roll. Update 1.1.1 ADDED: Ability to suppress or show the report of sent whispers, including script-level configuration as well as inline handles to provide the opposite behavior from the script's configuration setting. Silent Mode - Config at Script Level DiscreteWhisper will default to reporting to you the whispers you send (screenshots in the original thread). With this update, you can now configure that option to be turned on or off at the script level. If you are in "silent" mode, you will not receive a report of delivered/undelivered whispers, but your valid recipients will still receive the message you send them. To activate or deactivate silent mode at the script level, follow the script handle with #silent followed by your option: !w#silent|+ !w#silent|- The first will turn the report suppression ON (ie, activating silent mode). The second will turn suppression OFF (and you will get reports of sent whispers). The values that will turn ON silent mode are any from this list: yes, y, true, on, +, yup Anything else included after the pipe character will turn silent mode OFF. Silent Mode - Config for Single Message No matter what the setting of the script is configured to be, you can obtain a silent delivery or a report using the following syntax: !w#silent !w#report Note that the "silent", above, does not contain a pipe or a setting value from the above list. These options will force the designated behavior regardless of the script setting. For instance, having the script set to silent mode but using the report syntax will, for this message alone, force a report of delivered/undelivered whispers; the script's setting will be unchanged. Similarly, for a script configured to report all messages, you can use the silent syntax to suppress the report for a single message. Follow the above syntax structures with the rest of the line, as usual: !w#silent --gm --I don't want a report of this message --NO REPORT !w#report --Kokoro --I will know if you get this message! --REPORT A Note About Alternate Script Handles The original thread discusses how to change the handle of this script (if, for example, you wanted to free up the handle of "w" for another script). The above formations (#silent, etc.) will work with any handle recognized by the script.
Hi timmaugh, Nice script that opens lots of possibilities. On my side, not being a coder and kind of new to all that, I find it hard to have to rewrite codes for evey whisper that needs to be sent. Isn't there a way with multiple prompts to ask what is the message for all, and what is for only a few of the characters ? I don't know how this could be achieved, but that would be helpful and really would ease the process of whispering. May be adding a menu like !w --menu or help with some checkable options could be helpful too. Might be demanding too much, but otherwise i don't see how these whispers (if there are a few) can be made on the fly by newbies like myself.. Thanks for considering
1644867920
timmaugh
Pro
API Scripter
Interesting idea, Lionel. I think the best way to implement that would be with a panel that let you add extra parts to the message you wanted to send... that way you could save have an aside in the middle of a message instead of only at the end, and the length of the message could grow dynamically as you needed it. Should be pretty straightforward... let me see what I can do!
timmaugh said: Interesting idea, Lionel. I think the best way to implement that would be with a panel that let you add extra parts to the message you wanted to send... that way you could save have an aside in the middle of a message instead of only at the end, and the length of the message could grow dynamically as you needed it. Should be pretty straightforward... let me see what I can do! Hello, Have you been able to find something ? Can't wait to use that the E-Z way :)
1645900642
timmaugh
Pro
API Scripter
It's in the works! Looking like a handout interaction by default, though once the apparatus is in place I could probably offer a "whisper to yourself" chat interaction to build. 
Hello timmaugh, First off, thanks for all the effort you've put into this script! It's the closest I've found to something I'm trying to implement in my campaign, and I hoped I could run this problem by you to see if you have suggestions. What I want to do is populate my world and city maps with tokens on major landmarks. Each token would have a unique token action that whispers the lore for the area to the player, so they can learn about the world around them at their own pace without requiring me to read everything out. I also want to have differentiated lore, so players will receive some unique information (even secrets) based on their character's background, story, memories, etc. Is there a way to create a token action that whispers different information depending on who presses the button? I can think of a couple (much longer) workarounds to do what I'm looking to achieve. But I wanted to pick your brain first and see if there was a more streamlined solution. Thanks!
1646072102

Edited 1646149832
timmaugh
Pro
API Scripter
Hey, Luke... I think if I were going to tackle the idea you have in mind, I would do it with a combination of Muler and DiscreteWhisper (and probably APILogic + Fetch + ZeroFrame, just to make it easier in game). You already are figuring on someone (either you or a player) selecting the token (you have too select it to have the token action button available)... so then I would use the token's name as the variable to retrieve from a mule. Let's call the Mule ability "LocationLore", and we'll put it on a mule character named "TourGuide". Fill it with entries like: Essex Square=A fountain stands at the center of this stone paved intersection.{{Aside|Phyllaeia}} From your training in the Academy of Arts, you recognize the sculptor as Torzo, known for hiding cryptic messages in his work, and who was assassinated by House Pavil for just such a hidden message, accusing the matriarch of being a bloated warthog. Gray Tower District=Some more color info. {{Aside|Keterrel}}You know things.{{aside|Phyllaeia}}You feel an undercurrent of dread, passing through the shadows. Then you can use Muler to pull that information out (the second argument, below): !w --characters --get.TourGuide.LocationLore.@{selected|token_name}/get --INFORMATION ABOUT @{selected|token_name} {&mule TourGuide.LocationLore} Then, for the list of characters (the first argument, above), you might want a way to choose them ad hoc in the game... especially if the party had split and you didn't want to send a whisper to a party member who wasn't present. For that, you might use a roll query with various configurations of your people (ie, Phyllaeia alone, or Keterrel alone, or P + K together, etc.). That can get complex pretty quick, especially if you have more than a few characters, not to mention having to do HTML replacements. In that case, it might be better to have a field on the character that tracked if they had split into sub-groups (setup separately through a ChatSetAttr call, maybe). Then you could have a "characters" value in the same LocationLore mule ability on the TourGuide character, and use an APILogic test for each of your party members within that single entry: characters={& if @(Phyllaeia.SubGroup[main]) ~ groupname}Phyllaeia|{&end}{&if @(Keterrel.SubGroup[main]) ~ groupname}Keterrel|{&end} In that example "[main]" represents a default call if the character in question doesn't have a "SubGroup" attribute... ie, "if you don't find that attribute, act like it says, 'main'." We check whether that attribute includes (by use of the tilde... ~ ) "groupname"... however, "groupname" isn't a static value, because now we'll use a definition in our main call to point that term ("groupname") to a roll query that you can fill in: {&define ([groupname]?{Group to whisper to})} ...and then we retrieve the value from the Mule for the recipients argument (the first argument): !w {&define ([groupname]?{Group to whisper to})} --get.TourGuide.LocationLore.characters/get --get.TourGuide.LocationLore.@{selected|token_name}/get --INFORMATION ABOUT... Now, when the command runs, it gets the character entry from the LocationLore mule, and everywhere it sees "groupname" it replaces it with what you entered in the roll query. So you could have a subgroup defined as "town". As long as you properly segmented the party so that those exploring the town had that text included in their "SubGroup" attribute, they would now receive a discrete whisper for the location.
Thank you for the comprehensive response -- I really appreciate it! I'll think on this for a bit and see if it's something I want to try implementing, or whether I want to just opt for a simpler way to deliver lore, minus some bells and whistles. Have a good evening.