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

[Script] PowerCards 3 (Thread 6)

1599521606

Edited 1599522712
Kurt J.
Pro
API Scripter
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
Kurt J. said: Nibrus said: Hi, Im having a problem and im really not good at this. But i have been trying all summer to come up with a way to write an overall macro for the NPC multiattack. I have the templates and everything and npc-action works fine. But i want to  be able to get 2 hits in 1 powercard from 2 different sources ( say bite and claw) is this possible? withut writing a macro for every single monster? This would be a very difficult thing to accomplish, because of the variability of Multiattack. For example: Goblins : The goblin makes two attacks with its scimitar. The second attack has disadvantage. Brown Bear : The bear makes two attacks: one with its bite and one with its claws. Adult Red Dragon : The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws. And those are just the first three I looked up in the compendium. There wouldn't be any way for a single macro to determine what attacks it should be making and the variables associated with them (like disadvantage on the second attack for the goblin). It might be possible to set up some attributes on the NPC sheets to assist, but the cards would get mind-bogglingly complicated, and you would still need to set them up for every creature with multiattack. Okey, I almost figured as much. well thanks anyway. Ill try to figure out some way to at least make it easier then :)
Taylor B. said: After using the macro on the wiki page for displaying NPC info, (modified slightly to display speed and AC/type):  !power {{ --name|@{selected|character_name} --whisper|GM --format|badguys --emote| --tokenid|@{selected|token_id} --npc_attribute_summary|@{selected|character_id} --npc_qualities_summary|@{selected|character_id} --npc_skills_summary|@{selected|character_id} --!Actions|**Available Actions** --npc_action_list|@{selected|character_id} --!Reactions|**Available Reactions** --npc_reaction_list|@{selected|character_id} --!LA|**Legendary Actions** --npc_legendaryaction_list|@{selected|character_id} --!TR|**@{selected|character_name} Traits** --npc_trait_list|@{selected|character_id} }} But sometimes the traits show up with the description, sometimes just the name of the trait. It is consistent within the same monster, i.e. a zombie's traits always show up, but a grimlock's don't. And it doesn't seem to be dependent on the name of the trait, i.e. Devil's Sight and Magic Resistance show up for a Bone Devil, but not for a Horned Devil.  Any idea how I could make the trait descriptions show up every time? Following up on my own post from a while back, in case anybody else is looking for info... Back in March, Roll20 updated the 5e OGL npc sheet and changed the attribute used to call the description of npc traits and legendary actions from "desc" to "description". Lines 476 and 523 of the Powercards code use "desc" which is why all my older NPC's that had traits showed up correctly but not ones that I pulled out of the compendium starting in March. So if anyone is trying to get the npc trait descriptions to show up correctly in an NPC card for quick reference, grab the code from github and change those 2 lines and you should be golden. Happy Powercarding all.
Was the API updated? I'm using 3.8.13 (Latest) on the one-click install The Macros I use are now getting
I ran into that problem earlier... Kept re-booting the sanbox. and running different PC's until it started working. Been fine ever since. took about 3+ tries tho.
I've been restarting the sandbox, and deleting the PowerCard API and re-adding it.... and I 'm getting no where with it
I grabbed the Dev version from github 3.8.14 and added the lines var RollOdds = 0; var RollEvens = 0; at line 706, to fix my issue Kurt, when you get a moment can you check the one-click for PowerCards on Roll20 please
Hey, guys. Can you help me? I'm not very much into programming, but I am trying... I wanted an if condition for a test based on a choice of attribute of the character sheet. !power {{   -- name| Teste!   -- hroll| [[ [$dum] 1d1 + ?{Query| Força,0| Destreza,1|Constituição,2|Inteligência,3|Sabedoria,4|Carisma,5} ]]   -- ?? [$dum] == 1 ?? Força! | @{selected|token_name} faz um teste de força: [[ 1d20 + @{selected|Força} ]]   -- ?? [$dum] == 2 ?? Destreza! | @{selected|token_name} faz um teste de destreza: [[ 1d20 + @{selected|Destreza} ]]  -- ?? [$dum] == 3 ?? Constituição! | @{selected|token_name} faz um teste de constituição: [[ 1d20 + @{selected|Constituição} ]]  -- ?? [$dum] == 4 ?? Inteligência! | @{selected|token_name} faz um teste de inteligência: [[ 1d20 + @{selected|Inteligência} ]]  -- ?? [$dum] == 5 ?? Sabedoria! | @{selected|token_name} faz um teste de sabedoria: [[ 1d20 + @{selected|Sabedoria} ]]  -- ?? [$dum] == 5 ?? Carisma! | @{selected|token_name} faz um teste de carisma: [[ 1d20 + @{selected|Carisma} ]]   -- Bosta|Bosta }} But it always comes back as this: What dumb thing I am doing wrong? (sorry for the portuguese inside the code, it is because I'm brazilian)
1599775075

Edited 1599775164
Try this, I removed the spaces around  the pipe character "|" also changed carisma to be "6" !power {{   -- name| Teste!   -- hroll|[[ [$dum] 1d1 + ?{Query| Força,0| Destreza,1|Constituição,2|Inteligência,3|Sabedoria,4|Carisma,5} ]]   -- ?? [$dum] == 1 ?? Força!|@{selected|token_name} faz um teste de força: [[ 1d20 + @{selected|Força} ]]   -- ?? [$dum] == 2 ?? Destreza!|@{selected|token_name} faz um teste de destreza: [[ 1d20 + @{selected|Destreza} ]]  -- ?? [$dum] == 3 ?? Constituição!|@{selected|token_name} faz um teste de constituição: [[ 1d20 + @{selected|Constituição} ]]  -- ?? [$dum] == 4 ?? Inteligência!|@{selected|token_name} faz um teste de inteligência: [[ 1d20 + @{selected|Inteligência} ]]  -- ?? [$dum] == 5 ?? Sabedoria!|@{selected|token_name} faz um teste de sabedoria: [[ 1d20 + @{selected|Sabedoria} ]]  -- ?? [$dum] == 6 ?? Carisma!|@{selected|token_name} faz um teste de carisma: [[ 1d20 + @{selected|Carisma} ]]   -- Bosta|Bosta }}
1599775642
Kurt J.
Pro
API Scripter
Sims said: I grabbed the Dev version from github 3.8.14 and added the lines var RollOdds = 0; var RollEvens = 0; at line 706, to fix my issue Kurt, when you get a moment can you check the one-click for PowerCards on Roll20 please I definitely see where the issue is coming from, but I'm not certain why I'm not getting an error :\ Even when I turn on strict mode I'm not getting the reference error, though I see why it should be happening. I've updated my repo in 3.8.14 and sent a pull request to update OneClick, thought that won't go through for a few days.
1599775705
Kurt J.
Pro
API Scripter
Raphael M. said: Hey, guys. Can you help me? I'm not very much into programming, but I am trying... I wanted an if condition for a test based on a choice of attribute of the character sheet. !power {{   -- name| Teste!   -- hroll| [[ [$dum] 1d1 + ?{Query| Força,0| Destreza,1|Constituição,2|Inteligência,3|Sabedoria,4|Carisma,5} ]]   -- ?? [$dum] == 1 ?? Força! | @{selected|token_name} faz um teste de força: [[ 1d20 + @{selected|Força} ]]   -- ?? [$dum] == 2 ?? Destreza! | @{selected|token_name} faz um teste de destreza: [[ 1d20 + @{selected|Destreza} ]]  -- ?? [$dum] == 3 ?? Constituição! | @{selected|token_name} faz um teste de constituição: [[ 1d20 + @{selected|Constituição} ]]  -- ?? [$dum] == 4 ?? Inteligência! | @{selected|token_name} faz um teste de inteligência: [[ 1d20 + @{selected|Inteligência} ]]  -- ?? [$dum] == 5 ?? Sabedoria! | @{selected|token_name} faz um teste de sabedoria: [[ 1d20 + @{selected|Sabedoria} ]]  -- ?? [$dum] == 5 ?? Carisma! | @{selected|token_name} faz um teste de carisma: [[ 1d20 + @{selected|Carisma} ]]   -- Bosta|Bosta }} But it always comes back as this: What dumb thing I am doing wrong? (sorry for the portuguese inside the code, it is because I'm brazilian) When using RollIDs in a conditional, don't include the brackets... so [$dum] should just be $dum between the ?? and ??.
I was having the exact issue Sims was, made the changes to set RollOdds and RollEvans and now am getting this when executing "some" spells. This was a token attempting to cast magic missile as a level 1 spell. For reference, the error message generated was:  SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "~" found. undefined Conversely, the casting healing word doesn't appear to cause the fault; but hunter's mark does.
So, I'll admit I have no desire to read through 6 threads of stuff so I figure I'll just ask. Has anyone made any macros using this that will work with the Pathfinder Official Character Sheet? I'm trying to put something together to make a 'generic' melee attack and ranged attack macro for my 'Monster Template' that I copy to make all my various monsters that will key off all the relevant stats to roll, confirm crits if a crit is at risk, and do damage correctly based on a condition check of: A) Did you hit? i.e. $Atk >= @{target|ac} B) Did you crit? i.e. $Atk.base >= <critrange> AND $Atk >= @{target|ac} C) Calculate correct damage based on normal or critical hit (do not roll if miss) D) MAYBE use AlterBars to automatically deal damage to a tokens HP bar From what I read I am *sure* this is possible, but I'm having a hard time getting the syntax right with this particular sheet >.<
1599849191

Edited 1599849579
Hej Kurt. Thx you for the if else statement.  I would like to pass by you if is possible to also incorporate into powercards a whisper to gm in the same powercard. Let me explain. Let say I have a card that depending on the roll it will post info to my players but also whisper the gm with hidden information only for the gm. I have done something similar by adding two powercards. One for my players and one for me. But sometimes there is information that I need in the same powercard (Like results of variables and conditionals) and if i make two powercards the second will not inheret the value. !power {{ --name|Powercard --hroll|[[ [$R]1d100]] --?? $R < 50 ?? Display|You roll under 50 --?? $R > 51 ?? Display|You roll over 51 --?? $R > 51 ?? gmhiddeninfo | Only the GM can see this and come with extra information }} In this case the card would know to whisper some part for the player and some part to the gm. I have try to do this with multiple powercards but it breaks since the second powercard dont recognize the variable result from the first one. !power {{ --name|Powercard --hroll|[[ [$R]1d100]] --?? $R < 50 ?? Display|You roll under 50 --?? $R > 51 ?? Display|You roll over 51 }} !power {{ --whisper|GM --?? $R > 51 ?? gmhiddeninfo| Only the GM can see this and come with extra information }} Do you think something like this could be added? The reason I ask is that it would be great sometimes to have extra information for the gm can read using the variables and conditionals, witout needing to clog the channel for the players to see. Hope you understand what I mean
Can anyone help me with this? I am a newer DM with little to no API skills. All my powercards no longer function. I see some folks asked about the "one click" install. And i see there was an update(?) so&nbsp; I found thread 6 and I was able to Copy/Paste Kurts 3.8.14 update, into a new player action/attack but this is how it displays? Im assuming it needs modifications?? So it rolled a 22 (bonuses are correct) VS AC 15, then it does Skipto3 Hit ..........why? I dont understand.&nbsp; <div class="userscript-showtip userscript-tipsy" original-title="PowerCard sent by: Dungeon Master (Mark)" style="box-sizing: content-box; min-width: 150px; font-family: &quot;contrail one&quot;; font-size: 1.2em; line-height: 1.2em; font-weight: normal; font-style: normal; font-variant-numeric: normal; font-variant-east-asian: normal; letter-spacing: 2px; vertical-align: middle; margin: 0px; padding: 2px 0px 0px; border: 1px solid rgb(0, 0, 0); border-radius: 5px 5px 0px 0px; color: rgb(255, 255, 255); text-shadow: rgb(0, 0, 0) -1px -1px 0px, rgb(0, 0, 0) 1px -1px 0px, rgb(0, 0, 0) -1px 1px 0px, rgb(0, 0, 0) 1px 1px 0px; background-color: rgb(39, 78, 19); background-image: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));">5E Attack Attack Roll &nbsp;You roll&nbsp;<span title="Roll: [$atk] 1d20 + 4 + 3 Results: ( 15 ) + 4 + 3 = 22" class="userscript-inlinerollresult userscript-showtip userscript-tipsy" style="box-sizing: content-box; min-width: 1.75em; text-align: center; display: inline-block; font-weight: bold; height: 1em; margin-top: -1px; margin-bottom: 1px; padding: 0px 2px; border: 1px solid rgb(135, 133, 10); border-radius: 3px; background-color: rgb(255, 254, 162);">22 &nbsp;vs AC&nbsp; 15 skipto 3 &nbsp;Hit :Miss &nbsp;Since we didn't skip to anywhere else, assume a miss Miss &nbsp;Your attack missed. skipto4 &nbsp;EndOfCard :Fumble Fumble &nbsp;You miss horribly! Extra Fumble Stuff &nbsp;Maybe a roll on a fumble table? skipto 5 &nbsp;EndOfCard :Hit Hit! &nbsp;Your attack hit for&nbsp;<span title="Roll: 1d8 + 4 Results: ( 4 ) + 4 = 8" class="userscript-inlinerollresult userscript-showtip userscript-tipsy" style="box-sizing: content-box; min-width: 1.75em; text-align: center; display: inline-block; font-weight: bold; height: 1em; margin-top: -1px; margin-bottom: 1px; padding: 0px 2px; border: 1px solid rgb(135, 133, 10); border-radius: 3px; background-color: rgb(255, 254, 162);">8 &nbsp;damage! Extra Hit Stuff &nbsp;Who knows? Could be anything! skipto6 &nbsp;EndOfCard :Critical Critical Hit &nbsp;You strike a decisive blow for&nbsp;<span title="Roll: 2d8 + 4 Results: ( 4 + 1 ) + 4 = 9" class="userscript-inlinerollresult userscript-showtip userscript-tipsy" style="box-sizing: content-box; min-width: 1.75em; text-align: center; display: inline-block; font-weight: bold; height: 1em; margin-top: -1px; margin-bottom: 1px; padding: 0px 2px; border: 1px solid rgb(102, 0, 0); border-radius: 3px; background-color: rgb(255, 170, 170); color: rgb(102, 0, 0);">9 &nbsp;damage! Extra Crit Stuff &nbsp;Extra stuff that might happen on a crit! :EndOfCard &nbsp; &nbsp;
1599906626
Kurt J.
Pro
API Scripter
Danny C. said: Hej Kurt. Thx you for the if else statement.&nbsp; I would like to pass by you if is possible to also incorporate into powercards a whisper to gm in the same powercard. Let me explain. Let say I have a card that depending on the roll it will post info to my players but also whisper the gm with hidden information only for the gm. I have done something similar by adding two powercards. One for my players and one for me. But sometimes there is information that I need in the same powercard (Like results of variables and conditionals) and if i make two powercards the second will not inheret the value. !power {{ --name|Powercard --hroll|[[ [$R]1d100]] --?? $R &lt; 50 ?? Display|You roll under 50 --?? $R &gt; 51 ?? Display|You roll over 51 --?? $R &gt; 51 ?? gmhiddeninfo | Only the GM can see this and come with extra information }} In this case the card would know to whisper some part for the player and some part to the gm. I have try to do this with multiple powercards but it breaks since the second powercard dont recognize the variable result from the first one. !power {{ --name|Powercard --hroll|[[ [$R]1d100]] --?? $R &lt; 50 ?? Display|You roll under 50 --?? $R &gt; 51 ?? Display|You roll over 51 }} !power {{ --whisper|GM --?? $R &gt; 51 ?? gmhiddeninfo| Only the GM can see this and come with extra information }} Do you think something like this could be added? The reason I ask is that it would be great sometimes to have extra information for the gm can read using the variables and conditionals, witout needing to clog the channel for the players to see. Hope you understand what I mean This is certainly something I would consider implementing as a special tag type. If you are looking to do it right away, there is a hacky way to do it by nesting a call to PowerCards: !power {{ --name|Test --hroll|[[ [$save] 1d20 ]] --before|Before the whisper --api_power|_whisper|gm _Info|Here is the secret info [! [^save] !] --More|More player text }} The important thing is to not use {{ and }} in the nested powercards call or weird things will happen. This isn't ideal, though, so I'd be open to another implementation :)
1599906852
Kurt J.
Pro
API Scripter
Chef Mark said: Can anyone help me with this? I am a newer DM with little to no API skills. All my powercards no longer function. I see some folks asked about the "one click" install. And i see there was an update(?) so&nbsp; I found thread 6 and I was able to Copy/Paste Kurts 3.8.14 update, into a new player action/attack but this is how it displays? Im assuming it needs modifications?? So it rolled a 22 (bonuses are correct) VS AC 15, then it does Skipto3 Hit ..........why? I dont understand.&nbsp; 5E Attack Attack Roll &nbsp;You roll&nbsp;<span title="Roll: [$atk] 1d20 + 4 + 3 Results: ( 15 ) + 4 + 3 = 22" class="userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 135 , 133 , 10 ) ; border-radius: 3px ; background-color: rgb( 255 , 254 , 162 )">22 &nbsp;vs AC&nbsp; 15 skipto 3 &nbsp;Hit :Miss &nbsp;Since we didn't skip to anywhere else, assume a miss Miss &nbsp;Your attack missed. skipto4 &nbsp;EndOfCard :Fumble Fumble &nbsp;You miss horribly! Extra Fumble Stuff &nbsp;Maybe a roll on a fumble table? skipto 5 &nbsp;EndOfCard :Hit Hit! &nbsp;Your attack hit for&nbsp;<span title="Roll: 1d8 + 4 Results: ( 4 ) + 4 = 8" class="userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 135 , 133 , 10 ) ; border-radius: 3px ; background-color: rgb( 255 , 254 , 162 )">8 &nbsp;damage! Extra Hit Stuff &nbsp;Who knows? Could be anything! skipto6 &nbsp;EndOfCard :Critical Critical Hit &nbsp;You strike a decisive blow for&nbsp;<span title="Roll: 2d8 + 4 Results: ( 4 + 1 ) + 4 = 9" class="userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 102 , 0 , 0 ) ; border-radius: 3px ; background-color: rgb( 255 , 170 , 170 ) ; color: rgb( 102 , 0 , 0 )">9 &nbsp;damage! Extra Crit Stuff &nbsp;Extra stuff that might happen on a crit! :EndOfCard &nbsp; &nbsp; The macro I posted in the update about 3.8.14 is demonstrating new features (skipto and labels) of the 3.8.14 version of the API. That version is only available (currently) by installing from the development GIST, so the card above won't work with the current OneClick version. That said, I've pushed 3.8.14 towards OneClick because it also corrects the "RollOdds" error. As a side note on RollOdds, I randomly started getting the error on SOME sandbox restarts. My guess is that there are multiple sandbox servers and one or more is configured differently with respect to using variables without declaring them (which is absolutely my &nbsp;mistake... Not blaming the sandbox servers :)). That is probably why I didn't see the issue myself, and why some folks get it working by repeatedly restarting the sandbox. 3.8.14 with the fix should go to OneClick between Tuesday and Thursday this coming week.
Hej Kurt. Thx you and good to know you may consider it. I think Il wait until you implement it. I have not gotten my head around on how to use the api tag yet
What would I add to this code to have Charisma set to be equal to $Enhance? And why doesn't the vfx work? This script is similar to the strength version but doesn't have any save conditionals. Game: Castles &amp; Crusades &amp;{template:default} {{name= [img](@{selected|token_image}) @{selected|token_name} Action}} !power {{ --bgcolor|#1c4587 --erowbg|F1F1D4 --orowbg|#b6d7a8 --name|Enhancement (Charisma) --tokenid|@{selected|token_image} --emote|**Anáil nathrach, ortha bháis is beatha, do chéal déanaimh** &nbsp;--leftsub|**R:** T **CT:** 1 **D:** @{selected|Spell-Strength} Hour(s) **C:** VSM &nbsp;--Effect:| **@{target|token_name}'s Charisma** is increased to [[ [$Enhance] @{target|Charisma} + ?{Type|Primary, 1d4+1 |Secondary, 1d2+1 } ]] --soundfx|_audio,play,nomenu|morgana --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost&nbsp; --?? $Enhance == 1 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-4 --?? $Enhance &gt;= 2 AND $Enhance &lt;= 3 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-3&nbsp; &nbsp; --?? $Enhance &gt;= 4 AND $Enhance &lt;= 5 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-2&nbsp;&nbsp; --?? $Enhance &gt;= 6 AND $Enhance &lt;= 8 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-1&nbsp; --?? $Enhance &gt;= 9 AND $Enhance &lt;= 12 ?? api_setattr|_name @{target|character_name} _set _CharismaMod|0 --?? $Enhance &gt;= 13 AND $Enhance &lt;= 15 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|1 --?? $Enhance &gt;= 16 AND $Enhance &lt;= 17 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|2 --?? $Enhance &gt;= 18 AND $Enhance &lt;= 19 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|3 &nbsp;--?? $Enhance &gt;= 20 AND $Enhance &lt;= 21 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|4&nbsp; --?? $Enhance &gt;= 22 AND $Enhance &lt;= 23 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|5 --?? $Enhance &gt;= 24 AND $Enhance &lt;= 25 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|6&nbsp; &nbsp;--?? $Enhance &gt;= 26 AND $Enhance &lt;= 27 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|7&nbsp;&nbsp; --?? $Enhance == 28 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|8 --?? $Enhance == 29 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|9 --?? $Enhance == 30 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|10 }}
Kurt J. said: Chef Mark said: Can anyone help me with this? I am a newer DM with little to no API skills. All my powercards no longer function. I see some folks asked about the "one click" install. And i see there was an update(?) so&nbsp; I found thread 6 and I was able to Copy/Paste Kurts 3.8.14 update, into a new player action/attack but this is how it displays? Im assuming it needs modifications?? So it rolled a 22 (bonuses are correct) VS AC 15, then it does Skipto3 Hit ..........why? I dont understand.&nbsp; 5E Attack Attack Roll &nbsp;You roll&nbsp;<span title="Roll: [$atk] 1d20 + 4 + 3 Results: ( 15 ) + 4 + 3 = 22" class="userscript-userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 135 , 133 , 10 ) ; border-radius: 3px ; background-color: rgb( 255 , 254 , 162 )">22 &nbsp;vs AC&nbsp; 15 skipto 3 &nbsp;Hit :Miss &nbsp;Since we didn't skip to anywhere else, assume a miss Miss &nbsp;Your attack missed. skipto4 &nbsp;EndOfCard :Fumble Fumble &nbsp;You miss horribly! Extra Fumble Stuff &nbsp;Maybe a roll on a fumble table? skipto 5 &nbsp;EndOfCard :Hit Hit! &nbsp;Your attack hit for&nbsp;<span title="Roll: 1d8 + 4 Results: ( 4 ) + 4 = 8" class="userscript-userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 135 , 133 , 10 ) ; border-radius: 3px ; background-color: rgb( 255 , 254 , 162 )">8 &nbsp;damage! Extra Hit Stuff &nbsp;Who knows? Could be anything! skipto6 &nbsp;EndOfCard :Critical Critical Hit &nbsp;You strike a decisive blow for&nbsp;<span title="Roll: 2d8 + 4 Results: ( 4 + 1 ) + 4 = 9" class="userscript-userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 102 , 0 , 0 ) ; border-radius: 3px ; background-color: rgb( 255 , 170 , 170 ) ; color: rgb( 102 , 0 , 0 )">9 &nbsp;damage! Extra Crit Stuff &nbsp;Extra stuff that might happen on a crit! :EndOfCard &nbsp; &nbsp; The macro I posted in the update about 3.8.14 is demonstrating new features (skipto and labels) of the 3.8.14 version of the API. That version is only available (currently) by installing from the development GIST, so the card above won't work with the current OneClick version. That said, I've pushed 3.8.14 towards OneClick because it also corrects the "RollOdds" error. As a side note on RollOdds, I randomly started getting the error on SOME sandbox restarts. My guess is that there are multiple sandbox servers and one or more is configured differently with respect to using variables without declaring them (which is absolutely my &nbsp;mistake... Not blaming the sandbox servers :)). That is probably why I didn't see the issue myself, and why some folks get it working by repeatedly restarting the sandbox. 3.8.14 with the fix should go to OneClick between Tuesday and Thursday this coming week. Thanks for the response Kurt,I really appreciate it. My game is not until Friday night. So i guess i should just wait for the OneClick fix coming tues-thurd?
Love the Skipto.&nbsp; Thank you for doing that.&nbsp; Greatly cleaned things up.
1600380374
Kurt J.
Pro
API Scripter
Chef Mark said: Kurt J. said: Chef Mark said: Can anyone help me with this? I am a newer DM with little to no API skills. All my powercards no longer function. I see some folks asked about the "one click" install. And i see there was an update(?) so&nbsp; I found thread 6 and I was able to Copy/Paste Kurts 3.8.14 update, into a new player action/attack but this is how it displays? Im assuming it needs modifications?? So it rolled a 22 (bonuses are correct) VS AC 15, then it does Skipto3 Hit ..........why? I dont understand.&nbsp; 5E Attack Attack Roll &nbsp;You roll&nbsp;<span title="Roll: [$atk] 1d20 + 4 + 3 Results: ( 15 ) + 4 + 3 = 22" class="userscript-userscript-userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 135 , 133 , 10 ) ; border-radius: 3px ; background-color: rgb( 255 , 254 , 162 )">22 &nbsp;vs AC&nbsp; 15 skipto 3 &nbsp;Hit :Miss &nbsp;Since we didn't skip to anywhere else, assume a miss Miss &nbsp;Your attack missed. skipto4 &nbsp;EndOfCard :Fumble Fumble &nbsp;You miss horribly! Extra Fumble Stuff &nbsp;Maybe a roll on a fumble table? skipto 5 &nbsp;EndOfCard :Hit Hit! &nbsp;Your attack hit for&nbsp;<span title="Roll: 1d8 + 4 Results: ( 4 ) + 4 = 8" class="userscript-userscript-userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 135 , 133 , 10 ) ; border-radius: 3px ; background-color: rgb( 255 , 254 , 162 )">8 &nbsp;damage! Extra Hit Stuff &nbsp;Who knows? Could be anything! skipto6 &nbsp;EndOfCard :Critical Critical Hit &nbsp;You strike a decisive blow for&nbsp;<span title="Roll: 2d8 + 4 Results: ( 4 + 1 ) + 4 = 9" class="userscript-userscript-userscript-userscript-inlinerollresult userscript-showtip userscript-tipsy" style="min-width: 1.75em ; text-align: center ; display: inline-block ; font-weight: bold ; height: 1em ; margin-top: -1px ; margin-bottom: 1px ; padding: 0px 2px ; border: 1px solid rgb( 102 , 0 , 0 ) ; border-radius: 3px ; background-color: rgb( 255 , 170 , 170 ) ; color: rgb( 102 , 0 , 0 )">9 &nbsp;damage! Extra Crit Stuff &nbsp;Extra stuff that might happen on a crit! :EndOfCard &nbsp; &nbsp; The macro I posted in the update about 3.8.14 is demonstrating new features (skipto and labels) of the 3.8.14 version of the API. That version is only available (currently) by installing from the development GIST, so the card above won't work with the current OneClick version. That said, I've pushed 3.8.14 towards OneClick because it also corrects the "RollOdds" error. As a side note on RollOdds, I randomly started getting the error on SOME sandbox restarts. My guess is that there are multiple sandbox servers and one or more is configured differently with respect to using variables without declaring them (which is absolutely my &nbsp;mistake... Not blaming the sandbox servers :)). That is probably why I didn't see the issue myself, and why some folks get it working by repeatedly restarting the sandbox. 3.8.14 with the fix should go to OneClick between Tuesday and Thursday this coming week. Thanks for the response Kurt,I really appreciate it. My game is not until Friday night. So i guess i should just wait for the OneClick fix coming tues-thurd? For whatever reason, my latest pull request has not yet been merged, so the update doesn't look like it will make it to OneClick this week. My suggestion is to go to the API Scripts page and select PowerCards. There should be a version dropdown box that you can use to revert to 3.8.11 (the previous OneClick version) until OneClick gets updated.
OK Kurt no worries.It works fine with the older version.
1600711973

Edited 1600711993
Having some troubles using a question, conditionals, and skipto.&nbsp; Will they place nice together?&nbsp; So far it doesn't look like it but I'm hoping I missed something. !power {{ &nbsp;--bgcolor|#050404 &nbsp;--name|@{selected|token_name}Attempts to hit something in the dark! &nbsp;--Swing!|Is there something there? &nbsp;--hroll|[[ [$ST] 1d100]] &nbsp;--?? $ST &lt; 50 ?? skipto*1|Miss ?{Is something there| Yes, You connect with something in the dark!| No, Nothing but air I'm afraid } --skipto*2|End --:Miss| &nbsp;--Missed:|Nothing but air I'm afraid &nbsp;--:End| }} The goal is to roll a 50% miss chance when they can't see.&nbsp; So they don't know if something is there or not.
1600713572
Kurt J.
Pro
API Scripter
Johnny Meatshield said: Having some troubles using a question, conditionals, and skipto.&nbsp; Will they place nice together?&nbsp; So far it doesn't look like it but I'm hoping I missed something. !power {{ &nbsp;--bgcolor|#050404 &nbsp;--name|@{selected|token_name}Attempts to hit something in the dark! &nbsp;--Swing!|Is there something there? &nbsp;--hroll|[[ [$ST] 1d100]] &nbsp;--?? $ST &lt; 50 ?? skipto*1|Miss ?{Is something there| Yes, You connect with something in the dark!| No, Nothing but air I'm afraid } --skipto*2|End --:Miss| &nbsp;--Missed:|Nothing but air I'm afraid &nbsp;--:End| }} The goal is to roll a 50% miss chance when they can't see.&nbsp; So they don't know if something is there or not. The issue you are going to run into is that the roll query (?{Is something there...}) will be asked no matter what, because it is done on the chat server before the text gets passed to PowerCards. The API never sees the question (or even knows one was asked). The result text gets sent in place of the entire ?{..} block. Essentially this means that you can't only pop up a roll query based on something that happens in the card, since it won't have happened until well after the queries are all resolved.
Thanks
Can you use chatsetattr to augment/modify more than one attribute in the same macro? I'm trying to do this in powercards and I only get one ability change. The macro is designed to increase the target's strength with one !setattr and to set the nee modifier with a second !setattr based on the new strength value. I can get one or the other to populate but not both. What would I add to this code to have Charisma set to be equal to $Enhance? And why doesn't the vfx work? This script is similar to the strength version but doesn't have any save conditionals. Game: Castles &amp; Crusades &amp;{template:default} {{name= [img](@{selected|token_image}) @{selected|token_name} Action}} !power {{ --bgcolor|#1c4587 --erowbg|F1F1D4 --orowbg|#b6d7a8 --name|Enhancement (Charisma) --tokenid|@{selected|token_image} --emote|**Anáil nathrach, ortha bháis is beatha, do chéal déanaimh** &nbsp;--leftsub|**R:** T **CT:** 1 **D:** @{selected|Spell-Strength} Hour(s) **C:** VSM &nbsp;--Effect:| **@{target|token_name}'s Charisma** is increased to [[ [$Enhance] @{target|Charisma} + ?{Type|Primary, 1d4+1 |Secondary, 1d2+1 } ]] --soundfx|_audio,play,nomenu|morgana --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost&nbsp; --?? $Enhance == 1 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-4 --?? $Enhance &gt;= 2 AND $Enhance &lt;= 3 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-3&nbsp; &nbsp; --?? $Enhance &gt;= 4 AND $Enhance &lt;= 5 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-2&nbsp;&nbsp; --?? $Enhance &gt;= 6 AND $Enhance &lt;= 8 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-1&nbsp; --?? $Enhance &gt;= 9 AND $Enhance &lt;= 12 ?? api_setattr|_name @{target|character_name} _set _CharismaMod|0 --?? $Enhance &gt;= 13 AND $Enhance &lt;= 15 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|1 --?? $Enhance &gt;= 16 AND $Enhance &lt;= 17 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|2 --?? $Enhance &gt;= 18 AND $Enhance &lt;= 19 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|3 &nbsp;--?? $Enhance &gt;= 20 AND $Enhance &lt;= 21 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|4&nbsp; --?? $Enhance &gt;= 22 AND $Enhance &lt;= 23 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|5 --?? $Enhance &gt;= 24 AND $Enhance &lt;= 25 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|6&nbsp; &nbsp;--?? $Enhance &gt;= 26 AND $Enhance &lt;= 27 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|7&nbsp;&nbsp; --?? $Enhance == 28 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|8 --?? $Enhance == 29 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|9 --?? $Enhance == 30 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|10 }}
1600804839
Kurt J.
Pro
API Scripter
Peacekeeper B said: Can you use chatsetattr to augment/modify more than one attribute in the same macro? I'm trying to do this in powercards and I only get one ability change. The macro is designed to increase the target's strength with one !setattr and to set the nee modifier with a second !setattr based on the new strength value. I can get one or the other to populate but not both. What would I add to this code to have Charisma set to be equal to $Enhance? And why doesn't the vfx work? This script is similar to the strength version but doesn't have any save conditionals. Game: Castles &amp; Crusades &amp;{template:default} {{name= [img](@{selected|token_image}) @{selected|token_name} Action}} !power {{ --bgcolor|#1c4587 --erowbg|F1F1D4 --orowbg|#b6d7a8 --name|Enhancement (Charisma) --tokenid|@{selected|token_image} --emote|**Anáil nathrach, ortha bháis is beatha, do chéal déanaimh** &nbsp;--leftsub|**R:** T **CT:** 1 **D:** @{selected|Spell-Strength} Hour(s) **C:** VSM &nbsp;--Effect:| **@{target|token_name}'s Charisma** is increased to [[ [$Enhance] @{target|Charisma} + ?{Type|Primary, 1d4+1 |Secondary, 1d2+1 } ]] --soundfx|_audio,play,nomenu|morgana --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost&nbsp; --?? $Enhance == 1 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-4 --?? $Enhance &gt;= 2 AND $Enhance &lt;= 3 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-3&nbsp; &nbsp; --?? $Enhance &gt;= 4 AND $Enhance &lt;= 5 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-2&nbsp;&nbsp; --?? $Enhance &gt;= 6 AND $Enhance &lt;= 8 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|-1&nbsp; --?? $Enhance &gt;= 9 AND $Enhance &lt;= 12 ?? api_setattr|_name @{target|character_name} _set _CharismaMod|0 --?? $Enhance &gt;= 13 AND $Enhance &lt;= 15 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|1 --?? $Enhance &gt;= 16 AND $Enhance &lt;= 17 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|2 --?? $Enhance &gt;= 18 AND $Enhance &lt;= 19 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|3 &nbsp;--?? $Enhance &gt;= 20 AND $Enhance &lt;= 21 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|4&nbsp; --?? $Enhance &gt;= 22 AND $Enhance &lt;= 23 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|5 --?? $Enhance &gt;= 24 AND $Enhance &lt;= 25 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|6&nbsp; &nbsp;--?? $Enhance &gt;= 26 AND $Enhance &lt;= 27 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|7&nbsp;&nbsp; --?? $Enhance == 28 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|8 --?? $Enhance == 29 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|9 --?? $Enhance == 30 ?? api_setattr|_name @{target|token_name} _set _CharismaMod|10 }} Every tag in a PowerCard must be unique. In order to use the same tag more than once, you need to use the "same name" modifier as described in the Wiki here ( Script:PowerCards - Roll20 Wiki ) Essentially you need to add *1, *2, *3, etc. to the api_setattr command.
I apologize if I am posting in the wrong area - I am a newbie Pro trying to learn as much as I can. &nbsp;I am working on an 5E OGL game. I have been trying to create power cards that the players can use for skill checks. &nbsp;First, I created a generic macro, Skill-Check, and placed it in Token Actions bar for all players (they know to select their tokens before opening tabs):&nbsp; !power {{ &nbsp; --txcolor|#ffff00 &nbsp; --bgcolor|#006400 &nbsp; --titlefontshadow|#0000cc &nbsp; --corners|10 &nbsp; --orowtx|#ffff00 &nbsp; --orowbg|#000000 &nbsp; --name|@{selected|character_name}&nbsp; &nbsp; --leftsub|Uses Their &nbsp; --rightsub|Incredible Skill in &nbsp; --!Buttons|^^ ^^ [Acrobatics](~Macros|Acrobatics) [Animal Handling](~Macros|AnimalHandling) [Arcana](~Macros|Arcana) [Athletics](~Macros|Athletics) [Deception](~Macros|Deception) [History](~Macros|History) [Insight](~Macros|Insight) [Intimidation](~Macros|Intimidation) [Investigation](~Macros|Investigation) [Medicine](~Macros|Medicine) [Nature](~Macros|Nature) [Perception](~Macros|Perception) [Performance](~Cassius Van Halen|Performance) [Persuasion](~Macros|Persuasion) [Religion](~Macros|Religion) [Sleight Of Hand](~Macros|SleightOfHand) [Stealth](~Macros|Stealth) [Survival](~Macros|Survival) ^^ ^^ }} Then created the character sheet "Macros" and created an attribute for each skill (e.g.): !power {{ &nbsp; --txcolor|#ffffff &nbsp; --bgcolor|#000000 &nbsp; --erowtx|#ffffff &nbsp; --erowbg|#000000 &nbsp; --orowtx|#ffff00 &nbsp; --orowbg|#006400 &nbsp; --name|Acrobatics &nbsp; --leftsub|@{selected|character_name} Exercises&nbsp; &nbsp; --rightsub|a Skill! &nbsp; --!Skill|@{selected|character_name} rolls [[ [$Skl] ?{Skill|Standard,1d20cf&lt;1cs&gt;20|Advantage,2d20kh1cf&lt;1cs&gt;20|Disadvantage,2d20kl1cf&lt;1cs&gt;20} + @{selected|acrobatics_bonus} [Bonus] + @{selected|global_skill_mod} ]]&nbsp; }} The problem is that it works perfectly for me, but only me. &nbsp;Click Test Macro, click the Token Action tab, all fine...until a player tries to use it and gets: #Acrobatics. I have turned token IDs on for players and that has not accomplished anything. &nbsp;I hesitate to build attributes for each player individually as that is a lot of work. Any suggestions? Thanks for your patience.
1601047225
Kurt J.
Pro
API Scripter
Michael C. said: I apologize if I am posting in the wrong area - I am a newbie Pro trying to learn as much as I can. &nbsp;I am working on an 5E OGL game. I have been trying to create power cards that the players can use for skill checks. &nbsp;First, I created a generic macro, Skill-Check, and placed it in Token Actions bar for all players (they know to select their tokens before opening tabs):&nbsp; !power {{ &nbsp; --txcolor|#ffff00 &nbsp; --bgcolor|#006400 &nbsp; --titlefontshadow|#0000cc &nbsp; --corners|10 &nbsp; --orowtx|#ffff00 &nbsp; --orowbg|#000000 &nbsp; --name|@{selected|character_name}&nbsp; &nbsp; --leftsub|Uses Their &nbsp; --rightsub|Incredible Skill in &nbsp; --!Buttons|^^ ^^ [Acrobatics](~Macros|Acrobatics) [Animal Handling](~Macros|AnimalHandling) [Arcana](~Macros|Arcana) [Athletics](~Macros|Athletics) [Deception](~Macros|Deception) [History](~Macros|History) [Insight](~Macros|Insight) [Intimidation](~Macros|Intimidation) [Investigation](~Macros|Investigation) [Medicine](~Macros|Medicine) [Nature](~Macros|Nature) [Perception](~Macros|Perception) [Performance](~Cassius Van Halen|Performance) [Persuasion](~Macros|Persuasion) [Religion](~Macros|Religion) [Sleight Of Hand](~Macros|SleightOfHand) [Stealth](~Macros|Stealth) [Survival](~Macros|Survival) ^^ ^^ }} Then created the character sheet "Macros" and created an attribute for each skill (e.g.): !power {{ &nbsp; --txcolor|#ffffff &nbsp; --bgcolor|#000000 &nbsp; --erowtx|#ffffff &nbsp; --erowbg|#000000 &nbsp; --orowtx|#ffff00 &nbsp; --orowbg|#006400 &nbsp; --name|Acrobatics &nbsp; --leftsub|@{selected|character_name} Exercises&nbsp; &nbsp; --rightsub|a Skill! &nbsp; --!Skill|@{selected|character_name} rolls [[ [$Skl] ?{Skill|Standard,1d20cf&lt;1cs&gt;20|Advantage,2d20kh1cf&lt;1cs&gt;20|Disadvantage,2d20kl1cf&lt;1cs&gt;20} + @{selected|acrobatics_bonus} [Bonus] + @{selected|global_skill_mod} ]]&nbsp; }} The problem is that it works perfectly for me, but only me. &nbsp;Click Test Macro, click the Token Action tab, all fine...until a player tries to use it and gets: #Acrobatics. I have turned token IDs on for players and that has not accomplished anything. &nbsp;I hesitate to build attributes for each player individually as that is a lot of work. Any suggestions? Thanks for your patience. Did you assign the Macro character to be visible (and maybe controllable by) all? If not, they won't be able to reach the macros stored on it. As an aside, if you are interested in an alternate way to do skill checks that doesn't require a separate character sheet, below is my Skill Check macro. It just requires that a token be selected (and should work for players and for NPCs alike): !power {{ --inlinereplace|SkillName|?{Skill to Use?|Acrobatics|Animal Handling|Arcana|Athletics|Deception|History|Insight|Investigation|Medicine|Nature|Perception|Performance|Persuasion|Religion|Sleight of Hand|Stealth|Survival} --tokenid|@{selected|token_id} --name|~SkillName$ Check --format|@{selected|character_name} --emote|@{selected|character_name} attempts to use the ~SkillName$ skill --?! "~SkillName$" -eq "Acrobatics" !? Acrobatics|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|acrobatics_bonus} ]] --?! "~SkillName$" -eq "Animal Handling" !? Animal Handling|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|animal_handling_bonus} ]] --?! "~SkillName$" -eq "Arcana" !? Arcana|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|arcana_bonus} ]] --?! "~SkillName$" -eq "Athletics" !? Athletics|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|athletics_bonus} ]] --?! "~SkillName$" -eq "Deception" !? Deception|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|deception_bonus} ]] --?! "~SkillName$" -eq "History" !? History|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|history_bonus} ]] --?! "~SkillName$" -eq "Insight" !? Insight|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|insight_bonus} ]] --?! "~SkillName$" -eq "Intimidation" !? Intimidation|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|intimidation_bonus} ]] --?! "~SkillName$" -eq "Investigation" !? Investigation|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|investigation_bonus} ]] --?! "~SkillName$" -eq "Medicine" !? Medicine|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|medicine_bonus} ]] --?! "~SkillName$" -eq "Nature" !? Nature|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|nature_bonus} ]] --?! "~SkillName$" -eq "Perception" !? Perception|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|perception_bonus} ]] --?! "~SkillName$" -eq "Performance" !? Performance|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|performance_bonus} ]] --?! "~SkillName$" -eq "Persuasion" !? Persuasion|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|persuasion_bonus} ]] --?! "~SkillName$" -eq "Religion" !? Religion|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|religion_bonus} ]] --?! "~SkillName$" -eq "Sleight of Hand" !? Sleight of Hand|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|sleight_of_hand_bonus} ]] --?! "~SkillName$" -eq "Stealth" !? Stealth|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|stealth_bonus} ]] --?! "~SkillName$" -eq "Survival" !? Survival|check result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|survival_bonus} ]] }} I also have a very similar one for Saving Throws: !power {{ --inlinereplace|SkillName|?{Saving throw type?|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} --tokenid|@{selected|token_id} --name|~SkillName$ Saving Throw --format|@{selected|character_name} --emote|@{selected|character_name} attempts ~SkillName$ saving throw --?! "~SkillName$" -eq "Strength" !? Strength|save result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|strength_save_bonus} ]] --?! "~SkillName$" -eq "Dexterity" !? Dexterity|save result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|dexterity_save_bonus} ]] --?! "~SkillName$" -eq "Constitution" !? Constitution|save result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|constitution_save_bonus} ]] --?! "~SkillName$" -eq "Intelligence" !? Intelligence|save result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|intelligence_save_bonus} ]] --?! "~SkillName$" -eq "Wisdom" !? Wisdom|save result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|wisdom_save_bonus} ]] --?! "~SkillName$" -eq "Charisma" !? Charisma|save result is [[ ?{Advantage?|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|charisma_save_bonus} ]] }} I have these both marked as token actions available to all players.
1601049378

Edited 1601049473
I use this for my skills. You have to click on the token. !power {{ --whisper|@{Selected|character_name} --corners|10 --format|Conditions --titlefontshadow|none --name|@{Selected|character_name} --leftsub|@{Selected|class} --rightsub|Skills --Acrobatics|~R [Roll](! #SkillAcrobatics) ~R --Animal Handling|~R [Roll](! #SkillAnimalHandling) ~R --Arcana|~R [Roll](! #SkillArcana) ~R --Athletics|~R [Roll](! #SkillAthletics) ~R --Deception|~R [Roll](! #SkillDeception) ~R --History|~R [Roll](! #SkillHistory) ~R --Insight|~R [Roll](! #SkillInsight) ~R --Intimidation|~R [Roll](! #SkillIntimidation) ~R --Investigation|~R [Roll](! #SkillInvestigation) ~R --Medicine|~R [Roll](! #SkillMedicine) ~R --Nature|~R [Roll](! #SkillNature) ~R --Perception|~R [Roll](! #SkillPerception) ~R --Performance|~R [Roll](! #SkillPerformance) ~R --Persuasion|~R [Roll](! #SkillPersuasion) ~R --Religion|~R [Roll](! #SkillReligion) ~R --Sleight of Hand|~R [Roll](! #SkillSleightofHand) ~R --Stealth|~R [Roll](! #SkillStealth) ~R --Survival|~R [Roll](! #SkillSurvival) ~R }} Then the macros it call look like. !power {{ --emote|** @{selected|token_name} checks there skill at... ** --tokenid|@{selected|token_id} --format|Conditions --titlefontshadow|none --corners|10 --name|Athletics --leftsub|@{selected|character_name} --rightsub| Athletics Check --Bonus:|@{selected|athletics_bonus} --Roll|[[ [$Roll] ?{Advantage?| Normal, 1d20 + [[@{selected|athletics_bonus}]] [Athletics Modifier] | Advantage, 2d20KH1 + [[@{selected|athletics_bonus}]] [Athletics Modifier] | Disadvantage, 2d20KL1 + [[@{selected|athletics_bonus}]] [Athletics Modifier] } ]] --?? $Roll.base == 1 ?? !|**Fumble:** Some how you Messed up. }} Did the same for Saving throws. If you want a copy of the macros send my a PM with a email address and your request.&nbsp;
1601335139
Kurt J.
Pro
API Scripter
PCMHelper Update 1.0.10 on Development GIST Due to a bug that makes all of the Cast-L* macros show the character's first level spell (oops) I've put an update on the Development GIST for PCMHelper and will work on getting it to OneClick. This issue CAN BE FIXED &nbsp;in game without updating the API by going to the CAST-L2 thru CAST-L9 macros and modifying the following line (first line after !power{{ : --replacespell|@{selected|character_id}|?{Spell to Cast|@{selected|l1_spell_list}} and changing the attribute reference to the right attribute (l2_spell_list for level 2, l3_spell_list for level 3, etc.) Sorry about the inconvenience&nbsp;:(&nbsp;
Kurt J. &nbsp;and Craven, thanks! &nbsp;I will check out those alternatives. &nbsp;To answer Kurt's question, I did make it controllable by all but not visible. &nbsp;I will try that as well.
Im sorry if the solution is here and I just missed it, but I created a number of macros that use replacements.&nbsp; they work.. I need to make a new weapon attack.. and i go into replacements and i literally copy one of them..&nbsp; rename it.. and it fails.&nbsp; I've even copied and pasted as plain text but nothing is working!&nbsp; there seems to be no rhyme or reason to what is making this fail!&nbsp; it's a literal COPY, just with a different name!!.&nbsp; im sorry, im just super frustrated because my game is tonight..
1601402749

Edited 1601402775
I don't understand.&nbsp; I wanted to name them by their names.&nbsp; MeleeKnife and RangedKnife.&nbsp; but it fails.... as soon as i renamed them FUCKYOU1 and FUCKYOU2, they started working ... which is kinda dumb.&nbsp; &nbsp;I already have more than 2 Melee*something replacements, so i dont see how the name is screwing with it... but at least i got it to work.
Hello, I have a weird issue with one of my Big macro : some RollID doesnt show as a inline roll and just as a TXT : and i really don't understand why.... if someone has an idea.... here's the code (sorry it's a very long one so i only put the begining, but think that the code rapeat itself by 2 times more ) !power {{ --tokenid|@{selected|token_id} --target_list|@{target|Cible|token_id} --replaceattrs|T1-|@{target|Cible|character_id} --replaceattrs|ME-|@{selected|character_id} --inlinereplace|AttrMOD|~ME-MDEX$ [DEX] --inlinereplace|WeaponDMG|[[1d6]] [ARME] --inlinereplace|WeaponMOD|[[1]] [MOD] --inlinereplace|WeaponSUP|[[0]] --inlinereplace|WeaponSUPType|non --inlinereplace|WeaponSoundHit|Punch --inlinereplace|WeaponSoundMiss|Arrow Miss --hroll|[[ [$WeaponSupDice] 0d0 + 0 ]][[ [$AVA] ?{Avantage?|Normal, 0d0 + 1|Avantage, 0d0 + 2|Désavantage, 0d0 + 3} ]] --emote|**~ME-CN$** Kai Kai Kai sur ~T1-CN$ --name|Déluge de Coups --leftsub|Action + Action bonus + Ki --rightsub|Dist: Cac 1,5m --!infoArme1|**Dés de l'arme :** [! 1D6 +1 !] --?? $WeaponSupDice == 1 ?? !infoArme2|**Dés de ~WeaponSUPType$:** [! 0 !] --!infodegat|**Type de Dégats :** //Contondants et Magiques// --?? $AVA == 1 ?? !InfoAva1|**Avantage : ** //Normal// --?? $AVA == 2 ?? !InfoAva2|**Avantage : ** //Avantage// --?? $AVA == 3 ?? !InfoAva3|**Avantage : ** //Désavantage// --?? $AVA == 1 ?? !Infotxtatk1N|**Première Attaque :** --?? $AVA == 1 ?? !Infoatk1N|^* **Attaque : **[[ [$Atk1] 1d20 + ~AttrMOD$ + ~ME-PB$ [PROF] + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk1.base == 1 ?? !C*1:| $$#98111D|^* **ECHEC CRITIQUE!**$$ --?? $AVA == 1 AND $Atk1.base &gt;= 2 AND $Atk1.total &lt; ~T1-AC$ AND $Atk1.base &lt;&gt; 20 ?? !Miss1N| $$#98111D|^* **Raté!**$$ --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 ?? !degatatk1N|^* **Dégâts : **[[ [$DmgN1] 0d0 + ~WeaponDMG$ + ~AttrMOD$ + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 ?? alterbar*1|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN1] _show|all --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? !degatatk1NS|**Dégats de ~WeaponSUPType$: ** [[ [$DmgN1S] 0d0 + ~WeaponSUP$ ]] --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? alterbar*2|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN1S] _show|all --?? $AVA == 1 AND $Atk1.base == 20 ?? !degatatk1CN|$$#077034|^* **Coup critique : **$$ [[ [$CritDmgN1] 0d0 + ~WeaponDMG$ + ~WeaponDMG$ + ~WeaponMOD$ + ~AttrMOD$ ]] --?? $AVA == 1 AND $Atk1.base == 20 ?? alterbar*3|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN1] _show|all --?? $AVA == 1 AND $Atk1.base == 20 AND $WeaponSupDice == 1 ?? !degatatk1CNS| $$#077034|**Dégats Critique de ~WeaponSUPType$: **$$ [[ [$CritDmgN1S] 0d0 + ~WeaponSUP$ + ~WeaponSUP$ ]] --?? $AVA == 1 AND $Atk1.base == 20 AND $WeaponSupDice == 1 ?? alterbar*4|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN1S] _show|all --?? $AVA == 1 ?? !Infotxtatk2N|**Deuxième Attaque :** --?? $AVA == 1 ?? !Infoatk2N|^* **Attaque : **[[ [$Atk2] 1d20 + ~AttrMOD$ + ~ME-PB$ [PROF] + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk2.base == 1 ?? !C*2:| $$#98111D|^* **ECHEC CRITIQUE!**$$ --?? $AVA == 1 AND $Atk2.base &gt;= 2 AND $Atk2.total &lt; ~T1-AC$ AND $Atk2.base &lt;&gt; 20 ?? !Miss2N| $$#98111D|^* **Loupé!**$$ --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 ?? !degatatk2N|^* **Dégâts : ** [#[ [$DmgN2] 0d0 + ~WeaponDMG$ + ~AttrMOD$ + ~WeaponMOD$ ]#] --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 ?? alterbar*5|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN2] _show|all --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? !degatatk2NS|**Dégats de ~WeaponSUPType$: ** [#[ [$DmgN2S] 0d0 + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? alterbar*6|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN2S] _show|all --?? $AVA == 1 AND $Atk2.base == 20 ?? !degatatk2CN| $$#077034|^* **Coup critique : **$$ [#[ [$CritDmgN2] 0d0 + ~WeaponDMG$ + ~WeaponDMG$ + ~WeaponMOD$ + ~AttrMOD$ ]#] --?? $AVA == 1 AND $Atk2.base == 20 ?? alterbar*7|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN2] _show|all --?? $AVA == 1 AND $Atk2.base == 20 AND $WeaponSupDice == 1 ?? !degatatk2CNS| $$#077034|**Dégats Critique de ~WeaponSUPType$: **$$ [#[ [$CritDmgN2S] 0d0 + ~WeaponSUP$ + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk2.base == 20 AND $WeaponSupDice == 1 ?? alterbar*8|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN2S] _show|all --?? $AVA == 1 ?? !Infotxtatk3N|**Troisième Attaque :** --?? $AVA == 1 ?? !Infoatk3N|^* **Attaque : **[[ [$Atk3] 1d20 + ~AttrMOD$ + ~ME-PB$ [PROF] + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk3.base == 1 ?? !C*3:| $$#98111D|^* **ECHEC CRITIQUE!**$$ --?? $AVA == 1 AND $Atk3.base &gt;= 2 AND $Atk3.total &lt; ~T1-AC$ AND $Atk3.base &lt;&gt; 20 ?? !Miss3N| $$#98111D|^* **Manqué!**$$ --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 ?? !degatatk3N|^* **Dégâts : **[#[ [$DmgN3] 0d0 + ~WeaponDMG$ + ~AttrMOD$ + ~WeaponMOD$]#] --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 ?? alterbar*9|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN3] _show|all --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? !degatatk3NS|**Dégats de ~WeaponSUPType$: ** [#[ [$DmgN3S] 0d0 + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? alterbar*10|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN3S] _show|all --?? $AVA == 1 AND $Atk3.base == 20 ?? !degatatk3CN| $$#077034|^* **Coup critique : **$$ [#[ [$CritDmgN3] 0d0 + ~WeaponDMG$ + ~WeaponDMG$ + ~WeaponMOD$ + ~AttrMOD$ ]#] --?? $AVA == 1 AND $Atk3.base == 20 ?? alterbar*11|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN3] _show|all --?? $AVA == 1 AND $Atk3.base == 20 AND $WeaponSupDice == 1 ?? !degatatk3CNS| $$#077034|**Dégats Critique de ~WeaponSUPType$: **$$ [#[ [$CritDmgN3S] 0d0 + ~WeaponSUP$ + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk3.base == 20 AND $WeaponSupDice == 1 ?? alterbar*12|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN3S] _show|all --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ OR $Atk2.total &gt;= ~T1-AC$ OR $Atk3.total &gt;= ~T1-AC$ ?? soundfx|_audio,play,nomenu|~WeaponSoundHit$ --?? $AVA == 1 AND $Atk1.base == 20 OR $Atk2.base == 20 OR $Atk3.base == 20 ?? soundfx|_audio,play,nomenu|Ooowa --?? $AVA == 1 AND $Atk1.base == 1 OR $Atk2.base == 1 OR $Atk3.base == 1 ?? soundfx|_audio,play,nomenu|Fumble
Just to be clear, This behavior is totally random......... Sometimes the Roll appears as an inline roll, sometimes not.... Is there a limitation of the number of an inline roll inside a macro ?
Hello First day using API Scripts so apologies if this is a simple question. I'm using 5e OGL Companion, PowerCards and PCM Helper. I have advantage toggle set for all characters. One character has Radiant Soul which applies a global damage modfier based on their current level. I have this setup on the sheet with a roll of @{level}&nbsp; When I trigger an attack using PCAttack macro, i get the error in chat PowerCards: "Could not determine result type of: [{\"type\":\"L\",\"text\":\"$GDmg\"},{\"type\":\"M\",\"expr\":0}]" and in console Could not determine result type of: [{"type":"L","text":"$GDmg"},{"type":"M","expr":0}] undefined If I combine with another global damage modfier it works fine Any help would be greatly appreciated
1602413217

Edited 1602413347
I have a question about Powercard: Is it possible to make a macro for Area of Effects spells that the number of enemies affected are different everytime? (ex. Faerie Fire, Slow etc.) And by that, I mean a automated macro that do everything for you, Run checks, check Roll against AC, reduce target HP, Place debuff markers etc. I know creating an automate Powercard macro like this for a single target is easy enough, but the part I'm not sure about is the multiple target I think if you refer to the target using calls like @{target|token_id} Powercard will only recognize the first target selected. Is there anyway to substitute the call with the right amount of targets you want to target at the time? (@{target|target1|token_id},{@target|target2|token_id} and so on...) I'm still theorycrafting on this, so I don't have any macro to be pick apart here as of yet, but If anyone know about the possibilities of this, please let me know.
1602417664
Kurt J.
Pro
API Scripter
James S. said: Hello First day using API Scripts so apologies if this is a simple question. I'm using 5e OGL Companion, PowerCards and PCM Helper. I have advantage toggle set for all characters. One character has Radiant Soul which applies a global damage modfier based on their current level. I have this setup on the sheet with a roll of @{level}&nbsp; When I trigger an attack using PCAttack macro, i get the error in chat PowerCards: "Could not determine result type of: [{\"type\":\"L\",\"text\":\"$GDmg\"},{\"type\":\"M\",\"expr\":0}]" and in console Could not determine result type of: [{"type":"L","text":"$GDmg"},{"type":"M","expr":0}] undefined If I combine with another global damage modfier it works fine Any help would be greatly appreciated Just a guess, but you might try replacing the 1 in the global mod with 1d1. That will make Roll20 interpret it as a dice roll, but still always be 1.
Thanks Kurt, I tried a few workarounds using 0d0 or 1d1 + @{level} -1 but they all fail the same.&nbsp; The workaround that I have is to create another Global Damage Modifier that is always on and is set to 0d0.&nbsp; Not ideal but makes it work. Kurt J. said: James S. said: Hello First day using API Scripts so apologies if this is a simple question. I'm using 5e OGL Companion, PowerCards and PCM Helper. I have advantage toggle set for all characters. One character has Radiant Soul which applies a global damage modfier based on their current level. I have this setup on the sheet with a roll of @{level}&nbsp; When I trigger an attack using PCAttack macro, i get the error in chat PowerCards: "Could not determine result type of: [{\"type\":\"L\",\"text\":\"$GDmg\"},{\"type\":\"M\",\"expr\":0}]" and in console Could not determine result type of: [{"type":"L","text":"$GDmg"},{"type":"M","expr":0}] undefined If I combine with another global damage modfier it works fine Any help would be greatly appreciated Just a guess, but you might try replacing the 1 in the global mod with 1d1. That will make Roll20 interpret it as a dice roll, but still always be 1.
I am looking for a little help with a powercard I have created.&nbsp; This is for a 5e Custom Class build. There is 2 stages to the attack.&nbsp; Passing a DC15 leap. Passed: Attack with advantage and can move up to 20 feet.&nbsp; If I use the 2d20kh1 to roll the advantage, the attack even when beating the opponent AC produces the failed attack output. If I change it to roll 1d20 instead, it works no problems. Failed: Seems to work no problems. !power {{ --emote|@{selected|token_name} leaps and strikes at his opponent. --tokenid|@{selected|token_id} --format|atwill --name|Death from Above &nbsp; --Leap Roll| You roll [[ [$leap] 1d20 + @{selected|acrobatics_bonus} ]] vs DC15 &nbsp; --?? $leap.total &gt;= 15 ?? skipto*1|Success &nbsp; --:Trip| &nbsp; --Trip|Aramis failed his leap. &nbsp; --Attack|You roll [[ [$atk] 1d20 + @{selected|dexterity_mod} + @{selected|pb} ]] vs AC [! @{target|ac} !] &nbsp; --?? $atk.base == 20 ?? skipto*2|Critical &nbsp; --?? $atk.total &gt;= @{target|ac} ?? skipto*3|Hit &nbsp; --:AttackMiss| &nbsp; --AttackMiss|Aramis failed leap alerts his opponent, and he misses his attack. &nbsp; --skipto*4|EndofCard &nbsp; --:Hit| &nbsp; --Hit|You have successfully hit the target for [[ 1d6 + @{selected|dexterity_bonus} ]] piercing and [[ 2d6 ]] fire damage. &nbsp; --skipto*5|EndOfCard &nbsp; --:Critical| &nbsp; --Critcal|Despite failing to leap, Aramis has critically hit the opponent for [[ 2d6 + @{selected|dexterity_bonus} ] piercing and [[ 4d6 ]] fire damage. &nbsp; --skipto*6|EndOfCard &nbsp; --:Success| &nbsp; --Success|Aramis has leaped over his opponent, granting an opportunity to attack above their defences. &nbsp; --Strike|He strikes for [[ [$atk2] 2d20kh1 + @{selected|dexterity_mod} + @{selected|pb} ]] vs AC [! @{target|ac} !] &nbsp; --?? $atk2.base == 20 ?? skipto*7|Death &nbsp; --?? $atk2.total &gt;= @{target|ac} ?? skipto*8|Damage &nbsp; --:Jump| &nbsp; --Jump|Despite a great leap, Aramis has missed his attack. &nbsp; --Hop|Aramis can move up to 20 feet through the air, without generating attacks of opportunity. &nbsp; --skipto*9|EndOfCard &nbsp; --:Damage| &nbsp; --Damage|Aramis successfully attacks, as he leaps for [[ 1d6 + @{selected|dexterity_bonus} + 3d6 ]] piercing and [[ 2d6 ]] fire damage. &nbsp; --Hop|Aramis can move up to 20 feet through the air, without generating attacks of opportunity. &nbsp; --skipto*10|EndOfCard &nbsp; --:Death| &nbsp; --Death|Aramis has gotten a clean hit through the opponents guard as he leaps for [[ 2d6 + @{selected|dexterity_bonus} + 6d6 ]] piercing and [[ 4d6 ]] fire damage. &nbsp; --Hop|Aramis can move up to 20 feet through the air, without generating attacks of opportunity. &nbsp;&nbsp; &nbsp; --:EndOfCard| }}
2d20kh1 I think should be {2d20}kh1
Thanks Bilbo, that appears to have fixed the issue of the lines.&nbsp; The only thing now, is it is still not correctly translating the attack.
Not seeing the yellow box around the 24 ... so it looks like it is not processing it as an inline roll. To run the conditionals. [[ [$atk2] {2d20}kh1 + (@{selected|dexterity_mod}) + (@{selected|pb}) ]]
Hi everybody, I'm currently trying to run a power card marco. Here is the macro : &nbsp;&amp;#13;!power {{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @{whispertoggle} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --name|Attaque de tir &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --leftsub|@{genre} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --rightsub|@{wpntype} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --hroll|[[ [$dist] [NH] 1d0 +?{Modificateur pour distance de tir?|Moyenne et - (15m et -),1|Longue et - (30m et -),2|Très longue (30-70m),3|Extrême (70m et +),4}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? @{genre} == Plasma ?? $rollplasma|[[ [$plasmabrule] [NH] 1D10]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $plasmabrule == 1 AND @{genre} == Plasma ?? Brûlure:|$$#ff0000|**Arme inutilisable pendant trois rondes!**$$&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --soundfx|_audio,play,nomenu|@{bruittir} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 1 ?? a|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 0 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 2 ?? b|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 1 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 3 ?? c|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 2 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 4 ?? d|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 3 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 1 ?? Distance :|Moyenne et moins (15m et -) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 2 ?? Distance :|Longue (30m et -) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 3 ?? Distance :|Très longue (30-70m) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 4 ?? Distance :|Extrême (70m et +) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &lt; 0 AND $dist.total &gt;= 0 ?? Marge d'échec :|[^MS], Tir raté &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND $dist.total &gt;= 0?? Marge de succès :|[^MS], Tir réussi &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} &lt;&gt; Pompe ?? Niveau de blessure :|[[ [$DMG] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 1 ?? Niveau de blessure :|[[ [$DMGp1] [NH] {0d0 + @{INJ} +&nbsp; floor(@{INJ}/3) - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 2 ?? Niveau de blessure :|[[ [$DMGp2] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 3 ?? Niveau de blessure :|[[ [$DMGp3] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 4 ?? Niveau de blessure :|[[ [$DMGp4] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 1 AND $DMG &lt;= 5 AND $MS &gt;= 0 ?? !*6|Dommage Mineur &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 6 AND $DMG &lt;= 10 AND $MS &gt;= 0 ?? !*7|Dommage Moyen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 11 AND $DMG &lt;= 15 AND $MS &gt;= 0 ?? !*8|Dommage Majeur &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 16 AND $MS &gt;= 0 ?? !|Dommage Critique }} I get this result : &nbsp;or this&nbsp; But normally, the number circled in red should be the same.&nbsp; I think that my macro is processing all the&nbsp; |[[ [$MS]] in the formula. Any idea how I can stop this or fix my macro? Thanks a lot :)
1602545531

Edited 1602545646
Kurt J.
Pro
API Scripter
Alec U. said: I am looking for a little help with a powercard I have created.&nbsp; This is for a 5e Custom Class build. There is 2 stages to the attack.&nbsp; Passing a DC15 leap. Passed: Attack with advantage and can move up to 20 feet.&nbsp; If I use the 2d20kh1 to roll the advantage, the attack even when beating the opponent AC produces the failed attack output. If I change it to roll 1d20 instead, it works no problems. (actual card removed for clarity) Actually, I think your original card is Ok except for one single issue: The "Critical" line is missing the closing ]] from the inline roll: &nbsp; --Critcal|Despite failing to leap, Aramis has critically hit the opponent for [[ 2d6 + @{selected|dexterity_bonus} ] piercing and [[ 4d6 ]] fire damage. This is missing the second ] after the dexterity bonus... right about ----------------------------------------------------------------------^ here (assuming that spacing works :) If I change ] to ]], everything seems to work fine: &nbsp; --Critcal|Despite failing to leap, Aramis has critically hit the opponent for [[ 2d6 + @{selected|dexterity_bonus} ] ] piercing and [[ 4d6 ]] fire damage. There is no need to include the {} around the 2d20, etc. The problem is the chat server is getting confused about what is an inline roll and potentially nested inline rolls. Here is what I have as the final code: !power {{ --emote|@{selected|token_name} leaps and strikes at his opponent. --tokenid|@{selected|token_id} --format|atwill --name|Death from Above --Leap Roll| You roll [[ [$leap] 1d20 + @{selected|acrobatics_bonus} ]] vs DC15 --?? $leap.total &gt;= 15 ?? skipto*1|Success --:Trip| --Trip|Aramis failed his leap. --Attack|You roll [[ [$atk] 1d20 + @{selected|dexterity_mod} + @{selected|pb} ]] vs AC [! @{target|ac} !] --?? $atk.base == 20 ?? skipto*2|Critical --?? $atk.total &gt;= @{target|ac} ?? skipto*3|Hit --:AttackMiss| --AttackMiss|Aramis failed leap alerts his opponent, and he misses his attack. --skipto*4|EndofCard --:Hit| --Hit|You have successfully hit the target for [[ 1d6 + @{selected|dexterity_bonus} ]] piercing and [[ 2d6 ]] fire damage. --skipto*5|EndOfCard --:Critical| --Critcal|Despite failing to leap, Aramis has critically hit the opponent for [[ 2d6 + @{selected|dexterity_bonus} ] piercing and [[ 4d6 ]] fire damage. --skipto*6|EndOfCard --:Success| --Success|Aramis has leaped over his opponent, granting an opportunity to attack above their defences. --Strike|He strikes for [[ [$atk2] 2d20kh1 + @{selected|dexterity_mod} + @{selected|pb} ]] vs AC [! @{target|ac} !] --?? $atk2.base == 20 ?? skipto*7|Death --?? $atk2.total &gt;= @{target|ac} ?? skipto*8|Damage --:Jump| --Jump|Despite a great leap, Aramis has missed his attack. --Hop|Aramis can move up to 20 feet through the air, without generating attacks of opportunity. --skipto*9|EndOfCard --:Damage| --Damage|Aramis successfully attacks, as he leaps for [[ 1d6 + @{selected|dexterity_bonus} + 3d6 ]] piercing and [[ 2d6 ]] fire damage. --Hop|Aramis can move up to 20 feet through the air, without generating attacks of opportunity. --skipto*10|EndOfCard --:Death| --Death|Aramis has gotten a clean hit through the opponents guard as he leaps for [[ 2d6 + @{selected|dexterity_bonus} + 6d6 ]] piercing and [[ 4d6 ]] fire damage. --Hop|Aramis can move up to 20 feet through the air, without generating attacks of opportunity. --:EndOfCard| }}
1602546534
Kurt J.
Pro
API Scripter
G said: Hi everybody, I'm currently trying to run a power card marco. Here is the macro : &nbsp;&amp;#13;!power {{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @{whispertoggle} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --name|Attaque de tir &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --leftsub|@{genre} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --rightsub|@{wpntype} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --hroll|[[ [$dist] [NH] 1d0 +?{Modificateur pour distance de tir?|Moyenne et - (15m et -),1|Longue et - (30m et -),2|Très longue (30-70m),3|Extrême (70m et +),4}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? @{genre} == Plasma ?? $rollplasma|[[ [$plasmabrule] [NH] 1D10]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $plasmabrule == 1 AND @{genre} == Plasma ?? Brûlure:|$$#ff0000|**Arme inutilisable pendant trois rondes!**$$&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --soundfx|_audio,play,nomenu|@{bruittir} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 1 ?? a|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 0 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 2 ?? b|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 1 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 3 ?? c|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 2 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 4 ?? d|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 3 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 1 ?? Distance :|Moyenne et moins (15m et -) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 2 ?? Distance :|Longue (30m et -) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 3 ?? Distance :|Très longue (30-70m) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 4 ?? Distance :|Extrême (70m et +) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &lt; 0 AND $dist.total &gt;= 0 ?? Marge d'échec :|[^MS], Tir raté &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND $dist.total &gt;= 0?? Marge de succès :|[^MS], Tir réussi &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} &lt;&gt; Pompe ?? Niveau de blessure :|[[ [$DMG] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 1 ?? Niveau de blessure :|[[ [$DMGp1] [NH] {0d0 + @{INJ} +&nbsp; floor(@{INJ}/3) - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 2 ?? Niveau de blessure :|[[ [$DMGp2] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 3 ?? Niveau de blessure :|[[ [$DMGp3] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $MS.total &gt;= 0 AND @{genre} == Pompe AND $dist == 4 ?? Niveau de blessure :|[[ [$DMGp4] [NH] {0d0 + @{INJ} - @{target|combined_personal_defense},1d1}kh1 ]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 1 AND $DMG &lt;= 5 AND $MS &gt;= 0 ?? !*6|Dommage Mineur &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 6 AND $DMG &lt;= 10 AND $MS &gt;= 0 ?? !*7|Dommage Moyen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 11 AND $DMG &lt;= 15 AND $MS &gt;= 0 ?? !*8|Dommage Majeur &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $DMG &gt;= 16 AND $MS &gt;= 0 ?? !|Dommage Critique }} I get this result : &nbsp;or this&nbsp; But normally, the number circled in red should be the same.&nbsp; I think that my macro is processing all the&nbsp; |[[ [$MS]] in the formula. Any idea how I can stop this or fix my macro? Thanks a lot :) Your images didn't come through, so I can't see what you are referring to, but I can say that the issue is likely with the multiple rolls for [$MS]: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 1 ?? a|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 0 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 2 ?? b|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 1 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 3 ?? c|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 2 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? $dist.total == 4 ?? d|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - 3 + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] These will all do their dice rolls and assign the last one ($dist.total == 4) to $MS no matter what the value of $dist.total is. This is because ALL &nbsp;inline rolls and RollID assignments in a card happen before the lines of the card are processed, so when the output is generated, $MS will have the value generated for the last line that assigned it. That said, if I am reading your card right, you don't actually need to roll for $dist. When you issue the roll query, ?{Modificateur pour distance de tir?} will have a value of 1, 2, 3, or 4 in it, and the difference in each of the $MS rolls is that you want to subtract that value minus one from the roll. You can do this with a single line without the $dist roll: --MSRoll|[[ [$MS] [NH] 4df + @{rolelvlwpn} + @{qualitetir} - ?{Modificateur pour distance de tir?|Moyenne et - (15m et -),0|Longue et - (30m et -),1|Très longue (30-70m),2|Extrême (70m et +),3} + ?{Modificateur pour toucher la cible?|0|-4|-3|-2|-1|+1|+2|+3|+4} - 1 - @{target|esquivetotale}]] You could replace the lines that output the distance (which will also always only show the last one because they have the same tag name) with: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? ?{Modificateur pour distance de tir?} == 0 ?? Distance *1:|Moyenne et moins (15m et -) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? ?{Modificateur pour distance de tir?} == 1 ?? Distance *2 :|Longue (30m et -) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? ?{Modificateur pour distance de tir?} == 2 ?? Distance *3 :|Très longue (30-70m) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --?? ?{Modificateur pour distance de tir?} == 3 ?? Distance *4 :|Extrême (70m et +) The *1, *2, *3, and *4 make the tags unique and won't show on the card. After the first use of a Roll Query (?{...}) you only need the prompt part to use the same value throughout the card, hence the shortening of the ?{Modificateur...} code.
1602547039
Kurt J.
Pro
API Scripter
GruntK said: Hello, I have a weird issue with one of my Big macro : some RollID doesnt show as a inline roll and just as a TXT : and i really don't understand why.... if someone has an idea.... here's the code (sorry it's a very long one so i only put the begining, but think that the code rapeat itself by 2 times more ) !power {{ --tokenid|@{selected|token_id} --target_list|@{target|Cible|token_id} --replaceattrs|T1-|@{target|Cible|character_id} --replaceattrs|ME-|@{selected|character_id} --inlinereplace|AttrMOD|~ME-MDEX$ [DEX] --inlinereplace|WeaponDMG|[[1d6]] [ARME] --inlinereplace|WeaponMOD|[[1]] [MOD] --inlinereplace|WeaponSUP|[[0]] --inlinereplace|WeaponSUPType|non --inlinereplace|WeaponSoundHit|Punch --inlinereplace|WeaponSoundMiss|Arrow Miss --hroll|[[ [$WeaponSupDice] 0d0 + 0 ]][[ [$AVA] ?{Avantage?|Normal, 0d0 + 1|Avantage, 0d0 + 2|Désavantage, 0d0 + 3} ]] --emote|**~ME-CN$** Kai Kai Kai sur ~T1-CN$ --name|Déluge de Coups --leftsub|Action + Action bonus + Ki --rightsub|Dist: Cac 1,5m --!infoArme1|**Dés de l'arme :** [! 1D6 +1 !] --?? $WeaponSupDice == 1 ?? !infoArme2|**Dés de ~WeaponSUPType$:** [! 0 !] --!infodegat|**Type de Dégats :** //Contondants et Magiques// --?? $AVA == 1 ?? !InfoAva1|**Avantage : ** //Normal// --?? $AVA == 2 ?? !InfoAva2|**Avantage : ** //Avantage// --?? $AVA == 3 ?? !InfoAva3|**Avantage : ** //Désavantage// --?? $AVA == 1 ?? !Infotxtatk1N|**Première Attaque :** --?? $AVA == 1 ?? !Infoatk1N|^* **Attaque : **[[ [$Atk1] 1d20 + ~AttrMOD$ + ~ME-PB$ [PROF] + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk1.base == 1 ?? !C*1:| $$#98111D|^* **ECHEC CRITIQUE!**$$ --?? $AVA == 1 AND $Atk1.base &gt;= 2 AND $Atk1.total &lt; ~T1-AC$ AND $Atk1.base &lt;&gt; 20 ?? !Miss1N| $$#98111D|^* **Raté!**$$ --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 ?? !degatatk1N|^* **Dégâts : **[[ [$DmgN1] 0d0 + ~WeaponDMG$ + ~AttrMOD$ + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 ?? alterbar*1|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN1] _show|all --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? !degatatk1NS|**Dégats de ~WeaponSUPType$: ** [[ [$DmgN1S] 0d0 + ~WeaponSUP$ ]] --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ AND $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? alterbar*2|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN1S] _show|all --?? $AVA == 1 AND $Atk1.base == 20 ?? !degatatk1CN|$$#077034|^* **Coup critique : **$$ [[ [$CritDmgN1] 0d0 + ~WeaponDMG$ + ~WeaponDMG$ + ~WeaponMOD$ + ~AttrMOD$ ]] --?? $AVA == 1 AND $Atk1.base == 20 ?? alterbar*3|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN1] _show|all --?? $AVA == 1 AND $Atk1.base == 20 AND $WeaponSupDice == 1 ?? !degatatk1CNS| $$#077034|**Dégats Critique de ~WeaponSUPType$: **$$ [[ [$CritDmgN1S] 0d0 + ~WeaponSUP$ + ~WeaponSUP$ ]] --?? $AVA == 1 AND $Atk1.base == 20 AND $WeaponSupDice == 1 ?? alterbar*4|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN1S] _show|all --?? $AVA == 1 ?? !Infotxtatk2N|**Deuxième Attaque :** --?? $AVA == 1 ?? !Infoatk2N|^* **Attaque : **[[ [$Atk2] 1d20 + ~AttrMOD$ + ~ME-PB$ [PROF] + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk2.base == 1 ?? !C*2:| $$#98111D|^* **ECHEC CRITIQUE!**$$ --?? $AVA == 1 AND $Atk2.base &gt;= 2 AND $Atk2.total &lt; ~T1-AC$ AND $Atk2.base &lt;&gt; 20 ?? !Miss2N| $$#98111D|^* **Loupé!**$$ --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 ?? !degatatk2N|^* **Dégâts : ** [#[ [$DmgN2] 0d0 + ~WeaponDMG$ + ~AttrMOD$ + ~WeaponMOD$ ]#] --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 ?? alterbar*5|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN2] _show|all --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? !degatatk2NS|**Dégats de ~WeaponSUPType$: ** [#[ [$DmgN2S] 0d0 + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk2.total &gt;= ~T1-AC$ AND $Atk2.base &lt;&gt; 20 AND $Atk2.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? alterbar*6|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN2S] _show|all --?? $AVA == 1 AND $Atk2.base == 20 ?? !degatatk2CN| $$#077034|^* **Coup critique : **$$ [#[ [$CritDmgN2] 0d0 + ~WeaponDMG$ + ~WeaponDMG$ + ~WeaponMOD$ + ~AttrMOD$ ]#] --?? $AVA == 1 AND $Atk2.base == 20 ?? alterbar*7|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN2] _show|all --?? $AVA == 1 AND $Atk2.base == 20 AND $WeaponSupDice == 1 ?? !degatatk2CNS| $$#077034|**Dégats Critique de ~WeaponSUPType$: **$$ [#[ [$CritDmgN2S] 0d0 + ~WeaponSUP$ + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk2.base == 20 AND $WeaponSupDice == 1 ?? alterbar*8|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN2S] _show|all --?? $AVA == 1 ?? !Infotxtatk3N|**Troisième Attaque :** --?? $AVA == 1 ?? !Infoatk3N|^* **Attaque : **[[ [$Atk3] 1d20 + ~AttrMOD$ + ~ME-PB$ [PROF] + ~WeaponMOD$ ]] --?? $AVA == 1 AND $Atk3.base == 1 ?? !C*3:| $$#98111D|^* **ECHEC CRITIQUE!**$$ --?? $AVA == 1 AND $Atk3.base &gt;= 2 AND $Atk3.total &lt; ~T1-AC$ AND $Atk3.base &lt;&gt; 20 ?? !Miss3N| $$#98111D|^* **Manqué!**$$ --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 ?? !degatatk3N|^* **Dégâts : **[#[ [$DmgN3] 0d0 + ~WeaponDMG$ + ~AttrMOD$ + ~WeaponMOD$]#] --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 ?? alterbar*9|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN3] _show|all --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? !degatatk3NS|**Dégats de ~WeaponSUPType$: ** [#[ [$DmgN3S] 0d0 + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk3.total &gt;= ~T1-AC$ AND $Atk3.base &lt;&gt; 20 AND $Atk3.base &lt;&gt; 1 AND $WeaponSupDice == 1 ?? alterbar*10|_target|@{target|Cible|token_id} _bar|1 _amount|-[^DmgN3S] _show|all --?? $AVA == 1 AND $Atk3.base == 20 ?? !degatatk3CN| $$#077034|^* **Coup critique : **$$ [#[ [$CritDmgN3] 0d0 + ~WeaponDMG$ + ~WeaponDMG$ + ~WeaponMOD$ + ~AttrMOD$ ]#] --?? $AVA == 1 AND $Atk3.base == 20 ?? alterbar*11|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN3] _show|all --?? $AVA == 1 AND $Atk3.base == 20 AND $WeaponSupDice == 1 ?? !degatatk3CNS| $$#077034|**Dégats Critique de ~WeaponSUPType$: **$$ [#[ [$CritDmgN3S] 0d0 + ~WeaponSUP$ + ~WeaponSUP$ ]#] --?? $AVA == 1 AND $Atk3.base == 20 AND $WeaponSupDice == 1 ?? alterbar*12|_target|@{target|Cible|token_id} _bar|1 _amount|-[^CritDmgN3S] _show|all --?? $AVA == 1 AND $Atk1.total &gt;= ~T1-AC$ OR $Atk2.total &gt;= ~T1-AC$ OR $Atk3.total &gt;= ~T1-AC$ ?? soundfx|_audio,play,nomenu|~WeaponSoundHit$ --?? $AVA == 1 AND $Atk1.base == 20 OR $Atk2.base == 20 OR $Atk3.base == 20 ?? soundfx|_audio,play,nomenu|Ooowa --?? $AVA == 1 AND $Atk1.base == 1 OR $Atk2.base == 1 OR $Atk3.base == 1 ?? soundfx|_audio,play,nomenu|Fumble I can't say for sure, but I think it is possible that the system is getting confused with nested inline rolls. These three lines: --inlinereplace|WeaponDMG|[[1d6]] [ARME] --inlinereplace|WeaponMOD|[[1]] [MOD] --inlinereplace|WeaponSUP|[[0]] shouldn't need the [[ and ]] around the roll values if they are always used inside an line roll, and could be done like this: --inlinereplace|WeaponDMG|1d6 [ARME] --inlinereplace|WeaponMOD|1 [MOD] --inlinereplace|WeaponSUP|0 Which might eliminate some potential for confusion.