This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 3)

1448036156
Isembard
Pro
Sheet Author
Hello. I'm having trouble with Macros, I haven't tried anything complex but i am getting me this message in Chat: Hoping some one can suggest what I have done wrong. I have tested a few other people macros to check, but get the same message. Thanks
Can't nest, but you can just add AND $Ammo.total >= 1 to the attack roll lines. Oh duh, you're right!  Thanks HB!
FGIsembard said: Hello. I'm having trouble with Macros, I haven't tried anything complex but i am getting me this message in Chat: Hard to help without seeing the actual macro you're using. Does this work? !power {{ --name|PowerCard Test --!Test|This is a test. }}
1448037146
The Aaron
Pro
API Scripter
FGIsembard said: Hello. I'm having trouble with Macros, I haven't tried anything complex but i am getting me this message in Chat: Hoping some one can suggest what I have done wrong. I have tested a few other people macros to check, but get the same message. Thanks I'm guessing you don't have the {{ and }} in there around the arguments across multiple lines.
Oh duh... I'm dumb. I should go to bed. Been awake since 4pm yesterday.
1448037454

Edited 1448037496
Isembard
Pro
Sheet Author
Sorry, I knew I'd done something daft. I had copy/pasted the macro from a different game and not picked up the }} . Thank You
1448037577

Edited 1448037614
Isembard
Pro
Sheet Author
Embarrassingly I had sat for over an hour looking at that, lol
1448037697

Edited 1448037773
Sometimes when copying macros from here on the forums, the ! exclamation mark gets replaced by some html character entity or it adds an extra space in the macro... and that can also screw things up. Usually though, that one will still send !power into chat and not show any formatting changes.
1448039219
The Aaron
Pro
API Scripter
Yeah, I've seen that before too.  I think it's actually coping some non-printing unicode character.  The ! must be at the start of the line.  If you put the cursor on the !, move left one with the arrow key and then delete back to the beginning a few times, it usually fixes it.
1448040107

Edited 1448040157
Grrr...I'm still having issues with the trying to get the attack roll and such to not show when running out of ammo.  Again, probably something I'm boogering up. As soon as I add in the "AND" statements checking the $Ammo variable, the macro breaks.  It prompts for a target and my roll query, but displays nothing after that.  Even if I take out the conditional on the end that would display that they're out of ammo.  Here's what I've got.  I appreciate your help. !ammo @{selected|token_id} rangedammo1 -1 !power {{ --charid|@{character_id} --emote|@{selected|token_name} pulls back a @{rangedweaponname1} and fires at @{target|token_name}! --format|COMBAT --corners|10 --titlefont|Arial --titlefontsize|9 --subtitlefont|Arial --name|**Ranged Attack** --leftsub|**@{rangedweaponname1}** --rightsub|**Range 80/320** --Target:|$$#ff0000|**@{target|token_name}**$$ --Ammo:|[[ [$Ammo] @{rangedammo1} - 1 ]] out of [[ @{rangedammo1|max} ]] --Attack:|[[ [$Atk] @{AdvDisadv} + @{dexterity_mod} + @{prof_bonus} ]] vs AC --?? $Atk.total < @{target|npc_AC} AND $Atk.base <> 1 AND $Atk.base <> 20 AND $Ammo >= 1 ?? Miss:|The attack missed! --?? $Atk.base == 1 AND $Ammo >= 1 ?? Critical Miss:|The attack was fumbled! --?? $Atk.total >= @{target|npc_AC} AND $Atk.base <> 1 AND $Atk.base <> 20 AND $Ammo >= 1 ?? Hit:|You hit for [[ @{rangeddmg1} + @{dexterity_mod} ]] @{rangeddmgtype1} damage! --?? $Atk.base == 20 AND $Ammo >= 1 ?? Critical Hit:|You decimate the **@{target|token_name}** for [[ (@{rangeddmg1} + @{dexterity_mod}) * 2 ]] @{rangeddmgtype1} damage! --?? $Ammo.total <= 1 ?? Out of Ammo: You cannot attack with your @{rangedweaponname1}. }}
1448045905
Silvyre
Roll20 Mod Team
HoneyBadger said: Actually you should already be able to use --whisper|self,gm. If not, that would be easy to fix. --whisper|self,foo,gm will output to foo and gm but not to self
1448048358

