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)

1602551915

Edited 1602556538
-G-
Pro
Edited my last post cause I figured out a solution. The *1, *2,... partially solve my problem. Thanks a lot!&nbsp; I've also wanted to keep the "distance" part cause some wepaon needed it for damage variation (shotgun and meltagun). For those interested, here's the working code :&nbsp;<a href="https://bit.ly/33PLV0m" rel="nofollow">https://bit.ly/33PLV0m</a>
Kurt J. said: 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| }} Fantastic, thank you!&nbsp; Sometimes it is just that extra pair of eyes to spot the missing item.
Is there a way to format any type of link to not show that gigantic pink button, operating the way a normal link would (underlines when hovered on, is a different color than standard text, etc).&nbsp; I'm not talking about handouts and such, but also macros in 'inner-system' operations triggered by link? Especially when using the lists, such as spell and attack lists ( --spell_slots|@{selected|character_id} &amp;&nbsp; --spell_list|@{selected|character_id} ), to avoid them being so huge.
Hi, I am consistently receiving this error when trying to use a spell from any level but level 0. I saw someone else was having the same issue but did not get an answer. I have the latest versions of power cards and the macro helper. I deleted everything and reinstalled everything and it's still not working. I am using the macro with NPCs from the compendium, but even when I turn them back into PCs, it is not working. I also made sure that I was with advantage toggle. Any idea why this is happening?
My previous image did not come through, but it is the same problem as Oliver here. Oliver H. said: 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:&nbsp; 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.
Whilst trying to create a macro for multiple targetting, I've hit a nail. Here is the current macro : !power {{&nbsp; &nbsp;--target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} | @{target|7th|token_id} | @{target|8th|token_id} | @{target|9th|token_id}&nbsp; &nbsp; --Attack#?{Number of Targets|1} --Agilité *1|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-2 _show|GM --?? $Agi.base &lt; 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-20 _show|GM --Agilité *2|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *2|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *4|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *5|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *6|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *7|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *8|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *9|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM }} I'm currently having two problems : 1) I must click on 9 targets. I then write down how many targets are actually hit by the effet. The thing is, even if I specify a number, it always register 9 hits. If I finished clicking on a specific character after 4 targets, this character will be affected 5 more times. How can I fix this? 2)The first parameter, which cause either 2 or 20 damage was there as a test. Sometimes, while testing, even if the result was 0, it still cause 20 damage. Any idea why?
1602749285
Kurt J.
Pro
API Scripter
G said: Whilst trying to create a macro for multiple targetting, I've hit a nail. Here is the current macro : !power {{&nbsp; &nbsp;--target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} | @{target|7th|token_id} | @{target|8th|token_id} | @{target|9th|token_id}&nbsp; &nbsp; --Attack#?{Number of Targets|1} --Agilité *1|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-2 _show|GM --?? $Agi.base &lt; 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-20 _show|GM --Agilité *2|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *2|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *4|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *5|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *6|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *7|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *8|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *9|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM }} I'm currently having two problems : 1) I must click on 9 targets. I then write down how many targets are actually hit by the effet. The thing is, even if I specify a number, it always register 9 hits. If I finished clicking on a specific character after 4 targets, this character will be affected 5 more times. How can I fix this? 2)The first parameter, which cause either 2 or 20 damage was there as a test. Sometimes, while testing, even if the result was 0, it still cause 20 damage. Any idea why? There really isn't going to be a good way to do this, because PowerCards was never designed to be used this way. The numeric issue you are running into is likely because $Agi will only ever have one value (the last one rolled) because you can't re-use RollIDs. Specifying 9 targets is because you have a @{target|1st} thru 9th in the card - this is processed by the Chat server (PowerCards just gets a string of numbers). You might be able to check the token IDs after each target to see if it is the same as the previous target and skip to the end of the card if so, but you will still have to pick 9 targets because that isn't related to the API script.
1602794799

