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

Macro Advice: Interactive Map (Self Whispering Macro)

Hello Roll20, I am seeking help on what is likely a simple problem: I have an interactive map on my roll20 campaign page: players can select a map marker and use an action macro that sends a pop-up message in chat with further details on selected token (they click the castle map marker, use marco, the chat will tell them more about the castle). The macro for my public chat pop-up using this macro: &{template:default} {{name=@{selected|token_name}}} {{@{selected|bar1}  [Click Here To Learn More](@{selected|bar1|max})}}   Is there a way I can modify this macro for the players so that it whispers the same information to themselves in the chat. The intention is the clean up the chat for everyone else. If more than one player(s) needs the information, I can use my (above) macro to pop it in chat for everyone else.
I would suggest using RainbowEncoder’s trick “ Macro Overloading for per-player behavior ”. This can be used at any subscription level (free, plus, or pro). Or, since you have a Pro subscription you can use a “whisper to self” script, such as the one that is included with my Statblock MacroMule  script. You could also use a script such as Supernotes . 
1733752692

Edited 1733836794
timmaugh
Pro
API Scripter
Along with Jarren's excellent suggestions, I'll also add that you can do something like this with the Metascript Toolbox script. The Toolbox is a set of metascripts that provide different functionalities... in this case you'd be making use of Fetch and ZeroFrame. Fetch offers a construction that gets the speaker: @(speaker....) Now, since characters have different name properties from players (and players could be speaking either as themselves or their character), the property is a little different in each case: @(speaker.character_name) @(speaker.player_name) I didn't get around to adding a "get the name of the speaker regardless of if it's a character or a player," however Fetch has a default entry that we can make use of. Basically, if the thing you are looking for doesn't exist, Fetch will return the default value. So, if we put the player name retrieval syntax inside the default area of the character name retrieval syntax, then no matter who we're speaking as, we should get the name: @(speaker.character_name[@(speaker.player_name)]) Then, we can make use of ZeroFrames ability to output to the chat any message that starts as a bangsy message (intended for your mods). ZeroFrame does that by use of the {&simple} tag appearing somewhere in the line. So, all of that together, we... start with a bang whisper to the appropriate speaker include a {&simple} to make the message hit the chat output ...and we should have a command line that looks like: ! /w @(speaker.character_name[@(speaker.player_name)])  &{template:default} {{name=@{selected|token_name}}} {{@{selected|bar1}  [Click Here To Learn More](@{selected|bar1|max})}} {&simple}
1733802005
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
timmaugh said: ... So, all of that together, we... start with a bang whisper to the appropriate speaker include a {&simple} to make the message hit the chat output ...and we should have a command line that looks like: ! /w @(speaker.character_name[@(speaker.player_name)])  &{template:default} {{name=@{selected|token_name}}} {{@{selected|bar1}  [Click Here To Learn More](@{selected|bar1|max})}} Shouldn't that example have had an   {&simple}  in it?
1733836780
timmaugh
Pro
API Scripter
keithcurtis said: timmaugh  <left his brain at home> Shouldn't that example have had an   {&simple}  in it? Yes! Oops. Thanks! Fixed. =D