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

abilities versus abilities

hello. i have created a system with an abilitie for touch, and another for dodge. it was good but a bit borring to have two roll only to check if the attack touch. so i had try to make a new abilitie that look a bit like that   [[%Touch > %{target|Dodge}]]  but it don't work, i'm not very good at making code and it's a miracle my previous codes worked ^^' 
up?
I don't understand what your question is. Are you looking for help writing a macro? If so, please include what macro you currently have, which game system you are playing, and which character sheet the game is using.
1610639776

Edited 1610640829
what i initialy want to do is using the base roll20 macro system that make possible something like /r 1d20>@{strength} and said if it's a success or a fail, but using it to make a "confront" or "compare" between two @{attribute} or even two %{abilities} and by targeting a second token attribute or abilitie. and in one clic determine who win. my actual touch abilitie is [[{1d10+@{FOR}+@{PER}-4+?{Modificateur|0}}]] and my dodge abilitie is [[{1d10+@{DEX}+@{CON}+?{Modificateur|0}}]] (i'm french so "FOR", the french diminutive of my attribute "strenght".)
Macros always need to know which character to pull the attribute from, so using an @{} call needs to have either 'selected' or 'target' or a character name included: @{selected|FOR} will get the Strength/Force 'FOR' attribute from the selected token. @{target|FOR} will get the Strength/Force 'FOR' attribute from a token that you will be prompted to click on. @{CHARACTER_NAME|FOR} will get the Strength/Force 'FOR' attribute from the named character (replace CHARACTER_NAME with the character'sname). Roll20 does not have any kind of 'if - then' operations inside macros, so you won't be able to do what you want in a single macro. You could write a macro that would output a 1 if it is a success and a 0 if it fails, but there's no way to get an output that actually says "success" or "failure". The closest I think I could get is this - and some of the attribute names may be incorrect because I don't know which character sheet or game you are using: @{selected|token_name} rolls a [[{1d10+@{selected|FOR}+@{selected|PER}-4+?{Modificateur|0}}]] Touch against @{target|token_name}'s roll of [[{1d10+@{target|DEX}+@{target|CON}+?{Modificateur|0}}]] to Dodge! You would need to select the token of the character that is attacking (using 'touch'), and you will be prompted to click on the target that is dodging.
1610725960

Edited 1610726525
ho my god! it work! thank you so much! just to be sure, is i possible tu use directly abilities with % instead of attribute with @?
Yes.&nbsp; <a href="https://wiki.roll20.net/Macros" rel="nofollow">https://wiki.roll20.net/Macros</a> Attributes are called using @ Abilities are called using % Macros are called using # Queries are called using ? APIs (Scripts - Pro feature) are called using ! Rolls (Command button links) are called using ~&nbsp;