2
\$\begingroup\$

I created a set of macros using the API to generate attributes for characters on Roll20 to refer to their pronouns for use in macros. I currently have it set up with 3 macros, each with 4 lines because I can't add multiple attributes with a single command.

How can I use a macro to query which set (male, female, or neutral) of pronouns I want to use? I know I should be able to do something like


?{Male, Female, or Neutral? | Male,#Pronouns_M | Female,#Pronouns_F | Neutral,#Pronouns_N}

And that should work, but I'd rather have it where the contents of those sub-macros are in the main one and delete the sub-macros. Problem is, each of the sub macros is 4 lines such as #Pronouns_F


!setattr --sel --subjective|'she'

!setattr --sel --objective|'her'

!setattr --sel --PossessiveA|'her'

!setattr --sel --PossessiveP|'hers'

Is this a thing I can do or do I have to settle for the sub macros?

\$\endgroup\$
2
\$\begingroup\$

Turned out to be a little more difficult than I anticipated but that's fine. Was still not able to issue multiple commands from a single query choice but I did solve the issue in the OP as it turns out I can assign multiple attributes from a single command and it was user error before (though I'm not sure what I did wrong).

Here's the final working macro (which must be saved as an ability due to HTML replacement characters breaking in macros):

?{Male, Female, Neutral, or Monster? | Male,!setattr --sel --subjective|'he' --objective|'him' --PossessiveA|'his' --PossessiveP|'his' | Female,!setattr --sel --subjective|'she' --objective|'her' --PossessiveA|'her' --PossessiveP|'hers' | Monster,!setattr --sel --subjective|'it' --objective|'it' --PossessiveA|'its' --PossessiveP|'its' | Neutral,!setattr --sel --subjective|'they' --objective|'them' --PossessiveA|'their' --PossessiveP|'theirs'}

And here's multiple commands from one query! Thanks to GiGs on the Roll20 Forums for showing me how to do it.

?{Male,Female, or Neutral?|Male,!setattr --sel --subjective|'he'
!setattr --sel --objective|'him'
!setattr --sel --PossessiveA|'his'
!setattr --sel --PossessiveP|'his'|Female,!setattr --sel --subjective#'she'
!setattr --sel --objective#'her'
!setattr --sel --PossessiveA#'her'
!setattr --sel --PossessiveP#'hers'|Neutral,!setattr --sel --subjective|'they'
!setattr --sel --objective|'them'
!setattr --sel --PossessiveA|'their'
!setattr --sel --PossessiveP|'theirs'|Monster,!setattr --sel --subjective|'it'
!setattr --sel --objective|'it'
!setattr --sel --PossessiveA|'its'
!setattr --sel --PossessiveP|'its'}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .