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)

Okay... here is my solution to date. It is a Frankenstein of several APIs. !setattr --sel --MHX|[[3d6]] --silent /w gm ?{Skill|Teamwork} !power {{ --replacesection|@{selected|character_id}|?{Skill}|skills|skill_name|SC- --template|uchk|@{selected|character_name};Skill Check;?{Skill};**@{selected|MHX} vs ~SC-skill_roll_target$** --hroll| [[ [$rll] 0d6 + @{selected|MHX} ]] [#[ [$tgt] 0d6 + ~SC-skill_roll_target$ ]#] [#[ [$diff] 0d6 + abs( @{selected|MHX} - ~SC-skill_roll_target$) ]#] --?? $rll <= $tgt ?? @{selected|character_name} succeeded by| **[^diff]** --?? $rll > $tgt ?? @{selected|character_name} failed by| **[^diff]** --format|uchk }} We start with ChatSetAttr to send a new value to MHX on the selected character. This is going to happen asynchronously, so that exact roll won't get used for this check. Rather, the existing value in MHX will. But it's a little smoke and mirror act to allow me to reuse the same value multiple times. Next, the player selects a skill. In this example, they are prompted with Teamwork (because most of the team has this skill, so it was a good test value). Then, we throw that at the powercard. The roll is what we are after here. It should compare a 3d6 against the target of the skill and determine success or failure and the difference. This exact same roll will not work without the 0d6 in each individual part. Oddly, I think they are more necessary than the [#[ ]#] are.
1591636702

Edited 1591652860
Hey all, me again. :) I'm having 2 problems. The 1st is some formatting issues in a card.  I'm trying to put a chat menu button into chat for a specific character with the button centered buuuuut ... the characters name begins with C.  So I've got  !power {{  --whisper|GM --format|npcattack  --name|Prepared Spellbook  --!headerfocus| ~C **Focus Spells** ~C ~~~ ^^ @{Cazador|focus_points} currently  --!focuslist| ~C [@{Cazador|repeating_spellfocus_$0_name}](~Cazador|repeating_spellfocus_$0_spellroll) ~C   --!headercantrip| ~C **Cantrips** ~C ~~~  --!cantriplist| ~C [@{Cazador|repeating_cantrip_$0_name}](~Cazador|repeating_cantrip_$0_spellroll) [@{Cazador|repeating_cantrip_$1_name}](~Cazador|repeating_cantrip_$1_spellroll) ^^ [@{Cazador|repeating_cantrip_$2_name}](~Cazador|repeating_cantrip_$2_spellroll) [@{Cazador|repeating_cantrip_$3_name}](~Cazador|repeating_cantrip_$3_spellroll) ^^ [@{Cazador|repeating_cantrip_$4_name}](~Cazador|repeating_cantrip_$4_spellroll) ~C }} which is outputting I can see this is because of the ~C in ~Cazador in the button call.  Is there a way that anything can be substituted so I don't have to change the character name to selected. I would like the player to be able to click on this regardless of tokens.  The 2nd problem I"m having is using the base function of a roll for conditionals.  For this macro: !power {{   --name|Hideous Laughter   --Casting|Hideous Laughter at @{target|character_name}    --nothroll|[[ [$SaveDC] 0d0 + @{selected|spell_dc} ]] or [[ [$Roll] (1d20 [Base] + @{target|saving_throws_will}) ]] or [[ [$CritSave] 10d1 + @{selected|spell_dc}  ]]    --?? $Roll.base == 20 OR $Roll >= $CritSave ?? Critical Save|@{target|character_name} is unaffected.     --?? $Roll >= $SaveDC AND $Roll < $CritSave ?? Saved|//@{target|character_name} saves and cannot use reactions!//    --?? $Roll < $SaveDC ?? Failed|//@{target|character_name} cannot use reactions and is also **Slowed 1**!//    --?? $Roll.base == 1 ?? Critical Failure|//@{target|character_name} **falls prone** and can't use actions or reactions for 1 round. They are then **Slowed 1**.// }} The natural 20 and natural 1 is not being evaluated. If the save roll total is 20 then the critical save effect happens. What am I missing here? Thanks!
1591893183

Edited 1591893374
Hi everyone, I'm using PCM Helper to have the attacks for my npcs in the same visual than the actions of my players, but I have a question : Is there a way to not display the "description" of the attack ? For example, I would prefer if my players didn't know the DC is 11, nor the precise description of what it does if they fail... Is there a "hide" option please ? Thanks. (and "yes", in the character sheet it's already on "hide" :) )
1592004318

Edited 1592004403
Hey, So not sure if this has been asked, but is it possible to do conditional logic with the leftsub/rightsub? Basically, I'm trying to create a macro for a thrown weapon (like a dagger or javelin), and I want there to be a query prompt for whether or not the attack is ranged. If it's melee, then I want the power card to have --leftsub|Melee Weapon Attack with no rightsub. If it is ranged, I want it to output --leftsub|Ranged Weapon Attack --rightsub 30/120 ft. Currently this is what I have: !power {{ --name|Javelin --tokenid|@{selected|token_id} --target_list|@{target|token_id} --emote|attacks --Range|[[ [$Rng] ?{Melee or Ranged?|Melee,1d1|Ranged,2d1} ]] --?? $Rng == 1 ?? leftsub|Melee Weapon Attack --?? $Rng == 2 ?? leftsub|Ranged Weapon Attack AND rightsub|30/120 ft. --Attack:|[[ [$Atk] ?{Advantage?|Normal Roll,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + 4]] --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 2d6 + 2]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d6 + 2]] --soundfx|_audio,play,nomenu|melee_fast --?? $Atk >= @{target|AC} ?? soundfx|_audio,play,nomenu|melee_fast,piercing-1a --?? $Atk >= @{target|AC} AND $Atk.base <> 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 }} Any help is appreciated!
Hey SashaTK, Unfortunately I don't think that special tags can be included in conditionals.  I tried testing and it seemed to confirm this. One thing to note is that this line --?? $Rng == 2 ?? leftsub|Ranged Weapon Attack AND rightsub|30/120 ft. wouldn't have worked in any case.  "AND" will only work during the evaluation of the conditional, and everything after the conditional is treated like a normal tag.  In other words, if the conditional evaluated as true (i.e., it was a Ranged attack) then it would have evaluated as: --leftsub|Ranged Weapon Attack AND rightsub|30/120 ft. Which would have given you a subtitle (left-aligned) of "Ranged Weapon Attack AND rightsub|30/120 ft." Instead you can repeat the conditional as follows: --?? $Rng == 2 ?? leftsub|Ranged Weapon Attack --?? $Rng == 2 ?? rightsub|30/120 ft. This approach will work for conditionals you want to trigger multiple results.  Unfortunately, conditionals cannot trigger special tags so this won't help you solve your actual issue, which AFAIK is not possible. I will mention one other thing unrelated to the issue you are trying to fix.  If you are playing in a game (e.g., D&D 5e) where 1 automatically misses, you might want to program that happening.  With high-level characters (or particular magical effects) it is possible that even with a base roll of 1, when you add in their modifiers it can exceed the targets AC.  I program all of my attack macros to show a "fumble" on natural 1s, not because anything special happens but to guarantee a natural 1 is treated as a miss.
Thanks, Scott! I figured it was a bit of a long shot, but wanted to see if it was possible, anyway. I'm still pretty new to this whole java/macro/programming thing, so I'm just kind of figuring it out as I go. I didn't realize that logic worked that way, so that's really great to know! I'll also work on adding the "fumble" mechanic to my macros. We use Crit Fail/Hit decks in our game, so it'll be nice to have a visual notification when either of those situations happens. One quick question: I've noticed that when rolling adv/disadv that if there is a crit hit/miss on either of the dice, it will show the roll as either green or red respectively, even if the adv/disadv takes the other result. Is there a way to make it so that if I'm rolling advantage and roll a 1 and a 15 that it doesn't show the result highlighted in red?
1592074302

Edited 1592075288
**Update** It is not broken unless I make the first three hrolls something else. Right now I have them labeled "Day Roll,"  "Night Roll," and "DRoll." Sorry, one more issue to work out.... I'm trying to create a Random Wilderness Encounters macro where on a result of 17+ on a d20 an encounter triggers. A d12 is then rolled to determine what creatures the encounter uses (for those who are familiar with LMoP, this is the Wilderness Encounters procedure from that module). I already figured out that even if I tell Power Cards to only roll the d12 if the d20 is a 17+, it'll roll it anyway. Therefore I've had to tweak the macro a bit, but it's currently working. The issue is that I don't want all of the rolls clogging up my display, but when I change all four rolls (1d20 & 1d12 for Day, 1d20 & 1d12 for Night) to hrolls, the output card contains nothing but the title! It should be noted that if I only change the d12 rolls to hrolls, everything appears to work fine. Here's what I have so far. Any help is appreciated! !power {{ --whisper|GM --name|Sword Coast Wilderness Encounters --hroll|[[ [$Day] 1d20 ]] --hroll|[[ [$Night] 1d20 ]] --hroll|[[ [$DEnc] 1d12 ]] --hroll|[[ [$NEnc] 1d12 ]] --?? $Day < 17 ?? Day Encounter:|The day passes uneventfully. --?? $Day >= 17 AND $DEnc == 1 OR $DEnc == 2 ?? Day Encounter:|[[ 1d8 + 2 ]] Stirges --?? $Day >= 17 AND $DEnc == 3 OR $DEnc == 4 ?? Day Encounter:|[! 1 !] Ogre --?? $Day >= 17 AND $DEnc == 5 OR $DEnc == 6 ?? Day Encounter:|[[ 1d6 + 3 ]] Goblins --?? $Day >= 17 AND $DEnc == 7 OR $DEnc == 8 ?? Day Encounter:|[[ 1d4 + 2 ]] Hobgoblins --?? $Day >= 17 AND $DEnc == 9 OR $DEnc == 10 ?? Day Encounter:|[[ 1d4 + 2 ]] Orcs --?? $Day >= 17 AND $DEnc == 11 ?? Day Encounter:|[[ 1d4 + 2 ]] Wolves --?? $Day >= 17 AND $DEnc == 12 ?? Day Encounter:|[! 1 !] Owlbear --?? $Night < 17 ?? Night Encounter:|The night passes uneventfully. --?? $Night >= 17 AND $NEnc >= 1 AND $NEnc <= 3 ?? Night Encounter:|[[ 1d8 + 2 ]] Stirges --?? $Night >= 17 AND $NEnc == 4 ?? Night Encounter:|[[ 1d4 +1 ]] Ghouls --?? $Night >= 17 AND $NEnc == 5 ?? Night Encounter:|[[ 1d6 + 3 ]] Goblins --?? $Night >= 17 AND $NEnc == 6 ?? Night Encounter:|[[ 1d4 + 2 ]] Hobgoblins --?? $Night >= 17 AND $NEnc == 7 OR $NEnc == 8 ?? Night Encounter:|[[ 1d4 + 2 ]] Orcs --?? $Night >= 17 AND $NEnc == 9 OR $NEnc == 10 ?? Night Encounter:|[[ 1d4 + 2 ]] Wolves --?? $Night >= 17 AND $NEnc == 11 OR $NEnc == 12 ?? Night Encounter:|[! 1 !] Owlbear }}
SashaTK, You are only able to have one hroll tag per card.  But you can combine your rolls as follows: --hroll|[[ [$Day] 1d20 ]] [[ [$Night] 1d20 ]] [[ [$DEnc] 1d12 ]] [[ [$NEnc] 1d12 ]] This should fix your issue. Make sure you test out your logic to ensure it is working correctly.  Using ANDs and ORs in one conditional can be fickle. Another option you might try is to create a rollable tables for Daytime encounters and another for Nighttime encounters.  I'm not as familiar with rollable tables but it seems like random encounters would be an ideal implementation option for this.
1592079191

Edited 1592079216
SashaTK said: One quick question: I've noticed that when rolling adv/disadv that if there is a crit hit/miss on either of the dice, it will show the roll as either green or red respectively, even if the adv/disadv takes the other result. Is there a way to make it so that if I'm rolling advantage and roll a 1 and a 15 that it doesn't show the result highlighted in red? I don't believe the crit/fail green/red functionality works on multiple rolls.  There may be some API solution(s) that people have created to address this but not sure they will give you what you want. If the incorrect green/red results is bothersome you could change your rolls for advantage to remove them completely with 2d20kh1cf0cs21 and 2d20kl1cf0cs21.  cf0 says "critical failure if 0 or less" and cs21 says "critical success if 21 or more".  Since those are each impossible you won't have any green/red results.
Thanks again, Scott! I thought about changing the OR segment into something like this: --?? $Day >= 17 AND $DEnc >= 1 AND $DEnc <= 2 ?? ... The green/red thing doesn't really bother me, I was just wondering if there was something I was missing. I'll consider using the cf/cs bit, but honestly it's not a big deal.
1592087619

Edited 1592087679
Hello all, I'm working on a Powercard macro for Eldritch Blast and can't quite figure out how to give it everything I'm wanting on it.  !power {{ --name|Eldritch Blast --format|atwill --leftsub|Ranged Spell Attack --rightsub|120 ft Range --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|AC} --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 1d10 + 4 ]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 1d10 + 14 ]] --?{Hit delete to show hex damage|$}Hex:|[[1d6]] necrotic damage --vfx_opt|@{selected|token_id} @{target|token_id} Eldritch --?? $Atk >= @{target|AC} AND $Atk.base <> 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 }} This is what I've got so fair from looking at other examples I've found. What I'm missing is the following: -Adding the Hex damage to the amount deduced from the target token. - The Hex damage maximizing on a Crit -A way to add an option that would apply the benefits of the Hexblade curse features, both the extra damage and expanded crit range ideally. Don't know if its possible to get all of this on it, I'm brand new to Powercards and would appreciate any help on it.
1592088710
Kurt J.
Pro
API Scripter
SashaTK said: Hey, So not sure if this has been asked, but is it possible to do conditional logic with the leftsub/rightsub? Basically, I'm trying to create a macro for a thrown weapon (like a dagger or javelin), and I want there to be a query prompt for whether or not the attack is ranged. If it's melee, then I want the power card to have --leftsub|Melee Weapon Attack with no rightsub. If it is ranged, I want it to output --leftsub|Ranged Weapon Attack --rightsub 30/120 ft. Currently this is what I have: !power {{ --name|Javelin --tokenid|@{selected|token_id} --target_list|@{target|token_id} --emote|attacks --Range|[[ [$Rng] ?{Melee or Ranged?|Melee,1d1|Ranged,2d1} ]] --?? $Rng == 1 ?? leftsub|Melee Weapon Attack --?? $Rng == 2 ?? leftsub|Ranged Weapon Attack AND rightsub|30/120 ft. --Attack:|[[ [$Atk] ?{Advantage?|Normal Roll,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + 4]] --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 2d6 + 2]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d6 + 2]] --soundfx|_audio,play,nomenu|melee_fast --?? $Atk >= @{target|AC} ?? soundfx|_audio,play,nomenu|melee_fast,piercing-1a --?? $Atk >= @{target|AC} AND $Atk.base <> 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 }} Any help is appreciated! You can achieve very close to the effect you desire with a little trickery in where you place the roll query: !power {{ --name|Javelin --tokenid|@{selected|token_id} --target_list|@{target|token_id} --emote|attacks --leftsub|?{Melee or Ranged?|Melee,Melee Attack|Ranged,Ranged Attack - 30/120ft} --Attack:|[[ [$Atk] ?{Advantage?|Normal Roll,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + 4]] --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 2d6 + 2]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d6 + 2]] --soundfx|_audio,play,nomenu|melee_fast --?? $Atk >= @{target|AC} ?? soundfx|_audio,play,nomenu|melee_fast,piercing-1a --?? $Atk >= @{target|AC} AND $Atk.base <> 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 }} Because the query is processed before the text is sent to PowerCards, this will end up replacing leftsub with either "Melee Attack" or "Ranged Attack - 30/120ft". Because the vertical bar is used to separate items in a roll query I wasn't able to actually get it to do left and right subs, but the hack above will get you very close.
1592089230