Edited 1448049359
Silvyre
Roll20 Mod Team
!ammo @{selected|token_id} rangedammo1 -1 !power {{ --name|**Ranged Attack** -- ?? $Ammo < 0 ?? Out of Ammo:| You cannot attack [...]. -- ?? $Ammo >= 0 ?? 1 ammo used:|[[ [$Ammo|TXT] @{selected|rangedammo1} - 1 + 0d0 ]] of [[ [TXT] @{selected|rangedammo1|max} + 0d0 ]] now remaining. -- ?? $Ammo >= 0 ?? Attack:|[[ [$Atk] 1d20 ]] vs AC -- ?? $Ammo >= 0 AND $Atk.base == 1 ?? Critical Miss:|The attack was fumbled! -- ?? $Ammo >= 0 AND $Atk.base <> 1 AND $Atk.base <> 20 AND $Atk < @{target|npc_AC} ?? Miss:|The attack missed! -- ?? $Ammo >= 0 AND $Atk.base <> 1 AND $Atk.base <> 20 AND $Atk >= @{target|npc_AC} ?? Hit:|You hit [...]! -- ?? $Ammo >= 0 AND $Atk.base == 20 ?? Critical Hit:|You decimate [...]! }} I made quite a few alterations/redactions (most for functionality; some for flavor) and a few corrections (e.g. added missing | to Out of Ammo: tag; added 0d0 to inline roll that defines $Ammo) to the core of your macro, Craig. Please let me know if you have any questions.
1448048375
The Aaron
Pro
API Scripter
On line 446, change to this: _.each(PowerCard.whisper.split(","), function(y) { var resip = ('self' === y.trim() ? msg.who : y.trim()); sendChat(msg.who, "/w " + resip + " " + Display); });
Silvyre said: HoneyBadger said: Actually you should already be able to use --whisper|self,gm. If not, that would be easy to fix. --whisper|self,foo,gm will output to foo and gm but not to self Ok. Will implement Aaron's little snippet.
THE HOLY CRAP IT'S AN UPDATE TO POWERCARDS POST... November 20th, 2015 ~ 4:30 pm eastern Version: 3.2.11 Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Bugfix: You can now use self as part of multiple target whispers. Example: --whisper|self,gm Courtesy of TheAaron Minor Bugfix: Added a blank line semi-colon at the start of the script to help reduce possible errors of a missing semi-colon in another script. Will not have any affect if you have no other scripts. Added after reading about it in one of TheAaron's other posts somewhere. Update / Bugfix: Conditionals now properly test for both text and numbers. However, you're only going to get text from a roll query or attribute call and not an inline roll. So for example, in my D&D 5e game, I set up an attribute (AttackRoll ) on my character sheet and put ?{Attack|Standard, 1d20|w/Advantage, 2d20kh1|w/Disadvantage, 2d20kl1} in that attribute. I can now reference it via @{AttackRoll}. If I select Standard, it returns 1d20 and Advantage returns 2d20kh1. These conditionals are case sensitive. Yes does not equal yes or yEs or YEs or any combination other than Yes. Example:  -- ?? @{AttackRoll} == 2d20kh1 ?? Advantage|I have advantage! Example:  -- ?? ?{Flanking?|Yes|No} == Yes ??Flanking:|I am flanking! Courtesy of Nate W.
Silvyre, thank you!  I had to tweak your solution a bit, but it is working great!  Thanks for your help! Final solution for anyone wondering.  As long as the PC has at least 1 ammo to use the attack will go off.  If not, they'll get the dreaded "out of ammo" message. --Ammo:|[[ [$Ammo] @{rangedammo1} - 1 + 0d0 ]] of [[ @{rangedammo1|max} + 0d0 ]] remaining. --?? $Ammo < 0 ?? Out of Ammo:|You cannot attack with your @{rangedweaponname1}. --?? $Ammo > 0 ?? Attack:|[[ [$Atk] @{AdvDisadv} + @{dexterity_mod} + @{prof_bonus} ]] vs AC --?? $Ammo > 0 AND $Atk.total < @{target|npc_AC} AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Miss:|The attack missed! --?? $Ammo > 0 AND $Atk.base == 1 ?? Critical Miss:|The attack was fumbled! --?? $Ammo > 0 AND $Atk.total >= @{target|npc_AC} AND $Atk.base <> 1 AND $Atk.base <> 20 ?? Hit:|You hit for [[ @{rangeddmg1} + @{dexterity_mod} ]] @{rangeddmgtype1} damage! --?? $Ammo > 0 AND $Atk.base == 20 ?? Critical Hit:|You decimate the **@{target|token_name}** for [[ (@{rangeddmg1} + @{dexterity_mod}) * 2 ]] @{rangeddmgtype1} damage!
1448079265
Silvyre
Roll20 Mod Team
Cool. :) Heads up, though: if your @{rangedammo1} equals 1 when you use your macro, $Ammo will equal zero, and then nothing will display (hence $Ammo >= 0 instead of $Ammo > 0).
1448112863
Isembard
Pro
Sheet Author
Hello, once more I am after a little help. I have the following Macro: !power {{ --charid|@{selected|character_id} --emote|//@{selected|token_name} is attempting a Quick test...// --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|Quick Test --leftsub|Attribute (roll under) --hroll| Attribute [[ [$ATType] ?{Roll Type:|Quick, 0|Initiative, 1} +0d0 ]] --?? $ATType == 0 ?? !Roll0:|**Quick:** [[ [nh|$ATQCK] 1d20]] vs [[@{selected|Quick} + ?{Roll Modifier|0}]] --?? $ATType == 0 AND $ATQCK > @{selected|Quick} ?? ^Failure| --?? $ATType == 0 AND $ATQCK <= @{selected|Quick} ?? ^Success| --?? $ATType == 1 ?? !Roll1:|**Initiative:** [[ [nh|trkr] @{selected|Quick}d1]] ^^**Tiebreak:** [[1d20]] }} When I select to roll Quick from the Dropdown Menu it makes the roll and displays correctly but add the token to the Turn Tracker. I don't want it to do that. When I select the Initiative roll from the drop down it asks for a roll modifer, which I only need for the quick roll. It too displays correctly in chat and adds the token to the tuen tracker. It is as if the 2 option are mingling a bit. Not sure how to fix it. Thanks
1448114712
The Aaron
Pro
API Scripter
All rolls are evaluated on the client side. Powercards just adjusts which ones are displayed. I think there might be a work around you can use for initiative, but I don't remember it off the top of my head. 
1448115589
Silvyre
Roll20 Mod Team
Here's a workaround that involves nesting tags within a Roll Query : !power {{ --charid|@{selected|character_id} --emote|//@{selected|token_name} is attempting a Quick test...// --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|Quick Test --leftsub|Attribute (roll under) ?{Roll Type| Quick, --!Roll0:&#124;**Quick:** [[ [nh&#124;$ATQCK] 1d20]] vs [[@{selected|Quick} + ?{Roll Modifier&#124;0&#125;]] -- ?? $ATQCK > @{selected|Quick} ?? ^Failure&#124; -- ?? $ATQCK <= @{selected|Quick} ?? ^Success&#124; | Initiative, --!Roll1:&#124;**Initiative:** [[ [nh&#124;trkr] @{selected|Quick}d1]] ^^**Tiebreak:** [[1d20]] } }}
The Aaron said: All rolls are evaluated on the client side. Powercards just adjusts which ones are displayed. I think there might be a work around you can use for initiative, but I don't remember it off the top of my head.  Someone else asked about not processing the content of stuff blocked by conditionals. I probably can, just need to look at the order things are processed.
1448117883
Isembard
Pro
Sheet Author
Silvyre said: Here's a workaround that involves nesting tags within a Roll Query : !power {{ --charid|@{selected|character_id} --emote|//@{selected|token_name} is attempting a Quick test...// --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|Quick Test --leftsub|Attribute (roll under) ?{Roll Type| Quick, --!Roll0:|**Quick:** [[ [nh|$ATQCK] 1d20]] vs [[@{selected|Quick} + ?{Roll Modifier|0}]] -- ?? $ATQCK > @{selected|Quick} ?? ^Failure| -- ?? $ATQCK <= @{selected|Quick} ?? ^Success| | Initiative, --!Roll1:|**Initiative:** [[ [nh|trkr] @{selected|Quick}d1]] ^^**Tiebreak:** [[1d20]] } }} Thank You. Works exactly as I wanted.
Ugh, I've spent too much time away from working on this script. There are spots where it's doing something that I can't remember why it's doing it... lol.
1448144851
With the multiple whispers... Could you after adding the --whisper tag, then add an input box like ?{Who?} and list more than one person, i.e. player 2, player3, player5?
Yes.
1448146067
Silvyre
Roll20 Mod Team
Just keep in mind that if you'd have to replace the commas in such a list with HTML entities.
Silvyre said: Just keep in mind that if you'd have to replace the commas in such a list with HTML entities. Not in this case I believe. It would be --whisper|?{Whisper to|} and he would type the names in.
1448147395
Silvyre
Roll20 Mod Team
HoneyBadger said: Silvyre said: Just keep in mind that if you'd have to replace the commas in such a list with HTML entities. Not in this case I believe. It would be --whisper|?{Whisper to|} and he would type the names in. Ah, yes—you're right. In fact, it appears that, so long as there isn't more than one vertical bar in a Roll Query, commas don't break Roll Queries.
1448148525
HoneyBadger said: Silvyre said: Just keep in mind that if you'd have to replace the commas in such a list with HTML entities. Not in this case I believe. It would be --whisper|?{Whisper to|} and he would type the names in. Getting this error when I try my code: TypeError: Cannot read property 'substring' of undefined Here is the code: !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** is speaking in ?{What language are you speaking?} --name|Languages --whisper|?{Whisper to?} ?{Message..} }} Any ideas?
1448148709
Silvyre
Roll20 Mod Team
The only thing that should be placed within whisper tag is a list of names separated by commas. You'll need to place your message Roll Query within another tag.
1448148910
Silvyre said: The only thing that should be placed within whisper tag is a list of names separated by commas. You'll need to place your message Roll Query within another tag. Changed code to this: !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** is speaking in ?{What language are you speaking?} --name|Languages --whisper|?{Whisper to?}  --!Message|?{Message..} }} And I'm still getting the 'substring' error.
1448149952
Silvyre
Roll20 Mod Team
Arthur, would you mind troubleshooting your issue by incrementally removing tags from your macro until your error ceases to pinpoint its source?
1448150018

Edited 1448150089
I dunno. I just tested it and it worked fine for me.
1448150228
Silvyre said: Arthur, would you mind troubleshooting your issue by incrementally removing tags from your macro until your error ceases to pinpoint its source? It seems to be the --charid tag that's throwing it off.
Do this as a macro for me please: @{character_id} and copy/paste the id here. I want to see what part of the character id is throwing it off.
1448150889
HoneyBadger said: Do this as a macro for me please: @{character_id} and copy/paste the id here. I want to see what part of the character id is throwing it off. This is what I got when I did that: TypeError: Cannot read property 'substring' of undefined
1448151169

Edited 1448151322
Hey Calhanol (or whomever else can answer), I'd like to learn more about that awesome spellbook PowerCard you created.  Do the buttons call off to another macro to fire off the spell?  Which part of the formula is doing that?  Is it this part?   %{B-R8|04-Arcane-Armor}) I'd like to create one of these as well for 5e spells.  Sorry, I'm a little "wet behind the ears" with how the API works and interacts.  Thanks! The fruits of your assistance... (EDIT: Added in castings per day that change as used (with !ammo script)) !power {{ --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|**Spellbook** --leftsub|**Power: 1** --whisper|self --!Blank1|~~~ --!Rank0|~C**Rank 0 Spells**~C --!Blank2|~~~ --!Spells0|[[ @{B-R8|ArcaneArmor} + 0d0 ]] [**Arcane Armor**](! %{B-R8|04-Arcane-Armor}) ^^ [[ @{B-R8|MagicDart} + 0d0 ]] [**Magic Dart**](! %{B-R8|07-Magic-Dart}) ^^ [[ @{B-R8|MagicLock} + 0d0 ]] [**Magic Lock**](! %{B-R8|05-Magic-Lock}) ^^ [[ @{B-R8|SenseMagic} + 0d0 ]] [**Sense Magic**](! %{B-R8|03-Sense-Magic}) ^^ [[ @{B-R8|SecureSite} + 0d0 ]] [**Secure Site**](! %{B-R8|02-Secure-Site}) --!Blank3|~~~ --!Rank1|~C**Rank 1 Spells**~C --!Blank4|~~~ --!Spells1|[[ @{B-R8|Evade} + 0d0 ]] [**Evade**](! %{B-R8|06-Evade}) ^^ [[ @{B-R8|UnerringDarts} + 0d0 ]] [**Unerring Darts**](! %{B-R8|08-Unerring-Darts}) }}
1448151247
Silvyre
Roll20 Mod Team
Arthur B. said: HoneyBadger said: Do this as a macro for me please: @{character_id} and copy/paste the id here. I want to see what part of the character id is throwing it off. This is what I got when I did that: TypeError: Cannot read property 'substring' of undefined Could you copy, paste and enter @{selected|character_id} into the text chat after selecting the token that's linked to the Character that you're having difficulty with?
Wait... is this TypeError in chat with an orange background or in the api console?
1448151506
Silvyre said: Arthur B. said: HoneyBadger said: Do this as a macro for me please: @{character_id} and copy/paste the id here. I want to see what part of the character id is throwing it off. This is what I got when I did that: TypeError: Cannot read property 'substring' of undefined Could you copy, paste and enter @{selected|character_id} into the text chat after selecting the token that's linked to the Character that you're having difficulty with? When I do the @{selected|character_id} everything works fine with all the character id's.
1448151586
HoneyBadger said: Wait... is this TypeError in chat with an orange background or in the api console? In chat.
Arthur B. said: HoneyBadger said: Wait... is this TypeError in chat with an orange background or in the api console? In chat. Any errors in chat that have an orange background are Roll20 errors and have nothing to do with PowerCards. You most likely have a corrupted character journal or something. Can probably fix it just by copying the character.
1448152075

Edited 1448152381
Silvyre
Roll20 Mod Team
Craig L. said: Do the buttons call off to another macro to fire off the spell?  Which part of the formula is doing that?  Is it this part?   %{B-R8|04-Arcane-Armor}) Close! %{B-R8|04-Arcane-Armor} is an Ability Macro, which that holds the spell macro. [**Arcane Armor**](!&#13;&#37;{B-R8|04-Arcane-Armor}) is the API Command Button that calls that Ability Macro when pressed. At the moment, a --whisper tag is required to use API Command Buttons within a PowerCard. For advanced use, I showcased the steps needed to nest a [child] PowerCard within an API Command Button within a [parent] PowerCard in an earlier post .
1448152125

Edited 1448152240
Craig L. said: Hey Calhanol (or whomever else can answer), I'd like to learn more about that awesome spellbook PowerCard you created.  Do the buttons call off to another macro to fire off the spell?  Which part of the formula is doing that?  Is it this part?   %{B-R8|04-Arcane-Armor}) I'd like to create one of these as well for 5e spells.  Sorry, I'm a little "wet behind the ears" with how the API works and interacts.  Thanks! The fruits of your assistance... (EDIT: Added in castings per day that change as used (with !ammo script)) !power {{ --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|**Spellbook** --leftsub|**Power: 1** --whisper|self --!Blank1|~~~ --!Rank0|~C**Rank 0 Spells**~C --!Blank2|~~~ --!Spells0|[[ @{B-R8|ArcaneArmor} + 0d0 ]] [**Arcane Armor**](! %{B-R8|04-Arcane-Armor}) ^^ [[ @{B-R8|MagicDart} + 0d0 ]] [**Magic Dart**](! %{B-R8|07-Magic-Dart}) ^^ [[ @{B-R8|MagicLock} + 0d0 ]] [**Magic Lock**](! %{B-R8|05-Magic-Lock}) ^^ [[ @{B-R8|SenseMagic} + 0d0 ]] [**Sense Magic**](! %{B-R8|03-Sense-Magic}) ^^ [[ @{B-R8|SecureSite} + 0d0 ]] [**Secure Site**](! %{B-R8|02-Secure-Site}) --!Blank3|~~~ --!Rank1|~C**Rank 1 Spells**~C --!Blank4|~~~ --!Spells1|[[ @{B-R8|Evade} + 0d0 ]] [**Evade**](! %{B-R8|06-Evade}) ^^ [[ @{B-R8|UnerringDarts} + 0d0 ]] [**Unerring Darts**](! %{B-R8|08-Unerring-Darts}) }} This part right here: --!Blank1|~~~ --!Rank0|~C**Rank 0 Spells**~C --!Blank2|~~~ --!Spells0|[[ @{B-R8|ArcaneArmor} + 0d0 ]] [**Arcane Armor**](! %{B-R8|04-Arcane-Armor}) ^^ [[ @{B-R8|MagicDart} + 0d0 ]] [**Magic Dart**](! %{B-R8|07-Magic-Dart}) ^^ [[ @{B-R8|MagicLock} + 0d0 ]] [**Magic Lock**](! %{B-R8|05-Magic-Lock}) ^^ [[ @{B-R8|SenseMagic} + 0d0 ]] [**Sense Magic**](! %{B-R8|03-Sense-Magic}) ^^ [[ @{B-R8|SecureSite} + 0d0 ]] [**Secure Site**](! %{B-R8|02-Secure-Site}) is what calls to the spells for the buttons in the PowerCard.  --!Blank1|~~~ --!Rank0|~C**Rank 0 Spells**~C --!Blank2|~~~ --!Spells0|[[ @{B-R8|ArcaneArmor} + 0d0 ]] ^^^This part creates the frame for the buttons. [**Arcane Armor**](! %{B-R8|04-Arcane-Armor}) ^^^The first part here [**Arcane Armor**] - shows what goes in the button the ** ** makes it bold. the second part calls to the macro of the character, this one calls 04-Arcane-Armor macro for the character B-R8. So altogether you have [bold**button name**](call to macro! and then you need to use HTML entities (carriage return)%(@ symbol{B-R8(chracter name)|04-Arcane-Armor-(Macro)} The parts in () is what each part of the code is. EDIT:  You beat me to it Silvyre, but did I do a good job explaining it? I was so happy I could actually answer one of these, thanks to all the help I got from the rest of you!
1448152418
Silvyre
Roll20 Mod Team
Arthur B. said: EDIT:  You beat me to it Silvyre, but did I do a good job explaining it? I was so happy I could actually answer one of these, thanks to all the help I got from the rest of you! Yup. :)
1448152568
Silvyre said: Arthur B. said: EDIT:  You beat me to it Silvyre, but did I do a good job explaining it? I was so happy I could actually answer one of these, thanks to all the help I got from the rest of you! Yup. :) <<<<<Doing happy dance!!!
Hey, thanks guys!  I've gotten much closer due to your help.  I'm going to tinker with it to see if I can figure it out myself.  I've gotten the initial card to display with a button.  Now on to launching the spell PowerCard from there.  I'll cry "uncle" when I get frustrated enough.
Ok, figured a couple things out... and I will put an update out tomorrow, but I want to go over it again in the morning when I'm not so tired. Hidden initiative rolls (due to a conditional) will not add or modify a token's initiative now.
1448213886

