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)

why dont you use Powercard Formats Handout? It could perhaps help you with your problem
Danny C. said: why dont you use Powercard Formats Handout? It could perhaps help you with your problem Very nice catch, and giving it a quick test, that is a viable solution, but not a perfect one, as it doesn't allow a given row to have more than one color text (e.g. I can't have row #3 with both red *and* blue text, as far as I can tell). Meanwhile, I have found a fix. It has been looking at me right in the face this whole time. If you'll notice, I said previously that one of the '$' signs appears to have vanished into thin air. Why not try the dumbest solution then, I thought to myself: $$$#00ff00|YourTextHere$$$ As you can see, adding an additional '$' sign to feed whatever is eating it fixes the issue. Although it'd be nice to know where that original '$' has gone... It probably isn't even on PowerCards' side of things, just another Roll20 quirk.
1569626498

Edited 1569626525
Dad
Pro
I need some help with a macro I'm writing using this script. I want the macro to take 4 separate characteristics, and use them to build a dice-pool. The macro would go something like this. A = total size of dice-pool B = a number of B dice, ranging from 1-6 C = a number of C dice, ranging from 1-5 D = a number of D dice, ranging from 1-3 If A >= B+C+D, Roll (B+C+D)d10 If A < B+C+D, Create a pool of dice with a number of dice equal to A, first using B dice, then C dice, then D dice. This would be easy enough if I could use loops, but it doesn't appear to be a way I can do that. Would I have to manual write out all possible combinations of B, C, and D dice, then have the macro evaluate which one works?
Disregard, I have learned my mistakes.
Hello everyone. I am trying to use the  --api_ to call on the recursive tables but is not working. Could i get some help please --api_rt| [[ [[1d5]]t[Treasure] ]], what I am missing. It just freeze the whole script. Thx  !power {{ --name|Loot Generator --whisper|self --hroll|[[ [$Type] ?{Type|Peasant, 1|Citizen, 2|Noble, 3|Small Monster, 4|Large Monster, 5} +0d0 ]] [[ [$P] 1d100 ]] [[ [$S] 1d100 ]] [[ [$C] 1d100 ]] [[ [$Loot] 1d100 ]] [[ [$Cloth] 1d100 ]] --?? $Type == 1 ?? !| ~C **Peasant** ~C --?? $Type == 1 AND $P <= 15 ?? Pennies| ~R [[ 1d10 ]] ~R --?? $Type == 1 AND $S <= 5 ?? Shillings| ~R [[ 1d2 ]] ~R --?? $Type == 1 AND $Loot <= 25 ?? Items| [[ [TXT] 1t[TreasureDisgusting] ]] --?? $Type == 1 AND $Loot <= 10 ?? Items *1| [[ [TXT] 1t[TreasureKnickKnacks] ]] --?? $Type == 1 AND $Loot == 1 ?? Items *2| [[ [TXT] 1t[TreasureItems] ]] --?? $Type == 1 AND $Cloth == 1 ?? Cloth *3| [[ [TXT] 1t[TreasureCloths] ]] --api_rt| [[ [[1d5]]t[Treasure] ]] }}
1571068311

