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
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 4)

1518284828

Edited 1518284877
Craven said: How can I add [$Roll1] and [$Roll2] and [$Roll3]? Here is a workaround: !power {{ --tokenid|@{selected|token_id} --emote|@{selected|character_name} Perceives his surroundings. --titlebackground|none --titlefontshadow|none --format|Conditions --corners|10 --name|Perception --leftsub|@{selected|character_name} --?? $Roll1 >= 97 ?? Roll1|[! [^Roll1.base] !] --?? $Roll2 >= 97 ?? Roll2|[! [^Roll2.base] !] --?? $Roll3 >= 97 ?? Roll3|[! [^Roll3.base] !] --Roll:| [[ [$Roll1]{1d100} + [$Roll2]{1d100} + [$Roll3]{1d100} + [$Roll4]{1d100} + 139 ]] }}
1518438143

Edited 1518438206
Hi everyone, i've an another issue, again. I want to improve the macros attack, to put a différent result on a natural 1. Something like "critical miss". Sometimes we don't see the critical miss and i want to improve the effect. But my macro don't work fine, sometimes it broke the API Script. And, when a natural 1 happens i've 2 lines : "Echec", and "Echec critique", i want only one result : "Echec Critique" Here the macro :  !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d'embrocher @{target|character_name} --name|Arc Long --leftsub|Action --rightsub|Distance 45-180m --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb} +2]] [PROF]] | Advantage, 2d20kh1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb} +2]] [PROF]] | Disadvantage, 2d20kl1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb} +2]] [PROF]]} ]] vs AC --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_play|Cmiss --?? $Atk.base == 2 OR $Atk.total < @{target|AC}?? !Miss:|Echec. --?? $Atk < @{target||ac} ?? soundfx|_play|miss --?? $Atk >= @{target||ac} ?? soundfx|_play|Arrow1 --?? $Atk.total >= @{target||ac} AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod}]] Dommage Perforant --?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod}]] Dommage Perforant --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all}}
Ziterman S. said: Hi everyone, i've an another issue, again. I want to improve the macros attack, to put a différent result on a natural 1. Something like "critical miss". Sometimes we don't see the critical miss and i want to improve the effect. But my macro don't work fine, sometimes it broke the API Script. And, when a natural 1 happens i've 2 lines : "Echec", and "Echec critique", i want only one result : "Echec Critique" Here the macro :  !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d'embrocher @{target|character_name} --name|Arc Long --leftsub|Action --rightsub|Distance 45-180m --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb} +2]] [PROF]] | Advantage, 2d20kh1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb} +2]] [PROF]] | Disadvantage, 2d20kl1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb} +2]] [PROF]]} ]] vs AC --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_play|Cmiss --?? $Atk.base == 2 OR $Atk.total < @{target|AC}?? !Miss:|Echec. --?? $Atk < @{target||ac} ?? soundfx|_play|miss --?? $Atk >= @{target||ac} ?? soundfx|_play|Arrow1 --?? $Atk.total >= @{target||ac} AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod}]] Dommage Perforant --?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod}]] Dommage Perforant --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all}} --?? $Atk.base == 2 OR $Atk.total < @{target|AC} ?? !Miss:|Echec. this will always run when base is 2 or total is less then target ac so rolling a 1 will trigger both usally. I would add vs AC [[@{target||npc_ac}]] on the attack line so you can see the AC,  plus change --?? $Atk.base == 2 OR $Atk.total < @{target|AC} ?? !Miss:|Echec. to --?? $Atk.base == 2 OR $Atk.total < @{target||npc_ac} ?? !Miss:|Echec. and you need a space before the second ?? so i corrected that.
1518661581

