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

Making a macro that prints text and calls an attribute at once

A friend is hosting a game of Persona: Tabletop RPG by James Austin and Seamus Harvey, and I'm trying to automate some of the functions with macros since there's no sheet for it and neither of us can code one. I'm trying to make a macro that asks the user what Social Attribute they want to roll that then rolls the attribute and prints that it was rolled, something like this: /me rolls [number] for Athleticism or /me rolls for Athleticism, scoring [number] The draft code I have is /me rolls for ?{Select an Attribute|Athleticism|Charm|Guts|Knowledge|Proficiency}, scoring [[2d6+?{Select an Attribute|Athleticism|Charm|Guts|Knowledge|Proficiency}]] This isn't accomplishing what I want, it inputs e.g. Athleticism into the macro and prints "/me rolls for Athleticism, scoring [[2d6+Athleticism]]" instead of something like [[2d6+2]] How do I get the macro to input Athleticism as the word and also Athleticism the attribute with a single query to save clicks? It seems especially cumbersome to have to make a macro for each attribute separately.
1593033023
GiGs
Pro
Sheet Author
API Scripter
To do this you need to put more in the query.  /me rolls ?{Select an Attribute| Athleticism,[[2d6+@{Athleticism]] for Athleticism| Charm,[[2d6+@{Charm}]] for Charm| Guts,[[2d6+@{Guts}]] for Guts| Knowledge,[[2d6+@{Knowledge}]] for Knowledge| Proficiency,[[2d6+@{Proficiency}]] for Proficiency}
That works exactly how I want it to, thank you so much for your help! I can condense these macros down into one now!
1593033958
GiGs
Pro
Sheet Author
API Scripter
You're welcome! You can reduce some of the repeated text like so /me rolls [[2d6+?{Select an Attribute| Athleticism,@{Athleticism]] for Athleticism| Charm,@{Charm}]] for Charm| Guts,@{Guts}]] for Guts| Knowledge,@{Knowledge}]] for Knowledge| Proficiency,@{Proficiency}]] for Proficiency} You can break up the inline roll like that. But you cant break up the attribute call. You cant do /me rolls [[2d6+@{?{Select an Attribute| Athleticism,Athleticism]] for Athleticism| for example. One note, just in case you dont know: if you want that macro to be universal, you might want to add selected| to each attribute call, like so /me rolls [[2d6+?{Select an Attribute| Athleticism,@{selected|Athleticism]] for Athleticism| Charm,@{selected|Charm}]] for Charm| Guts,@{selected|Guts}]] for Guts| Knowledge,@{selected|Knowledge}]] for Knowledge| Proficiency,@{selected|Proficiency}]] for Proficiency} This allows you to use a universal macro, make it available to players (maybe by checking the Token Action box). Then players can select their token, click the macro, and it'll automatically use the stats from the character linked to that token.
That's even better, thanks so much for this revision, I think that one will work perfectly.