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 .
×
May your rolls be merry + bright! 🎄
Create a free account

amateur problem: macro outputting unwanted text

1592773044

Edited 1592773598
Okay, so I can feel  how silly a problem I've made for myself, buuut I've also got borderline zero experience with any of this, so I figured it's time to ask the community. I have a macro that calls four situational modifier resources from a character sheet and displays the current amount the token/character sheet has versus the maximum in a drop-down menu. This is meant as a visual aid for the next query, in which the player plugs how much of a resource they want to use to modify their roll. It's a bit messy, but it gets the job done... except for the unintentional side-effect of the first query also posting a chunk of its result to the chat log. As shown here, the "Smarts 6 / 6" and its brackets are getting posted. What I actually want is the output to only include the dice roll that comes from the second half, or perhaps something along the lines of "(Character) summons a burst of (Selected Attribute from Part 1)!" followed by the roll for Part 2. But yes, cleeearly I'm not grasping some of the formatting that I want, so any direction would be appreciated, xD.
1592773676

Edited 1592773752
Ziechael
Forum Champion
Sheet Author
API Scripter
If you put an exclamation mark in front of your first query it should still give the pop up but not print anything to chat :) !?{Cheat etc etc etc } /r 1d6... The extra bracket is because you have too many brackets at the end of your query FYI.
1592774013

Edited 1592774101
Ziechael
Forum Champion
Sheet Author
API Scripter
For your stretch goal: /em summons a burst of ?{What kind of cheat|Strength: @{selected|Strength}/@{selected|Strength|Max} ,Strength |Speed: @{selected|Speed}/@{selected|Speed|Max} ,Speed |Smarts: @{selected|Smarts}/@{selected|Smarts|Max} ,Smarts |Charm: @{selected|Charm}/@{selected|Charm|Max} ,Charm } /r 1d6 + ?{How many|0}d4 This allows you to use your query as before as part of an emote (so will include the calling characters name) but by adding an output for the query based on the selection made (see in bold above) you can get a dynamic emote and still see your cheat sheet.
Ahh, awesome. Just gave these a try and thanks so much! :D One other question, though. Since /em uses the name of the player, is there a way for the emote to call the name of the character instead? I saw that players can choose to have their rolls represented as their characters, but as the GM, I'd like to have these emotes come from NPCs or bosses as well. I've tried selected , name , and selected|character_name  to little success.
1592793821
GiGs
Pro
Sheet Author
API Scripter
You should be able to use one of these: @{selected|character_name} @{selected|token_name}
Aha, I think I've solved it. Just needed the "/emas" command which I'd never heard of before, xD. "/emas @{selected|token_name} summons a... etc" Thanks again to the both of you.
1592798100

Edited 1592798132
Oosh
Sheet Author
API Scripter
I'm pretty sure /emas only works for the DM, by the way. If your intention is for the players to use this, it won't work. Remember your players have a drop-down in their chat bar where they can change their chat output from "Roll20 name" to "Character Name". If they select their character name here the /me or /em emote command will output they way you want it to.
Ah, yeah, totally. The /em and Character Name option works for players, but I also wanted a way for me as the GM to emote the occasional NPC, so it boils down to having two versions of the macro.
1592800806
Oosh
Sheet Author
API Scripter
Nice! Just making sure it didn't become a problem later :)
1592812281
Ziechael
Forum Champion
Sheet Author
API Scripter
As a side note, players can also set their in-game name to be the same as their character in the settings tab, that way /em will output their character name instead ;)