!power {{
--charid|@{selected|character_id}
--emote|//@{selected|token_name} is attempting a challenge roll...//
--orowbg|#F5DEB3
--erowbg|#FFFFF0
--name|Challenge Roll
--leftsub|Attribute vs. 10
--hroll| Attribute [[ [$ATType] ?{Attribute:|Strength, 0|Agility, 1|Intellect, 2|Will, 3|Perception, 4} +0d0 ]] ^^ Boons/Banes: [[ [nh|$BB] ?{Roll Modifier|None, 0|Boon, {?{Number of Boons&_#124;1&_#125;d6&_#125;kh1 |Bane, {?{Number of Banes&_#124;1&_#125;t[BaneDice]&_#125;kl1 } + 0d0]]
--?? $ATType == 0 AND @{selected|STR} == 100 ?? !Blank1|~~~
--?? $ATType == 0 AND @{selected|STR} == 100 ?? !Error1|~C**Error**~C
--?? $ATType == 0 AND @{selected|STR} == 100 ?? !Blank2|~~~
--?? $ATType == 0 AND @{selected|STR} == 100 ?? !Error|~CYou do not have a //Strength// attribute, you ignore all effects of the challenge roll~C
--?? $ATType == 0 AND @{selected|STR} <> 100 ?? !Roll0|**Strength** [[ [nh|$ATSTR] 1d20 + @{selected|STR} + ?{Roll Modifier} ]] vs [[ [nh] 10d1 ]]
--?? $ATType == 0 AND $ATSTR < 10 AND @{selected|STR} <> 100 ?? ^1Failure|
--?? $ATType == 0 AND $ATSTR >= 10 AND @{selected|STR} <> 100 ?? ^1Success |
--?? $ATType == 1 AND @{selected|AGI} == 100 ?? !Blank1|~~~
--?? $ATType == 1 AND @{selected|AGI} == 100 ?? !Error1|~C**Error**~C
--?? $ATType == 1 AND @{selected|AGI} == 100 ?? !Blank2|~~~
--?? $ATType == 1 AND @{selected|AGI} == 100 ?? !Error|~CYou do not have an //Agility// attribute, you ignore all effects of the challenge roll~C
--?? $ATType == 1 AND @{selected|AGI} <> 100 ?? !Roll1|**Agility** [[ [nh|$ATAGI] 1d20 + @{selected|AGI} + ?{Roll Modifier} ]] vs [[ [nh] 10d1 ]]
--?? $ATType == 1 AND $ATAGI < 10 AND @{selected|AGI} <> 100 ?? ^1Failure|
--?? $ATType == 1 AND $ATAGI >= 10 AND @{selected|AGI} <> 100 ?? ^1Success|
--?? $ATType == 2 AND @{selected|INT} == 100 ?? !Blank1|~~~
--?? $ATType == 2 AND @{selected|INT} == 100 ?? !Error1|~C**Error**~C
--?? $ATType == 2 AND @{selected|INT} == 100 ?? !Blank2|~~~
--?? $ATType == 2 AND @{selected|INT} == 100 ?? !Error|~CYou do not have an //Intellect// attribute, you ignore all effects of the challenge roll~C
--?? $ATType == 2 AND @{selected|INT} <> 100 ?? !Roll2|**Intellect** [[ [nh|$ATINT] 1d20 + @{selected|INT} + ?{Roll Modifier} ]] vs [[ [nh] 10d1 ]]
--?? $ATType == 2 AND $ATINT < 10 AND @{selected|INT} <> 100 ?? ^1Failure|
--?? $ATType == 2 AND $ATINT >= 10 AND @{selected|INT} <> 100 ?? ^1Success|
--?? $ATType == 3 AND @{selected|WILL} == 100 ?? !Blank1|~~~
--?? $ATType == 3 AND @{selected|WILL} == 100 ?? !Error1|~C**Error**~C
--?? $ATType == 3 AND @{selected|WILL} == 100 ?? !Blank2|~~~
--?? $ATType == 3 AND @{selected|WILL} == 100 ?? !Error|~CYou do not have a //Will// attribute, you ignore all effects of the challenge roll~C
--?? $ATType == 3 AND @{selected|WILL} <> 100 ?? !Roll3|**Will** [[ [nh|$ATWILL] 1d20 + @{selected|WILL} + ?{Roll Modifier} ]] vs [[ [nh] 10d1 ]]
--?? $ATType == 3 AND $ATWILL < 10 AND @{selected|WILL} <> 100 ?? ^1Failure|
--?? $ATType == 3 AND $ATWILL >= 10 AND @{selected|WILL} <> 100 ?? ^1Success|
--?? $ATType == 4 AND @{selected|PER} == 100 ?? !Blank1|~~~
--?? $ATType == 4 AND @{selected|PER} == 100 ?? !Error1|~C**Error**~C
--?? $ATType == 4 AND @{selected|PER} == 100 ?? !Blank2|~~~
--?? $ATType == 4 AND @{selected|PER} == 100 ?? !Error|~CYou do not have a //Perception// attribute, you ignore all effects of the challenge roll~C
--?? $ATType == 4 AND @{selected|PER} <> 100 ?? !Roll4|**Perception** [[ [nh|$ATPER] 1d20 + @{selected|PER} + ?{Roll Modifier} ]] vs [[ [nh] 10d1 ]]
--?? $ATType == 4 AND $ATPER < 10 AND @{selected|PER} <> 100 ?? ^1Failure|
--?? $ATType == 4 AND $ATPER >= 10 AND @{selected|PER} <> 100 ?? ^1Success|
}}
This is my !powercard marco. I have not tried to do it for non-powercard users yet but maybe it will give you somewhere to start.
1st off you have to remove the _ between all the &_# in the bane/boon section (it is there just to keep the html from parsing in the message).
2nd when a creature does not have an attribute (say they have '-' STR score) I enter it as 100. Nothing will ever have a 100 and its a good round number to remember. That is why all the reference back to 100 are in the code. This is because if you target a creature without an attribute the attack automatically fails.
Beyond that it is just a series of queries to ask the questions, and a ton of conditionals (powercard version of If/Than) so that it will only print out the correct info.
Thinking about it it terms of a normal marco.
/roll 1d20 + query|modifier + query|boon/bane (and then compare to 10)
you have the boon/bane query already, and the one for the modifier should be the same as in this code, except trade out the numbers (ie. Strength, 0... change the 0) for an attribute call to the character sheet (ie. @{character|STR} ... and add in all the correct html calls as needed for the | and the }).
might take a few tries, but that should do it.