Edited 1518661941
John D.
Sheet Author
API Scripter
Hello, I'm new at this I am trying to create a macro for Dark Heresy 2nd Edition Can anyone tell me why this isn't working? !power {{ --titlefontshadow|none --titlefontsize| 12px --subtitlefontsize | 18px --corners|10 --orowbg|#9395CA --erowbg|#9395CA --format|Attributes --name|@{Selected|character_name} --leftsub|Weapon Skill --Roll|~R [[ [$Roll] [[1d100]] ]] ~R --Target|~R [[ [$Roll2] [[(@{selected|WeaponSkill} + ?{Modifier|0})]] ]] ~R --?? $Roll1.total == 1 ?? Autosuccess|**@{Selected|character_name} rolled a 1 and automatically succeeds.** --?? $Roll1.total == 100 ?? Autofailure|**@{Selected|character_name} rolled a 100 and automatically fails.** --?? $Roll1.total <= $Roll2.total ?? Success|**@{Selected|character_name} succeeds by [[ floor( $Roll2/10) - floor($Roll1/ 10) + 1 ]] degree(s).** --?? $Roll1.total > $Roll2.total ?? Failure|**@{Selected|character_name} succeeds by [[ floor( $Roll1/10) - floor($Roll2/ 10) + 1 ]] degree(s).** }}
1518676293

Edited 1518676323
John D. said: Hello, I'm new at this I am trying to create a macro for Dark Heresy 2nd Edition Can anyone tell me why this isn't working? !power {{ --titlefontshadow|none --titlefontsize| 12px --subtitlefontsize | 18px --corners|10 --orowbg|#9395CA --erowbg|#9395CA --format|Attributes --name|@{Selected|character_name} --leftsub|Weapon Skill --Roll|~R [[ [$Roll1] [[1d100]] ]] ~R --Target|~R [[ [$Roll2] [[(@{selected|WeaponSkill} + ?{Modifier|0})]] ]] ~R --?? $Roll1.total == 1 ?? Autosuccess|**@{Selected|character_name} rolled a 1 and automatically succeeds.** --?? $Roll1.total == 100 ?? Autofailure|**@{Selected|character_name} rolled a 100 and automatically fails.** --?? $Roll1.total <= $Roll2.total ?? Success|**@{Selected|character_name} succeeds by [[ floor( $Roll2/10) - floor($Roll1/ 10) + 1 ]] degree(s).** --?? $Roll1.total > $Roll2.total ?? Failure|**@{Selected|character_name} succeeds by [[ floor( $Roll1/10) - floor($Roll2/ 10) + 1 ]] degree(s).** }} You forgot to make it $Roll1. Try it now
1518680948

Edited 1518713139
John D.
Sheet Author
API Scripter
That, and a few more problems. ⊙﹏⊙ Here are the result after I fiddle with it some more, still doesn't work, but I think I'm getting closer. Right, nevermind. I just found out that Roll IDs can't be [^called] into inline rolls. Is there still a way to accomplish this though? !power {{ --titlefontshadow|none --titlefontsize| 12px --subtitlefontsize | 18px --corners|10 --orowbg|#9395CA --erowbg|#9395CA --format|Attributes --name|@{Selected|character_name} --leftsub|Weapon Skill --Roll|~R [[ [$Roll] 1d100 ]] ~R --Target|~R [[ [$Target] 0d0 + @{selected|WeaponSkill} + ?{Modifier|0} ]] ~R --?? $Roll.total == 1 ?? Auto Success|**@{Selected|character_name} rolled a 1 and automatically succeeds.** --?? $Roll.total == 100 ?? Auto Failure|**@{Selected|character_name} rolled a 100 and automatically fails.** --?? $Roll.total <= $Target.total AND $Roll.total <> 1 AND $Roll.total <> 100 ?? Success|**@{Selected|character_name} succeeds by [[ floor( [^Target]/10) - floor([^Roll]/ 10) + 1 ]] degree(s).** --?? $Roll.total > $Target.total AND $Roll.total <> 1 AND $Roll.total <> 100 ?? Failure|**@{Selected|character_name} fails by [[ floor( [^Roll]/10) - floor([^Target]/ 10) + 1 ]] degree(s).** }}
You could use conditionals to output the degrees of success and failure. If @{selected|WeaponSkill} is just a number, you could furthermore replace all instances of [^Target] with @{selected|WeaponSkill} + ?{Modifier}
1518841282

Edited 1518841318
John D.
Sheet Author
API Scripter
Silvyre said: You could use conditionals to output the degrees of success and failure. If @{selected|WeaponSkill} is just a number, you could furthermore replace all instances of [^Target] with @{selected|WeaponSkill} + ?{Modifier} Could you please demonstrate? The problem that I'm seeing now is that the degrees of success and failure need to calculate the tens digit of the roll, but I just can't do [[floor([^Roll]/ 10)]] because Roll IDs can't be [^called] into inline rolls.
1518896913

Edited 1518897256
John D. said: Silvyre said: You could use conditionals to output the degrees of success and failure. If @{selected|WeaponSkill} is just a number, you could furthermore replace all instances of [^Target] with @{selected|WeaponSkill} + ?{Modifier} Could you please demonstrate? Sure; here is the simplest way to work around the issue of being unable to [^call] Roll IDs: !power {{ --titlefontshadow|none --titlefontsize| 12px --subtitlefontsize | 18px --corners|10 --orowbg|#9395CA --erowbg|#9395CA --format|Attributes --name|@{Selected|character_name} --leftsub|Weapon Skill --Roll|~R [! [^Roll.base] !] ~R --Target|~R [[ @{selected|WeaponSkill} + ?{Modifier|0} ]] ~R --?? $Roll.base == 1 ?? Auto Success|**@{Selected|character_name} rolled a 1 and automatically succeeds.** --?? $Roll.base == 100 ?? Auto Failure|**@{Selected|character_name} rolled a 100 and automatically fails.** --?? $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of success|[[ ceil((@{selected|WeaponSkill} + ?{Modifier} - [$Roll]{1d100} + 0.01) / 10) ]] -- Note :|0 degrees of success = 1 degree of failure; -1 degrees of success = 2 degrees of failure, etc. }} The output for degrees of failure for the above macro is suboptimal, so you may want to add in conditionals to improve it: !power {{ --titlefontshadow|none --titlefontsize| 12px --subtitlefontsize | 18px --corners|10 --orowbg|#9395CA --erowbg|#9395CA --format|Attributes --name|@{Selected|character_name} --leftsub|Weapon Skill --Roll|~R [! [^Roll.base] !] ~R --Target|~R [[ @{selected|WeaponSkill} + ?{Modifier|0} ]] ~R --hroll|[[ ceil((@{selected|WeaponSkill} + ?{Modifier} - [$Roll]{1d100} + 0.01) / 10) ]] ( Note : this roll is hidden.) --?? $Roll.base == 1 ?? Auto Success|**@{Selected|character_name} rolled a 1 and automatically succeeds.** --?? $Roll.base == 100 ?? Auto Failure|**@{Selected|character_name} rolled a 100 and automatically fails.** --?? $Roll >= 1 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of success|**@{Selected|character_name} succeeds by [! [^Roll] !] degree(s).** --?? $Roll == 0 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[1]] degree.** --?? $Roll == -1 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[2]] degrees.** --?? $Roll == -2 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[3]] degrees.** --?? $Roll == -3 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[4]] degrees.** --?? $Roll == -4 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[5]] degrees.** --?? $Roll == -5 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[6]] degrees.** --?? $Roll == -6 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[7]] degrees.** --?? $Roll == -7 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[8]] degrees.** --?? $Roll == -8 AND $Roll.base <> 1 AND $Roll.base <> 100 ?? Degrees of failure|**@{Selected|character_name} fails by [[9]] degrees.** }}
On a totally related subject - where is Sky?? I haven't seen him in months.
1519145104
John D.
Sheet Author
API Scripter
Silvyre said: John D. said: Silvyre said: You could use conditionals to output the degrees of success and failure. If @{selected|WeaponSkill} is just a number, you could furthermore replace all instances of [^Target] with @{selected|WeaponSkill} + ?{Modifier} Could you please demonstrate? Sure; here is the simplest way to work around the issue of being unable to [^call] Roll IDs: Beautifully done, thank you very much.
Wow. This script is simply amazing. It has sped up so many things for my playgroup that it almost doesn't feel like we're playing on roll20 anymore! So thank you so much for making this! I am currently trying to streamline the combat macros we are using so that the most common actions can be done at the touch of a button (and a few confirmation boxes), but I'm a bit stumped as to making a macro that can handle several attacks with all of our group's special cases. I currently have a macro that works wonderfully when it comes to making a single attack. It checks for crits and confirms them, deals damage depending on the type of attack, etc. And it does it's job wonderfully (though I will be making it look nicer at a later point, it's fairly basic now) But it has gotten rather big, and when I tried to basically copy the same rows of texts with different variables for a second attack I noticed it simply ran for a certain amount of lines, and then sorta... stopped. After some debugging I concluded that the macro ran just fine, but became too big and/or too convoluted so likely failed somehow. What I am wondering is if anyone has done anything similar and has any ideas on doing this that doesn't involve making a bunch of rolls and tons of conditional statements? Or perhaps some pointers to reduce the clutter down to a few rows of checks per roll? What follows is the macro I am using currently for a single attack. I use hidden rolls at the beginning to be able to make the rolls and then be able to access the ones that are relevant when the time comes, kinda like variables I guess. Perhaps this is a bad way of using them? Is there a way to access the actual roll at a later point and not just the total? Then, for the actual hits, you can see that they come in pairs, checking for the same conditions. This is because I couldn't figure out if there was a way to use the alterbars command right after another tag, so first I have the text saying what type of hit and damage dealt, then I have a separate row which actually changes the health. If anyone has any pointers I'm all ears! !power {{ --name|Ranged Attack! --$test2 |?{Sneak attack? 1 for yes, 0 for no.|1|0} --$test3 |?{Haste? 1 for yes, 0 for no.|0|1} --$test4 |?{Special ammo? 1 for yes, 0 for no.|0|1} --$test5 |?{Additional to Hit modifier?|0|1|2|3|4|5|6|7|8|9|10|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10} --hroll|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo? 1 for yes, 0 for no.} + ?{Haste? 1 for yes, 0 for no.} + ?{Sneak attack? 1 for yes, 0 for no.} * 5 ]][[ [$Crit1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo? 1 for yes, 0 for no.} + ?{Haste? 1 for yes, 0 for no.} + ?{Sneak attack? 1 for yes, 0 for no.} * 5 ]][[ [$Dmg1] 1d4 + 7 * ?{Special ammo? 1 for yes, 0 for no.} + 1 + ?{Sneak attack? 1 for yes, 0 for no.}*5d6]] --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 < @{target||bar3} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 < @{target||bar2} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 >= @{target||bar3} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 >= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 >= @{target||bar2} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 >= @{target||bar2} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[10 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-10 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[24]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-24 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[70 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-70 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[84 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-84 _show|all }}
Stellan N. said: Wow. This script is simply amazing. It has sped up so many things for my playgroup that it almost doesn't feel like we're playing on roll20 anymore! So thank you so much for making this! I am currently trying to streamline the combat macros we are using so that the most common actions can be done at the touch of a button (and a few confirmation boxes), but I'm a bit stumped as to making a macro that can handle several attacks with all of our group's special cases. I currently have a macro that works wonderfully when it comes to making a single attack. It checks for crits and confirms them, deals damage depending on the type of attack, etc. And it does it's job wonderfully (though I will be making it look nicer at a later point, it's fairly basic now) But it has gotten rather big, and when I tried to basically copy the same rows of texts with different variables for a second attack I noticed it simply ran for a certain amount of lines, and then sorta... stopped. After some debugging I concluded that the macro ran just fine, but became too big and/or too convoluted so likely failed somehow. What I am wondering is if anyone has done anything similar and has any ideas on doing this that doesn't involve making a bunch of rolls and tons of conditional statements? Or perhaps some pointers to reduce the clutter down to a few rows of checks per roll? What follows is the macro I am using currently for a single attack. I use hidden rolls at the beginning to be able to make the rolls and then be able to access the ones that are relevant when the time comes, kinda like variables I guess. Perhaps this is a bad way of using them? Is there a way to access the actual roll at a later point and not just the total? Then, for the actual hits, you can see that they come in pairs, checking for the same conditions. This is because I couldn't figure out if there was a way to use the alterbars command right after another tag, so first I have the text saying what type of hit and damage dealt, then I have a separate row which actually changes the health. If anyone has any pointers I'm all ears! !power {{ --name|Ranged Attack! --$test2 |?{Sneak attack? 1 for yes, 0 for no.|1|0} --$test3 |?{Haste? 1 for yes, 0 for no.|0|1} --$test4 |?{Special ammo? 1 for yes, 0 for no.|0|1} --$test5 |?{Additional to Hit modifier?|0|1|2|3|4|5|6|7|8|9|10|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10} --hroll|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo? 1 for yes, 0 for no.} + ?{Haste? 1 for yes, 0 for no.} + ?{Sneak attack? 1 for yes, 0 for no.} * 5 ]][[ [$Crit1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo? 1 for yes, 0 for no.} + ?{Haste? 1 for yes, 0 for no.} + ?{Sneak attack? 1 for yes, 0 for no.} * 5 ]][[ [$Dmg1] 1d4 + 7 * ?{Special ammo? 1 for yes, 0 for no.} + 1 + ?{Sneak attack? 1 for yes, 0 for no.}*5d6]] --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 < @{target||bar3} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 < @{target||bar2} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 >= @{target||bar3} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 >= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 >= @{target||bar2} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 >= @{target||bar2} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[10 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-10 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[24]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-24 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[70 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-70 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[84 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-84 _show|all }} What game system is this?
1519198791

Edited 1519203209
It's Pathfinder, but with a custom crit generator that does different things depending on wheter the attack is a crit and miss, crit and hit and double crit, which explains all those extra crit conditions.  We tend to use the red token bar for basic AC and the blue bar for flat-footed AC so that's why the macro is checking for those separately depending on whether the attack is a sneak attack or not, which also practically doubles the rows in the macro I suppose numbered questions are easier to answer so here goes: 1: Is there any way to effectivize the macro I currently have so that I can add up to three additional attacks? 2: Is there a way to make hidden rolls and then show them in their entirety if they become relevant? The way I am doing it now only allows me to show the total of the roll. This is good for making a crit confirm roll that only really applies when a critical threat happens. 3: Can you make an alterbar command in the middle of another tag or do I need to make duplicate rows that I currently do to separate a text command and the alterbar command. 4: Can you access other macros using a script? 5: Can you repeat entire chunks of the script? Might be a good way to make additional attacks, like a while-loop.
I've actually found the answer to some of my questions myself: 4: Yes, simply use nested macros:&nbsp; <a href="https://wiki.roll20.net/Macros" rel="nofollow">https://wiki.roll20.net/Macros</a> 5: Kind of. I've noticed that if you put a nested macro inside a powercards script it will treat that macro as part of the powercards script. So might be a doable solution. While experimenting with this I have indeed noticed that there seems to be a hardcap on how much data the powercards can handle though, so I will have to slim my macro considerably. Any way to "trim the fat", if you will, would be appreciated!
1519282375

Edited 1519285351
Stellan N. said: when I tried to basically copy the same rows of texts with different variables for a second attack I noticed it simply ran for a certain amount of lines, and then sorta... stopped. Roll20 has a hard cap on the number of Roll Queries that can be simultaneously processed by the Text Chat: 100. Your single-attack macro contains 66 Roll Queries, so attempting to double that would leave 32 Roll Queries unprocessed. However, in your case, you can simply cut most of those Roll Queries by using Roll IDs: !power {{ --name|Ranged Attack! --hroll| [[ [$SA] ?{Sneak attack?|Yes, 1|No, 0} + {0} ]] ?{Haste?|No, 0|Yes, 1} [[ [$Ammo] ?{Special ammo?|No, 0|Yes, 1} + {0} ]] ?{Additional to Hit modifier?|0|1|2|3|4|5|6|7|8|9|10|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10} [[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} * 5 ]] [[ [$Crit1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} * 5 ]] [[ [$Dmg1] 1d4 + 7 * ?{Special ammo?} + 1 + ?{Sneak attack?} * 5d6 ]] --?? $Atk1.base &lt;&gt; 20 AND $SA == 0 AND $Atk1 &lt; @{target||bar3} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base &lt;&gt; 20 AND $SA == 1 AND $Atk1 &lt; @{target||bar2} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base &lt;&gt; 20 AND $SA == 0 AND $Atk1 &gt;= @{target||bar3} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base &lt;&gt; 20 AND $SA == 0 AND $Atk1 &gt;= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base &lt;&gt; 20 AND $SA == 1 AND $Atk1 &gt;= @{target||bar2} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base &lt;&gt; 20 AND $SA == 1 AND $Atk1 &gt;= @{target||bar2} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 _show|all --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 _show|all --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 1d4 _show|all --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 1d4 _show|all --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base == 20 AND $Ammo == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[10 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-10 _show|all --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base == 20 AND $Ammo == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[24]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-24 _show|all --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 _show|all --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} AND $Ammo == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 _show|all --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} AND $Ammo == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base == 20 AND $Ammo == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[70 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base == 20 AND $Ammo == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-70 _show|all --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base == 20 AND $Ammo == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[84 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $SA == 1 AND $Crit1.base == 20 AND $Ammo == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-84 _show|all }} Now that there's only 14 Roll Queries, you should be able to add one or two more attacks to this macro without a problem.
1519296567

Edited 1519296644
Woah. Not only does this actually help me fix up my macro, it also makes things much nicer to read, and you even added another functionality I wasn't aware of; turning query answers into numerical values! I couldn't have hoped for a better response! Thank you so much! I take it there isn't a way to process two commands into one line then? So those duplicate condition checks for those alterbar commands will have to remain for now. Was there any way of referencing an entire die roll and not just the total or base roll, in order to show the players what a hidden die roll was in its entirety? Would be great for those crit confirm rolls and damage rolls, when they are actually relevant. Either way, thank you so much for your help! Really taught me a lot!
1519322318

Edited 1519364818
I was further able to reduce your macro by factoring some logic together by replacing some Roll IDs with Queries (or vice versa) where helpful: !power {{ --name|Ranged Attack! --hroll| ?{Sneak attack?|Yes, 5|No, 0} ?{Haste?|No, 0|Yes, 1} ?{Special ammo?|No, 0|Yes, 1} ?{Additional to Hit modifier?|0|1|2|3|4|5|6|7|8|9|10|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10} --?? $Atk1 &gt;= @{target||bar3} ?? Atk1|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} ]] --?? $Atk1.base == 20 ?? Crit1|[[ [$Crit1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} ]] --?? $Atk1 &gt;= @{target||bar3} ?? Dmg1|[[ [$Dmg1] 1d4 + ?{Special ammo?} * 7 + 1 + ?{Sneak attack?}d6 ]] --?? $Atk1.base &lt;&gt; 20 AND $Atk1 &lt; @{target||bar3} ?? First attack Missed|**[^Atk1], You missed!** --?? $Atk1.base &lt;&gt; 20 AND $Atk1 &gt;= @{target||bar3} ?? First attack Hit!|**[^Atk1], You Hit! Dealing [^Dmg1] damage!** --?? $Atk1.base &lt;&gt; 20 AND $Atk1 &gt;= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1] _show|all --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} ?? First attack Crit!|**Crit [^Atk1] and Miss [^Crit1]. Dealing [[ [$CM] 5 + ?{Special ammo?} * 7 + ?{Sneak Attack?} * 6 ]] Damage. Roll on the Crit table with a [[^Atk1] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CM] _show|all --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} ?? First attack Crit!|**Crit [^Atk1] and Hit [^Crit1]. Dealing [! [^CM] !] + 1d4 Damage. Roll on the Crit table with a [[^Atk1] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CM] + 1d4 _show|all --?? $Atk1.base == 20 AND $Crit1.base == 20 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [! [^CM] !] x 2 Damage. Roll on the Crit table with a [[^Atk1] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CM] + [^CM] _show|all }}
Silvyre is a master of the macros.
1519371173

Edited 1519391004
That he is! I can't say I even understand how that macro works, but it looks so sleek and awesome! First off, how can you check what a rollid is at the same line as you're rolling it? I'm guessing it works because rollids are always executed or something? I'm specifically thinking about this line: --?? $Atk1 &gt;= @{target||bar3} ?? Atk1|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} ]] And I'm guessing that has something to do with the reason why you removed the rollids for the roll queries at the top? Or maybe it just wasn't needed anymore with how the macro was set up, since I'm guessing you can't add rollids to another rollid? Either way I'm gonna have some fun playing around with adding more attacks in the macro when I get to a computer, you've been incredibly helpful, thanks!
Silvyre said: I was further able to reduce your macro by factoring some logic together by replacing some Roll IDs with Queries (or vice versa) where helpful: !power {{ --name|Ranged Attack! --hroll| ?{Sneak attack?|Yes, 5|No, 0} ?{Haste?|No, 0|Yes, 1} ?{Special ammo?|No, 0|Yes, 1} ?{Additional to Hit modifier?|0|1|2|3|4|5|6|7|8|9|10|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10} --?? $Atk1 &gt;= @{target||bar3} ?? Atk1|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} ]] --?? $Atk1.base == 20 ?? Crit1|[[ [$Crit1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} ]] --?? $Atk1 &gt;= @{target||bar3} ?? Dmg1|[[ [$Dmg1] 1d4 + ?{Special ammo?} * 7 + 1 + ?{Sneak attack?}d6 ]] --?? $Atk1.base &lt;&gt; 20 AND $Atk1 &lt; @{target||bar3} ?? First attack Missed|**[^Atk1], You missed!** --?? $Atk1.base &lt;&gt; 20 AND $Atk1 &gt;= @{target||bar3} ?? First attack Hit!|**[^Atk1], You Hit! Dealing [^Dmg1] damage!** --?? $Atk1.base &lt;&gt; 20 AND $Atk1 &gt;= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1] _show|all --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} ?? First attack Crit!|**Crit [^Atk1] and Miss [^Crit1]. Dealing [[ [$CM] 5 + ?{Special ammo?} * 7 + ?{Sneak Attack?} * 6 ]] Damage. Roll on the Crit table with a [[^Atk1] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &lt; @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CM] _show|all --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} ?? First attack Crit!|**Crit [^Atk1] and Hit [^Crit1]. Dealing [! [^CM] !] + 1d4 Damage. Roll on the Crit table with a [[^Atk1] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $Crit1.base &lt;&gt; 20 AND $Crit1 &gt;= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CM] + 1d4 _show|all --?? $Atk1.base == 20 AND $Crit1.base == 20 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [! [^CM] !] x 2 Damage. Roll on the Crit table with a [[^Atk1] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CM] + [^CM] _show|all }} Silvyre how does this work --?? $Atk1 &gt;= @{target||bar3} ?? Atk1|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo?} + ?{Haste?} + ?{Sneak attack?} ]] you are checking $Atk1 before you roll for [$Atk1] ?
1519421811