Edited 1603309040
Kurt J. said: G said: Whilst trying to create a macro for multiple targetting, I've hit a nail. Here is the current macro : !power {{&nbsp; &nbsp;--target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} | @{target|7th|token_id} | @{target|8th|token_id} | @{target|9th|token_id}&nbsp; &nbsp; --Attack#?{Number of Targets|1} --Agilité *1|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-2 _show|GM --?? $Agi.base &lt; 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-20 _show|GM --Agilité *2|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *2|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *4|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *5|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *6|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *7|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *8|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --Agilité *9|^^[[ [$Agi] [NH] 4df]] pour %%token_name%% --?? $Agi.base &gt;= 0 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi.base &lt; 0 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM }} I'm currently having two problems : 1) I must click on 9 targets. I then write down how many targets are actually hit by the effet. The thing is, even if I specify a number, it always register 9 hits. If I finished clicking on a specific character after 4 targets, this character will be affected 5 more times. How can I fix this? 2)The first parameter, which cause either 2 or 20 damage was there as a test. Sometimes, while testing, even if the result was 0, it still cause 20 damage. Any idea why? There really isn't going to be a good way to do this, because PowerCards was never designed to be used this way. The numeric issue you are running into is likely because $Agi will only ever have one value (the last one rolled) because you can't re-use RollIDs. Specifying 9 targets is because you have a @{target|1st} thru 9th in the card - this is processed by the Chat server (PowerCards just gets a string of numbers). You might be able to check the token IDs after each target to see if it is the same as the previous target and skip to the end of the card if so, but you will still have to pick 9 targets because that isn't related to the API script. The way that I've gone around this is to add a drop down query for the number of targets and then use additional conditionals based on that number.&nbsp; So for your card it may look something like:&nbsp; !power {{ --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} | @{target|7th|token_id} | @{target|8th|token_id} | @{target|9th|token_id} --hroll|[[ [$Target] 0d0 + ?{Number of Targets|1} ]] --Attack#?{Number of Targets} --Agilité *1|^^[[ [$Agi1] [NH] 4df]] pour %%token_name%% --?? $Agi1.base &gt;= 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-2 _show|GM --?? $Agi1.base &lt; 0 ?? alterbar1|_target|@{target|1st|token_id} _bar|3 _amount|-20 _show|GM --?? $Target &gt; 1 ??Agilité *2|^^[[ [$Agi2] [NH] 4df]] pour %%token_name%% --?? $Agi2.base &gt;= 0 AND $Target &gt; 1 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi2.base &lt; 0 AND $Target &gt; 1 ?? alterbar2|_target|@{target|2nd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 2 ??Agilité *3|^^[[ [$Agi3] [NH] 4df]] pour %%token_name%% --?? $Agi3.base &gt;= 0 AND $Target &gt; 2 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi3.base &lt; 0 AND $Target &gt; 2 ?? alterbar3|_target|@{target|3rd|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 3 ??Agilité *4|^^[[ [$Agi4] [NH] 4df]] pour %%token_name%% --?? $Agi4.base &gt;= 0 AND $Target &gt; 3 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi4.base &lt; 0 AND $Target &gt; 3 ?? alterbar4|_target|@{target|4th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 4 ??Agilité *5|^^[[ [$Agi5] [NH] 4df]] pour %%token_name%% --?? $Agi5.base &gt;= 0 AND $Target &gt; 4 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi5.base &lt; 0 AND $Target &gt; 4 ?? alterbar5|_target|@{target|5th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 5 ??Agilité *6|^^[[ [$Agi6] [NH] 4df]] pour %%token_name%% --?? $Agi6.base &gt;= 0 AND $Target &gt; 5 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi6.base &lt; 0 AND $Target &gt; 5 ?? alterbar6|_target|@{target|6th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 6 ??Agilité *7|^^[[ [$Agi7] [NH] 4df]] pour %%token_name%% --?? $Agi7.base &gt;= 0 AND $Target &gt; 6 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi7.base &lt; 0 AND $Target &gt; 6 ?? alterbar7|_target|@{target|7th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 7 ??Agilité *8|^^[[ [$Agi8] [NH] 4df]] pour %%token_name%% --?? $Agi8.base &gt;= 0 AND $Target &gt; 7 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi8.base &lt; 0 AND $Target &gt; 7 ?? alterbar8|_target|@{target|8th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM --?? $Target &gt; 8 ??Agilité *9|^^[[ [$Agi9] [NH] 4df]] pour %%token_name%% --?? $Agi9.base &gt;= 0 AND $Target &gt; 8 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-1d4+13 _show|GM --?? $Agi9.base &lt; 0 AND $Target &gt; 8 ?? alterbar9|_target|@{target|9th|token_id} _bar|3 _amount|-(1d4+13)/2 _show|GM }} You still have to click on all 9 targets, but this way you can just click multiple times on the last target. Then the card won't process over the numbers of targets you've declared.&nbsp;
Kurt J. said: 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. Hi Kurt ! thanks for the reply yes confusion is the right terms&nbsp; :) i've try for some of my macro and now it seems to work but as it's kind of random i'll see in the future what's happen (for example i ve use a replace for a @{target} and when i use some of the attibutes like ~target-SBINT$ in a inline roll.... sometimes it do the same .... but it was with my previous mistake) i'll keep you inform if i have another issue/feedback with the replace function&nbsp;&nbsp;
Up there (points up) I put in a request that probably got lost in the huge textboxes.&nbsp; Just wondered if anyone has an idea... <a href="https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278580#post-9278580" rel="nofollow">https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278580#post-9278580</a> I'm thinking I need to play in the Formatting Handout, but I have no idea what to do ... I know it's essentially a very specific, interactive, css sheet.&nbsp; I just don't know what to enter. Also, is there a way to learn what all the API pregen format tags are?&nbsp; (like --format|bigbad, for example)?
1602876433
Kurt J.
Pro
API Scripter
Wolf Thunderspirit said: Up there (points up) I put in a request that probably got lost in the huge textboxes.&nbsp; Just wondered if anyone has an idea... <a href="https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278580#post-9278580" rel="nofollow">https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278580#post-9278580</a> I'm thinking I need to play in the Formatting Handout, but I have no idea what to do ... I know it's essentially a very specific, interactive, css sheet.&nbsp; I just don't know what to enter. Also, is there a way to learn what all the API pregen format tags are?&nbsp; (like --format|bigbad, for example)? There is no way built into PowerCards to style the API buttons generated by the various OGL commands, since they are just the standard button/link template used by Roll20.&nbsp; This Thread in the Macros Forum &nbsp;discusses using a browser addon to modify the styles of Roll20 interface elements, which might work - but they only modify the appearance for you &nbsp;and not for anyone else in the game. PowerCards doesn't come with any built-in formats - they must all be created in a PowerCard Formats handout and are specific to your game. If you have installed and set up PCMHelper, it creates a handout with four pre-defined formats: atwill: --txcolor|#000000 --bgcolor|#004400 charinfo: --txcolor|#ffff00 --bgcolor|#000000 --titlefontshadow|#0000cc --corners|10 --orowbg|#cec7b6 --erowbg|#cec7b6 badguys: --txcolor|#ffff00 --bgcolor|#000000 --titlefontshadow|#0000cc --corners|10 --emotefont|font-family: Arial; font-weight: bold; bigbad: --txcolor|#ffff00 --bgcolor|#000000 --titlefontshadow|#0000cc --corners|10 Formats aren't exactly CSS (though some format elements contains CSS information) but rather a list of formatting tags used by PowerCards that are just summarized as a single --format line. If you decide to make/edit a formats handout, I suggest keeping it in an external text file and making your changes there through something like Notepad or Notepad++. When you want to update your formats in game, copy the text and paste it into the handout. The Roll20 in-game editor was updated a year or so ago and inserts all kinds of HTML junk into handouts that prevent PowerCards from reading them properly if they have been edited via the handout editor.
Kurt J. said: Wolf Thunderspirit said: Up there (points up) I put in a request that probably got lost in the huge textboxes.&nbsp; Just wondered if anyone has an idea... <a href="https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278580#post-9278580" rel="nofollow">https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278580#post-9278580</a> I'm thinking I need to play in the Formatting Handout, but I have no idea what to do ... I know it's essentially a very specific, interactive, css sheet.&nbsp; I just don't know what to enter. Also, is there a way to learn what all the API pregen format tags are?&nbsp; (like --format|bigbad, for example)? There is no way built into PowerCards to style the API buttons generated by the various OGL commands, since they are just the standard button/link template used by Roll20.&nbsp; This Thread in the Macros Forum &nbsp;discusses using a browser addon to modify the styles of Roll20 interface elements, which might work - but they only modify the appearance for you &nbsp;and not for anyone else in the game. PowerCards doesn't come with any built-in formats - they must all be created in a PowerCard Formats handout and are specific to your game. If you have installed and set up PCMHelper, it creates a handout with four pre-defined formats: atwill: --txcolor|#000000 --bgcolor|#004400 charinfo: --txcolor|#ffff00 --bgcolor|#000000 --titlefontshadow|#0000cc --corners|10 --orowbg|#cec7b6 --erowbg|#cec7b6 badguys: --txcolor|#ffff00 --bgcolor|#000000 --titlefontshadow|#0000cc --corners|10 --emotefont|font-family: Arial; font-weight: bold; bigbad: --txcolor|#ffff00 --bgcolor|#000000 --titlefontshadow|#0000cc --corners|10 Formats aren't exactly CSS (though some format elements contains CSS information) but rather a list of formatting tags used by PowerCards that are just summarized as a single --format line. If you decide to make/edit a formats handout, I suggest keeping it in an external text file and making your changes there through something like Notepad or Notepad++. When you want to update your formats in game, copy the text and paste it into the handout. The Roll20 in-game editor was updated a year or so ago and inserts all kinds of HTML junk into handouts that prevent PowerCards from reading them properly if they have been edited via the handout editor. OK - TYVM Kurt!&nbsp; Very helpful :-)
I think my post was lost in the rest, so I will post it again here : <a href="https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278781#post-9278781" rel="nofollow">https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278781#post-9278781</a> I would really love to be able to use Powercard in my game, but this issue makes it non-usable for a lot of stuff. Thanks in advance guys!
1602964614
Kurt J.
Pro
API Scripter
JPBEG said: I think my post was lost in the rest, so I will post it again here : <a href="https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278781#post-9278781" rel="nofollow">https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278781#post-9278781</a> I would really love to be able to use Powercard in my game, but this issue makes it non-usable for a lot of stuff. Thanks in advance guys! I am currently testing a fix for the spellcasting issue with PCMHelper. I should have an update to the development GIST tonight or tomorrow.
1602965028

Edited 1602965162
Kurt J.
Pro
API Scripter
JPBEG said: I think my post was lost in the rest, so I will post it again here : <a href="https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278781#post-9278781" rel="nofollow">https://app.roll20.net/forum/post/7136858/script-powercards-3-thread-6/?pageforid=9278781#post-9278781</a> I would really love to be able to use Powercard in my game, but this issue makes it non-usable for a lot of stuff. Thanks in advance guys! Ok, I believe I have this working. The Development GIST is updated to version 1.0.11, and contains a fixed template for spellcasting. Assuming no issues with this one, I'll push it up to OneClick for distribution this week.
1602978430

Edited 1602978839
-G-
Pro
Erik M. said: You still have to click on all 9 targets, but this way you can just click multiple times on the last target. Then the card won't process over the numbers of targets you've declared.&nbsp; Thanks for the help! That's pretty awesome :) For anyone out the that's looking at the formula and might want to include it in it's game, please note there is a typo in the second part which read : --?? $Target &gt; 2 ??Agilité *2| Should be like this : --?? $Target &gt; 2 ??Agilité *3|
Having an issue. If I run my powetcards through chat or with the macro open for test macro, it works fine. If I run it through a button in another powercard or as a token action it shows the script in chat and doesn't activate the actual effects. Not sure why it's doing this. Here is the code &nbsp;!power {{ --bgcolor|#1c4587 --erowbg|#cfe2f3 --orowbg|#b6d7a8 --name|@{selected|token_name} Attacks @{target|token_name}&nbsp; --leftsub|@{selected|WeaponName_1} --?? @{selected|Off} == 0 AND @{selected|Charge} == 0 AND @{selected|Call} == 0 ?? Maneuver:|Standard --?? @{selected|Off} == 3 AND @{selected|Charge} == 0 AND @{selected|Call} == 0 ?? Maneuver:|Offensive Focus --?? @{selected|Off} == 0 AND @{selected|Charge} == 2 AND @{selected|Call} == 0 ?? Maneuver:|Charge --?? @{selected|Off} == 3 AND @{selected|Charge} == 2 AND @{selected|Call} == 0 ?? Maneuver:|Offensive Focus, Charge --?? @{selected|Off} == 0 AND @{selected|Charge} == 0 AND @{selected|Call} == 8 ?? Maneuver:|Called Shot --?? @{selected|Off} == 0 AND @{selected|Charge} == 2 AND @{selected|Call} == 8 ?? Maneuver:|Called Shot, Charge --?? @{selected|Off} == 3 AND @{selected|Charge} == 2 AND @{selected|Call} == 8 ?? Maneuver:|Offensive Focus, Called Shot, Charge --Attack:|[[ [$Atk] 1d20 +@{selected|bth} +@{selected|WeaponHitMod_1} +@{selected|WeaponHitMagic_1} +@{selected|WeaponHitMisc_1} +@{Selected|Off} -@{selected|Call} ]] --?? @{target|Dodge} == 4 ?? alterbar4|_target|@{target|token_id} _bar|1 _amount|-4 _show|all --?? @{target|Dodge} == 4 ?? api_setattr|_name @{target|token_name} _set _Dodge|0 _silent --?? @{target|DodgeNumber} == 1 ?? alterbar5|_target|@{target|token_id} _bar|1 _amount|-2 _show|all --?? @{target|DodgeNumber} == 3 ?? api_setattr|_name @{target|token_name} _set _DodgeNumber|2 _silent --?? @{target|DodgeNumber} == 2 ?? api_setattr|_name @{target|token_name} _set _DodgeNumber|1 _silent --?? @{target|DodgeNumber} == 1 ?? api_setattr|_name @{target|token_name} _set _DodgeNumber|0 _Dodge|0 _silent --?? $Atk &gt;= @{target|A.C.} AND $Atk.base &lt;&gt; 20 AND $Atk.base &lt;&gt; 1 AND @{selected|Call} == 0 ?? Hit: | You have hit @{target|token_name} for [[ [$Dmg] @{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk &gt;= @{target|A.C.} AND $Atk.base &lt;&gt; 20 AND $Atk.base &lt;&gt; 1 AND @{selected|Call} == 8 ?? Hit: | You have hit @{target|token_name} with a **Called Shot** for [[ [$CallDmg] @{selected|WeaponDmg_1} +@{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk.base == 20 AND @{selected|Call} == 0 ?? Critical Hit: | You have hit @{target|token_name} with a **Critical** for [[ [$CritDmg] @{selected|WeaponDmg_1} + @{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk.base == 20 AND @{selected|Call} == 8 ?? Critical Called Shot: | You have hit @{target|token_name} with a **Critical Called Shot ** for [[ [$CritCall] @{selected|WeaponDmg_1} + @{selected|WeaponDmg_1} + @{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk &lt; @{target|A.C.} AND $Atk.base &lt;&gt; 1 ?? Miss: | You have missed @{target|token_name}! --?? $Atk &gt;= @{target|A.C.} AND $Atk.base &lt;&gt; 20 AND $Atk.base &lt;&gt; 1 AND @{selected|Call} == 0 ?? alterbar6|_target|@{target|token_id} _bar|2 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 AND @{selected|Call} == 0 ?? alterbar7|_target|@{target|token_id} _bar|2 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|A.C.} AND $Atk.base &lt;&gt; 20 AND $Atk.base &lt;&gt; 1 AND @{selected|Call} == 8 ?? alterbar8|_target|@{target|token_id} _bar|2 _amount|-[^CallDmg] _show|all --?? $Atk.base == 20 AND @{selected|Call} == 8 ?? alterbar9|_target|@{target|token_id} _bar|2 _amount|-[^CritCall] _show|all --?? $Dmg &gt;= @{target|bar2} AND $Atk &gt;= @{target|A.C.} ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead --?? $CritDmg &gt;= @{target|bar2} AND $Atk.base == 20 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead --?? @{selected|Call}Dmg &gt;= @{target|bar2} AND $Atk.base &lt;&gt; 20 AND $Atk.base &lt;&gt; 1 AND @{selected|Call} == 8 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead --?? $CritCall &gt;= @{target|bar2} AND $$Atk.base == 20 AND @{selected|Call} == 8 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead }}
Is it possible to have --rightsub or --leftsub set to different things based upon the results of a conditional? --hroll|[[ [$TechniqueNumber] 1d0+?{Technique|Visual,1|Psychic,0} ]] --?? $TechniqueNumber == 1 ?? skipto*1|Visual --?? $TechniqueNumber == 0 ?? skipto*1|Psychic --:Visual| --rightsub|Visual --:Psychic| --rightsub|Psychic
1603009873
Kurt J.
Pro
API Scripter
John B. said: Is it possible to have --rightsub or --leftsub set to different things based upon the results of a conditional? --hroll|[[ [$TechniqueNumber] 1d0+?{Technique|Visual,1|Psychic,0} ]] --?? $TechniqueNumber == 1 ?? skipto*1|Visual --?? $TechniqueNumber == 0 ?? skipto*1|Psychic --:Visual| --rightsub|Visual --:Psychic| --rightsub|Psychic Not directly... rightsub and leftsub are "special" tags that aren't subject to conditionals. It should be possible to do via a template with conditional inclusion, but I haven't tested that.
Thanks! I doubt I'll ask for a template change and can work around it!
I am a newbie to pro and hope I am not posting this to the wrong place.&nbsp; (5e OGL: token-mod, chatsetattr scripts installed.)&nbsp; I have a recurring problem with trying to deal with spell cards that convey effects for multiple levels.&nbsp; In many cases I want to offer the effect of subsequent levels and also keep track of spell slot utilization at the appropriate level. (Also, frankly, I am pretty sure&nbsp;my scripts are amateur and need some cleanup.)&nbsp; Example:&nbsp; !modbattr --silent --charid @{selected|character_id} --lvl2_slots_expended|-1 !power&nbsp; {{ &nbsp; --charid|@{selected|character_id} &nbsp; --emote|@{selected|character_name} Casts a Spell! &nbsp; --emotefont|font-family: "Helvetica"; font-weight: bold; &nbsp; --txcolor|#E5E7E9 &nbsp; --bgcolor|#283747 &nbsp; --titlefontshadow|none &nbsp; --border|5px solid #000 &nbsp; --corners|10 &nbsp; --erowtx|#E5E7E9 &nbsp; --erowbg|#717D7E &nbsp; --orowtx|#E5E7E9 &nbsp; --orowbg|#283747 &nbsp; --!Name|~C Absorb Elements ~C &nbsp; --leftsub|1st Level | Abjuration&nbsp; | **S** &nbsp; &nbsp; --rightsub|Reaction | Self | 1 Round &nbsp; --!desc|[Ward](<a href="https://media.giphy.com/media/kfEixUOUyyBP9dSGOU/giphy.gif" rel="nofollow">https://media.giphy.com/media/kfEixUOUyyBP9dSGOU/giphy.gif</a>) &nbsp; --!Spell_Desc:|@{selected|character_name} gains resistance to ?{Type:|acid|cold|fire|lightning|thunder} damage until the start of @{selected|character_name}'s next turn. &nbsp; --!Damage|1st time @{selected|character_name} hits with a melee attack before spell ends causes an extra [[?{Spell Slot?|1|2|3|4|5}d6 ]] damage. &nbsp; --api_token-mod*1| _ids @{selected|token_id} _set statusmarkers|blue|interdiction &nbsp; --!Slots|[[@{selected|lvl1_slots_expended}-1]] of @{selected|lvl1_slots_total} Level 1 Slots Remain &nbsp; }} The above powercard works fine but: 1) I don't seem to be able to call the modbattr api script from powercards as I can with the token-mod [ --api_modbattr _silent _charid @{selected|character_id} _lvl2_slots_expended|-1 does not work] &nbsp; and 2) I don't seem to be able to assign the spell slot query to a tag for later use in the slot tracking or some other method of allowing a level change to track the correct slot. &nbsp;&nbsp;Any help would be appreciated .
A quick&nbsp; Ureck said: Hello, i have a problem with a macro. It works when pasted in the chat but when used as an ability produces an error : SyntaxError: Expected "!!", "!", "cf", "cs", "d", "k", "m", "mt", "r", "ro", "s", [0-9] or [&gt;|&lt;|=] but "~" found. undefined I'm using 3.5 Diana P Sheet I don't know if it's normal but at the end of you longest line (3rd one), you can read this : [...] weapon5|@{selected|weapon6name},weapon6} Shouldn't&nbsp; weapon6 be followed by |@{selected|weapon7name} like the rest? As for the rest, sorry, can't find why it give you this result.
Hello. I am brand new to the Roll20 API and Power Card. I have created a simple macro to make an attack roll, compare it to the target's AC and calculate damage. !power {{ --name|Handaxe --leftsub|Melee Weapon Attack --rightsub|Reach 5 ft. --tokenid|@{selected|token_id} --emote|@{selected|character_name} attacks with his Handaxe! --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{strength_mod} + @{pb} ]] vs AC @{target|npc_ac} --?? $Atk.base &gt; 1 AND $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt; 20 ?? Hit!| Target takes [[ [$Dmg] 1d6 + @{strength_mod} ]] slashing damage! --?? $Atk.base == 20 ?? Critical Hit!| Target takes [[ [$CritDmg] 2d6 + @{strength_mod} ]] slashing damage! }} My question: Is there a way to account for the target's Damage Vulnerabilities or Resistances? Those values look like they are stored in the&nbsp;npc_vulnerabilities and&nbsp;npc_resistances attributes on the NPC's character sheet. The problem is, if a creature has multiple immunities, they are stored as a single list separated by commas. Is it possible to parse the list and compare it to the type of damage the weapon is doing and then make the adjustments?&nbsp; I have tried searching for a solution to this, but haven't had any luck. Any help with this would be greatly appreciated.&nbsp;
1603191669
Kurt J.
Pro
API Scripter
Phillip K. said: Hello. I am brand new to the Roll20 API and Power Card. I have created a simple macro to make an attack roll, compare it to the target's AC and calculate damage. !power {{ --name|Handaxe --leftsub|Melee Weapon Attack --rightsub|Reach 5 ft. --tokenid|@{selected|token_id} --emote|@{selected|character_name} attacks with his Handaxe! --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{strength_mod} + @{pb} ]] vs AC @{target|npc_ac} --?? $Atk.base &gt; 1 AND $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt; 20 ?? Hit!| Target takes [[ [$Dmg] 1d6 + @{strength_mod} ]] slashing damage! --?? $Atk.base == 20 ?? Critical Hit!| Target takes [[ [$CritDmg] 2d6 + @{strength_mod} ]] slashing damage! }} My question: Is there a way to account for the target's Damage Vulnerabilities or Resistances? Those values look like they are stored in the&nbsp;npc_vulnerabilities and&nbsp;npc_resistances attributes on the NPC's character sheet. The problem is, if a creature has multiple immunities, they are stored as a single list separated by commas. Is it possible to parse the list and compare it to the type of damage the weapon is doing and then make the adjustments?&nbsp; I have tried searching for a solution to this, but haven't had any luck. Any help with this would be greatly appreciated.&nbsp; At the moment, there is no way to do this with PowerCards. I'll ponder some possible methods and see if it is something I can add (not specifically vulnerabilities/resistances, but a generic "contains" function for conditionals.
Hi, first of all Powercards is one mandatory api !!! very good job&nbsp; but i'm struggling with the template. I do everything mention in Kurt video and from the wiki ( the handout file, ensure that no @{} are present etc...) but each time i launch a macro that is pointing to a template.... nothing happens. no message at all from the chat or from the API log From what i used, i've copy/paste example from the wiki Is there something special to do to ensure that is working&nbsp; ?&nbsp; Thank you
Kurt J. said: Phillip K. said: Hello. I am brand new to the Roll20 API and Power Card. I have created a simple macro to make an attack roll, compare it to the target's AC and calculate damage. !power {{ --name|Handaxe --leftsub|Melee Weapon Attack --rightsub|Reach 5 ft. --tokenid|@{selected|token_id} --emote|@{selected|character_name} attacks with his Handaxe! --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{strength_mod} + @{pb} ]] vs AC @{target|npc_ac} --?? $Atk.base &gt; 1 AND $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt; 20 ?? Hit!| Target takes [[ [$Dmg] 1d6 + @{strength_mod} ]] slashing damage! --?? $Atk.base == 20 ?? Critical Hit!| Target takes [[ [$CritDmg] 2d6 + @{strength_mod} ]] slashing damage! }} My question: Is there a way to account for the target's Damage Vulnerabilities or Resistances? Those values look like they are stored in the&nbsp;npc_vulnerabilities and&nbsp;npc_resistances attributes on the NPC's character sheet. The problem is, if a creature has multiple immunities, they are stored as a single list separated by commas. Is it possible to parse the list and compare it to the type of damage the weapon is doing and then make the adjustments?&nbsp; I have tried searching for a solution to this, but haven't had any luck. Any help with this would be greatly appreciated.&nbsp; At the moment, there is no way to do this with PowerCards. I'll ponder some possible methods and see if it is something I can add (not specifically vulnerabilities/resistances, but a generic "contains" function for conditionals. Thanks, Kurt. That would be awesome if you could add that functionality. I do have a new question, however. I've figured out how to use TokenMod with PowerCards to apply a status condition marker to a token, but is there a way to check a selected token to see if a particular status condition marker has been applied?&nbsp; My intent is to create two macros. First, a player casts Hunter's Mark and the macro will apply a 'marked' status condition marker to the target token. Second, when the player attacks the marked target with their weapon attack script, it will have a condition to see if the marked status is in effect and apply the extra 1d6 damage. Hopefully what I'm trying to do makes sense. Thanks in advance for any help.&nbsp;
1603437168

Edited 1603437470
Hello, I've been trying to teach myself how to use power cards.&nbsp; I would like to make a macro that takes advantage of both PowerCards and ChatSetAttr to roll a fighters second wind die, subtract the appropriate ammo, and add the rolled amount to their HP.&nbsp; This is what I am working with: !power {{ --name|Second Wind --leftsub|@{selected|character_name} --rightsub|Fighter --Roll:|[[ [$SecWind] 1d10 + @{selected|base_level}]] --api_setattr_silent_sel| _class_resource|@{selected|class_resource|-1} --api_setattr_silent_sel| _hp|@{selected|hp|+[^SecWind]} }} I've been able to get the roll to appear in the chat but the ammo is not being subtracted and the health is not being added:&nbsp; Is there something obvious that I'm missing?
1603441567

Edited 1603442439
Phillip K. said: Kurt J. said: Phillip K. said: Hello. I am brand new to the Roll20 API and Power Card. I have created a simple macro to make an attack roll, compare it to the target's AC and calculate damage. !power {{ --name|Handaxe --leftsub|Melee Weapon Attack --rightsub|Reach 5 ft. --tokenid|@{selected|token_id} --emote|@{selected|character_name} attacks with his Handaxe! --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{strength_mod} + @{pb} ]] vs AC @{target|npc_ac} --?? $Atk.base &gt; 1 AND $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt; 20 ?? Hit!| Target takes [[ [$Dmg] 1d6 + @{strength_mod} ]] slashing damage! --?? $Atk.base == 20 ?? Critical Hit!| Target takes [[ [$CritDmg] 2d6 + @{strength_mod} ]] slashing damage! }} My question: Is there a way to account for the target's Damage Vulnerabilities or Resistances? Those values look like they are stored in the&nbsp;npc_vulnerabilities and&nbsp;npc_resistances attributes on the NPC's character sheet. The problem is, if a creature has multiple immunities, they are stored as a single list separated by commas. Is it possible to parse the list and compare it to the type of damage the weapon is doing and then make the adjustments?&nbsp; I have tried searching for a solution to this, but haven't had any luck. Any help with this would be greatly appreciated.&nbsp; At the moment, there is no way to do this with PowerCards. I'll ponder some possible methods and see if it is something I can add (not specifically vulnerabilities/resistances, but a generic "contains" function for conditionals. Thanks, Kurt. That would be awesome if you could add that functionality. I do have a new question, however. I've figured out how to use TokenMod with PowerCards to apply a status condition marker to a token, but is there a way to check a selected token to see if a particular status condition marker has been applied?&nbsp; My intent is to create two macros. First, a player casts Hunter's Mark and the macro will apply a 'marked' status condition marker to the target token. Second, when the player attacks the marked target with their weapon attack script, it will have a condition to see if the marked status is in effect and apply the extra 1d6 damage. Hopefully what I'm trying to do makes sense. Thanks in advance for any help.&nbsp; hello, here's my hunter's mark macro !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** lance sa marque sur @{target|character_name} --name|Marque du chasseur --leftsub|Action bonus --rightsub|Dist: 27m --Ecole :|Divination --Composants :|V --Niveau d'origine|[[1]] --!SlotUsed|**Slot Utilisé : **[[ [$SlotUsedValue] ?{Sort de niveau 1 - Choix du slot :|1, 1|2, 2|3, 3|4, 4|5, 5|6, 6|7, 7} + 0d0]] --?? $SlotUsedValue &lt;= 2 ?? !infolong*1|**Durée : **Concentration, jusqu'a 1 heure --?? $SlotUsedValue &gt; 2 AND $SlotUsedValue &lt;= 4 ?? !infolong*2|**Durée : **Concentration, jusqu'a 8 heures --?? $SlotUsedValue &gt;= 5 ?? !infolong*3|**Durée : **Concentration, jusqu'a 24 heures --?? $SlotUsedValue == 1 AND @{selected|lvl1_slots_expended} == 0 ?? !cancel*1|$$#98111D|Pas assez de slots niveau 1 $$ --?? $SlotUsedValue == 1 AND @{selected|lvl1_slots_expended} == 0 ?? skipto*1|EndofCard --?? $SlotUsedValue == 2 AND @{selected|lvl2_slots_expended} == 0 ?? !cancel*2|$$#98111D|Pas assez de slots niveau 2 $$ --?? $SlotUsedValue == 2 AND @{selected|lvl2_slots_expended} == 0 ?? skipto*2|EndofCard --?? $SlotUsedValue == 3 AND @{selected|lvl3_slots_expended} == 0 ?? !cancel*3|$$#98111D|Pas assez de slots niveau 3 $$ --?? $SlotUsedValue == 3 AND @{selected|lvl3_slots_expended} == 0 ?? skipto*3|EndofCard --?? $SlotUsedValue == 4 AND @{selected|lvl4_slots_expended} == 0 ?? !cancel*4|$$#98111D|Pas assez de slots niveau 4 $$ --?? $SlotUsedValue == 4 AND @{selected|lvl4_slots_expended} == 0 ?? skipto*4|EndofCard --?? $SlotUsedValue == 5 AND @{selected|lvl5_slots_expended} == 0 ?? !cancel*5|$$#98111D|Pas assez de slots niveau 5 $$ --?? $SlotUsedValue == 5 AND @{selected|lvl5_slots_expended} == 0 ?? skipto*5|EndofCard --?? $SlotUsedValue == 6 AND @{selected|lvl6_slots_expended} == 0 ?? !cancel*6|$$#98111D|Pas assez de slots niveau 6 $$ --?? $SlotUsedValue == 6 AND @{selected|lvl6_slots_expended} == 0 ?? skipto*6|EndofCard --?? $SlotUsedValue == 7 AND @{selected|lvl7_slots_expended} == 0 ?? !cancel*7|$$#98111D|Pas assez de slots niveau 7 $$ --?? $SlotUsedValue == 7 AND @{selected|lvl7_slots_expended} == 0 ?? skipto*7|EndofCard --!Description1|**Description : ** Vous choisissez une créature située dans votre champ de vision et à portée et lui apposez une marque mystique la désignant comme votre proie. Jusqu'à la fin du sort, vous lui infligez [! 1d6 !] dégâts supplémentaires à chaque fois que vous réussissez à lui infliger des dégâts avec une arme et vous avez **l'avantage sur les éventuels tests de Sagesse (Perception) ou Sagesse (Survie) que vous faites pour la retrouver**. Si la cible tombe à 0 point de vie avant que ce sort se termine, vous pouvez utiliser une action bonus lors d'un tour ultérieur pour marquer une nouvelle créature. --!Description2|**A plus haut niveau : **Si vous lancez ce sort en utilisant un emplacement de niveau 3 ou 4, vous pouvez vous concentrer sur le sort pendant 8 heures. Si vous utilisez un emplacement de niveau 5 ou supérieur, vous pouvez maintenir votre concentration sur le sort jusqu'à 24 heures. --api_token-mod*1|_ids @{target|token_id} _ignore-selected _set statusmarkers|archery-target --api_token-mod*2|_ids @{selected|token_id} _ignore-selected _set statusmarkers|blue --hroll|[[ [$infolvl1] 0d0 + @{selected|lvl1_slots_expended} -1 ]][[ [$infolvl2] 0d0 + @{selected|lvl2_slots_expended} -1 ]][[ [$infolvl3] 0d0 + @{selected|lvl3_slots_expended} -1 ]][[ [$infolvl4] 0d0 + @{selected|lvl4_slots_expended} -1 ]][[ [$infolvl5] 0d0 + @{selected|lvl5_slots_expended} -1 ]][[ [$infolvl6] 0d0 + @{selected|lvl6_slots_expended} -1 ]][[ [$infolvl7] 0d0 + @{selected|lvl7_slots_expended} -1 ]] --?? $SlotUsedValue == 1 ?? api_setattr*1| _modb _charid @{selected|character_id} _lvl1_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 1 _fb-content Il reste [! [^infolvl1] !] slot(s) LVL1 sur [! @{selected|lvl1_slots_total} !] !!! --?? $SlotUsedValue == 2 ?? api_setattr*2| _modb _charid @{selected|character_id} _lvl2_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 2 _fb-content Il reste [! [^infolvl2] !] slot(s) LVL2 sur [! @{selected|lvl2_slots_total} !] !!! --?? $SlotUsedValue == 3 ?? api_setattr*3| _modb _charid @{selected|character_id} _lvl3_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 3 _fb-content Il reste [! [^infolvl3] !] slot(s) LVL3 sur [! @{selected|lvl3_slots_total} !] !!! --?? $SlotUsedValue == 4 ?? api_setattr*4| _modb _charid @{selected|character_id} _lvl4_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 4 _fb-content Il reste [! [^infolvl4] !] slot(s) LVL4 sur [! @{selected|lvl4_slots_total} !] !!! --?? $SlotUsedValue == 5 ?? api_setattr*5| _modb _charid @{selected|character_id} _lvl5_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 5 _fb-content Il reste [! [^infolvl5] !] slot(s) LVL5 sur [! @{selected|lvl5_slots_total} !] !!! --?? $SlotUsedValue == 6 ?? api_setattr*6| _modb _charid @{selected|character_id} _lvl6_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 6 _fb-content Il reste [! [^infolvl6] !] slot(s) LVL6 sur [! @{selected|lvl6_slots_total} !] !!! --?? $SlotUsedValue == 7 ?? api_setattr*7| _modb _charid @{selected|character_id} _lvl7_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 7 _fb-content Il reste [! [^infolvl7] !] slot(s) LVL7 sur [! @{selected|lvl7_slots_total} !] !!! --soundfx|_audio,play,nomenu|Roots --:EndofCard| }} for this i'm using these API : Powercard (of course) Token mod Chatsetattr The script chek the lvl slot and put blue marker on caster (concetration) and archery on the target token mod doesn't permit to verify if a marker is already on a token (or i didn't have found yet how) so the 1d6 must be done manually Or (but i haven't tested) you can use Chatsetattr to set a new attribute with a value to the target taht can be check via conditionnal @{taget|marked} == 1 to add 1d6
1603442011

Edited 1603446884
GruntK said: Hi, first of all Powercards is one mandatory api !!! very good job&nbsp; but i'm struggling with the template. I do everything mention in Kurt video and from the wiki ( the handout file, ensure that no @{} are present etc...) but each time i launch a macro that is pointing to a template.... nothing happens. no message at all from the chat or from the API log From what i used, i've copy/paste example from the wiki Is there something special to do to ensure that is working&nbsp; ?&nbsp; Thank you HAHAHAHAHAAAAAAAAAAA ! i found ! when kurt says case sensitive, it means CaSe Sensitive !!!! my mistakes was in the Handout name ..... i ve put Powercard Templates.... and it was Power C ard Templates !!!!! Sorry for the spam ! But know that i ve tested template, i have a question regarding performance and processing: let say i have 3 players, one barbarian (with rage bonus), one thief (with sneak attack], one warrior what is the best : Doing one template with everything in it (with conditionnal and skipto regarding if the rage or sneak is used) ? Doing a specific template for each kind of attack (one standard, one with rage, one with sneak attack) ? Or is it similar in term of performance, because --template read all the handout file ? My macro becomes complex and now i'm working to ensure that performances is the best.
Had a question, I'm building a Star Wars 5e game, and love power cards, but not much of a coder, everything seems to work great for attacks but it looks like spells lists don't get created using the PCMsetup.&nbsp; Is there an easy fix for this?
Is there a way to use RollID's in a Query? For instance: --hroll|[[ [$MaxPoints] 1d0 + @{sheet_variable} + @{another_variable} ]] --Spend|?{Spend Points (Max: [^MaxPoints])|0} It either displays the text Spend Points ([^MaxPoints]) instead of the value. I also tried just putting the sheet variables in the query but it then displays&nbsp;&nbsp; Spend Points (3+3) I also tried putting in [[ 1d0+@{sheet_variable} + @{another_variable} ]] but it just displayed the text again Thanks!
John B. &nbsp; &nbsp; Try something like: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; --!Sleep|@{Selected|character_name} can allocate up to ?{ Level|1st Level, [[5d8]]|2nd Level, [[7d8]]|3rd Level, [[9d8]]|4th Level, [[11d8]] } sleep points.
Bach; &nbsp;&nbsp;&nbsp;&nbsp;For what it's worth, this is my SecondWind Powercard: !modbattr --silent --charid @{selected|character_id} --class_resource|-1&nbsp; !power {{ &nbsp; --border|5px solid #000 &nbsp; --erowtx|#000000 &nbsp; --erowbg|#000080 &nbsp; --orowtx|#ffff00 &nbsp; --orowbg|#006400&nbsp;&nbsp; &nbsp; --name|@{selected|character_name} Gets a Second Wind! &nbsp; --!desc|[Wind](<a href="https://media.giphy.com/media/CiTLZWskt7Fu/giphy.gif" rel="nofollow">https://media.giphy.com/media/CiTLZWskt7Fu/giphy.gif</a>) ^^ ^^ (A Rest is Required to Recharge) }} !token-mod --set bar1_value|+[[{[[1d10+round(@{selected|level}/2)]], [[@{selected|bar1|max} - @{selected|bar1}]]}kl1]]
1603566115

Edited 1603573891
John
Pro
@Michael C I don't think that's exactly what I'm trying to do but that opens up other possibilities. What I'm trying to do is display the results of a calculation/roll inside a roll query prompt. Thanks
Hey guys!&nbsp;&nbsp; Relatively new to API, and am playing around with Powercards.&nbsp; I got it working great for my NPCs, and only want to use the spell function for my PCs (I have token actions sussed out already and they are used to them).&nbsp; Using the generic spell macro from PCMHelper, my spell macro works great.&nbsp; However, I noticed in my DEV copy of my game that the Magic Missile only shoots one missile. Is there a way of modifying that spell macro without re-writing the whole spell list?
Hi, I ve got a question regarding -api_*** when the api called used {{&nbsp; }} at the begining and the end, how can i interpret this inside powercards ? example the SpawnDefaultToken API : !Spawn {{ --name| Cimeterre de Flammes --qty| 1 --force| yes --offset| 1,0 --size| 1,1 --order | toFront --light| 10,-5 --fx| explode-fire --expand| 15, 25 }} i know it's possible to replace character... with html entities, something like this : --api_Spawn |&amp;#123;&amp;#123; _name|Cimeterre de Flammes _qty| 1 _force| yes _offset| 1,0 _size| 1,1 _order | toFront _light| 10,-5 _fx| explode-fire _expand| 15, 25 &amp;#125;&amp;#125; but it doesnt seems to work any clue ?
1603928745

Edited 1603933776
Need a little help on a script ... dunno what I'm doing wrong. In an undead companion's attack description called "Glare": The mummy uses a random glare on a target that it can see within 60 feet.}} @{Mute Companion|charname_output} !power {{ --tokenid|@{selected|token_id} --emote|Companion Glares ... --leftsub|DC 14 --Random Identifier|[[ [$Rando] 1d4 ]] checking [^Rando] --?? [^Rando] -eq 1 ?? Dreadful Glare|%{-MIU8WnkrC0Uj7YSg5cF|1_Mummy_Glare} --?? [^Rando] -eq 2 ?? Terrifying Glare|%{-MIU8WnkrC0Uj7YSg5cF|2_Mummy_Glare} --?? [^Rando] -eq 3 ?? Cursing Glare|%{-MIU8WnkrC0Uj7YSg5cF|3_Mummy_Glare} --?? [^Rando] -eq 4 ?? Destroying Glare|%{-MIU8WnkrC0Uj7YSg5cF|4_Mummy_Glare} }} ! These are the macros set up on the sheet: 1_Mummy_Glare: --name|Dreadful Glare --rightsub|Constitution Save --!description|The targeted creature must succeed on a DC 14 Constitution saving throw or be paralyzed for 1 minute. ^^ The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. 2_Mummy_Glare: --name|Terrifying Glare --rightsub|Wisdom Save --!description|The targeted creature must succeed on a DC 14 Wisdom saving throw or be frightened for 1 minute. ^^ The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. 3_Mummy_Glare: --name|Cursing Glare --rightsub|Constitution Save --!description|The targeted creature must make a DC 14 Constitution saving throw, taking 8d8 necrotic damage on a failed save, or half as much damage on a successful one. --!Damage|[[8d8]] Necrotic Damage; Half on Save 4_Mummy_Glare: --name|Destroying Glare --rightsub|Dexterity Save --!description|If the target is a creature, it must succeed on a DC 14 Dexterity saving throw or take 10d8 force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust. ^^ If the target is a Large or smaller nonmagical object or creation of magical force, it is disintegrated without a saving throw. ^^ If the target is a Huge or larger nonmagical object or creation of magical force, this ray disintegrates a 10-foot cube of it. --!Damage|[[10d8]] Force Damage The thing is that it's not outputting anything but the 4th option, even when 1, 2, &amp; 3 are rolled (had to take out the --hroll, replacing with --Random Identifier|[[ [$Rando] 1d4 ]] checking [^Rando], to see what was actually happening behind the scenes) Can anyone tidy this up for me?&nbsp; I think it's just not doing the conditionals right, but I'm missing what I'm doing wrong ... EDIT: I realize now what is happening - beyond the API.&nbsp; It is that the %{character ID|Ability Call} HAS to fire and replaces all before it.&nbsp; In contrast, Something like this won't work because of the reserved tags.&nbsp; The mummy uses a random glare on a target that it can see within 60 feet.}} @{Mute Companion|charname_output} !power {{ --tokenid|@{selected|token_id} --emote|Companion Glares ... --leftsub|DC 14 --Random Identifier|[[ [$Rando] 1d4 ]] checking [^Rando] --?? [^Rando] -eq 1 ?? name|Dreadful Glare --?? [^Rando] -eq 1 ?? rightsub|Constitution Save --?? [^Rando] -eq 1 ?? !description|The targeted creature must succeed on a DC 14 Constitution saving throw or be paralyzed for 1 minute. ^^ The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. --?? [^Rando] -eq 2 ?? name|Terrifying Glare --?? [^Rando] -eq 2 ?? rightsub|Wisdom Save --?? [^Rando] -eq 2 ?? !description|The targeted creature must succeed on a DC 14 Wisdom saving throw or be frightened for 1 minute. ^^ The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. --?? [^Rando] -eq 3 ?? name|Cursing Glare --?? [^Rando] -eq 3 ?? rightsub|Constitution Save --?? [^Rando] -eq 3 ?? !description|The targeted creature must make a DC 14 Constitution saving throw, taking 8d8 necrotic damage on a failed save, or half as much damage on a successful one. --?? [^Rando] -eq 3 ?? !Damage|[[8d8]] Necrotic Damage; Half on Save --?? [^Rando] -eq 4 ?? name|Destroying Glare --?? [^Rando] -eq 4 ?? rightsub|Dexterity Save --?? [^Rando] -eq 4 ?? !description|If the target is a creature, it must succeed on a DC 14 Dexterity saving throw or take 10d8 force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust. ^^ If the target is a Large or smaller nonmagical object or creation of magical force, it is disintegrated without a saving throw. ^^ If the target is a Huge or larger nonmagical object or creation of magical force, this ray disintegrates a 10-foot cube of it. --?? [^Rando] -eq 4 ?? !Damage|[[10d8]] Force Damage }} ! I'm at a loss what to do here.&nbsp; Any suggestions?
Ok - tried with Replacements ... still can't get this to work ...
1604330431

Edited 1604331013
Is there a way the macro can choose the highest modifier, like in this example?&nbsp; !setattr --name @{selected|character_name} --modb !power {{ --emote|** @{selected|token_name} Attacks --tokenid|@{selected|token_id} --titlefontshadow|none --format|Conditions --corners|10 --name|Weapon Of Life Stealing Template --leftsub|Melle Attack --rightsub|5 ft Range --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|strength_mod} or @{selected|dexterity_mod} + @{selected|pb} ]] vs AC @{target|npc_ac} --?? $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt;&gt; 20 ?? Damage:|[[ [$Dmg] 2d6 @{selected|Strength_mod} or @{selected|dexterity_mod} ]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d6 + @{selected|Strength_mod} or @{selected|dexterity_mod} ]] --?? $Atk.base == 20 ?? Necrotic Damage|[[ [$NecDmg] 3d6 ]] --soundfx|_audio,play,nomenu|slashing --vfx_opt|@{selected|token_id} @{target|token_id} glow-blood --?? $Atk.base == 20 ?? vfx_opt|@{target|token_id} explosion-death --?? $Atk &gt;= @{target|npc_AC} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 20 ?? alterbar3|_target|@{target|token_id} _bar|1 _amount|-[^NecDmg] _show|all --?? $Atk.base == 20 ?? Life Steal:| You Are Healed For [^NecDmg] Temporary Hit Points equal to the extra damage dealt. }} So for instance, If a warrior with +3 strenght modfier equips this weapon, it will choose the strenght modifier, but if a rouge with +2 dexterity modifier uses this weapon, the macro will change according to the highest modifier for the character.&nbsp; Thanks :)
1604421172