Edited 1571068854
On the subject of powercards, I was hoping for a little bit of help. I'm using the 5e OLG sheet and and play 'text only' games. I use lots of automation where I can to help speed up combat/rolls etc. The following type of powercard pops up on each persons turn.... Using the following code: !power {{ --whisper|@{selected|character_name} --name|What are you doing? --tokenid|@{selected|token_id} --ogl_pc_attack_list|@{selected|character_id} --leftsub|Atk Bonus: @{selected|spell_attack_bonus} --rightsub|Save DC: @{selected|spell_save_dc} --spell_slots|@{selected|character_id} --spell_list|@{selected|character_id} }} However, I want to add a 'Other actions?' button at the bottom, which then, when clicked, opens ANOTHER powercard with the following sort of things..... Dash?: Your character can use their action to move their full movement again. Disengage?:   You can leave an enemies melee range without them getting an attack of opportunity against you Dodge?:  xxxxxx Shove? xxxx Call for a truce? This might work. Are they on the back foot? Can you intimidate them? etc, etc - This is a request of my players, because they all seem to forget that there are other alternatives to do during combat :) - I'd probably, in turn, make each of the links above 'buttons' too, so when pressed it would spit out something like:  /em chooses to 'Dash' instead of attacking, allowing them to double their movement speed...." --- Could anyone please help me out with how to add what I guess would be 'free text'? into the powercards? Thanks
Hey there! I've been playing with the PowerCards scripts for a while, and recently, I've come across a particularly minor issue, although  one that does start to irritate me after a little bit. I run a Pathfinder Final Fantasy campaign, and I have a lot of attacks set up to auto detect crits and roll them. This is the following macro: !power {{ --format|general --name|Melee Attack --leftsub|Goblin --rightsub|Rusted Longsword --Attack| --!^1AttackRoll| **__[[ [TXT] [$Atk] 1d20 + 1 + 2 + 1 + ?{Atk Bonus|0} ]]__** vs AC --?? $Atk.base == 1 OR $Atk.total < @{target|AC} ?? !^2Miss:|The Goblin missed @{target|token_name}! --?? $Atk.base == 20 OR $Atk.total >= @{target|AC} ?? ^2Damage| --?? $Atk.base == 20 OR $Atk.total >= @{target|AC} ?? !^3DamageRoll| **__[[ [TXT] 1d6 + 2 + 1 + ?{Dmg Bonus|0} ]]__** Slashing --?? $Atk.base >= 19 AND $Atk.total >= @{target|AC} ?? ^2Critical Confirmation| --?? $Atk.base >= 19 AND $Atk.total >= @{target|AC} ?? !^3ConfirmRoll| **__[[ [TXT] [$Crit] 1d20 + 1 + 2 + 1 + ?{Atk Bonus} ]]__** vs AC --?? $Atk.base >= 19 AND $Crit.total < @{target|AC} OR $Crit.base == 1 ?? !^4CritMiss:|The Critical fails! --?? $Atk.base >= 19 AND $Crit.total >= @{target|AC} AND $Atk.base >= @{target|AC} ?? ^4Critical Damage| --?? $Atk.base >= 19 AND $Crit.total >= @{target|AC} AND $Atk.base >= @{target|AC} ?? !^5CritDamage| +**__[[ [TXT] 1d6 + 2 + 1 + ?{Dmg Bonus|0} ]]__** Slashing }} The issue though is that sometimes the macro will not actually post. There doesn't seem to be any sort of pattern, and as far as I can tell, it isn't an issue with the conditionals. Sometimes, it just wont return anything. If I resend it one or two additional times, usually it will post the correct info and we're all good. I've tried removing all tabs/spaces/line breaks, and I believe I've removed any syntax errors on my part, so I'm not too sure what the issue might be. I also couldn't find any reference to this issue in other threads, although there was a fair bit to look through so I may have missed it.
Roll20 Lagging?
So, I believe it has something to do with having 3D Dice active in Roll20, because when I turned that off, my macros started working consistently, with just a little bit of lag every now and then.
There is a Power Cards Forum discussing this very topic, Skeleton Jester. If I recall correctly, I think it was settled that Power Cards does not work with 3D Dice. So I'm glad you did get to fix your issue.
Hello, first, I apologize for my english because it's not my native language. I would like to create a macro that my player can use in this way: I would like him to be able to select an X number of targets, launch his attack and that each target is affected according to their AC. I would also like the damage to be different for each target. For now, I use this and I remove the HP myself. Usually, I use altbar but as my macro is not like I like, I do not use it but if you can add it, I'll be grateful. !power {{ --name|Attaque Tournoyante --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} --Attack:#?{Number of targets|1}|[[1d20+@{selected|STR-mod}]] vs @{selected|AC} (%%token_name%%) ^^**Hit:**[[1d8+@{selected|STR-mod}]] }} The other problem,  the macro don’t take in count the AC of each targets. Thank you by advance.
1571785275

Edited 1571790289
Ravenknight
KS Backer
Kwang said: Hello, first, I apologize for my english because it's not my native language. I would like to create a macro that my player can use in this way: I would like him to be able to select an X number of targets, launch his attack and that each target is affected according to their AC. I would also like the damage to be different for each target. For now, I use this and I remove the HP myself. Usually, I use altbar but as my macro is not like I like, I do not use it but if you can add it, I'll be grateful. !power {{ --name|Attaque Tournoyante --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} --Attack:#?{Number of targets|1}|[[1d20+@{selected|STR-mod}]] vs @{selected|AC} (%%token_name%%) ^^**Hit:**[[1d8+@{selected|STR-mod}]] }} The other problem,  the macro don’t take in count the AC of each targets. Thank you by advance. Shall it be one attack against all the targets or one attack against each of them? If you want to retain the ability to switch between 1-3 targets I don't know any way to apply checks against AC to the target list. But you can make a simple check like this: !power {{ --emote|@{selected|token_name} attacks. --tokenid|@{selected|token_id} --format|atwill --name|Test --Attack|[[1d20+@{selected|strength_mod}]] **vs AC** --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} --#?{Number of targets|1}|** - %%token_name%% AC:%%AC%%** --Effect|[[1d8+@{selected|strength_mod}]] damage }} The output will look like this: You can also become a little more fancy with checking for several targets and let Powercards do the math for you but the code below will always attack 3 targets with the same attack. No matter what: !power {{ --emote|@{selected|token_name} attacks. --tokenid|@{selected|token_id} --format|atwill --name|Test --Attack|[[ [$Atk1] 1d20+[[@{selected|strength_mod}]]]] vs AC --First Target:|^^**@{target|1st|token_name} AC: @{target|1st|ac}** --?? $Atk1.base == 1 OR $Atk1.total < @{target|1st|ac}?? !Miss First target:|$$#ff0000|**Miss First Target!**$$ --?? $Atk1.total >= @{target|1st|ac} AND $Atk1.base > 1 AND $Atk1.base < 20 ?? Hit First Target:|[[1d8+[[@{selected|strength_mod}]]]] damage --?? $Atk1.base == 20 ?? Critical Hit First Target:|[[2d8+[[@{selected|strength_mod}]]]] damage --Second Target:|^^**@{target|2nd|token_name} AC: @{target|2nd|ac}** --?? $Atk1.base == 1 OR $Atk1.total < @{target|2nd|ac}?? !Miss Second target:|$$#ff0000|**Miss Second Target!**$$ --?? $Atk1.total >= @{target|2nd|ac} AND $Atk1.base > 1 AND $Atk1.base < 20 ?? Hit Second Target:|[[1d8+[[@{selected|strength_mod}]]]] damage --?? $Atk1.base == 20 ?? Critical Hit Second Target:|[[2d8+[[@{selected|strength_mod}]]]] damage --Third Target:|^^**@{target|3rd|token_name} AC: @{target|3rd|ac}** --?? $Atk1.base == 1 OR $Atk1.total < @{target|3rd|ac}?? !Miss Third target:|$$#ff0000|**Miss Second Target!**$$ --?? $Atk1.total >= @{target|3rd|ac} AND $Atk1.base > 1 AND $Atk1.base < 20 ?? Hit Third Target:|[[1d8+[[@{selected|strength_mod}]]]] damage --?? $Atk1.base == 20 ?? Critical Hit Third Target:|[[2d8+[[@{selected|strength_mod}]]]] damage }} And finally you can make one attack against every single one of the targets: !power {{ --emote|@{selected|token_name} attacks. --tokenid|@{selected|token_id} --format|atwill --name|Test --First Target:|^^**@{target|1st|token_name}**^^**Attack:** [[ [$Atk1] 1d20+[[@{selected|strength_mod}]]]] vs **AC: @{target|1st|ac}** --?? $Atk1.base == 1 OR $Atk1.total < @{target|1st|ac}?? !Miss First target:|$$#ff0000|**Miss First Target!**$$ --?? $Atk1.total >= @{target|1st|ac} AND $Atk1.base > 1 AND $Atk1.base < 20 ?? Hit First Target:|[[1d8+[[@{selected|strength_mod}]]]] damage --?? $Atk1.base == 20 ?? Critical Hit First Target:|[[2d8+[[@{selected|strength_mod}]]]] damage --Second Target:|^^**@{target|2nd|token_name}**^^**Attack:** [[ [$Atk2] 1d20+[[@{selected|strength_mod}]]]] vs **AC: @{target|2nd|ac}** --?? $Atk2.base == 1 OR $Atk2.total < @{target|2nd|ac}?? !Miss Second target:|$$#ff0000|**Miss Second Target!**$$ --?? $Atk2.total >= @{target|2nd|ac} AND $Atk2.base > 1 AND $Atk2.base < 20 ?? Hit Second Target:|[[1d8+[[@{selected|strength_mod}]]]] damage --?? $Atk2.base == 20 ?? Critical Hit Second Target:|[[2d8+[[@{selected|strength_mod}]]]] damage --Third Target:|^^**@{target|3rd|token_name}**^^**Attack:** [[ [$Atk3] 1d20+[[@{selected|strength_mod}]]]] vs **AC: @{target|3rd|ac}** --?? $Atk3.base == 1 OR $Atk3.total < @{target|3rd|ac}?? !Miss Third target:|$$#ff0000|**Miss Second Target!**$$ --?? $Atk3.total >= @{target|3rd|ac} AND $Atk3.base > 1 AND $Atk2.base < 20 ?? Hit Third Target:|[[1d8+[[@{selected|strength_mod}]]]] damage --?? $Atk3.base == 20 ?? Critical Hit Third Target:|[[2d8+[[@{selected|strength_mod}]]]] damage }} ( I'm sure there are better macros out there :) but this is what I got at the moment. )
Hello, thank you, it's great, i'm gonna try, you were very fast to give me solution =)
Ravenknight   I come back because I actually try to use alterbar and visual effect with the third macro you give me. But i can't understand how use alterbar and to automatically remove the HP. I usually use this: --?? $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 And when i try to add visual effect, only one target add it. --?? $Atk >= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood I'm sorry for all those question but if someone can help me, it will be great.
Can't help you Kwang. I don't use any automatic HP-subtraction. :/
Thank you for your quick answer, i'll try again and maybe i found an answer =D
Kwang said: Ravenknight &nbsp; I come back because I actually try to use alterbar and visual effect with the third macro you give me. But i can't understand how use alterbar and to automatically remove the HP. I usually use this: --?? $Atk &gt;= @{target|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 And when i try to add visual effect, only one target add it. --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood I'm sorry for all those question but if someone can help me, it will be great. Kwang, try this. It works for my attacks that use audio. I don't use video effects, but the guy in charge of Power Cards has a couple of YouTube videos with audio and video effects instructions. Here's the link: <a href="https://youtu.be/JwUkdO-F3LQ" rel="nofollow">https://youtu.be/JwUkdO-F3LQ</a> --Target|@{target||token_name} --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|strength_mod}]] [STR] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + [[@{selected|strength}]] [STR] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 + [[@{selected|strength_mod}]] [STR] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||ac}]] --?? $Atk &lt; @{target||ac} ?? !Missed|**You missed!** --?? $Atk &lt; @{target||ac} ?? audioattr*1|@{selected|token_id} Audio_OnMiss*1 --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? Hit:|[[ [$Dmg] 1d8+[[@{selected|strength_mod}]]]] slashing damage&nbsp; --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? audioattr*2|@{selected|token_id} Audio_OnHit*1 --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|strength_mod}]]]] slashing damage --?? $Atk.base == 20 ?? audioattr*3|@{selected|token_id} Audio_OnCrit*1 --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 1 ?? !|**Fumble: --?? $Atk.base == 1 ?? audioattr*4|@{selected|token_id} Audio_OnFumble*1 }}
Looks very interesting. I'll check this out in more detail soon!
Powercards is the gift that keeps on giving. :)
Ravenknight said: Powercards is the gift that keeps on giving. :) Ravenknight, do you by chance use alterbars and/or PowerCards Macro Helper?
Hi there people. I'm beginning my journey into Power Cards and I have a question : 1-I've tried many times and in many ways and can't find a workaround : Can you create a RollID with a simple query? Exemple: --TitleEx|[[ [$automatic] ?{Auto?|0|-1}]] 2-I want to create this because, in a custom game, when a weapon fire in automatic mode, it consume ammo faster but it give a bonus to damage. Normally, I was asking a query with&nbsp; ?{Auto?&nbsp; for the ''hit'' part and then the ''ammo consumption'' part. Can't I just refer this with a RollID in further rolls? Thanks a lot!
Guillaume B. said: 1-I've tried many times and in many ways and can't find a workaround : Can you create a RollID with a simple query? Example: --TitleEx|[[ [$automatic] ?{Auto?|0|-1}]] &nbsp;Can't I just refer this with a RollID in further rolls? Guillaume B., I am not a power cards expert, but I think in order to use the RollID, you have to have an actual roll.&nbsp; Even something like 1d1 works.&nbsp; Try something like this: !power {{ --name|Firing &nbsp; --! [[ [NH] [$automatic] ?{Auto?|no,1d1-2|yes, 1d1}]]| &nbsp; --?? $automatic.total &lt; 0 ?? Dmg: | +0, no auto &nbsp; --?? $automatic.total &gt; 0 ?? Dmg: | +4 for automatic }} A little bit of testing gave me some hope that might help you.&nbsp; Even if that does work, I am sure you will have more customization to do before it is applicable to your game.&nbsp; Good luck.
1572635769

Edited 1572635923
-G-
Pro
Luke H. said: Guillaume B. said: Things. Much more logical things. Quick thinking! I've tried to multiply the query result by 1d1 but a dice roll in each choice seems to work out.&nbsp; I'll try this out.
1572637081
Ziechael
Forum Champion
Sheet Author
API Scripter
A simple `0d0 + ?{non dice roll query result}` will work just as well, as long as there is a roll in there somewhere... but if it works, don't break it... or something like that!
Dave T said: Ravenknight said: Powercards is the gift that keeps on giving. :) Ravenknight, do you by chance use alterbars and/or PowerCards Macro Helper? Hiya! No, I do them all dirty and by hand. :D&nbsp;
@Ravenknight The companion to PowerCards (PC Macro Helper) is great. I'd like to use alter-bars to deduct HPs from the token automatically using PCMH, but I can't get them to run. Was hoping someone&nbsp; had been in the same spot as myself and had a fix. But no luck, so far. I'll just keep at it while waiting for a solution.&nbsp;
I'm setting up attack macros using power cards and have some questions that I hope someone can answer.&nbsp; 1st, does anyone have examples of template and replacement handouts that work together with eachother, and the macro that uses the two of them together?&nbsp; Im having a rough time getting started on them.&nbsp; 2nd, how does one make a targets token show upon the right hand side of an emote? I've looked thru many a power cards thread and can't seem to find anything about it.&nbsp; Thanks in advance!
1573219283

Edited 1573219320
-G-
Pro
I've been doing some research but I can't find anything. Is there a way to put the ammo script in a power cards? I'm trying to have a one-click button that manage the ''roll to hit'' then ''dodge'' if hit, then ''damage'' if hit was successful and finally ''ammo'' to see if the player used a magazine or not.&nbsp; Right now, everything works except the ammo part. I've tried this (and many other iteration) without success: &nbsp; &lt;button type="roll" name="roll_jet_total" value=" !power {{ --hroll||[[ [$MS] [NH] 4df + @{rolelvlwpn} + ?{Modificateur pour toucher la cible?|0|-3|-2|-1|+1|+2|+3} - ?{Niveau de difficulté pour atteindre la cible?|0}]] --?? $MS.total &lt; 0 ?? Marge d'échec :|[^MS], Tir raté. --?? $MS.total &gt;= 0 ?? Marge de succès :|[^MS], Tir réussi --?? $MS.total &gt;= 0 ?? Test d’esquive :|[[ [$Esq] [NH] 4df + @{hurtlvl} + @{agility} + ?{Modificateur pour le test d'esquive?|0|-3|-2|-1|+1|+2|+3}]] --?? $Esq.total &gt; $MS.total ?? Résultat| La cible anticipe tes tirs. --?? $Esq.total &lt;= $MS.total ?? Résultat| La cible est touchée. --?? $Esq.total &lt;= $MS.total ?? Niveau de blessure:|[[ [$DMG] 0d0 + @{INJ} - @{target|combined_personal_defense} ]] --?? $Esq.total &lt;= $MS.total ?? alterbar1|_target|@{target||token_id} _bar|3 _amount|-[^DMG]/2+[^MS]/2 _show|GM --ammo|!ammo @{character_id} @{chargeurfull} [[-1*{@{Recharge}+?{Tir automatique ?|Non,0|Oui,-2}}&lt;1}]] }} "&gt;&lt;/button&gt; When rolled alone and not in a powercard, it work perfectly :&nbsp; &lt;button type="roll" name="roll_consochargeur" value="!ammo @{character_id} @{chargeurfull} [[-1*{@{Recharge}+?{Tir automatique ?|Non,0|Oui,-2}}&lt;1}]]"&gt;&lt;/button&gt; Thanks a lot, Guillaume edit: typo
Guillaume, I don't know if it would work inside the power cards script, but you can put chat calls in the same macro card as a power cards script, just above or below the brackets.&nbsp; I have several power cards that I put an emote in front of, then the power card.&nbsp; It wouldn't end up in the same box and format as the power card, but it would at least post at the same time, either above or below.&nbsp;
I have tried to put some API's with PC as well. And Luke H. suggestion is the best way of knocking it out, without struggling to get it done. That is the way I have been doing for some time. Players like it as well.... :)
1573245317

Edited 1573245438
-G-
Pro
Luke H. said: Guillaume, I don't know if it would work inside the power cards script, but you can put chat calls in the same macro card as a power cards script, just above or below the brackets.&nbsp; I have several power cards that I put an emote in front of, then the power card.&nbsp; It wouldn't end up in the same box and format as the power card, but it would at least post at the same time, either above or below.&nbsp; Thanks for the suggestion! I've tried before : &lt;button type="roll" name="roll_jet_total" value=" !ammo @{character_id} @{chargeurfull} [[-1*{@{Recharge}+?{Tir automatique ?|Non,0|Oui,-2}}&lt;1}]] !power {{ --the rest }} "&gt;&lt;/button&gt; And after : &lt;button type="roll" name="roll_jet_total" value=" !power {{ --the rest }} !ammo @{character_id} @{chargeurfull} [[-1*{@{Recharge}+?{Tir automatique ?|Non,0|Oui,-2}}&lt;1}]] "&gt;&lt;/button&gt; And it seems that when the ammo script works, powercards doesn't work and vice-versa. I can't fire both script with one roll button. :/
1573255941

Edited 1573256011
PC macro for the Dwarfs attack Then the "Command Button" to run the apply damage API All in one macro
BilBo 2 said: PC macro for the Dwarfs attack Then the "Command Button" to run the apply damage API All in one macro Nice, that looks great! Could you please provide your macro/html text so I could find a workaround? Thanks, G
1573260949

Edited 1573262629
!power {{ --format|pcatt --leftsub|Weapon --rightsub|Axe --name|Dwarfs Commanded --hroll| [[ [$TacH] @{target|BAR2}+1d0 ]] [[ [$TacM] @{target|BAR2}+1d1 ]] [[ [$wpn] 2d1} ]] --?? $wpn.total == 1 ?? vs @{target|token_name} with:|Long Sword --?? $wpn.total == 2 ?? vs @{target|token_name} with:|Battle Axe --Dwarf’s Att vs AC: [[20- [$C1] 1d20-1]]| --?? $C1.total &lt;= $TacH.total AND $wpn.total == 1 ?? HIT|for [[1d8+1]] - click $$#ff0000|**Apply**$$ to dmg trgt --?? $C1.total &lt;= $TacH.total AND $wpn.total == 2 ?? HIT|for [[1d8+1]] - click $$#ff0000|**Apply**$$ to dmg trgt --?? $C1.total &gt;= $TacM.total ?? Miss| --?? $C1.base == 1 ?? Fumble|~R Roll Toops Discipline ~R --?? $C1.base == 20 ?? Critical Hit|~R multiply dmg x 2 ~R }} /w BloodstoneA [Apply](~BloodstoneA|Smack) That runs the power card macro Then running Token-mod to apply damage. !token-mod --set bar1_value|-[[(?{Enter Damage no +/-})]] --ids @{target|Target 1|token_id} /em damaged @{target|Target 1|token_name} for ?{Enter Damage no +/-} All get the post that dmg was applied I think I had edited it so just "Battle Axe"came up..the $wpn was a query at one point...lol SO I guess in your case...Run your PC macro. With a "command button" to run ammo script. Then have it post to chat, or wispier to GM, for ammo spent.. Badabing
I have a power card for a generic attack using the OGL sheet. I would like to show a line for global damage like Sneak Attack but if the PC that uses the macro doesn't have a global damage mod, I get an error. An inelegant workaround is to give every PC a default global damage mod with its active flag set to 0, of type "blank" doing 0d0 damage. Is there a better way? --?? @{selected|repeating_damagemod_$0_global_damage_active_flag} == 1 ?? @{selected|repeating_damagemod_$0_global_damage_type}|[[ @{selected|repeating_damagemod_$0_global_damage_damage} ]]
The --spell_list tag lists only prepared spells.&nbsp; NPCs in purchased (WotC) products don't have their spells shown as "prepared" by default.&nbsp; Is there a way to have the --spell_list tag show all spells, not just prepared?&nbsp; (Or, if anyone has a simple solution for setting all spells to "prepared" that could work).
Scott to be honest... even if you had 100 spellcasters.... it should only take a few seconds per character to 'prepare' them all by clicking that little red dot for each spell. I know it's a pain but I can't imagine it's a huge issue.
BilBo 2 said: Badabing After a bit of testing, I've been able to tweak things a bit. Now the !ammo script launch directly when the player attacks with his weapon.&nbsp; !power {{ (attacks goes here) }} &amp;#13;!ammo &amp;#64;{character_id} &amp;#64;{chargeurfull} &amp;#91;&amp;#91;-1*{@{Recharge} + &amp;#63;{Tir automatique&amp;#63;|Non,0|Oui,-2}}&lt;1}&amp;#93;&amp;#93;) Simply adding the&nbsp; &amp;#13; in front of the ammo script get everything done. Thanks for your time.
On another topic regarding power cards, do you have any idea how I could run a modifier for distance? So, the situation I'm facing is this one : In my custom game, ranged weapon are into 3 type (pistols, rifles and heavy) and the ranged distance is divided in 5 (short, medium, long, very long, extreme). Each weapon's type ability to hit the target is modulated differently according to the distance of the target. Pistols are -2/-3/-5 for long/very long/extreme distance, rifle are -1/-2/-3 for long/very long/extreme and so on and so forth.&nbsp; Since I can't use a rollID as variable, I'm trying to figure a clever way to implement the modifier when considering the distance AND the weapons type. &nbsp; I know I can just include a query with a ?modifier?| input in my formula but I would prefer it to be automatic (I know I must ask the distance through a query though). Please note that the character sheet does already define a weapon type with @{wpntype} through my repeating sections (repeating_weapons_wpntype with pistol, rifle and heavy) so I could use this info with a conditional somehow. Right now, my button in the character sheet is defined with this code: &lt;button type="roll" name="roll_jet_total" value=" &amp;#13;!power {{ @{whispertoggle} --tokenid|@{selected|token_id} --emote|@{selected|token_name} tire avec son arme sur @{target|token_name} --target_list|@{target|token_id} --emotefont|font-family: New Century Schoolbook, serif; font-weight: bold; font-size:10pt; --border|1px solid #A9A9A9 --corners|10 --bgcolor|8d0709 --txcolor|#363636 --erowtx|#000000 --erowbg|#A9A9A9 --orowtx|#000000 --orowbg|#708090 --name|Attaque de tir --leftsub|@{vrainom} --rightsub|@{wpntype} --hroll||[[ [$MS] [NH] 4df - @{hurtlvl} + @{rolelvlwpn} + @{stunlvl} + @{qualiterir} + ?{Modificateur pour toucher la cible?|0|-3|-2|-1|+1|+2|+3} - ?{Niveau de difficulté pour atteindre la cible?|0}]] --soundfx|_audio,play,nomenu|@{bruittir} --?? @{genre} == plasma ?? hroll||[[ [$plasmabr] [NH] 1d10]] --?? @{genre} == plasma AND $plasmabr.total &lt;= 1 ?? Brûlure:|$$#ff0000|**Arme inutilisable pendant trois rondes!**$$ --?? $MS.total &lt; 0 ?? Marge d'échec :|[^MS], Tir raté. --?? $MS.total &gt;= 0 ?? Marge de succès :|[^MS], Tir réussi --?? $MS.total &gt;= 0 ?? $Test d’esquive :|[[ [$Esq] [NH] 4df - @{hurtlvl} + @{stunlvl} + @{esquivetotale}]] &nbsp;&nbsp;&nbsp;&nbsp; --?? $Esq.total &gt; $MS.total AND $MS.total &gt;= 0 ?? Esquive| La cible anticipe les tirs. &nbsp;&nbsp;&nbsp;&nbsp;--?? $Esq.total &lt;= $MS.total AND $MS.total &gt;= 0 ?? Esquive| La cible est touchée. &nbsp;&nbsp;&nbsp;&nbsp;--?? $Esq.total &lt;= $MS.total AND $MS.total &gt;= 0 ?? Niveau de blessure:|[[ [$DMG] [NH] 0d0 + @{INJ} - @{target|combined_personal_defense} ]] &nbsp;&nbsp;&nbsp;&nbsp;--?? $Esq.total &lt;= $MS.total AND $MS.total &gt;= 0 ?? alterbar|_target|@{target||token_id} _bar|1 _amount|-([^DMG]/2+[^MS]/2) _show|GM }} &amp;#13;!ammo &amp;#64;{character_id} &amp;#64;{chargeurfull} &amp;#91;&amp;#91;-1*{@{Recharge} + &amp;#63;{Tir automatique&amp;#63;|Non,0|Oui,-2}}&lt;1}&amp;#93;&amp;#93;) "&gt;&lt;/button&gt; And it oup
1576536685

Edited 1576536701
Dad
Pro
While using this macro to help speed up skill resolution for my game, I ran across a weird bug that causes the "mt" or match dice function to fail. Using the following macro I get the error: " Could not determine result type of: [{\"type\":\"M\",\"expr\":12},{\"type\":\"C\",\"text\":\"d12mt \"}]" !power {{ --Roll | [[12d12mt]] }} Is there a simple solution I missed while looking through the script's wiki entry, or is the "mt" function really incompatible with the PowerCards api?
I know this might be a silly question, but has the name of the&nbsp; 5E OGL sheet changed? I am not getting the PCMHelper app to work creating the new attributes, and tried to start a new game with that specific sheet, but am not showing one.
1580273016

Edited 1580273248
Extremely new to all of this. But just started using Power Cards along with the power card macro helper and im getting this error when i have a PC use healing word and this second error when i have a PC use a net to attack.&nbsp; {"name":"SyntaxError","expected":["\"(\"","\".\"","\"[\"","\"abs(\"","\"ceil(\"","\"d\"","\"floor(\"","\"round(\"","\"t\"","\"{\"","[ |\\t]","[+|\\-]","[0-9]"],"found":")","message":"Expected \"(\", \".\", \"[\", \"abs(\", \"ceil(\", \"d\", \"floor(\", \"round(\", \"t\", \"{\", [ |\\t], [+|\\-] or [0-9] but \")\" found.","offset":9,"line":1,"column":10} "Could not determine result type of: [{\"type\":\"L\",\"text\":\"$Dmg\"},{\"type\":\"M\",\"expr\":2}]" Both of these seem to crash the api and i have to restart. I'm having a pretty inconsistent experience just trying to do basic things and so im positive&nbsp;its because i set something up incorrectly or am doing something wrong. Thanks in advance for the help!
Two questions: 1) Is there anyway to do inlinereplace after a condition? &nbsp; so something like --?? ?{selected|Alignment} == Evil ?? inlinereplace|Bonus|10 2) Is there a way to get range between two tokens within Powercards (for weapons with different range grids)? This could be a function I'm not seeing or an API that's out there that can be called by Powercards (either to use in a conditional or even just to display) So if as a conditional, might be something like &nbsp;(using 'RangeCall' as a placeholder here for whatever actually works) --?? RangeCall &lt; 15 ?? Range: |Short &nbsp; or if just displayed then --Range: |&nbsp;RangeCall &nbsp; Thanks
1582185714