Edited 1592089286
Kurt J.
Pro
API Scripter
SashaTK said: **Update** It is not broken unless I make the first three hrolls something else. Right now I have them labeled "Day Roll,"  "Night Roll," and "DRoll." Sorry, one more issue to work out.... I'm trying to create a Random Wilderness Encounters macro where on a result of 17+ on a d20 an encounter triggers. A d12 is then rolled to determine what creatures the encounter uses (for those who are familiar with LMoP, this is the Wilderness Encounters procedure from that module). I already figured out that even if I tell Power Cards to only roll the d12 if the d20 is a 17+, it'll roll it anyway. Therefore I've had to tweak the macro a bit, but it's currently working. The issue is that I don't want all of the rolls clogging up my display, but when I change all four rolls (1d20 & 1d12 for Day, 1d20 & 1d12 for Night) to hrolls, the output card contains nothing but the title! It should be noted that if I only change the d12 rolls to hrolls, everything appears to work fine. Here's what I have so far. Any help is appreciated! !power {{ --whisper|GM --name|Sword Coast Wilderness Encounters --hroll|[[ [$Day] 1d20 ]] --hroll|[[ [$Night] 1d20 ]] --hroll|[[ [$DEnc] 1d12 ]] --hroll|[[ [$NEnc] 1d12 ]] --?? $Day < 17 ?? Day Encounter:|The day passes uneventfully. --?? $Day >= 17 AND $DEnc == 1 OR $DEnc == 2 ?? Day Encounter:|[[ 1d8 + 2 ]] Stirges --?? $Day >= 17 AND $DEnc == 3 OR $DEnc == 4 ?? Day Encounter:|[! 1 !] Ogre --?? $Day >= 17 AND $DEnc == 5 OR $DEnc == 6 ?? Day Encounter:|[[ 1d6 + 3 ]] Goblins --?? $Day >= 17 AND $DEnc == 7 OR $DEnc == 8 ?? Day Encounter:|[[ 1d4 + 2 ]] Hobgoblins --?? $Day >= 17 AND $DEnc == 9 OR $DEnc == 10 ?? Day Encounter:|[[ 1d4 + 2 ]] Orcs --?? $Day >= 17 AND $DEnc == 11 ?? Day Encounter:|[[ 1d4 + 2 ]] Wolves --?? $Day >= 17 AND $DEnc == 12 ?? Day Encounter:|[! 1 !] Owlbear --?? $Night < 17 ?? Night Encounter:|The night passes uneventfully. --?? $Night >= 17 AND $NEnc >= 1 AND $NEnc <= 3 ?? Night Encounter:|[[ 1d8 + 2 ]] Stirges --?? $Night >= 17 AND $NEnc == 4 ?? Night Encounter:|[[ 1d4 +1 ]] Ghouls --?? $Night >= 17 AND $NEnc == 5 ?? Night Encounter:|[[ 1d6 + 3 ]] Goblins --?? $Night >= 17 AND $NEnc == 6 ?? Night Encounter:|[[ 1d4 + 2 ]] Hobgoblins --?? $Night >= 17 AND $NEnc == 7 OR $NEnc == 8 ?? Night Encounter:|[[ 1d4 + 2 ]] Orcs --?? $Night >= 17 AND $NEnc == 9 OR $NEnc == 10 ?? Night Encounter:|[[ 1d4 + 2 ]] Wolves --?? $Night >= 17 AND $NEnc == 11 OR $NEnc == 12 ?? Night Encounter:|[! 1 !] Owlbear }} Another quirk of the way things like hroll works... multiples can be an issue. You can work around this by doing all of the rolls in a single hroll like this: !power {{ --whisper|GM --name|Sword Coast Wilderness Encounters --hroll|[[ [$Day] 1d20 ]] [[ [$Night] 1d20 ]] [[ [$DEnc] 1d12 ]] [[ [$NEnc] 1d12 ]] --?? $Day < 17 ?? Day Encounter:|The day passes uneventfully. --?? $Day >= 17 AND $DEnc == 1 OR $DEnc == 2 ?? Day Encounter:|[[ 1d8 + 2 ]] Stirges --?? $Day >= 17 AND $DEnc == 3 OR $DEnc == 4 ?? Day Encounter:|[! 1 !] Ogre --?? $Day >= 17 AND $DEnc == 5 OR $DEnc == 6 ?? Day Encounter:|[[ 1d6 + 3 ]] Goblins --?? $Day >= 17 AND $DEnc == 7 OR $DEnc == 8 ?? Day Encounter:|[[ 1d4 + 2 ]] Hobgoblins --?? $Day >= 17 AND $DEnc == 9 OR $DEnc == 10 ?? Day Encounter:|[[ 1d4 + 2 ]] Orcs --?? $Day >= 17 AND $DEnc == 11 ?? Day Encounter:|[[ 1d4 + 2 ]] Wolves --?? $Day >= 17 AND $DEnc == 12 ?? Day Encounter:|[! 1 !] Owlbear --?? $Night < 17 ?? Night Encounter:|The night passes uneventfully. --?? $Night >= 17 AND $NEnc >= 1 AND $NEnc <= 3 ?? Night Encounter:|[[ 1d8 + 2 ]] Stirges --?? $Night >= 17 AND $NEnc == 4 ?? Night Encounter:|[[ 1d4 +1 ]] Ghouls --?? $Night >= 17 AND $NEnc == 5 ?? Night Encounter:|[[ 1d6 + 3 ]] Goblins --?? $Night >= 17 AND $NEnc == 6 ?? Night Encounter:|[[ 1d4 + 2 ]] Hobgoblins --?? $Night >= 17 AND $NEnc == 7 OR $NEnc == 8 ?? Night Encounter:|[[ 1d4 + 2 ]] Orcs --?? $Night >= 17 AND $NEnc == 9 OR $NEnc == 10 ?? Night Encounter:|[[ 1d4 + 2 ]] Wolves --?? $Night >= 17 AND $NEnc == 11 OR $NEnc == 12 ?? Night Encounter:|[! 1 !] Owlbear }} You can also output a table roll, but I have to go back and look at how to do that :) That way you could put your encounter list in a table... let me experiment.
1592090272
Kurt J.
Pro
API Scripter
Ok, so I created two Rollable Tables:  and  And the macro now looks like this :  !power {{ --whisper|GM --name|Sword Coast Wilderness Encounters --hroll|[[ [$Day] 1d20 ]] [[ [$Night] 1d20 ]] [[ [$DEnc] 1d12 ]] [[ [$NEnc] 1d12 ]] --?? $Day < 17 ?? Day Encounter:|The day passes uneventfully. --?? $Day >= 17 ?? Day Encounter:|[[ 1t[DayEncounters] ]] --?? $Night < 17 ?? Night Encounter:|The night passes uneventfully. --?? $Night >= 17 ?? Night Encounter:|[[ 1t[NightEncounters] ]] }} You *could* make this even simpler by adding a item to the Day table that says "The day passes uneventfully" with a weight of 48 (my math could be wrong there!) and leaving the others at 1 (same with the NightEncounter table). In that case, the macro would simply be: !power {{ --whisper|GM --name|Sword Coast Wilderness Encounters --Day Encounter:|[[ 1t[DayEncounters] ]] --Night Encounter:|[[ 1t[NightEncounters] ]] }} And it should have the same probability of generating any given encounter
1592091114
Kurt J.
Pro
API Scripter
Kariaudhanaur said: Hi everyone, I'm using PCM Helper to have the attacks for my npcs in the same visual than the actions of my players, but I have a question : Is there a way to not display the "description" of the attack ? For example, I would prefer if my players didn't know the DC is 11, nor the precise description of what it does if they fail... Is there a "hide" option please ? Thanks. (and "yes", in the character sheet it's already on "hide" :) ) It can be done, but it isn't for the faint of heart :) You would need to edit the PowerCard Templates PCMHelper handoud, which needs to be done in a very particular way to avoid the in-game editor causing problems by inserting HTML and other hidden stuff in the text. You will need to open the handout and select all of the text. Copy it and paste it into an empty document in something like Notepad++ (the build-in Notepad in windows doesn't have a line length long enough to handle some of the templates I don't believe). Once you have the text in Notepad++, look at the very end of the NPCAttack line (if wordwrap is off, each template is on a single line). What you would look to remove is: --["~NPCA-DESCRIPTION$" -ne "" ]Description|~NPCA-DESCRIPTION$ Now hilight everything and copy it to the clipboard. Go back to Roll20 and hilight all of the text in the Handout and hit Delete. Save the template, then reopen it and paste the modified text back into the handout. Try out the macros to make sure nothing got broken. if it did, you'll need to rerun !pcmsetup to restore the default templates.
Cool! Thanks for the update! I'll have to play around with that and see what all I can do. :)
1592091641
Kurt J.
Pro
API Scripter
SashaTK said: Cool! Thanks for the update! I'll have to play around with that and see what all I can do. :) One thing to note is that the inline rolls in the encounter tables can't have any spaces... [[1d8+2]] is fine, but [[ 1d8+2 ]] throws an error. Not sure why, but important to know. The table will also only work from a PowerCard. If you click "roll" next to the table it will literally say something like [[1d8+2]] Stirges :)
Hello everybody, Thank you for you work on PowerCards, it really is an amazing API script !  I'm having an issue with the following code :  !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** Expulse l'énergie du tonnerre --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id}  --name|Vague Tonnante --leftsub|Action --rightsub|Cube de 4,50m --Sauvegarde#?{Number of targets|1}|[[ [$Svg] 1d20 + [[@{target|constitution_mod}]] [CON] ]] (%%token_name%%) vs DD[[ @{selected|spell_save_dc}]] --Dégâts :|[[ [$Dmg] ?{Quel lvl?| Lvl 1, 2d8 | Lvl 2, 3d8 | Lvl 3, 4d8 | Lvl 4, 5d8 | Lvl 5, 6d8 | Lvl 6, 7d8 | Lvl 7, 8d8 | Lvl 8, 9d8 | Lvl 9, 10d8 | } ]] Dégât Tonnerre et la cible est repoussé de 3m --Réussite :| La cible de prend que la moitié des dégâts et n'est pas repoussée. --vfx_opt|@{selected|token_id} explosion-water }} It seems the different save rolls on constitution use the same modifier, and what I want is using the constitution modifier of the different target in target list.  The charm %%token_name%% do the trick but I haven't find the equivalent for constitution_mod... I use the 5e OGL character sheet for my PC. Does anyone have a solution ? Thank you in advance! 
Hi everybody, i make the base for a macro for acid splash. !power {{ --tokenid|@{selected|token_id} --emote|** @{selected|token_name} lance un sort ** --tokenid|@{selected|token_id} --format|badguys --corners|10 --name|Aspertion d'acide --Niveau du sort:| **Sort mineur** --leftsub|Attaque magique --rightsub| 18 m --Info:| Invocation | 1 Action |  VS --target_list|@{target|token_id} --Sauvegarde|[[ [$svg] ?{Avantage?| Normal, 1d20 ] | Avantage, 2d20kh1+ | Désavantage, 2d20kl1 }]]**/DD[[@{selected|spell_save_dc}]] --?? $svg > [[@{selected|spell_save_dc} ]] ??Dégâts :|[[ [$Dmg] 1d6 ]] --alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --Effet:| Vous propulsez une bulle d’acide. Choisissez une ou deux créatures, lesquelles sont à 1,50 mètre ou moins l’une de l’autre, dans la portée du sort. La cible doit réussir un jet de sauvegarde de Dextérité sans quoi elle subit 1d6 de dégâts d’acide. Les dégâts de ce sort augmentent de 1d6 lorsque vous atteignez le niveau 5 (2d6), le niveau 11 (3d6) et le niveau 17 (4d6). }} but it's not correct, i need make a roll for the Ash Zombie Vs DD . I must use this attribut "npcd_dex_mod" from Zombie, but i dont see the way for the zombie doe  this roll, i try different thing but doesn't work. It's possible to insert a macro for this roll? Any idea? Ty
Vandamme P. said: --Sauvegarde|[[ [$svg] ?{Avantage?| Normal, 1d20 ] | Avantage, 2d20kh1+ | Désavantage, 2d20kl1 }]]**/DD[[@{selected|spell_save_dc}]] but it's not correct, i need make a roll for the Ash Zombie Vs DD . I must use this attribut "npcd_dex_mod" from Zombie, but i dont see the way for the zombie doe  this roll, i try different thing but doesn't work. It's possible to insert a macro for this roll? Any idea? Ty Hello,  Maybe you can try :  --Sauvegarde|[[ [$svg] ?{Avantage?| Normal, 1d20 ] | Avantage, 2d20kh1+ | Désavantage, 2d20kl1 } + [[@{target|dexterity_mod}]] ]]**/DD[[@{selected|spell_save_dc}]] It will check the dex_mod of the target of your spell
Adrien L. said: Vandamme P. said: --Sauvegarde|[[ [$svg] ?{Avantage?| Normal, 1d20 ] | Avantage, 2d20kh1+ | Désavantage, 2d20kl1 }]]**/DD[[@{selected|spell_save_dc}]] but it's not correct, i need make a roll for the Ash Zombie Vs DD . I must use this attribut "npcd_dex_mod" from Zombie, but i dont see the way for the zombie doe  this roll, i try different thing but doesn't work. It's possible to insert a macro for this roll? Any idea? Ty Hello,  Maybe you can try :  --Sauvegarde|[[ [$svg] ?{Avantage?| Normal, 1d20 ] | Avantage, 2d20kh1+ | Désavantage, 2d20kl1 } + [[@{target|dexterity_mod}]] ]]**/DD[[@{selected|spell_save_dc}]] It will check the dex_mod of the target of your spell It's perfect. !power {{ --tokenid|@{selected|token_id} --emote|** @{selected|token_name} lance un sort ** --tokenid|@{selected|token_id} --format|badguys --corners|10 --name|Aspertion d'acide --Niveau du sort:| **Sort mineur** --leftsub|Attaque magique --rightsub| 18 m --Info:| Invocation | 1 Action | VS --target_list|@{target|token_id} --Sauvegarde|[[ [$svg] ?{Avantage?| Normal, 1d20 | Avantage, 2d20kh1 | Désavantage, 2d20kl1 } + [[@{target|dexterity_mod}]] ]]**/DD[[@{selected|spell_save_dc}]] --?? $svg < [[@{selected|spell_save_dc} ]] ??Dégâts :|[[ [$Dmg] 1d6 ]] --?? $svg < [[@{selected|spell_save_dc} ]]??alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --Effet:| Vous propulsez une bulle d’acide. Choisissez une ou deux créatures, lesquelles sont à 1,50 mètre ou moins l’une de l’autre, dans la portée du sort. La cible doit réussir un jet de sauvegarde de Dextérité sans quoi elle subit 1d6 de dégâts d’acide. Les dégâts de ce sort augmentent de 1d6 lorsque vous atteignez le niveau 5 (2d6), le niveau 11 (3d6) et le niveau 17 (4d6). }} Ty !
Hi - How do I get this to output result to the tracker? I have managed way more complicated power cards but for some reason I cannot figure this out. Cheers Brian !power {{  --name|@{selected|token_name}   --leftsub|Initiative Roll  --@{selected|token_name} rolls[[1d20 + @{initiative_bonus}[INIT] &{tracker}]]    }}
I use this. !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** réagit ! --name|Initiative --Jet :|[[ [TRKR] 1d20 + @{selected|initiative_bonus}]] }}
Hi everybody ! I'm getting old and my scripting years are far away^^ I've created a sheet for Storypath System Trinity Aeon. I use PC a lot and I have been reading all your threads but I'm getting confused and I would need some help. My characters have Psi powers. I have created a PC macro to list those. From ther theycan either call upon the power upfront or do ot discretely (through a GM whisp) I'm using 2 different templates : 1 for the normal use and another one for the GM whisp! Normal template : NewPsi:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --ppsi Restant|[[ [$Ppr] {(~14! - [[~9!]])} ]] --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}>~13! ]] --?? $ppR < 0 ?? Impossible|**$$#fff|Pas assez de points Psi pour utiliser ce pouvoir! $$**  --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 0 ?? !echec|**$$#fff|C'est un échec! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 0 ?? --api_token-mod|_ids @{selected|token_id} _ignore-selected _set bar1_value|-[[~9!]] --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 1 ?? !fumble|**$$#900|C'est un Fumble! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 1 ?? --api_token-mod|_ids @{selected|token_id} _ignore-selected _set bar1_value|-[[~9!]] --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Attack|~0! obtient [^Atk.ss] +[[~11!]] +~12! succès au final! --?? $Ppr > 0 AND $Atk.ss >= 1 ?? --api_token-mod|_ids @{selected|token_id} _ignore-selected _set bar1_value|-[[~9!]] --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Hello|[TTB 'width=100%'][TRB][TDB align=left width='100%']**$$#000|Description :$$**[TDE][TRE] [TRB][TDB align=justify width='100%']//$$#000|~4!$$//[TDE][TRE] [TRB][TDB align=left width='100%']**$$#000|Système:$$**[TDE][TRE] [TRB][TDB align=justify width='100%']$$#000|~5!$$[TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Rayon : $$**~8![TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Coût en P. Psi: $$**~9![TDE][TRE][TRB][TDB align=Left width='100%']**$$#000|Taille de la cible: $$**~10![TDE][TRE][TTE] GM whisp template : NewPsiW:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --whisper|GM --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}>~13! ]] --?? $Atk.ss == 0 AND $Atk.ones == 0 ?? !echec|**$$#fff|C'est un échec! $$** --?? $Atk.ss == 0 AND $Atk.ones >= 1 ?? !fumble:|**$$#900|C'est un Fumble! $$** --?? $Atk.ss >= 1 ?? !Attack:|~0! obtient [^Atk.ss] +[[~11!]] +~12! succès au final! --!Hello|[TTB 'width=100%'][TRB][TDB align=left width='100%']**$$#000|Description :$$**[TDE][TRE] [TRB][TDB align=justify width='100%']//$$#000|~4!$$//[TDE][TRE] [TRB][TDB align=left width='100%']**$$#000|Système:$$**[TDE][TRE] [TRB][TDB align=justify width='100%']$$#000|~5!$$[TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Rayon : $$**~8![TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Coût en P. Psi: $$**~9![TDE][TRE][TRB][TDB align=Left width='100%']**$$#000|Taille de la cible: $$**~10![TDE][TRE][TTE] Pouvoirs Psi (PC macro to call the Psi Powers) : !power {{ --name|@{selected|character_name} --format|badguys --emote| --tokenid|@{selected|token_id} --!Hello|[TTB 'width=100%' 'bgcolor=Black'] [TRB][TDB align=center width='10%']**$$#fff|INT$$**[TDE][TDB align=center width='10%']**$$#fff|FOR$$**[TDE][TDB align=center width='10%']**$$#fff|PRE$$**[TDE][TDB align=center width='10%']**$$#fff|AST$$**[TDE][TDB align=center width='10%']**$$#fff|DEX$$**[TDE][TDB align=center width='10%']**$$#fff|MAN$$**[TDE][TRE] [TRB 'bgcolor=#444444'][TDB align=center width='10%']**$$#fff|@{selected|Intelligence}$$**[TDE][TDB align=center width='10%']**$$#fff|@{selected|Force}$$**[TDE][TDB align=center width='10%']**$$#fff|@{selected|Presence}$$**[TDE]   [TDB align=center width='10%']**$$#fff|@{selected|Astuce}$$**[TDE][TDB align=center width='10%']**$$#fff|@{selected|Dexterite}$$**[TDE][TDB align=center width='10%']**$$#fff|@{selected|Manipulation}$$**[TDE][TRE] [TRB][TDB align=center width='10%']**$$#fff|RES$$**[TDE][TDB align=center width='10%']**$$#fff|VIG$$**[TDE][TDB align=center width='10%']**$$#fff|CAL$$**[TDE][TDB align=center width='10%']**$$#fff|PSI$$**[TDE][TDB align=center width='10%']**$$#fff|INIT$$**[TDE][TRE] [TRB 'bgcolor=#444444'][TDB align=center width='10%']**$$#fff|@{selected|Resolution}$$**[TDE][TDB align=center width='10%']**$$#fff|@{selected|Vigueur}$$**[TDE][TDB align=center width='10%']**$$#fff|@{selected|Calme}$$**[TDE]  [TDB align=center width='10%' ]**$$#fff|@{selected|psi}$$**[TDE][TDB align=center width='10%' ]**$$#fff|@{selected|InitF}$$**[TDE][TRE] ~~~ --!Listeapt1|[TTB width='100%'] [TRB][TDB align=center width='100%' colspan='10']**@{selected|Aptitude_Name} **[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b1-@{selected|A1B1}](!
#A1B1)[TDB align=center width='20%' colspan='2'][-->GM ](!
#A1B1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b2-@{selected|A1B2}](!
#A1B2)[TDB align=center width='20%' colspan='2'][-->GM ](!
#A1B2w)[TDE][TRE] [TTE] ~~~ --!Actions|**Mode1 : @{selected|mode1_name}(@{selected|mode1})**^^ --!Listemode1|[TTB width='100%'] [TRB][TDB align=left width='80%' colspan='8'][1-@{selected|repeating_m1_$0_m1-pouvoir}](!
#M1P1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1P1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][2-@{selected|repeating_m1_$1_m1-pouvoir}](!
#M1P2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1P2w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][3-@{selected|repeating_m1_$2_m1-pouvoir}](!
#M1P3)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1P3w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][4-@{selected|repeating_m1_$3_m1-pouvoir}](!
#M1P4)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1P4w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][5-@{selected|repeating_m1_$4_m1-pouvoir}](!
#M1P5)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1P5w)[TDE][TRE][TTE] ~~~ --!Actions2|**Mode2 : @{selected|mode2_name}(@{selected|mode2})**^^ --!Listemode2|[TTB width='100%'] [TRB][TDB align=left width='80%' colspan='8'][1-@{selected|repeating_m2_$0_m2-pouvoir}](!
#M2P1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2P1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][2-@{selected|repeating_m2_$1_m2-pouvoir}](!
#M2P2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2P2w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][3-@{selected|repeating_m2_$2_m2-pouvoir}](!
#M2P3)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2P3w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][4-@{selected|repeating_m2_$3_m2-pouvoir}](!
#M2P4)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2P4w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][5-@{selected|repeating_m2_$4_m2-pouvoir}](!
#M2P5)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2P5w)[TDE][TRE][TTE] ~~~ --!Actions3|**Mode3 : @{selected|mode3_name}(@{selected|mode3})**^^ --!Listemode3|[TTB width='100%'] [TRB][TDB align=left width='80%' colspan='8'][1-@{selected|repeating_m3_$0_m3-pouvoir}](!
#M3P1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M3P1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][2-@{selected|repeating_m3_$1_m3-pouvoir}](!
#M3P2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M3P2w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][3-@{selected|repeating_m3_$2_m3-pouvoir}](!
#M3P3)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M3P3w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][4-@{selected|repeating_m3_$3_m3-pouvoir}](!
#M3P4)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M3P4w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][5-@{selected|repeating_m3_$4_m3-pouvoir}](!
#M3P5)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M3P5w)[TDE][TRE][TTE] ~~~ --!Listeaux1|[TTB width='100%'] [TRB][TDB align=left width='100%' colspan='10']**@{selected|repeating_maux_$0_aptaux-name} - @{selected|repeating_maux_$0_modeaux-name} (@{selected|repeating_maux_$0_modeaux})**[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b1-@{selected|repeating_maux_$0_auxb1}](!
#M0AuxB1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M0AuxB1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b2-@{selected|repeating_maux_$0_auxb2}](!
#M0AuxB2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M0AuxB2w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][1-@{selected|repeating_maux_$0_auxp1-pouvoir}](!
#M0AuxP1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M0AuxP1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][2-@{selected|repeating_maux_$0_auxp2-pouvoir}](!
#M0AuxP2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M0AuxP2w)[TDE][TRE][TTE] ~~~ --!Listeaux2|[TTB width='100%'] [TRB][TDB align=left width='100%' colspan='10']**@{selected|repeating_maux_$1_aptaux-name} - @{selected|repeating_maux_$1_modeaux-name} (@{selected|repeating_maux_$1_modeaux})**[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b1-@{selected|repeating_maux_$1_auxb1}](!
#M1AuxB1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1AuxB1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b2-@{selected|repeating_maux_$1_auxb2}](!
#M1AuxB2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1AuxB2w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][1-@{selected|repeating_maux_$1_auxp1-pouvoir}](!
#M1AuxP1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1AuxP1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][2-@{selected|repeating_maux_$1_auxp2-pouvoir}](!
#M1AuxP2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M1AuxP2w)[TDE][TRE][TTE] ~~~ --!Listeaux3|[TTB width='100%'] [TRB][TDB align=left width='100%' colspan='10']**@{selected|repeating_maux_$2_aptaux-name} - @{selected|repeating_maux_$2_modeaux-name} (@{selected|repeating_maux_$2_modeaux})**[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b1-@{selected|repeating_maux_$2_auxb1}](!
#M2AuxB1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2AuxB1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][b2-@{selected|repeating_maux_$2_auxb2}](!
#M2AuxB2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2AuxB2w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][1-@{selected|repeating_maux_$2_auxp1-pouvoir}](!
#M2AuxP1)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2AuxP1w)[TDE][TRE] [TRB][TDB align=left width='80%' colspan='8'][2-@{selected|repeating_maux_$2_auxp2-pouvoir}](!
#M2AuxP2)[TDE][TDB align=center width='20%' colspan='2'][-->GM ](!
#M2AuxP2w)[TDE][TRE][TTE] }} Sample Psi Power (normal use) : !power {{ --template|NewPsi|@{selected|character_name};@{selected|psi};@{selected|mode1};@{selected|repeating_m1_$4_m1-pouvoir};@{selected|repeating_m1_$4_m1-effect};@{selected|repeating_m1_$4_m1-system};@{selected|repeating_m1_$4_m1-Duree};@{selected|repeating_m1_$4_m1-Portee};@{selected|repeating_m1_$4_m1-Rayon};@{selected|repeating_m1_$4_m1-PP};@{selected|repeating_m1_$4_m1-TAI};@{selected|repeating_m1_$4_m1-mait};@{selected|repeating_m1_$4_m1-bonus};@{selected|targetnumber};@{selected|psipoints}}} Sample Psi power (GM use) : !power {{ --template|NewPsiW|@{selected|character_name};@{selected|psi};@{selected|mode3};@{selected|repeating_m3_$2_m3-pouvoir};@{selected|repeating_m3_$2_m3-effect};@{selected|repeating_m3_$2_m3-system};@{selected|repeating_m3_$2_m3-duree};@{selected|repeating_m3_$2_m3-portee};@{selected|repeating_m3_$2_m3-rayon};@{selected|repeating_m3_$2_m3-pp};@{selected|repeating_m3_$2_m3-tai};@{selected|repeating_m3_$2_m3-mait};@{selected|repeating_m3_$2_m3-bonus};@{selected|targetnumber}}} !token-mod --set bar1_value|-[[@{selected|repeating_m3_$2_m3-pp}]] If I use the GM template everything is almost fine ! Psipoints in Bar1 decrease but as I'm not doing any test to check if a player has enough psipoints left it carries on negative values... So I figured out, I would test psipoints left in the normal use. To do so I have to get rid of the decrease in the psi power itself and include it the normal template. That's where things get messy !
Quick question, I love the look of powercards and want to make the switch for my campaign, however my party is attached to the visual aspect of the 3d dice roll. I can't find clear information saying if 3D dice is compatible with the current version of Powercards, any help?
The Kaptain said: Quick question, I love the look of powercards and want to make the switch for my campaign, however my party is attached to the visual aspect of the 3d dice roll. I can't find clear information saying if 3D dice is compatible with the current version of Powercards, any help? Pretty sure it's not ! If it hasn't changed, it was mentioned many times that 3D dices were NOT compatible with PC....
1592237850
Kurt J.
Pro
API Scripter
Brian said: Hi - How do I get this to output result to the tracker? I have managed way more complicated power cards but for some reason I cannot figure this out. Cheers Brian !power {{  --name|@{selected|token_name}   --leftsub|Initiative Roll  --@{selected|token_name} rolls[[1d20 + @{initiative_bonus}[INIT] &{tracker}]]    }} You have a couple of issues with the card above:  - The line where initiative is rolled doesn't have a tag name. Every line in a PowerCard must follow the format of --TagName|TagContents. - The @{initative_bonus} is missing "selected" (ie, @{selected|initiative_bonus} Here is a revised card that rolls and outputs to the tracker: !power {{ --name|@{selected|token_name} --leftsub|Initiative Roll --Initiative|@{selected|token_name} rolls [[1d20 + @{selected|initiative_bonus}[INIT] &{tracker} ]] }}
David R. said: Hello all, I'm working on a Powercard macro for Eldritch Blast for a warlock with agonizing blast and can't quite figure out how to give it everything I'm wanting on it.  !power {{ --name|Eldritch Blast --format|atwill --leftsub|Ranged Spell Attack --rightsub|120 ft Range --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|AC} --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 1d10 + 4 ]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 1d10 + 14 ]] --?{Hit delete to show hex damage|$}Hex:|[[1d6]] necrotic damage --vfx_opt|@{selected|token_id} @{target|token_id} Eldritch --?? $Atk >= @{target|AC} AND $Atk.base <> 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 }} This is what I've got so fair from looking at other examples I've found. What I'm missing is the following: -Adding the Hex damage to the amount deduced from the target token. - The Hex damage maximizing on a Crit -A way to add an option that would apply the benefits of the Hexblade curse features, both the extra damage and expanded crit range ideally. Don't know if its possible to get all of this on it, I'm brand new to Powercards and would appreciate any help on it. Friend of mine got it working, for those interested here it is: !power {{ --name|Eldritch Blast --charid|@{selected|character_id} --tokenid|@{selected|Token_id} --target_list|@{target|token_id} --emote|@{selected|token_name} fires a forceful blast of energy at the @{target|token_name}. --emotefont|font-family: "Script"; font-weight: bold; --format|atwill --titlefont|Candal --leftsub|Ranged Spell Attack --rightsub|120 feet --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|AC} --?? $Atk < @{target|AC} ?? |The attack missed. ?{Curse| No, --?? $Atk >= @{target|AC} AND $Atk.base < 20 ?? Damage:|[[ [$Dmg] 1d10 + @{Mirrik|charisma_mod} + ?{Hex|No,0|Yes,1}d6]] --?? $Atk.base >= 20 ?? Critical Hit|[[ [$CritDmg] 1d10 + @{Mirrik|charisma_mod} + ?{Hex|No,0|Yes,1}d6 + 6*?{Hex|No,0|Yes,1} + 10 ]] --?? $Atk >= @{target|AC} AND $Atk.base < 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 |Yes, --?? $Atk >= @{target|AC} AND $Atk.base < 19 ?? Damage:|[[ [$Dmg] 1d10 + @{Mirrik|charisma_mod} + @{Mirrik|pb} + ?{Hex|No,0|Yes,1}d6]] --?? $Atk.base >= 19 ?? Critical Hit|[[ [$CritDmg] 1d10 + @{Mirrik|charisma_mod} + ?{Hex|No,0|Yes,1}d6 + @{Mirrik|pb} + 6*?{Hex|No,0|Yes,1} + 10]] --?? $Atk >= @{target|AC} AND $Atk.base < 19 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base > 19 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all }}
I'm looking at David R's finished code above, albeit for a completely different reason, and I still don't understand --  Is there a way to do a generic API call within a conditional, especially when you don't need to pass on any further commands? I see alterbar being called above but I was trying to simply call another one-off script. 
1592347805

Edited 1592347997
Kurt J.
Pro
API Scripter
Hrekto said: I'm looking at David R's finished code above, albeit for a completely different reason, and I still don't understand --  Is there a way to do a generic API call within a conditional, especially when you don't need to pass on any further commands? I see alterbar being called above but I was trying to simply call another one-off script.  While Alterbars is a special case (it was part of the PowerCards code before I started working on it, as Alterbars was also written by Sky) there is a way to call other APIs: --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|blue The above will call token-mod (--api_ and then the name of the api you want to call, with its parameters after the |). This should work in a conditional the same way alterbars does. The reason for all of the | in the David R's code above is that it is being done inside a roll query, which uses | to separate items, so the escaped form of | (|) needs to be used. Note that when calling alterbar or any other API this way, the double dash (--) used by most APIs for parameters is replaced with an underscore in the PowerCard. Powercards will modify that back to a -- when the API call is made.
Kurt J. said: Hrekto said: I'm looking at David R's finished code above, albeit for a completely different reason, and I still don't understand --  Is there a way to do a generic API call within a conditional, especially when you don't need to pass on any further commands? I see alterbar being called above but I was trying to simply call another one-off script.  While Alterbars is a special case (it was part of the PowerCards code before I started working on it, as Alterbars was also written by Sky) there is a way to call other APIs: --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|blue The above will call token-mod (--api_ and then the name of the api you want to call, with its parameters after the |). This should work in a conditional the same way alterbars does. The reason for all of the | in the David R's code above is that it is being done inside a roll query, which uses | to separate items, so the escaped form of | (|) needs to be used. Note that when calling alterbar or any other API this way, the double dash (--) used by most APIs for parameters is replaced with an underscore in the PowerCard. Powercards will modify that back to a -- when the API call is made. Thank you.  What about formatting a script call with no parameters? For posterity I'm trying to insert the Fumbler script (whose only command is !fumble or !fumble <percent> for a specific roll)  in the PCAttack template from PCMHelper.  No pipe or just a pipe alone removes the row in the card when the condition is met, and I assume that's because the script isn't being called.  The following... --api_fumbler|_fumble returns the following error from Fumbler, regardless of the condition being met Fumbler: Can not find the fumble chart handout named: And I can't figure out how it's parsing the line in order to create a properly named handout, so I suspect this is either an issue with Fumbler (If so, so long and thanks for all the fish  code) or in the way it has to fit into the generic api call, if it can.  Either way, thank you. 
1592392384
Andreas J.
Forum Champion
Sheet Author
Translator
BTW, I did some wiki cleanup a while ago, which also included updating the fantastic wiki page for Power Cards. <a href="https://wiki.roll20.net/Power_Cards" rel="nofollow">https://wiki.roll20.net/Power_Cards</a> This is the best documented API to my knowledge.
1592419204
Kurt J.
Pro
API Scripter
Andreas J. said: BTW, I did some wiki cleanup a while ago, which also included updating the fantastic wiki page for Power Cards. <a href="https://wiki.roll20.net/Power_Cards" rel="nofollow">https://wiki.roll20.net/Power_Cards</a> This is the best documented API to my knowledge. I was just in there yesterday adding some images. The cleanup looks great!
Hi guys! Any chance to get some help with my previous post !?
First off, fantastic work on this script, Kurt. You've done some great work here, as have the community who have helped shape it. So I don't have any experience writing code, or scripting, or whatever you might call it. What I've learned has come recently and through hours of trial and error, and pouring through forum posts. My ability to understand even half of the capabilities of this script are lacking, I'll be the first to admit that. I am currently running a D&amp;D 5e campaign, using the community contributed character sheet, and I've managed to put together a bunch of powercard macros that I'm happy with. They're simple, but functional enough for my current requirements. I've gotten to a point now where I'm trying to try achieve something a bit more complex using conditional statements. Let me try to describe what I am hoping to achieve: I am trying to build a catch-all macro for spells that call on sheet attributes, and is generic enough that it can work for any player. The catch is, I want it to be able to change part of the output based on whether the spell requires a saving throw, attack roll, or heals damage. I realize the community contributed character sheet isn't the most popular and the attributes will differ from the Roll20 one, so getting to bottom of my issue might be difficult if it has to do with the attributes I'm calling. I have come up with this: !power {{ --format|spell --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** casts @{selected|repeating_spellbooklevel1_$1_spellname} --name|@{selected|repeating_spellbooklevel1_$1_spellname} --leftsub|@{selected|repeating_spellbooklevel1_$1_spellfriendlylevel} --rightsub|@{selected|repeating_spellbooklevel1_$1_spellschool} --Casting Time:|@{selected|repeating_spellbooklevel1_$1_spellcasttime} --Range:|@{selected|repeating_spellbooklevel1_$1_spellrange} --Components:|@{selected|repeating_spellbooklevel1_$1_spellcomponents} --Duration:|@{selected|repeating_spellbooklevel1_$1_spellduration} --hroll|[[ [$SpAtk] @{selected|repeating_spellbooklevel1_$1_attackstat} ]] [[&nbsp; [$SpSave] @{selected|repeating_spellbooklevel1_$1_spellsavedc} ]] [[ [$Heal] @{selected|repeating_spellbooklevel1_$1_spellhealamount} ]] --?? $SpAtk == 0 AND $Heal == 0 AND $SpSave &gt; 0 ?? Saving Throw:|^* DC [[ [$SpSaveDC] @{selected|repeating_spellbooklevel1_$1_spellsavedc} ]] @{selected|repeating_spellbooklevel1_$1_savestat} !Effect:|(@{selected|repeating_spellbooklevel1_$1_savesuccess} on save) --?? $SpAtk == 0 AND $SpSave == 0 AND $Heal &gt; 0 ?? Healing:|^*[[ [$HealAmt] @{selected|repeating_spellbooklevel1_$1_spellhealamount} ]] --?? $SpAtk == 0 AND $SpSave == 0 AND $Heal &gt; 0 ?? alterbar3|_target|@{target|token_id} _bar|3 _amount|+[^HealAmt] _show|all --?? $SpAtk &gt; 0 AND $SpSave == 0 AND $Heal == 0 ?? Spell Attack:|^*[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|PB} + @{selected|repeating_spellbooklevel1_$1_attackstat}]] | Advantage, 2d20kh1 + + [[@{selected|PB} + @{selected|repeating_spellbooklevel1_$1_attackstat}]] | Disadvantage, 2d20kl1 + [[@{selected|PB} + @{selected|repeating_spellbooklevel1_$1_attackstat}]]} ]] --?? $Atk.base == 1 OR $Atk.total &lt; @{target|bar2} ?? !Miss:|~C**$$#A80000|Miss!$$**~C --?? $Atk.total &gt;= @{target|bar2} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Damage:|^*[[ [$Dmg] @{selected|repeating_spellbooklevel1_$1_damage}]] @{selected|repeating_spellbooklevel1_$1_damagetype} --?? $Atk &gt;= @{target|bar2} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target|token_id} _bar|3 _amount|-[^Dmg] _show|all --?? $Atk.base &gt;= 20 ?? Critical Hit:|[[ [$CritDmg] [[@{selected|repeating_spellbooklevel1_$1_damage} + @{selected|repeating_spellbooklevel1_$1_damagemiscbonus}]] @{selected|repeating_spellbooklevel1_$1_damagetype} --?? $Atk.base &gt;= 20 ?? alterbar2|_target|@{target|token_id} _bar|3 _amount|-[^CritDmg] _show|all --!Desc|@{selected|repeating_spellbooklevel1_$1_spelldescription} }} When I formatted this to only include the spell attack roll, without the spell save and healing conditionals, it worked like a charm. With the other conditionals, I am prompted to choose a target, then asked to choose whether the attack is at advantage, disadvantage, or normal, and then nothing appears in the chat. I can't figure out what is wrong. If SpSave has no value AND Heal has no value AND SpAttack does not have no value, then roll an attack/damage. If SpAttack has no value AND Heal has no value AND SpSave does not have no value, then show spell save info. If SpSave has no value AND SpAttack has no value AND Heal does not have no value, show amount healed. It seems logical to me but then again I don't know a whole lot. Any help anyone can offer would be greatly appreciated! Edit: I should probably mention what I am doing here: --hroll|[[ [$SpAtk] @{selected|repeating_spellbooklevel1_$1_attackstat} ]] [[&nbsp; [$SpSave] @{selected|repeating_spellbooklevel1_$1_spellsavedc} ]] [[ [$Heal] @{selected|repeating_spellbooklevel1_$1_spellhealamount} ]] The character sheet doesn't really have a way to track whether a spell requires a saving throw, etc. There is a section under each spell however, where you can choose parameters for saving throws, attacks, and even healing. If nothing is entered into these fields, calling the attribute returns a value of 0. I've used hroll to convert these attributes to numbers so I can reference them throughout the macro.
Greetings all, I'm working on a Powercard macro for Spiritual Weapon and can't quite figure what is wrong with the Crit line. When I crit it just does normal damage. !power {{ &nbsp;--name|Spiritual Weapon &nbsp;--leftsub|Attack &nbsp;--rightsub|5 ft Range &nbsp;--Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1| Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|NPC_AC} &nbsp;--?? $Atk &gt;= @{target|AC} AND $Atk.base &lt;&gt; 20 ?? Damage:|[[ [$Dmg]?{Spell Level|Level Two, 1d8|Level Four, 2d8} + @{Charisma_mod} ]] Force &nbsp;--?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg]?{Spell Level|Level Two, 2d8|Level Four, 4d8} + @{Charisma_mod} ]] Force &nbsp;--soundfx|_audio,play,nomenu|Greatsword &nbsp;--?? $Atk &gt;= @{target|NPC_AC} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all &nbsp;--?? $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all }}
I think when you use a query you can't change the "results" from the response.&nbsp; So ?{Spell Level|Level Two, 2d8|Level Four, 4d8} is being interpreted as ?{Spell Level|Level Two, 1d8|Level Four, 2d8} (the first version of the query). An easy way to handle this is to change your crit line to: --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg]?{Spell Level|Level Two, 1d8|Level Four, 2d8} + ?{Spell Level|Level Two, 1d8|Level Four, 2d8} + @{Charisma_mod} ]] Force &nbsp;
@Ironmantle All rolls, queries, and references to Target are always executed if they are included in the macro.&nbsp; You aren't able to "hide" these behind conditionals.&nbsp; The conditionals only affect what "displays" in the macro, they don't control/affect what is "calculated".
1592568770

