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

Help with macro using attributes from two different tabs / Ajuda com macro usando atributos de duas fichas diferentes

Hi. I'm new to roll20 and would like guidance. I am using the following macro: "Olá. Sou novo no roll20 e gostaria de uma orientação. Estou usando a seguinte macro:" &{template:default}{{name=**@{selected|token_name}** attacked with bow and arrow **@{target|Inimigo|token_name}**!}}{{Obtained=[[d20+@{Distance}]]}}{{**CA:**[[(@{Shield})+(@{Armor}) ]]=*If the result is **greater than or equal to CA of the Monster**, the attack is successful!*}} {{Damage= [[@{Damage} ]]}} "&{template:default}{{name=**@{selected|token_name}** atacou com com arco e flexa **@{target|Inimigo|token_name}**!}}{{Obteve=[[d20+@{Distância}]]}}{{**CA:**[[(@{Escudo})+(@{Armadura}) ]]=*Se o resultado é **maior ou igual a CA do Monstro**, o ataque é bem-sucedido!*}} {{Dano= [[@{Dano} ]]}}" I know that it creates a box with the name of the character that attacks the other selected, it adds 1d20 to the value of its remote attack and shows the value of the CA that in my case are the sum of the attributes shield and armor, but it adds the of the card of the attacking character, not the attacker. "Sei que ela cria uma caixa com o nome do personagem que ataca o outro selecionado, ele soma 1d20 ao valor de seu ataque a distancia e mostra o valor da CA que no meu caso são o somatorio dos atributos escudo e armadura, porem ele soma o da ficha do personagem que ataca, não do atacado." Is there any way to construct this macro to show the CA of the attacked token? "Existe alguma forma de construir essa macro para mostrar a CA do token atacado? "
1536371570
The Aaron
Pro
API Scripter
Probably like this: &{template:default}{{name=**@{selected|token_name}** attacked with bow and arrow **@{target|Inimigo|token_name}**!}}{{Obtained=[[d20+@{Distance}]]}}{{**CA:**[[(@{ target|Inimigo| Shield})+(@{ target|Inimigo| Armor}) ]]=*If the result is **greater than or equal to CA of the Monster**, the attack is successful!*}} {{Damage= [[@{Damage} ]]}}
Thanks for this, even in this macro I would like to add a comparison between the value obtained in the scrolling + attributes with the AC of the target (enemy) and if it is equal or greater to write success and already appears the damage and if it is less write fault and no damage appears? or just with the API?
1536422400
The Aaron
Pro
API Scripter
You could only do the branching logic (the if/then/else) via the API, or with some special aspects of a Custom Character Sheet's Roll Template.
Thank you very much, as i have no knowledge of programming, I'm getting caught up, an now that I've decided to learn a little bit.