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

Roll Query how to chose 1 option with 2 diffrent outputs in the same macro

 I'm trying to make an Detect Alignment Spell macro where I chose the Allingment an it changes the text accordingly but I've got a Problem.
I can make am macro so that I chose Evil an it changes all parts of the Text accordingly to my choice.
But then it comes to the Part where you becomme overwhelmed if you are on the oppside side of the Alignment scale an detect a very strong aura

I tried to just copy the rollquery and change the output from Evil to Good but instead of Good it just says evil at that point.

This is the command i use ?{Alignment| Evil, Evil | Good, Good | Chaos, Chaos | Law, Law} .

It seams that roll20 sees after the 1. one of those only "?{Alignment |" and inputs the fist version of the Option I chose instead of looking  which Option I chose and then look which text or roll that would be at this point in the macro.

Is there a way to make this work so I dont have to make a 2. roll querys or input the whole text in the query 4 times to get every version right?

2. Is there an chat command that  higlights only the name of the selected token?
/em @{selected|token_name} shows  unfortunetly  also the name I use in the chat but I only want to see the tokens name in this way without my chosen name highligted.







April 13 (8 years ago)

Edited April 13 (8 years ago)
Tetsuo
Forum Champion
Unfortunately, the first one isn't possible. The second however, is. Under the text entry box for chat there's an As: drop down menu. Set that to reflect your character name. You could also change your display name in the settings tab above chat. 
April 13 (8 years ago)

Edited April 13 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Janis,

I think I've got solutions (or at least answers) for both your questions.
1. For this question, you are correct that Roll queries by themselves are not able to do what you want. There is a workaround though as long as you don't mind a little funky formatting. You can make a rollable table for each alignment and have only a single entry in each.
The important part here is that based on the order of operations, roll queries are resolved prior to rolls (including table rolls), so if we use a slight modification of your query above:
?{Alignment|Evil|Good|Chaos|Law}

We can make 4 tables with only a single table item each:
Overwhelm-Align (e.g Overwhelm-Evil table would have good as it's only entry).

Then in our macro, we do this:

You detect ?{Alignment|Evil|Good|Chaos|Law} auras. If you detect an exceptionally strong aura and are of [[1t[Overwhelm-?{Alignment}] ]] alignment, you become overwhelmed.

2. If you are the gm, you can /emas or /as to speak as any thing you put in quotes after it:
/emas "Random NPC guy" This guy mutters something meaningless

/emas "@{selected|token_name}" Roars a battlecry and charges you

If you aren't a gm, then your best bet is to choose the character you are speaking as from the dropdown list under the chat input field.

Hope that helps,

Scott

EDIT: Kyle's suggestion below is also good, I just went for the complicated way :)
So inside your macro are you using two queries: 1. ?{Alignment|Evil|Good|Chaos|Law} and 2. ?{Alignment|Good|Evil|Chaos|Law} ?

If so, macros are 'smart' enough to group queries together with the same name (in this case the query name is 'Alignment') so that you can simply specify ?{Alignment} later in the macro and it will use the result from the first usage. Unfortunately for your use case, it means that you CANNOT reorder the values in the same macro and expect to input the value twice. What you CAN do is change the name of the second query with the order of results that you want and be asked TWICE for the result. For example , ?{Alignment 1|Evil|Good|Chaos|Law} and ?{Alignment 2|Good|Evil|Chaos|Law}.

If instead you are trying to do something like this: ?{Alignment|Evil,eq1|Good,gq1|Chaos,cq1|Law,lq1} and ?{Alignment|Evil,eq2|Good,gq2|Chaos,cq2|Law,lq2}.

Unfortunately it is not possible to reuse the selected option and get a separate value (short of using API, that is). What you can do however is combine the two queries together into a bigger query such as ?{Alignment|Evil,eq1 COMMON STUFF eq2|Good,gq1 COMMON STUFF gq2|Chaos,cq1 COMMON STUFF cq2|Law,lq1 COMMON STUFF lq2}
Ok thx for the tipps I thoght there would be no Option to do the first as I wanted to do it.
I'll probably just  make this as an 2. Querry ?{Alignment2|Evil, Good | ...]

And for the 2. i Know that I can chose to speak as  a Character I play but I'll soon get a 2. one and didn't want to change this every time but It seams that I have to but still thx .
April 13 (8 years ago)
[Deleted]
Sheet Author
Why not nest?
?{Alignment|Evil,?{Which effect?&# 124;Normal&# 44;output&# 124;Overwhelming&# 44;output&# 125;|etc etc so and so forth
Because I already made the ?{Alingment| Evil, Good | ...] and I only Needed to ad the 2 at the end.
Here is the Complete macro I mostly copy the PF spell form the site and make Querrys , Rolls and Attribute Calls if needed.

/me casts Detect ?{Alignment| Evil, Evil | Good, Good | Chaos, Chaos | Law, Law}

School divination; Level cleric/oracle 1,
CASTING

Casting Time 1 standard action

Component V, S, DF
EFFECT

Range 60 ft.
Area cone-shaped emanation
Duration concentration, up to [[10+@{selected|level}]] min.
Saving Throw none; Spell Resistance no

DESCRIPTION

You can sense the presence of ?{Alignment| Evil, Evil | Good, Good | Chaos, Chaos | Law, Law}
. The amount of information revealed depends on how long you study a particular area or subject.

1st Round: Presence or absence of ?{Alignment| Evil, Evil | Good, Good | Chaos, Chaos | Law, Law}
.

2nd Round: Number of evil auras (creatures, objects, or spells) in the area and the power of the most potent ?{Alignment| Evil, Evil | Good, Good | Chaos, Chaos | Law, Law}
aura present.

If you are of ?{Alignment2| Evil, Good | Good, Evil | Chaos, Law | Law, Chaos}
alignment, and the strongest ?{Alignment| Evil, Evil | Good, Good | Chaos, Chaos | Law, Law}
aura’s power is overwhelming (see below), and the HD or level of the aura’s source is at least twice your character level, you are stunned for 1 round and the spell ends.

3rd Round: The power and location of each aura. If an aura is outside your line of sight, then you discern its direction but not its exact location.


Aura inf here : Link to site