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

Question Regarding Target Numbers and Success

1443306776

Edited 1443317540
Kiyomi N.
Sheet Author
The system I am attempting to emulate involving rolling under a target number (usually a skill or your accuracy) plus or minus any modifiers. Is there any way to code such a thing and have chat spit out simple a Success or Failure result? I've gotten as far as to get a result of 0 for failure and 1 for success using something like {{attack=[[{1d100cs<@{attackcritrange}cf>95}<@{Accuracy} + @{weaponskill1} - @{target|evasion} ]]}} {{damage=[[(@{weapondamagemath1}) * @{physicald_mod}]]}} The problem is that any math that I attempt to have take place after the < gets all screwed up and ends up adding to be success count. I guess it's not designed for a roll in which you only want to know pass or fail. I thought if I could manage to move all my math onto the other side of the < that it would work, but apparently it still doesn't like it. Any ideas? Is there a way perhaps to declare what your target number was in the roll template macro thing?
1443311043

Edited 1443317377
Kiyomi N.
Sheet Author
Nevermind I figured it out ^_^ Just had to create a new entry in the template and then add it to my roll macros. Perfecto!  Scratch that, I still have a question... How do I get the name of my target to show up in my attack macro? I thought rather than vs AC I could put in my template vs @{target|token_name} but it's just showing up as @{target|token_name} in my template when I roll the dice, rather than the token name. Any help?
1443319263
vÍnce
Pro
Sheet Author
Can you post your macro Kiyomi?
I eventually got it to work by setting it as an entirely different entry in my template. How do I past code in here without it like... running it? lol
1443323439
Pat S.
Forum Champion
Sheet Author
You post it just like normal text for the forums. Macro's only run in the game chat and not the forums.
it wont run, but hit the first symbol in the reply box and it will do this: here is where you post your code
Sorry I didn't mean literally run I just like some of it wasn't showing up. I think I got past my earlier issue anyway. I created a new section in the roll template  {{#target}} <div class="sheet-row"> <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Target</div> <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{target}}</div> </div> {{/target}} and {{#threshold}} <div class="sheet-row"> <div class="sheet-col-7-12 sheet-padl sheet-padr sheet-rt-key">Threshold</div> <div class="sheet-col-5-12 sheet-padr sheet-rt-value">{{threshold}}</div> </div> {{/threshold}} then I just added them to my roll macro so that they would display the information I wanted them to like so. <div class="sheet-col-1-12 sheet-center"><button type="roll" class="sheet-roll" name="roll_WeaponAttack1" value="&{template:5eDefault} {{title=@{weaponname1}}} {{subheader=@{character_name}}} {{subheaderright=Weapon Attack}} {{target=@{target|token_name}}} {{threshold=[[@{weaponskill1}+@{Accuracy}-(@{target|evasion})+(?{Modifier|0})]]}} {{attack=[[{1d100cs<@{attackcritrange}cf>95} ]]}} {{damage=[[((@{weapondamagemath1}) * @{physicald_mod})]]}}" >Attack</button></div>