Edited 1604421195
Fredda, here's my shortsword macro which auto selects based on the higher of the dex or str mod... !power {{ --emote|@{selected|token_name} attacks a target with a shortsword --tokenid|@{selected|token_id} --format|Melee --name|Shortsword --leftsub|Melee Attack --rightsub|Reach 5 ft --target_list|@{target|token_id} -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} ?? Attack:|[[ [$AtkDex] ?{Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + @{selected|dexterity_mod} [Dex Mod] + @{selected|pb} [Proficiency] + @{selected|global_attack_mod} [Global] ]] vs AC -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base == 1 ?? Critical Fail:|Fumble. -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base == 1 ?? soundfx:|_audio,play,nomenu|MeleeMiss -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base &lt;&gt; 1 AND $AtkDex.total &lt; [[@{target|npc_ac}]] AND $AtkDex.base &lt;&gt; 20 ?? !Miss|You missed. -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base &lt;&gt; 1 AND $AtkDex.total &lt; [[@{target|npc_ac}]] AND $AtkDex.base &lt;&gt; 20 ?? soundfx:|_audio,play,nomenu|MeleeMiss -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base &lt;&gt; 1 AND $AtkDex.total &gt;= [[@{target|npc_ac}]] AND $AtkDex.base &lt;&gt; 20 ?? Hit:|[[1d6 + @{selected|dexterity_mod} [Dex Mod] ]] Piercing damage -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base &lt;&gt; 1 AND $AtkDex.total &gt;= [[@{target|npc_ac}]] AND $AtkDex.base &lt;&gt; 20 ?? soundfx:|_audio,play,nomenu|ShortswordHit -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base &lt;&gt; 1 AND $AtkDex.total &gt;= [[@{target|npc_ac}]] AND $AtkDex.base &lt;&gt; 20 ?? vfx_opt|@{target|token_id} glow-blood -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base == 20 ?? Critical Hit:|[[2d6 + @{selected|dexterity_mod} [Dex mod] ]] Piercing damage -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base == 20 ?? soundfx:|_audio,play,nomenu|ShortswordHit -- ?? @{selected|dexterity_mod} &gt;= @{selected|strength_mod} AND $AtkDex.base == 20 ?? vfx_opt|@{target|token_id} glow-blood -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} ?? Attack:|[[ [$AtkStr] ?{Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + @{selected|strength_mod} [Str Mod] + @{selected|pb} [Proficiency] + @{selected|global_attack_mod} [Global] ]] vs AC -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base == 1 ?? Critical Fail:|Fumble. -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base == 1 ?? soundfx:|_audio,play,nomenu|MeleeMiss -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base &lt;&gt; 1 AND $AtkStr.total &lt; [[@{target|npc_ac}]] AND $AtkStr.base &lt;&gt; 20 ?? !Miss|You missed. -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base &lt;&gt; 1 AND $AtkStr.total &lt; [[@{target|npc_ac}]] AND $AtkStr.base &lt;&gt; 20 ?? soundfx:|_audio,play,nomenu|MeleeMiss -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base &lt;&gt; 1 AND $AtkStr.total &gt;= [[@{target|npc_ac}]] AND $AtkStr.base &lt;&gt; 20 ?? Hit:|[[1d6 + @{selected|strength_mod} [Str Mod] ]] Piercing damage -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base &lt;&gt; 1 AND $AtkStr.total &gt;= [[@{target|npc_ac}]] AND $AtkStr.base &lt;&gt; 20 ?? soundfx:|_audio,play,nomenu|ShortswordHit -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base &lt;&gt; 1 AND $AtkStr.total &gt;= [[@{target|npc_ac}]] AND $AtkStr.base &lt;&gt; 20 ?? vfx_opt|@{target|token_id} glow-blood -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base == 20 ?? Critical Hit:|[[2d6 + @{selected|strength_mod} [Str Mod] ]] Piercing damage -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base == 20 ?? soundfx:|_audio,play,nomenu|ShortswordHit -- ?? @{selected|dexterity_mod} &lt; @{selected|strength_mod} AND $AtkStr.base == 20 ?? vfx_opt|@{target|token_id} glow-blood }}
I ran a large one-shot session at the weekend using power cards. Overall it worked great and I got some really nice compliments on the macros I created for the session. One thing that happened was that after a player would need to drop (the game went on for longer than anticipated) the macros against their character would stop working properly. Specifically I created a character ability called Actions, this brings up an interface which shows all the actions that character can take and what their resources stand at. For characters whose players left the game, this would no longer work correctly. Normally when a player presses Actions, everyone else would just see a little thing in the chat saying x is looking at his/her actions. That player and the DM would see the full output though. However after a player left if a different player was given control of the character and pressed Actions for that character then everyone including that player and the DM would only see the little thing in the chat saying x is looking at his/her actions. I also tried clearing cache and asked the other player to clear their cache too I tried removing control from all players, saving, adding the new player only but the error stuck. I tried deleting the token and creating a new one and reassigning the character to it, but the error persisted. For all other characters the macro kept working though. Has anyone else seen this thing happen or know how it can be fixed? because even now when I log into Roll20 and look at the map that we played on the error is still there. I added the Actions macro so you can see what it does, each character has something similar but this one is specific to the character Lucy Skywalker. I also added a screenshot to show what I mean !power {{ --emote|** @{selected|token_name} checks her options** --tokenid|@{selected|token_id} --titlebackground|none --titlefontshadow|none --whisper|@{selected|character_name} --corners|10 --format|atwill --name|^^Actions --leftsub|@{selected|character_name} --rightsub|Level @{selected|level} @{selected|class}^^ ^^ --**~CAmmunition~C** --@{repeating_resource_$0_resource_left_name}:| ~R[[@{repeating_resource_$0_resource_left}]]~R --@{repeating_resource_$0_resource_right_name}:| ~R[[@{repeating_resource_$0_resource_right}]]~R --@{repeating_resource_$1_resource_left_name}:| ~R[[@{repeating_resource_$1_resource_left}]]~R ~~~ ~C**Weapons**~C [@{selected|repeating_attack_$0_atkname}](~selected|repeating_attack_$0_attack) [@{selected|repeating_attack_$1_atkname}](~selected|repeating_attack_$1_attack) [@{selected|repeating_attack_$2_atkname}](~selected|repeating_attack_$2_attack) ~~~ **~CClass Resources~C** --Medipacks | ~R[[@{selected|other_resource}]]~R --@{selected|repeating_resource_$1_resource_left_name} | ~R[[@{repeating_resource_$1_resource_left}]]~R ~~~ **~CClass Features~C** [@{selected|repeating_attack_$3_atkname}](~selected|repeating_attack_$3_attack) [@{selected|repeating_attack_$4_atkname}](~selected|repeating_attack_$4_attack) }}
Hello! Big fan of the script! I primarily use Token Actions for PCs and Powercards for my NPCs and PC spells, but the PCaction macro for my players got one of my players excited to see if it were possible to have PC automatically deal damage in addition to checking hit success.&nbsp; I have both Alterbar and Token-Mod installed, but can't seem to get the script to output the proper command to apply the damage roll to the appropriate bar (Bar3).&nbsp; Has anyone had any success with this? Here is the macro I have for PCaction: !power {{ &nbsp; --replacepcattack|@{selected|character_id}|?{Select attack to use|@{selected|attacklist}} &nbsp; --replacement|Advantage &nbsp; --replaceattrs|S-|@{selected|character_id} &nbsp; --replaceattrs|T-|@{target|character_id} &nbsp; --api_token-mod _ids @{target|token_id} _set bar3_value|- [$dmg] I am just not sure what to put in the $dmg brackets to get it to trigger from the damage roll.&nbsp; Any help?
1604518326
Kurt J.
Pro
API Scripter
CatSwann said: Hello! Big fan of the script! I primarily use Token Actions for PCs and Powercards for my NPCs and PC spells, but the PCaction macro for my players got one of my players excited to see if it were possible to have PC automatically deal damage in addition to checking hit success.&nbsp; I have both Alterbar and Token-Mod installed, but can't seem to get the script to output the proper command to apply the damage roll to the appropriate bar (Bar3).&nbsp; Has anyone had any success with this? Here is the macro I have for PCaction: !power {{ &nbsp; --replacepcattack|@{selected|character_id}|?{Select attack to use|@{selected|attacklist}} &nbsp; --replacement|Advantage &nbsp; --replaceattrs|S-|@{selected|character_id} &nbsp; --replaceattrs|T-|@{target|character_id} &nbsp; --api_token-mod _ids @{target|token_id} _set bar3_value|- [$dmg] I am just not sure what to put in the $dmg brackets to get it to trigger from the damage roll.&nbsp; Any help? Your --api_token-mod line is missing the vertical bar separating the tag from the content: --api_token-mod|_ids @{target|token_id} _set bar3_value|-[$dmg]
1604523379