Edited 1448214228
November 22nd, 2015 ~ 12:30 pm eastern Version: 3.2.12 Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Bugfix: Content hidden by conditionals will not be processed. This really only affects the [trkr] roll option that sends a token to the turn order tracker. Example: -- ?? ?{Send to Init|Yes|No} == Yes ?? Initiative:|[[ [trkr] 1d20 ]] If you select no, the token will not be added to the turn order tracker, nor will its existing initiative be modified. Update: You can now display the base value of a Roll ID by adding [^Roll ID] to your PowerCard. This cannot be used as a stored variable to do math with however. Example: --Damage:| [[ [$Physical] 1d8 + [$Fire] 1d6 + [$Necrotic] 2d6 ]] ([^Fire] fire, [^Necrotic] necrotic) would show up as Damage: [19] (4 fire, 9 necrotic) If you want to include a modifier as part of the base value, you must wrap the roll and modifier in curly brackets like this: [[ [$Physical] {1d8 + 3 [Str Mod] } + [$Fire] {2d6 + 3} ]] Bugfix: As part of the above update, I was able to get Roll ID's to work with multiple dice and their base sum. Before the bugfix, $ID.base would only use the last number rolled, regardless of the number dice rolled. Example: If you rolled [[ [$Fire] 3d6 + 10 ]] and rolled a 3, 3, 5... [^Fire] would only show the five and any conditionals trying to use $Fire.base would only test against the value of five instead of eleven, the sum of the dice only. This would be most useful for system that use multiple dice for a roll that may or may not have modifiers applied, but also bases things like critical success off the base rolls. Like using 3d6 for attacks rolls in D&D instead of 1d20. You would be able to do the following, which did not work before. -- Attack:| [[ [$Atk] 3d6 + 3 [Str Mod] ]] vs AC -- ?? $Atk.base >= 18 ?? Critical Hit:|You got a critical hit!
1448219852

