Development GIST Updated to 3.8.14 I have been experimenting with another new feature, and have updated the development gist with its first iteration. 3.8.14 introduces two new types of tags "SkipTos" and "Labels": NOTE: This feature is entirely experimental and may change or be removed if it is not useful. SkipTos begin with "skipto" (case insensitive) and follow the required uniqueness rule (so use skipto*1, skipto*2, etc) and will instruct PowerCards to skip card lines until the matching label is hit. The label is specified as the content of the tag. For example: --skipTo|EndOfCard will hide all additional card lines until it finds a label called "EndOfCard" Labels begin with a colon (:) and are not added to card output (though they must still be unique, and as with all non-visible tags any inline rolls will still be executed and assigned to rollids. The | separating content MUST be included, and the content can be treated as a comment of sorts because it won't be shown on the card. The corresponding label for the skipto above would be: --:EndOfCard| Note that skipto and label names are not case sensitive. The idea here is to potentially make cards more readable, as you can use a "negative condition" to skip entire blocks of the card output instead of putting the same conditional on each line of a block. Here is an example: !power {{ --name|5E Attack --Attack Roll|You roll [[ [$atk] 1d20 + @{selected|strength_mod} + @{selected|pb} ]] vs AC [! @{target|npc_ac} !]
--?? $atk.base <> 20 ?? skipto*1|NotACrit --Critical Hit|You strike a decisive blow for [[ 2d8 + @{selected|strength_mod} ]] damage! --Extra Crit Stuff|Extra stuff that might happen on a crit! --skipto*2|EndOfCard
--:NotACrit|It wasn't a crit, so lets see if it was a fumble --?? $atk.base <> 1 ?? skipto*3|NotAFumble --Fumble|You miss horribly! --Extra Fumble Stuff|Maybe a roll on a fumble table? --skipto*4|EndOfCard
--:NotAFumble|It wasn't a fumble. Did we hit? --?? $atk.total < @{target|npc_ac} ?? skipto*5|NotAHit --Hit!|Your attack hit for [[ 1d8 + @{selected|strength_mod} ]] damage! --Extra Hit Stuff|Who knows? Could be anything! --skipto*6|EndOfCard
--:NotAHit|We didn't hit. Show a missed message --Miss|Your attack missed!
--:EndOfCard| }} This shows how it is possible to have multiple content lines be displayed based on conditionals without having to repeat the conditional for each line. I've included some comments as the content portion of the label tags. It starts by checking to see if the attack was NOT a critical hit. If it wasn't, it skips to "NotACrit". If it was a crit, it continues showing lines until it hits "skipto|EndOfCard" at which point the remaining lines until the ":EndOfCard" label are removed from the output. Assume we didn't roll a crit, checking begins again after the "NotACrit" label and test for a fumble, and so on. Some important notes: It is only possible to skip forward in the card. Trying to skip to a previous label will just result in the rest of the card being ignored. Conditionals are evaluated before skips are processed. I haven't fully thought through what ramifications that might have if you split "else" conditionals across multiple skips. It might be like crossing the streams, so be careful with that :) Skipping to a non-existent label will just skip the remainder of the card. Labels don't need to be references by a skipto - they can be used simply to add comments to cards if desired. Please let me know if you find some useful tricks for skiptos and labels or if you run into unexpected behavior. Edit: Alternatively, the above card could be written like this: !power {{ --name|5E Attack --Attack Roll|You roll [[ [$atk] 1d20 + @{selected|strength_mod} + @{selected|pb} ]] vs AC [! @{target|npc_ac} !] --?? $atk.base == 20 ?? skipto*1|Critical --?? $atk.base == 1 ?? skipto*2|Fumble --?? $atk.total >= @{target|npc_ac} ?? skipto*3|Hit --:Miss| Since we didn't skip to anywhere else, assume a miss --Miss|Your attack missed. --skipto*4|EndOfCard
--:Fumble| --Fumble|You miss horribly!
--Extra Fumble Stuff|Maybe a roll on a fumble table? --skipto*5|EndOfCard
--:Hit| --Hit!|Your attack hit for [[ 1d8 + @{selected|strength_mod} ]] damage!
--Extra Hit Stuff|Who knows? Could be anything! --skipto*6|EndOfCard
--:Critical| --Critical Hit|You strike a decisive blow for [[ 2d8 + @{selected|strength_mod} ]] damage!
--Extra Crit Stuff|Extra stuff that might happen on a crit!
--:EndOfCard| }} Which I think might be even more readable - I actually like this style much better than the first example, but I'm going to leave that example there because it is still valid. In this new case, we simply have three conditionals that check for the possibilities (crit, fumble, hit) and if non of them is true it just falls through to :Miss. At the end of each block we skip to :EndOfCard