Edited 1519422162
Stellan N. said: I'm guessing it works because rollids are always executed or something? Yes, that's correct. Every roll (except those that are placed within $hidden tags) is processed by PowerCards before it evaluates any conditional statements. Or maybe it just wasn't needed anymore with how the macro was set up, since I'm guessing you can't add rollids to another rollid? Yup. Since I replaced static numbers within the attack and damage rolls with Roll Queries (e.g. for sneak attack), there was no longer any need for the Roll IDs that corresponded to those static numbers.
Thanks a bunch! I've had a lot of fun scripting this weekend, making a bunch of macros for the RPG system I am creating, using what you've taught me to make some really neat little macros! I really do appreciate the help you've given me! As it stands right now, I will probably not be able to make the multi attack macro, since it seems the alterbar script can only handle one alteration at a time, so despite the alterbars script giving me outputs that say that the NPC is taking 4 different damage values, separately, it only applies the last one of those alterbar commands to the health bar. But I suppose doing one at a time is more dramatic anyway, so not too much of a biggie, at least it autocalculates pretty much everything I would want so that's awesome!&nbsp; Again, thanks a bunch for all the help you've given!
You're very welcome! Happy scripting!
Hello everyone ! I am trying to script some of the characters I play with in my 4E session. The end result I wish to obtain is a script which can attack multiple opponents, damage them if the power hits and maybe play a sound too ! So I managed to get close to something but I have no idea on how to make it work. See below: !power --format|encounter --name|Thorn Spray --leftsub|At-Will --rightsub|Standard Action --emote|You release a blast of thorns that puncture your foes. --Range|Close blast 5 (Each creature in the blast) --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} --Attack#?{Number of Targets|1}|[[ [$Atk] 1d20 + 6 ]] vs %%Fortitude%% Fort (%%token_name%%) --?? $Atk.base == 1 OR $Atk.total &lt; @{target|1st|Fortitude} ?? !Miss:#1|You missed. --?? $Atk.total &gt;= @{target|1st|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? !Hit: *1|[[ [$Dmg] 1d10 + 6 ]] damage. --?? $Atk.total &gt;= @{target|1st|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? alterbar3 *1|_target|@{target|1st|token_id} _bar|3 _amount|-[^Dmg] _show|GM --?? $Atk.base == 1 OR $Atk.total &lt; @{target|2nd|Fortitude} ?? !Miss:#1|You missed. --?? $Atk.total &gt;= @{target|2nd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? !Hit: *2|[[ [$Dmg] 1d10 + 6 ]] damage. --?? $Atk.total &gt;= @{target|2nd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? alterbar3 *2|_target|@{target|2nd|token_id} _bar|3 _amount|-[^Dmg] _show|GM --?? $Atk.base == 1 OR $Atk.total &lt; @{target|3rd|Fortitude} ?? !Miss:#1|You missed. --?? $Atk.total &gt;= @{target|3rd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? !Hit: *3|[[ [$Dmg] 1d10 + 6 ]] damage. --?? $Atk.total &gt;= @{target|3rd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? alterbar3 *3|_target|@{target|3rd|token_id} _bar|3 _amount|-[^Dmg] _show|GM So this "little script" does the following: * creates a token list * tests attack for each token in the list * then conditionals begin to roll and apply damage if they hit. My issue now is that only the last token in the list is used, and the other two, although the values are calculated, the damage is never applied. I am using the same tokens and I believe that might be the source of the issue, because if I have three totally different tokens it works ! Thing is in 4E I have minions and monsters of the same type (like 3 bandits with 2 thugs and 6 goons). I can target with the script above one bandit, one thug and one goon but if I want to target three goons or two bandits, the script dies. Notes: I am using the latest version of PowerCards, AlterBars, Roll20AM. I managed to obtain some results with single use, single target powers. I need more targets !
Raul - Tiberiu I. said: Hello everyone ! I am trying to script some of the characters I play with in my 4E session. The end result I wish to obtain is a script which can attack multiple opponents, damage them if the power hits and maybe play a sound too ! So I managed to get close to something but I have no idea on how to make it work. See below: !power --format|encounter --name|Thorn Spray --leftsub|At-Will --rightsub|Standard Action --emote|You release a blast of thorns that puncture your foes. --Range|Close blast 5 (Each creature in the blast) --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} --Attack#?{Number of Targets|1}|[[ [$Atk] 1d20 + 6 ]] vs %%Fortitude%% Fort (%%token_name%%) --?? $Atk.base == 1 OR $Atk.total &lt; @{target|1st|Fortitude} ?? !Miss:#1|You missed. --?? $Atk.total &gt;= @{target|1st|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? !Hit: *1|[[ [$Dmg] 1d10 + 6 ]] damage. --?? $Atk.total &gt;= @{target|1st|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? alterbar3 *1|_target|@{target|1st|token_id} _bar|3 _amount|-[^Dmg] _show|GM --?? $Atk.base == 1 OR $Atk.total &lt; @{target|2nd|Fortitude} ?? !Miss:#1|You missed. --?? $Atk.total &gt;= @{target|2nd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? !Hit: *2|[[ [$Dmg] 1d10 + 6 ]] damage. --?? $Atk.total &gt;= @{target|2nd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? alterbar3 *2|_target|@{target|2nd|token_id} _bar|3 _amount|-[^Dmg] _show|GM --?? $Atk.base == 1 OR $Atk.total &lt; @{target|3rd|Fortitude} ?? !Miss:#1|You missed. --?? $Atk.total &gt;= @{target|3rd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? !Hit: *3|[[ [$Dmg] 1d10 + 6 ]] damage. --?? $Atk.total &gt;= @{target|3rd|Fortitude} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? alterbar3 *3|_target|@{target|3rd|token_id} _bar|3 _amount|-[^Dmg] _show|GM So this "little script" does the following: * creates a token list * tests attack for each token in the list * then conditionals begin to roll and apply damage if they hit. My issue now is that only the last token in the list is used, and the other two, although the values are calculated, the damage is never applied. I am using the same tokens and I believe that might be the source of the issue, because if I have three totally different tokens it works ! Thing is in 4E I have minions and monsters of the same type (like 3 bandits with 2 thugs and 6 goons). I can target with the script above one bandit, one thug and one goon but if I want to target three goons or two bandits, the script dies. Notes: I am using the latest version of PowerCards, AlterBars, Roll20AM. I managed to obtain some results with single use, single target powers. I need more targets ! Might I suggest instead of using token ID use NPC name and give them different iterations, i.e. bandit 1, bandit 2, goon 1, goon 2, etc.
And when conditions change, I change the script too ?
I managed to figure out that I need **something** in the conditional line to take into account the number of targets which you input in the **--Attack#?{Number of Targets|1}** tag. Basically, if I select nine different tokens OR I select five different tokens and the sixth token, three times more BUT I want to roll the attack for only three targets, I need a conditional line which to account for the number of attacks given and then check for miss, hit and bar alter for each target input. TL;DR - target nine tokens creates a list, input the desired attack rolls (e.g 3 out of 9), roll three attacks, check for miss, check for hit, check for alter bar for those three tokens if the attacks hit.
Hi! I was wondering if anyone knew of a way to hide Repeating Actions that aren't there? I use a Macro with Power cards to pull up a spell list for NPC's however not all the slots are filled with each caster, so i end up with this. Any suggestions on how to hide the actions that aren't there?
Posting the macro will probably be needed to see how to fix it! ^^
Anthony V. said: Hi! I was wondering if anyone knew of a way to hide Repeating Actions that aren't there? I use a Macro with Power cards to pull up a spell list for NPC's however not all the slots are filled with each caster, so i end up with this. Any suggestions on how to hide the actions that aren't there? anyone have any ideas I am interested as well.&nbsp;
Hi, I'm trying to get a macro to work for 5e where a cantrip does a main attack to one one and does 3 damage to something adjacent. I can't seem to get the 3 damage to pop up in the same nice boxes rolls do and I was wondering what was wrong. !power {{ --tokenid|@{selected|token_id} --emote|Merkesh stabs at his foe as his blade begins to glow a sickly emerald color. --format|merkesh --name|Viper Strike --leftsub|Action --rightsub|Reach 5 ft. --Cantrip|Abjuration --Components|V,M --Attack|[[1d20 + 3 [Charisma Mod] + 2 [Proficiency]]] | [[1d20 + 3 [Charisma Mod] + 2 [Proficiency]]] vs AC --Hit|[[1d8 + 3 [Charisma Mod]]] piercing damage and [[3 [Charisma Mod]]] acid damage to an adjacent foe. }} Also, I don't know even where to start with this but I'd like to add to this queries for it critting and a hexblade curse(which if yes, would cause an additional 2 damage and make it crit on 19 as well as 20) Any help would be greatly appreciated!
As far as I understand, you can't get it to show up in the same little boxes as rolls do (with the accompanying math) without doing rolls. Fortunately you can go around this by making a 1d0 roll or maybe even a 0d0 roll and then add the 3 to it, which should work as intended.&nbsp; As for hexblade, just make a query at the start of the macro, like right before the attack roll, like so: --!Query|?{Hexblade?|No, 0|Yes, 2} And just add ?{Hexblade?} to your damage calculations as it'd be either +0 or +2. As for critting, you'd first have to make a rollid for the attack roll and then you'd have to do a bunch of conditionals, like: --?? $Atk1.base &lt;&gt; 20 AND $Atk1.base &lt;&gt; 19 AND $Atk1.base &lt;&gt; 1 AND&nbsp;$Atk1 &lt; AC ?? Attack Missed|**[^Atk1], You missed!** --?? $Atk1.base == 19 AND $Atk1 &gt; AC AND ?{Hexblade} &gt; 0 ?? Crit!|**Attack Crit!** --?? $Atk1.base == 19 AND $Atk1 &gt; AC AND ?{Hexblade} == 0 AND $Atk1 &gt; AC?? Regular hit!|**Attack Hit!** Just know that the macro can become very large!
Ian Y. said: Hi, I'm trying to get a macro to work for 5e where a cantrip does a main attack to one one and does 3 damage to something adjacent. I can't seem to get the 3 damage to pop up in the same nice boxes rolls do and I was wondering what was wrong. !power {{ --tokenid|@{selected|token_id} --emote|Merkesh stabs at his foe as his blade begins to glow a sickly emerald color. --format|merkesh --name|Viper Strike --leftsub|Action --rightsub|Reach 5 ft. --Cantrip|Abjuration --Components|V,M --Attack|[[1d20 + 3 [Charisma Mod] + 2 [Proficiency]]] | [[1d20 + 3 [Charisma Mod] + 2 [Proficiency]]] vs AC --Hit|[[1d8 + 3 [Charisma Mod]]] piercing damage and [[3 [Charisma Mod]]] acid damage to an adjacent foe. }} Also, I don't know even where to start with this but I'd like to add to this queries for it critting and a hexblade curse(which if yes, would cause an additional 2 damage and make it crit on 19 as well as 20) Any help would be greatly appreciated! + ?{Hexblade Curse?|No,0|Yes,@{selected|pb}} add this to your damage rolls to add hexblade curse damage. The curse uses the Proficiency bonus so instead using 2 I added @{selected|pb}. for the extra damage to other target you could do it on a different line with query like --Extra target damage:|?{adjacent target?|no, 0 yes,3} if you want the yellow box you will need to add ?{adjacent target?|no, [[0d0+0]] yes,[[0d0+3]]} I would change vs AC to vs **AC** [[@{target||npc_ac}]] this will ask you to click on the target and look at its AC to compare it to for Critical check you need a to set a rollid like&nbsp; --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] the roll id here is $Atk and $Atk.base will only use the roll. then you can compare like --?? $Atk.base =&gt; 19 ?? Critical Hit:|[[ [$CritDmg] 0d0+1]] --?? $CritDmg == 1 Critical:|[[ 2d8 + [[@{selected|Charisma_mod}]]&nbsp;+ ?{Hexblade Curse?|No,0|Yes,[[@{selected|pb}]] ]] piercing damage
Can anyone help me with this please ? !power {{ --name|Twin Strike --target_list|@{target|1st|token_id} | @{target|2nd|token_id} --hit *1| [[ [$Dmg1] 1d10 ]] --alterbar3 *1|_target|@{target|1st|token_id} _bar|3 _amount|-[^Dmg1] _show|GM --hit *2|[[ [$Dmg2] 1d8 ]] --alterbar3 *2|_target|@{target|2nd|token_id} _bar|3 _amount|-[^Dmg2] _show|GM }} Why doesn't this script apply damage twice on the same token ?
1520349819

Edited 1520349860
The Aaron
Pro
API Scripter
Mar 6th, 2018 ~ 10:15 am eastern Version: 3.6.0 Link: <a href="https://gist.github.com/Sky-Captain-13/452330a3d92" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d92</a>... Update: Added npc_action_list and spell_list as special tags that will create API Command Buttons for all npc actions and all npc or pc spells that are prepared (5e OGL Sheet only). --npc_action_list|@{selected|character_id} --spell_list|@{selected|character_id}
1520350252
The Aaron
Pro
API Scripter
Anthony V., Craven&nbsp; -- that should address what you wanted. (Not my code, BTW, just posting it for a friend. =D)
So awesome! Thank you!
The Aaron said: Anthony V., Craven&nbsp; -- that should address what you wanted. (Not my code, BTW, just posting it for a friend. =D) Thanks you, thank you
The Aaron said: Anthony V., Craven&nbsp; -- that should address what you wanted. (Not my code, BTW, just posting it for a friend. =D) OMG, I just tested this and its awesome. Please thank our friend.&nbsp;
The Aaron said: Anthony V., Craven&nbsp; -- that should address what you wanted. (Not my code, BTW, just posting it for a friend. =D) Issue with the spell part the names are right but when you click to cast the spells it cast different spells. Cure wounds cast Detect evil and Thunderwave cast Identify. Cantrips seem to be working fine. Level 2 spell are messed up too. My cleric PC has 2nd level spell and its cast the spell in order first spell on the list but the 6th spell is prepared, the second spell even tho the 9th spell is prepared. Its getting the name right just not cast the correct spells. This is for PC and OGL 5e in ToA. If you need a video or screen shots let me know.
1520412673

Edited 1520425378
Raul - Tiberiu I. said: Can anyone help me with this please ? !power {{ --name|Twin Strike --target_list|@{target|1st|token_id} | @{target|2nd|token_id} --hit *1| [[ [$Dmg1] 1d10 ]] --alterbar3 *1|_target|@{target|1st|token_id} _bar|3 _amount|-[^Dmg1] _show|GM --hit *2|[[ [$Dmg2] 1d8 ]] --alterbar3 *2|_target|@{target|2nd|token_id} _bar|3 _amount|-[^Dmg2] _show|GM }} Why doesn't this script apply damage twice on the same token ? To get this to work, you'll need to change "alterbar3 *1" and "alterbar3 *2" to "alterbar1" and "alterbar2" and then update to the latest version of PowerCards .
Not sure if this is the place for it, but as a player, not a GM, for 5e, can i get powercards to use for myself in the game I am currently playing in?
1520529058
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Mike, if the creator of the game you are in has a Pro subscription you could ask them to add the Powercards script, then you would be able to use it sure.
1520529170

Edited 1520529667
Ziechael said: Hi Mike, if the creator of the game you are in has a Pro subscription you could ask them to add the Powercards script, then you would be able to use it sure. Thank you so much Ziechael.&nbsp; I appreciate it greatly.&nbsp; Just wanted to clean up my personal gameplay during the campaign.&nbsp; Looks like Macros will be the way to go. Now to try to figure out exactly how to do that with no previous knowledge whatsoever.&nbsp; Should be fun
Mike H. said: Ziechael said: Hi Mike, if the creator of the game you are in has a Pro subscription you could ask them to add the Powercards script, then you would be able to use it sure. Thank you so much Ziechael.&nbsp; I appreciate it greatly.&nbsp; Just wanted to clean up my personal gameplay during the campaign.&nbsp; Looks like Macros will be the way to go. Now to try to figure out exactly how to do that with no previous knowledge whatsoever.&nbsp; Should be fun I think you can also gift a sub to your GM if they are not pro members. Any we are here to help with the macros. The group have a lot of them made already.
1520549643

Edited 1520550266
Thank you very much Craven. I am actually looking for a macro that can query the list of spells that I have prepped so that i can nest a macro with only the prepared spells for that day.&nbsp; Is this possible without too much hassle? Better explanation. A Druid knows all the spells available at their certain casting levels.&nbsp; I can only prepare so many per day/after a long rest. I want to be able to have a nested macro that whispers to me what spells i have available and is clickable to cast whichever spell i want to cast. This is a nested macro that i have for a ranger's longbow shots with or without Hail of Thorns and Sharpshooter /w Fenrith &{template:spell} {{name=Longbow Shots}} } {{description=Select your Shot: [Longbow](! #lb)[Longbow w/ HoT](! #lbhot)[Longbow w/ Sharp](! lbws)[Longbow w/ HoT S](! #lbhots)}} I obviously have each macro set up as well that it pulls from. Also, for my roll macro, I was wondering if there was a way to show each roll for it's own value.&nbsp; I currently use&nbsp; &{template:npc} {{normal=1}} {{name=}} {{rname=D20}} {{mod=}} {{r1=[[?{How many}d20]]}} but if i roll more than 1 of the same dice, it adds them automatically Any and all help would be great.
Silvyre said: Raul - Tiberiu I. said: Can anyone help me with this please ? !power {{ --name|Twin Strike --target_list|@{target|1st|token_id} | @{target|2nd|token_id} --hit *1| [[ [$Dmg1] 1d10 ]] --alterbar3 *1|_target|@{target|1st|token_id} _bar|3 _amount|-[^Dmg1] _show|GM --hit *2|[[ [$Dmg2] 1d8 ]] --alterbar3 *2|_target|@{target|2nd|token_id} _bar|3 _amount|-[^Dmg2] _show|GM }} Why doesn't this script apply damage twice on the same token ? To get this to work, you'll need to change "alterbar3 *1" and "alterbar3 *2" to "alterbar1" and "alterbar2" and then update to the latest version of PowerCards . Bow before the power of scripting gods ! Thanks Silvyre !
Mike H. said: Thank you very much Craven. I am actually looking for a macro that can query the list of spells that I have prepped so that i can nest a macro with only the prepared spells for that day.&nbsp; Is this possible without too much hassle? Better explanation. A Druid knows all the spells available at their certain casting levels.&nbsp; I can only prepare so many per day/after a long rest. I want to be able to have a nested macro that whispers to me what spells i have available and is clickable to cast whichever spell i want to cast. This is a nested macro that i have for a ranger's longbow shots with or without Hail of Thorns and Sharpshooter /w Fenrith &{template:spell} {{name=Longbow Shots}} } {{description=Select your Shot: [Longbow](! #lb)[Longbow w/ HoT](! #lbhot)[Longbow w/ Sharp](! lbws)[Longbow w/ HoT S](! #lbhots)}} I obviously have each macro set up as well that it pulls from. Also, for my roll macro, I was wondering if there was a way to show each roll for it's own value.&nbsp; I currently use&nbsp; &{template:npc} {{normal=1}} {{name=}} {{rname=D20}} {{mod=}} {{r1=[[?{How many}d20]]}} but if i roll more than 1 of the same dice, it adds them automatically Any and all help would be great. That is possible using Power Cards but once again your GM must have Pro Subscription to get it done.
Mike H. said: Thank you very much Craven. I am actually looking for a macro that can query the list of spells that I have prepped so that i can nest a macro with only the prepared spells for that day.&nbsp; Is this possible without too much hassle? Better explanation. A Druid knows all the spells available at their certain casting levels.&nbsp; I can only prepare so many per day/after a long rest. I want to be able to have a nested macro that whispers to me what spells i have available and is clickable to cast whichever spell i want to cast. This is a nested macro that i have for a ranger's longbow shots with or without Hail of Thorns and Sharpshooter /w Fenrith &{template:spell} {{name=Longbow Shots}} } {{description=Select your Shot: [Longbow](! #lb)[Longbow w/ HoT](! #lbhot)[Longbow w/ Sharp](! lbws)[Longbow w/ HoT S](! #lbhots)}} I obviously have each macro set up as well that it pulls from. Also, for my roll macro, I was wondering if there was a way to show each roll for it's own value.&nbsp; I currently use&nbsp; &{template:npc} {{normal=1}} {{name=}} {{rname=D20}} {{mod=}} {{r1=[[?{How many}d20]]}} but if i roll more than 1 of the same dice, it adds them automatically Any and all help would be great. Here is my macro for a spell book that show only prepared spells and is for a cleric. you just need to change the info at the top for the different classes. But you need powercards version 3.6.1&nbsp; !power {{ --emote|** @{selected|token_name} Uses a Holy Symbol ** --tokenid|@{selected|token_id} --titlebackground|none --titlefontshadow|none --whisper|@{selected|character_name} --corners|10 --format|atwill --name|^^Spell Book --leftsub|@{selected|character_name} --rightsub|Level @{selected|level} @{selected|class}^^ ^^ --**Spell Save DC**| [[ 8 + [[@{selected|pb}]]+ @{selected|wisdom_mod}]] ^^**Spell Attack Bonus** [[ [[@{selected|pb}]]&nbsp; + @{selected|wisdom_mod} ]] --Amount of Prepared Spells:| [[@{selected|wisdom_mod} + @{Selected|Level} ]] --!Domain Spells:|~C ** Domain Spells ** ~C **1st:** searing smite, shield ^^ **3rd:** heat metal, magic weapon ^^ **5th:** elemental weapon, protection from energy^^ **7th:** fabricate, wall of fire^^ **9th:** animate objects, creation^^ --!1|~C ** Available Spells Slots** ~C&nbsp; &nbsp; **Level 1 :** [[@{selected|lvl1_slots_total}]] **Remaining** [[@{selected|lvl1_slots_expended}]]^^ **Level 2 :** [[@{selected|lvl2_slots_total}]] **Remaining** [[@{selected|lvl2_slots_expended}]] **Level 3 :** [[@{selected|lvl3_slots_total}]] **Remaining** [[@{selected|lvl3_slots_expended}]] --spell_list|@{selected|character_id} }} and it looks like this in chat. I Allow my clerics PC to have all the cantrips. For Druid and cleric are similar and you will need to remove Domain Spell section and replace with Druid Circle info if applicable.