Edited 1592568873
Hello There!!&nbsp; First post here. I'm working on a macro for one of my player's ranger. He uses a longbow +1, and has the archery capacity (+2).It is quite nice as it is, and it works, but I'd like to add something. at the moment it: -asks for Advantage and rolls (magic bonus and archery included) -plays sounds -triggers an fx -removes the hit points from target (if hit) -crit and fumble&nbsp; -Arrows ammunitions removed What i'd like to add is a query for magical +1, +2, +3 arrows, and add the appropriate bonus to the D20 roll and damages. I've tried to add something like&nbsp; --Arrow|[[ [$Arr] ?{arrow?|+1, |+2, 2|+3, 3} + 0d0 ]] and then tried to add +[^Arr] to the roll and damage, but it doesn't add anything. It seems that it's not possible to "call" a value ([^Arr]) as a bonus in a roll. Does anybody have an idea? !ammo @{selected|token_id} other_resource -1 flèche !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** Décoche une flèche sur @{target|character_name} --target_list|@{target|token_id} --name|Magic Longbow --leftsub|Action --rightsub|Dist: 45m/180m --Attack|[[ [$Atk] ?{Avantage?| Normal, 1d20 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] | Avantage, 2d20kh1 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] | Désadvantage, 2d20kl1 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH]} ]] --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_audio,play,nomenu|Fumble --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? !Miss:|Echec. --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? soundfx|_audio,play,nomenu|Arrow Miss --?? $Atk &gt;= @{target||ac} ?? soundfx|_audio,play,nomenu|Arrow 3 --?? $Atk.total &gt;= @{target||ac} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod} +1]] Dégâts perforants --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod} + 1}]] Dégâts perforants --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood }}
Scott P. said: @Ironmantle All rolls, queries, and references to Target are always executed if they are included in the macro.&nbsp; You aren't able to "hide" these behind conditionals.&nbsp; The conditionals only affect what "displays" in the macro, they don't control/affect what is "calculated". Thanks for the reply Scott. I think I understand. If I'm understanding you correctly, then I could accomplish what I'm aiming for as long as any references to "target" are removed. The macro could roll an attack/damage, show spell save DC, or roll healing based on the criteria I set up but it would not be able to do that AND check target AC and determine a hit, apply damage, or apply healing.&nbsp; Is this something that can be achieved with a different order of operations or a different approach? Or will I have to make a separate macro for healing spells, save spells, and attack spells?&nbsp;
1592584719