Edited 1448219961
Is there a format option to default a result to zero if it happens to go into the negatives?  I'm displaying current ammo amounts to my PCs and have to subtract -1 from the attribute before displaying it.  I'm also using that same result in conditionals.  Due to the order of operations, the ammo script does decrement the value, but PowerCards must be firing at the same time because when I display the attribute it is at it's previous value.  Although, once everything is done executing the attribute has the decremented value. For example, this is what I'm doing to get the display to show the right value: ...A bunch of stuff above this... --Ammo:|[[ [$Ammo] ( @{selected|rangedammo1} - 1 ) + 0d0 ]] of [[ @{selected|rangedammo1|max} + 0d0 ]] remaining. --?? $Ammo <= 0 ?? Out of Ammo:|You cannot attack with your @{selected|rangedweaponname1}. --?? $Ammo > 0 ?? Attack:|[[ [$Atk] @{AdvDisadv} + @{selected|dexterity_mod} + @{selected|prof_bonus} + 0d0 ]] vs AC ....A bunch of stuff below this.... If I were to run the macro and let's say the PC has 10 arrows before attacking.  The macro is run, the ammo script will subtract the one arrow, the PowerCard displays, but if I didn't have the "-1" in there it would display "10" instead of "9".  Plus, none of the later conditionals would be evaluating the right value.  Additionally, when the attribute hits "0" then the display is showing "-1".  Very annoying!