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 command for multiple gif in a button

September 30 (2 years ago)

greetings, I found myself in the following situation:

I have a monk, with multiple gif ideas for the unarmed attacks, so is there some macro which I can use in the description of the weapon attacks.

September 30 (2 years ago)
Gauss
Forum Champion
Please elaborate on what you want the macro to do, in as much detail as you can provide? 
September 30 (2 years ago)

My bad, let me try it again.


On the 'attacks and spellcasting' session, in the attacks and such, I put this [gif](gif addres) to display the gif in the description of the attack to display the gif.


now, I want to have more choices so I create copies of the same attack using different gifs for each one. now I am wondering if I there is a macro of sorts which, I could do put varios different gifs for just one attack, instead of having to make varios copies; a macro that would allow to select which gif to use.


is it better?

September 30 (2 years ago)

Edited September 30 (2 years ago)
Gauss
Forum Champion

You might be able to do this with a query although that may not work.
But you should definitely be able to do a chat button setup. Have multiple buttons each leading to a different macro. Each macro has the same attack but with each one has a different gif in the attack. 

how did I do that?

October 01 (2 years ago)
Gauss
Forum Champion

Can you give me an example URL to use? 

sure:

[a](https://media.giphy.com/media/R9s3hwgbVR1CEoCJaJ/giphy.gif)

[a](https://media.giphy.com/media/v0KGy4BXDcKoFKdkEV/giphy.gif)

October 01 (2 years ago)

Edited October 01 (2 years ago)
Gauss
Forum Champion

Macroname: Attack Macro
/w @{selected|character_name} &{template:npcaction}{{rname=@{selected|character_name}}}{{name=@{selected|npc_type}}}{{description=**Select Attack**
[Attack 1](~selected|Attack-1)
[Attack 2](~selected|Attack-2)

Attack 1 macro:
Macro name: Attack-1 
https://media.giphy.com/media/R9s3hwgbVR1CEoCJaJ/giphy.gif
%{selected|repeating_attack_$0_attack}

Attack 2 macro: 
Macro name: Attack-2
https://media.giphy.com/media/v0KGy4BXDcKoFKdkEV/giphy.gif
%{selected|repeating_attack_$1_attack}


Note: this assumes you are using the 5e by Roll20 character sheet. 
You can replace the $0, $1, etc. with the number of the attack in the sheet. Just increment up the # until you find the attack you want. 
If you are not the 5e by Roll20 sheet, then you can replace the repeating field with the macro of the character sheet you are using. 

You can replace "selected" with your character name if desired.