Edited 1592584772
@ Emmanuel C The easiest way would be to drop a sub query into your Attack formula Change this&nbsp; &nbsp; the&nbsp; &nbsp; + 1 [Magic]&nbsp; &nbsp; &nbsp;just the 1 needs to be replaced. With this&nbsp; &nbsp; &nbsp; &nbsp;(?{Magical Arrow + ?&amp;#124;1&amp;#125;) Then the user can just type in his arrow modifier type during that use. NOTE: It will default to 1
1592592876
Kurt J.
Pro
API Scripter
Emmanuel C. said: Hello There!!&nbsp; First post here. I'm working on a macro for one of my player's ranger. He uses a longbow +1, and has the archery capacity (+2).It is quite nice as it is, and it works, but I'd like to add something. at the moment it: -asks for Advantage and rolls (magic bonus and archery included) -plays sounds -triggers an fx -removes the hit points from target (if hit) -crit and fumble&nbsp; -Arrows ammunitions removed What i'd like to add is a query for magical +1, +2, +3 arrows, and add the appropriate bonus to the D20 roll and damages. I've tried to add something like&nbsp; --Arrow|[[ [$Arr] ?{arrow?|+1, |+2, 2|+3, 3} + 0d0 ]] and then tried to add +[^Arr] to the roll and damage, but it doesn't add anything. It seems that it's not possible to "call" a value ([^Arr]) as a bonus in a roll. Does anybody have an idea? !ammo @{selected|token_id} other_resource -1 flèche !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** Décoche une flèche sur @{target|character_name} --target_list|@{target|token_id} --name|Magic Longbow --leftsub|Action --rightsub|Dist: 45m/180m --Attack|[[ [$Atk] ?{Avantage?| Normal, 1d20 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] | Avantage, 2d20kh1 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] | Désadvantage, 2d20kl1 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH]} ]] --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_audio,play,nomenu|Fumble --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? !Miss:|Echec. --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? soundfx|_audio,play,nomenu|Arrow Miss --?? $Atk &gt;= @{target||ac} ?? soundfx|_audio,play,nomenu|Arrow 3 --?? $Atk.total &gt;= @{target||ac} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod} +1]] Dégâts perforants --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod} + 1}]] Dégâts perforants --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood }} All rolls are processed before PowerCards does anything else, so [^Arr] does not exist when the to hit/damage rolls happen. RollIDs are only used for matching conditionals or for display purposes. As BilBo mentioned, you could embed this within the rolls (and you can simplify the attack line a bit):&nbsp; --Attack|[[ [$Atk] ?{Avantage?| Normal, 1d20|Avantage, 2d20kh1|Désadvantage, 2d20kl1} + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] } ?{Arrow Type?|Normal,+0|+1,+1 [+1 Arrow]|+2,+2 [+2 Arrow]|+3,+3 [+3 Arrow]} ]] } You can add the same arrow query (?{Arrow Type?|Normal,+0|+1,+1 [+1 Arrow]|+2,+2 [+2 Arrow]|+3,+3 [+3 Arrow]}) to each of the damage lines as well, and it will only prompt once as all roll queries&nbsp; with the same text are converted to the same value. The simplification of the advantage query comes from the fact that only the die roll (1d20, 1d20kh1 or 1d20kl1) needs to change... all of the modifiers are the same for all three types of roll.
1592605258
Kurt J.
Pro
API Scripter
Ironmantle said: Scott P. said: @Ironmantle All rolls, queries, and references to Target are always executed if they are included in the macro.&nbsp; You aren't able to "hide" these behind conditionals.&nbsp; The conditionals only affect what "displays" in the macro, they don't control/affect what is "calculated". Thanks for the reply Scott. I think I understand. If I'm understanding you correctly, then I could accomplish what I'm aiming for as long as any references to "target" are removed. The macro could roll an attack/damage, show spell save DC, or roll healing based on the criteria I set up but it would not be able to do that AND check target AC and determine a hit, apply damage, or apply healing.&nbsp; Is this something that can be achieved with a different order of operations or a different approach? Or will I have to make a separate macro for healing spells, save spells, and attack spells?&nbsp; All of that should be possible, but I think what Scott is saying is that you will run into issues with thing like spells without a target : You will still be prompted to select a target because @{target} is referenced in the macro, so when casting, say, a Fireball you will be prompted for a token target. Since Fireball does have a save effect (and assuming any other issues with the macro were worked out) you would see a save vs that token and then health would be subtracted from it, but not from anyone else that might be in the area of effect. I created a test game with the community sheet to try out your macro, but I kept getting errors on the $SPAtk roll in the hroll about it not understanding the math. Given I'm not familiar with that sheet, I didn't dig too deeply into it, though.
1592605760

Edited 1592605874
Kurt J.
Pro
API Scripter
Mangouste said: Hi guys! Any chance to get some help with my previous post !? I'm completely unfamiliar with the system you are using, but I did notice one thing in the first line of your normal macro: NewPsi:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --ppsi Restant|[[ [$ Ppr ] {(~14! - [[~9!]])} ]] --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}&gt;~13! ]] --?? $ ppR &lt; 0 ?? RollIDs are case sensitive, so $Ppr and $ppR are not the same, and $ppR hasn't been assigned and will have a value of (RollID Not Found) I believe. That might throw lots of things off.
Hi People, sorry for the repost but since it wasn't really answered before, I thought I'd try posing my question again about powercards and formatting. I won't copy and paste things here making the thread longer than it needs to be, and instead post a&nbsp; link to my previous question . Thanks!
Kurt J. said: Ironmantle said: Scott P. said: @Ironmantle All rolls, queries, and references to Target are always executed if they are included in the macro.&nbsp; You aren't able to "hide" these behind conditionals.&nbsp; The conditionals only affect what "displays" in the macro, they don't control/affect what is "calculated". Thanks for the reply Scott. I think I understand. If I'm understanding you correctly, then I could accomplish what I'm aiming for as long as any references to "target" are removed. The macro could roll an attack/damage, show spell save DC, or roll healing based on the criteria I set up but it would not be able to do that AND check target AC and determine a hit, apply damage, or apply healing.&nbsp; Is this something that can be achieved with a different order of operations or a different approach? Or will I have to make a separate macro for healing spells, save spells, and attack spells?&nbsp; All of that should be possible, but I think what Scott is saying is that you will run into issues with thing like spells without a target : You will still be prompted to select a target because @{target} is referenced in the macro, so when casting, say, a Fireball you will be prompted for a token target. Since Fireball does have a save effect (and assuming any other issues with the macro were worked out) you would see a save vs that token and then health would be subtracted from it, but not from anyone else that might be in the area of effect. I created a test game with the community sheet to try out your macro, but I kept getting errors on the $SPAtk roll in the hroll about it not understanding the math. Given I'm not familiar with that sheet, I didn't dig too deeply into it, though. Thanks for the reply Kurt. I'm going to play around with it some more tonight. There's a very good chance my math is wrong or my attribute references are messed up. I suspect it might actually be easier to just do a separate macro for the separate spell types. If I manage to solve the issue I'll let you know.&nbsp; Thanks for all your hard work!&nbsp;
1592612987

Edited 1592613029
Kurt J.
Pro
API Scripter
godthedj said: Hi People, sorry for the repost but since it wasn't really answered before, I thought I'd try posing my question again about powercards and formatting. I won't copy and paste things here making the thread longer than it needs to be, and instead post a&nbsp; link to my previous question . Thanks! So what is happening is an obscure issue because the character's name starts with R and you have it listed twice within the same tag... ~R is the PowerCards code for right justifying something, and it only activates if it is in a card an even number of times (ie, things between ~R and ~R get right justified). By far the easiest solution is to change first letter of the character name in your macro to a lower-case "r" (no need to change anything about the character itself). This won't impact functionality but will avoid the issue because the ~R code is case sensitive. The same thing would happen for characters with names starting with C or L as well.
1592615403

Edited 1592619416
Kurt J. said: Mangouste said: Hi guys! Any chance to get some help with my previous post !? I'm completely unfamiliar with the system you are using, but I did notice one thing in the first line of your normal macro: NewPsi:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --ppsi Restant|[[ [$ Ppr ] {(~14! - [[~9!]])} ]] --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}&gt;~13! ]] --?? $ ppR &lt; 0 ?? RollIDs are case sensitive, so $Ppr and $ppR are not the same, and $ppR hasn't been assigned and will have a value of (RollID Not Found) I believe. That might throw lots of things off. Thanks a lot Kurt ! It seems to be a lot better ! You rock man..... Actually that solved the condition not being evaluated but it looks like TokenMod not being called at all......... Ppr stand for PsiPoints remaining so when it's&gt;0 AND there are soe success on the pool dice used ($Atk.ss&gt;0) it should call TokenMod to decrease the amount of psi points linked to bar1 by the amount of the power used (~9!)...but it doesn't ! Any idea ?
Kurt J. said: Emmanuel C. said: Hello There!!&nbsp; First post here. I'm working on a macro for one of my player's ranger. He uses a longbow +1, and has the archery capacity (+2).It is quite nice as it is, and it works, but I'd like to add something. at the moment it: -asks for Advantage and rolls (magic bonus and archery included) -plays sounds -triggers an fx -removes the hit points from target (if hit) -crit and fumble&nbsp; -Arrows ammunitions removed What i'd like to add is a query for magical +1, +2, +3 arrows, and add the appropriate bonus to the D20 roll and damages. I've tried to add something like&nbsp; --Arrow|[[ [$Arr] ?{arrow?|+1, |+2, 2|+3, 3} + 0d0 ]] and then tried to add +[^Arr] to the roll and damage, but it doesn't add anything. It seems that it's not possible to "call" a value ([^Arr]) as a bonus in a roll. Does anybody have an idea? !ammo @{selected|token_id} other_resource -1 flèche !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** Décoche une flèche sur @{target|character_name} --target_list|@{target|token_id} --name|Magic Longbow --leftsub|Action --rightsub|Dist: 45m/180m --Attack|[[ [$Atk] ?{Avantage?| Normal, 1d20 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] | Avantage, 2d20kh1 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] | Désadvantage, 2d20kl1 + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH]} ]] --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_audio,play,nomenu|Fumble --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? !Miss:|Echec. --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? soundfx|_audio,play,nomenu|Arrow Miss --?? $Atk &gt;= @{target||ac} ?? soundfx|_audio,play,nomenu|Arrow 3 --?? $Atk.total &gt;= @{target||ac} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod} +1]] Dégâts perforants --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod} + 1}]] Dégâts perforants --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood }} All rolls are processed before PowerCards does anything else, so [^Arr] does not exist when the to hit/damage rolls happen. RollIDs are only used for matching conditionals or for display purposes. As BilBo mentioned, you could embed this within the rolls (and you can simplify the attack line a bit):&nbsp; --Attack|[[ [$Atk] ?{Avantage?| Normal, 1d20|Avantage, 2d20kh1|Désadvantage, 2d20kl1} + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] +1 [MAGIC] +2 [ARCH] } ?{Arrow Type?|Normal,+0|+1,+1 [+1 Arrow]|+2,+2 [+2 Arrow]|+3,+3 [+3 Arrow]} ]] } You can add the same arrow query (?{Arrow Type?|Normal,+0|+1,+1 [+1 Arrow]|+2,+2 [+2 Arrow]|+3,+3 [+3 Arrow]}) to each of the damage lines as well, and it will only prompt once as all roll queries&nbsp; with the same text are converted to the same value. The simplification of the advantage query comes from the fact that only the die roll (1d20, 1d20kh1 or 1d20kl1) needs to change... all of the modifiers are the same for all three types of roll. It's awesome!! You guys rock!!! Thanks soooo much Now if I want to push it a little further, Is there a way to use !ammo @{selected|token_id} other_resource -1 flèche in a query and the have the correct ammo removed (normal, +1,+2...)? I can't find a command to use !ammo inside a powercard, that's why I put it before the !power
Emmanuel C. said: in a query and the have the correct ammo removed (normal, +1,+2...)? I can't find a command to use !ammo inside a powercard, that's why I put it before the !power Any api can be called in a Powercard using the special api tag created for this purpose.&nbsp; I don't use the ammo script so I'm not familiar with the syntax but I think that if you would normally use this command: !ammo @{selected|token_id} other_resource -1 flèche then within your Powercard you can use: --api_ammo @{selected|token_id} other_resource -1 flèche You can find more information about Advanced API Usage within PowerCards here .