Edited 1604523549
That did not seem to work.&nbsp; It is still not triggering the token-mod command to reduce Bar3 by the damage result.
I tracked down how to use Alterbar with PowerCards, and have had &lt;some&gt; success.&nbsp; I can get the damage to deduct from the right bar, but it doesn't seem to be accurate.&nbsp; The amount actually deducted is wildly different from the damage roll result.&nbsp; Sometimes it is 10 points more, sometimes it is 5 points less, sometimes in between.&nbsp; It has never been correct, though. Any help with my syntax? !power {{ &nbsp; --replacepcattack|@{selected|character_id}|?{Select attack to use|@{selected|attacklist}} &nbsp; --replacement|Advantage &nbsp; --replaceattrs|S-|@{selected|character_id} &nbsp; --replaceattrs|T-|@{target|character_id} &nbsp; --alterbar1|_target|@{target|token_id} _bar|3 _amount|-[^Dmg] _show|all
I am having trouble trying to use the Skip To functionality. I know I must have my syntax wrong but I can't seem to figure out where.&nbsp; No matter which number I select from the list, I always get the same output "&nbsp;That number is too big! Try Again!". Can anyone explain what I am doing wrong?&nbsp; This is my test script: !power {{ --name|Skip Test --hroll| [[ [$Result] 1d0 + ?{Pick number 2 from this list|1,1|2,2|3,3} ]] --?? [$Result] &lt; 2 ?? skipto*1|TooSmall --?? [$Result] == 2 ?? skipto*2|Correct --?? [$Result] &gt; 2 ?? skipto*3|TooBig --:TooSmall| --That number is too small! Try Again! --:Correct| --That number is correct! --:TooBig| --That number is too big! Try Again! }}
Hello All, First thank you for all the awesome contributions. New to Roll20 and just got into API use.&nbsp;&nbsp; I'm having and issue with a combat macro of powercard I've built. Basically trying to replicate the combat modifiers provided in the character sheet macro. Once I get it working properly plan to add some of the bells and whistles ike sounds and effects based upon different wepaons tyes used. Works fine from the character sheet (Using 3.5 Diana) But when I try and copy it out to a macro for the table to use I'm getting the following error:&nbsp; TypeError: Cannot read property 'substring' of undefined &nbsp; that keeps repeating. Do I need to do something different to make it work in a table macro?&nbsp; Here is the code:&nbsp; &nbsp;&nbsp; !power {{ --name|@{selected|character_name} Swings his @{selected|weapon1name} at @{target|character_name} --Attack:|[[ [$Atk] 1d20 @{weapon1attackcalc} + ?{Flanking|0} - ?{Power Attack|0} + ?{Additional Attack Modifier|0}]] vs **AC** @{target|bar2} --?? $Atk &gt;= @{target|bar2} ?? Damage:|[[ [$Dmg] @{weapon1damage} + ?{Power Attack Damage}]] --?? $Atk &gt;= @{target|bar2} AND $Atk.base &gt;= @{weapon1critmin} ??&nbsp; Confirm Crit:|[[ [$Crt] 1d20 @{weapon1attackcalc}]] vs **AC** @{target|bar2}&nbsp; --?? $Crt &gt;= @{target|bar2} AND $Atk.base &gt;= @{weapon1critmin}&nbsp; ?? Crit Damage:|[[ [$CDmg] @{weapon1damage} +?{Power Attack Damage}]] --?? $Atk &gt;= @{target|bar2} AND $Crt &lt; @{target|bar2} ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Crt &gt;= @{target|bar2} AND $Atk.base &gt;= @{weapon1critmin} ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^Dmg]+[^CDmg] _show|all }}
1604589554
Kurt J.
Pro
API Scripter
Phillip K. said: I am having trouble trying to use the Skip To functionality. I know I must have my syntax wrong but I can't seem to figure out where.&nbsp; No matter which number I select from the list, I always get the same output "&nbsp;That number is too big! Try Again!". Can anyone explain what I am doing wrong?&nbsp; This is my test script: !power {{ --name|Skip Test --hroll| [[ [$Result] 1d0 + ?{Pick number 2 from this list|1,1|2,2|3,3} ]] --?? [$Result] &lt; 2 ?? skipto*1|TooSmall --?? [$Result] == 2 ?? skipto*2|Correct --?? [$Result] &gt; 2 ?? skipto*3|TooBig --:TooSmall| --That number is too small! Try Again! --:Correct| --That number is correct! --:TooBig| --That number is too big! Try Again! }} Couple of different issues. First, you need to remove the [ ] from around $Result in the conditionals. They aren't used inside conditionals, and end up making the test "[1] &lt; 2", which will always be true (I know that isn't the result you are seeing - more on that later). The second issue is that your "too small", "too big", and "correct" lines aren't proper PowerCards tags - they aren't in --tag|content format, so things will get very &nbsp;confused. If you do just want to display the text without a tag, use the ! modifier in front of the tag name, so --!toosmall|That number is too small! Try again! Finally, skipto does exactly that. It skips forward to a given label in the card. If the above are corrected and the user enters a 1, they will see: That number is too small! Try Again! That number is correct! That number is too big! Try Again! because it will simply fall through and continue on after "Too small". You'll need to jump past the conditions that don't apply with another label and skipto. A working version of the macro you described could look something like this: !power {{ --name|Skip Test --hroll| [[ [$Result] 1d0 + ?{Pick number 2 from this list|1,1|2,2|3,3} ]] --?? $Result &lt; 2 ?? skipto*1|TooSmall --?? $Result == 2 ?? skipto*2|Correct --?? $Result &gt; 2 ?? skipto*3|TooBig --:TooSmall| --!toosmall|That number is too small! Try Again! --skipto*4|EndOfCard --:Correct| --!correct|That number is correct! --skipto*5|EndOfCard --:TooBig| --!toobig|That number is too big! Try Again! --:EndOfCard| }}