Edited 1582186067
Hello, firstly, a big thank you for this script which is really great. I use a fake character to store various variables in the form of attributes. Is it possible to change an attribute of a character with a roll made in a Powercards?
Darshyne said: Hello, firstly, a big thank you for this script which is really great. I use a fake character to store various variables in the form of attributes. Is it possible to change an attribute of a character with a roll made in a Powercards? I haven't worked with it much, but I believe that the API ChatSetAttribute can change attributes on a character, and I think you can Use Powercards to call to other API.&nbsp;
1582331313

Edited 1582332424
Victor B.
Pro
Sheet Author
API Scripter
I have a proposal here.&nbsp; I'm working on Combat Master, formerly Combat Tracker, formerly Combat Tracker and Status Info, which rolls init using internal or group-init, integrates with Macros/APIs while managing a turnorder, who is up in that turnorder, supports the new custom icons for conditions using libTokenMarker API (by The Aaron), assigns/removes conditions and tracks the duration of those conditions automatically removing them when they run their course (spells, whatever) plus a lot more...i.e....manage combat.&nbsp;&nbsp; Your script came up.&nbsp; I have to take your syntax as is, Roll20 won't do any conversions of @{character_name} @{token_id} @{character_id} before I send to chat, so I came up with a way to support that.&nbsp; However, {SELECTED} doesn't work.&nbsp; The Aaron has a post about this as well.&nbsp; I can republish.&nbsp; I'd like to call your API fully, but to do that I'd like to propose you continue the current syntax for backward compatibility, but add a new command --ids &lt;comma delimited list of tokens ids&gt;.&nbsp; If you see ids coming in, use the token to go to the char sheet.&nbsp; Use the charsheet for the attributes.&nbsp; In addition you can use msg.selected for selected token ids and do the same thing, each token tracking back to char sheet back to attributes. Use the token -&gt; char sheet -&gt; attributes and then you don't need any @{} syntax.&nbsp; Simplifies your syntax as well and makes it easier to use.&nbsp; So support current way of doing it and in addition, add a token driven processing using either msg.selected OR --ids and don't require all the @{} syntax requirements.&nbsp; Then I can call your API with full capability.&nbsp; Right now there's too much macro based, Roll20 converted syntax, for me to use all your functionality.&nbsp; Just a thought.&nbsp; We all volunteer here.&nbsp; So, not a big deal if you don't have time to do this or don't want to.&nbsp;&nbsp;