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.

PowerCards 3 (Thread 2)

What about something like this? [[ [$BB] ?{Boons} - ?{Banes} + 1d0]] ?? $BB.total >= 0 ?? [[1d20+mod+(?{Boons} - ?{Banes})d6kh1]] ?? $BB.total < 0 ?? [[1d20+mod-((?{Banes} - ?{Boons}))d6kh1]] That way if you have 3 Boons and 2 Banes, you end up rolling 1d6, added to your total. If you have 3 Banes and 2 Boons, you end up rolling 1d6, subtracted from your total.
1435693016
DK Heinrich
Marketplace Creator
Sheet Author
ahh - ok will work with that (and with pulling them from the title line) - still realizing how much difference a 'space' can make in here... thanks again!
...accidentally left in extra parentheses in the third line, there. Originally was doing it as (-1*(?{Boons} - ?{Banes}))d6kh1. :-P
1435693509
DK Heinrich
Marketplace Creator
Sheet Author
I like that also Robert - testing it after HBs solution to see what feels the most like playing at the table. Thanks!
June 30th, 2015 ~ 3:45 pm eastern Version: 3.2.4 Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Update: Added a tag to hide rolls for use with conditionals. --hroll or --hrolls will both allow you to make any number of rolls in that tag for later use in conditionals. These rolls will not show up on the powercard or when mousing over the title or the card itself. In fact, the rolls are never shown to anyone. I made add in an option to whisper these hidden rolls to the GM, later. Example: --hroll| [[ [$ID] 1d6 ]]
1435701773
Gen Kitty
Forum Champion
Wooooooo. Combine this with variables later and I can clean up the gun paladin's macros a little more!
GenKitty said: Wooooooo. Combine this with variables later and I can clean up the gun paladin's macros a little more! Yeah, I've been slacking due to overtime at work and wedding planning. Now that my fiancee is working, I'll have some more free time here and there on my days off. :D
1435702655

Edited 1435703243
Looking fantastic. Upgraded to the newest version. Thanks HB! I've got another problem though, which I've been scratching my head over for a while. Although I think I've got the problem down-pat, and upon searching the thread you might be aware of it already. However I might as well just check to make sure. On the first check of a --?? tag it doesn't seem to recognize anything but $var.total or $var.base value. I've got the following code (Heavily cut down in order to preserve clarity); !power {{ --format|Attack --charid|@{Selected|character_id} --emote|^^//@{Selected|token_name} attacks @{Target|vTarget1|token_name}!// --name|@{Selected|repeating_weapon_0_name} --leftsub|@{Selected|repeating_weapon_0_notes} --rightsub|@{Selected|repeating_weapon_0_type} --!rTitle|~C**Attack | Damage**~C --!rAttack1| Attack 1 (Not optional) --?? [[@{Selected|bab}]] > [[5]] ?? !rAttack2| Attack 2 (BAB Dependant) --?? [[@{Selected|bab}]] > [[10]] ?? !rAttack3| Attack 3 (BAB Dependant) --?? [[@{Selected|bab}]] > [[15]] ?? !rAttack4| Attack 4 (BAB Dependant) }} Which outputs the following: If I get rid of the [[]] it outputs this instead: Which originally occurred to me that perhaps it's the spacing of the conditional that was causing it to bug out, which is why I tried the [[]] that fixed some other conditional problems for me. However, if we go one step further and completely remove everything excess and just use base numbers such as; --!rAttack1| Attack 1 (Not optional) --?? 5 > 5 ?? !rAttack2| Attack 2 (BAB Dependant) --?? 5 > 10 ?? !rAttack3| Attack 3 (BAB Dependant) --?? 5 > 15 ?? !rAttack4| Attack 4 (BAB Dependant) It produces this: Perhaps this is intentional and an intended for later versions? Or perhaps a previous bugfix may have broken it? If it simply hasn't (Or isn't) going to be implemented, you might want to give the main post a quick update as it gave me a few headaches at the least. Thanks for your help again! Sorry for the long posts. Edit: I should probably leave the work-around that I'm using here as well, just in case anyone else was looking for a problem like this. !power {{ --format|Attack --charid|@{Selected|character_id} --emote|^^//@{Selected|token_name} attacks @{Target|vTarget1|token_name}!// --name|@{Selected|repeating_weapon_0_name} --leftsub|@{Selected|repeating_weapon_0_notes} --rightsub|@{Selected|repeating_weapon_0_type} --!rTitle|~C**Attack | Damage**~C --hroll|[[ [$BAB] @{Selected|bab} + 0d0 ]] --!rAttack1| Attack 1 (Not optional) --?? $BAB.total > 5 ?? !rAttack2| Attack 2 (BAB Dependant) --?? $BAB.total > 10 ?? !rAttack3| Attack 3 (BAB Dependant) --?? $BAB.total > 15 ?? !rAttack4| Attack 4 (BAB Dependant) }} Stuffing the value of whatever attribute you're trying to call into a hidden roll and bonking it on-top of a $Value works perfectly, producing something like this upon changing the bab value on the character sheet;
I thought numbers worked for either side. Adding that to my to do list.
GenKitty said: Wooooooo. Combine this with variables later and I can clean up the gun paladin's macros a little more! I completely agree. Once I am able to use conditionals with Target Info Charms (which by default means we can then use conditionals in more than just the tag of a given field), I'll be able to use this for everything.
One of my hopes for PowerCards is that it'll one day be possible to use reserved tags with conditionals. That alone may allow many users to reduce the sheer number of macros they are required to edit by a gigantic number (in conjunction with switchboard-like roll queries). Similarly, I'm also looking forward to the aforementioned expansions to conditionals. :) Thank you for all the incredible work you've put into PowerCards, HB.
Silvyre said: One of my hopes for PowerCards is that it'll one day be possible to use reserved tags with conditionals. That alone may allow many users to reduce the sheer number of macros they are required to edit by a gigantic number (in conjunction with switchboard-like roll queries). Similarly, I'm also looking forward to the aforementioned expansions to conditionals. :) Thank you for all the incredible work you've put into PowerCards, HB. What do you mean by use conditionals with reserved tags?
HoneyBadger said: What do you mean by use conditionals with reserved tags? Currently, !power {{ --title|[[ [$n] 1 + 0d0 ]] -- ?? $n == 1 ?? name|tag }} Outputs
Silvyre said: HoneyBadger said: What do you mean by use conditionals with reserved tags? Currently, !power {{ --title|[[ [$n] 1 + 0d0 ]] -- ?? $n == 1 ?? name|tag }} Outputs Ah, yeah... that's not going to work until I add the ability to reference a variable in the content of tag instead of just using it in the tag itself.
1435754584

Edited 1435754602
Hi again... I'm sure you hate me by now, but I think I've found another bug. It appears that you're unable to use negative numbers in square brackets for Power Cards. Using the following: !power {{ --DebugValue|[[1]] }} Produces this just like normal: However using this, with the only thing being changed being the [[1]] value to a negative number; !power {{ --DebugValue|[[-1]] }} It produces nothing in the chat log and instead crashes the entire script with the error message of: I also quickly checked to make sure this wasn't a base Roll20 Issue, however Roll20 handles negatives inside of [[]] just fine. Sorry!
1435757592
Ziechael
Forum Champion
Sheet Author
API Scripter
A bit of a hack but this works: !power {{ --DebugValue|[[-1 + 0d0]] }}
1435759656
DK Heinrich
Marketplace Creator
Sheet Author
--hroll|Target Defense: [[ [$DEF] [[@{target|DEFENSE}]] + 0d0 ]] ^^ Target Critical: [[ [$Crit] [[ 5 + @{target|DEFENSE}]] +0d0 ]] ^^ Boons/Banes: [[ [nh] [$BB] ?{Boons|0} - ?{Banes|0} + 1d0]] --?? $BB.total >= 0 ?? Roll:|Agility: [[ [nh] [$RollRes]1d20+@{selected|AGI}+(?{ Boons} - ?{Banes})d6kh1]] --?? $BB.total < 0 ?? Roll:|Agility: [[ [nh] [$RollRes]1d20+@{selected|AGI}-(?{Banes} - ?{Boons})d6kh1]] --?? $RollRes.total < $DEF ?? Failure:|[[ [txt] 1t[Failure] ]] --?? $RollRes.total >= $DEF ?? Success:|Deal [[ [nh] 2d6]] damage --?? $RollRes.total >= $DEF AND $RollRes.total >= 20 AND $RollRes.total >= $Crit ?? Critical:| text here I am getting what looked like random results from my $RollRes.total contidionals, but looking at it I think that they are pulling the condition from the 2nd $BB.total even if the 1st $BB.total is the one that is triggered. I tried to swap to $RollRes1 and $RollRes2 but then had to have two sets of Results - and they would both show up each time. I am hoping that I have missed something silly and you can just laugh at me while typing the solution... As a side note - can you call out a $ answer further down on a card ... example I am hiding the creation of $DEF, but would like to show the answer in a call out box (real of fake i dont care) after my $BB.total (i tried [ ] and [[ ]] and the same with and without spaces - all options result in a no-answer). so it would like like: Roll Agility: 18 vs. 21 Defense (the 21 is what is in question). I can do it by just calling the attribute again (currently how its being done), but trying to tighten up the macro a bit more. Thanks again!
I wonder if it might be because of the [nh] [$BB] you've got in the --hroll line? I think I recall HoneyBadger saying if you wanted to do that it had to be done as [nh|$BB] instead. It might not be assigning properly. (Though if the roll is hidden anyway, not sure you need the [nh] part.)
1435763759

Edited 1435764201
DK Heinrich
Marketplace Creator
Sheet Author
undefined:1 t Defense: $[[1]] ^^ Target Critical: $[[2]] ^^ Boons/Banes: $[[3]]","!vs.":"~ ^ SyntaxError: Unexpected token , at Object.parse (native) at evalmachine.<anonymous>:146:30 at checkFinishedOps ( was my crash error when I made that change Robert, thoughts? Removed the [nh] totally and still getting same mistakes (as above - not the one in this post) - so I dont think that is the culprit. :( EDIT: also have confirmed that it is pulling the results based on 2nd $BB every time - so it 'should' be something in how I am setting up my $RollRes and using that name twice.
Hrm...not sure on that. All I can think is that it's talking about a token, so maybe it's something to do with the @{target section? I've always put in specific names for the targets, i.e. @{target|Target1|DEFENSE} even if there's only one target, but I don't know if that has anything to do with anything. O_O
1435765123

Edited 1435765907
DK Heinrich
Marketplace Creator
Sheet Author
making my brain melt. If I have any Boons or zero boons (triggers 1st $BB) i get a failure (I think its reading the 2nd $BB as zero). If I have any Banes (triggers 2nd $BB) it works perfect. telling me that has to be in the reuse of the $RollRes name... but I cant get it to stop. lol EDIT: oh, wonder if I can use *1, *2 on them like you do if you want to use the same name after -- nope... it just thinks it a different name. EDIT: Confirmed that it works with any boons or zero boons (triggers 1st $BB) correctly when the $RollRes are differnt names.... so that is the issue. Now I need to find a way to add and AND statement to force it back to RollRes1 and 2 correctly. Or better yet, a way to tell it to only report based on the $BB result.
1435766331

Edited 1435766489
DK Heinrich
Marketplace Creator
Sheet Author
BOOM! Got it... this saga has ended. As I was typing my last thought on last post it hit me... and it works (well on 1st ten tests...). Thank you all for help. !power {{ --charid|@{character_id} --emote|//The @{selected|token_name} attacks with its draining touch….// --format|npcattack --name|Draining Touch --leftsub|1 creature --rightsub|Adjacent --title|Melee Attack --hroll|Target Defense: [[ [$DEF] [[@{target|DEFENSE}]] + 0d0 ]] ^^ Target Critical: [[ [$Crit] [[ 5 + @{target|DEFENSE}]] +0d0 ]] ^^ Boons/Banes: [[ [nh] [$BB] ?{Boons|0} - ?{Banes|0} + 0d0]] --!vs.| ~C vs **@{target|token_name}** ~C --?? $BB.total >= 0 ?? Roll|Agility [[ [nh] [$RollRes1] 1d20 + @{selected|AGI} + (?{ Boons} -?{Banes})d6kh1]] --?? $BB.total < 0 ?? Roll|Agility [[ [nh] [$RollRes2] 1d20 + @{selected|AGI} - (?{Banes} - ?{Boons})d6kh1]] --?? $BB.total >= 0 AND $RollRes1.total < $DEF ?? Failure|[[ [txt] 1t[Failure] ]] --?? $BB.total >= 0 AND $RollRes1.total >= $DEF ?? Success|Deal [[ [nh] 2d6]] damage --?? $BB.total >= 0 AND $RollRes1.total >= $DEF AND $RollRes1.total >= 20 AND $RollRes1.total >= $Crit ?? Critical|You //Drain// your target. It gains [! 1 !] //Corruption// and reduces its //Health// by [[ [nh] 1d6]]. While its //Health// is reduced it makes all //Strength// attack and challenge rolls with 1 bane. If its //Health// is reduced to zero it dies and a new shadow wiggles free from its body. --?? $BB.total < 0 AND $RollRes2.total < $DEF ?? Failure|[[ [txt] 1t[Failure] ]] --?? $BB.total < 0 AND $RollRes2.total >= $DEF ?? Success|Deal [[ [nh] 2d6]] damage --?? $BB.total < 0 AND $RollRes2.total >= $DEF AND $RollRes2.total >= 20 AND $RollRes2.total >= $Crit ?? Critical|You //Drain// your target. It gains [! 1 !] //Corruption// and reduces its //Health// by [[ [nh] 1d6]]. While its //Health// is reduced it makes all //Strength// attack and challenge rolls with 1 bane. If its //Health// is reduced to zero it dies and a new shadow wiggles free from its body. }}
1435776938

Edited 1435776974
Roll options and id's need to be in the same label. [[ [nh|$ID] 1d10 ]] like that. Order doesn't matter, but they are supposed to all be in the same label. Also, .total is optional. If PowerCards finds a RollID and it doesn't have .base or .total, it defaults to .total. Finally, you have two tags named Roll| which may cause issues.
1435777286

Edited 1435777686
DK Heinrich
Marketplace Creator
Sheet Author
odd, it worked with the option/tag separate and gave error when combined. I will try it combined again to see if I can recreate. (EDIT: did not recreate so leaving it combined but will keep my eye on it) Good to know on the .total, I think I knew that but added it at one point to see if that was the culprit. I have another that is giving me fits, but I will look it over for the above things 1st to see if it solves it. Thanks again for all your work on this stuff HB
Greysion said: !power {{ --DebugValue|[[-1]] }} It produces nothing in the chat log and instead crashes the entire script with the error message of: I know where this bug is roughly. Shouldn't be super difficult to fix.
1435779274
DK Heinrich
Marketplace Creator
Sheet Author
Ok, next one is a query to pick an attribute followed by second query to assign boons/bane. When I only have the 0 option in the macro it works perfect, when I add the 1 option to the macro it spits out two results (for each option). I have been over and over my use of AND, and my eyes are blurry so it looks correct, but obviously something is not. The 'same' tag *numbers are newest addition to see if it would help, it did not... also tried it without --hroll just encase it was messing with me, but its not... it is fine. --hroll| Attribute [[ [$ATType] ?{Strength (0), Agility (1), Intellect (2), Will (3), Perception (4)} +0d0 ]] ^^ Boons/Banes [[ [nh] [$BB] ?{Boons|0} - ?{Banes|0} + 0d0]] --?? $ATType == 0 AND $BB >= 0 ?? Roll *1|Strength [[ [nh|$ATSTR1] 1d20 + @{selected|STR} + (?{ Boons} -?{Banes})d6kh1]] vs [! 10 !] --?? $ATType == 0 AND $BB < 0 ?? Roll *2|Strength [[ [nh|$ATSTR2] 1d20 + @{selected|STR} - (?{Banes} - ?{Boons})d6kh1]] vs [! 10 !] --?? $ATSTR1 < 10 AND $BB >= 0 ?? Failure *1| [[ [txt] 1t[Failure] ]] --?? $ATSTR2 < 10 AND $BB < 0 ?? Failure *2| [[ [txt] 1t[Failure] ]] --?? $ATSTR1 >= 10 AND $BB >= 0 ?? Success *1| You avoid something nasty --?? $ATSTR2 >= 10 AND $BB < 0 ?? Success *2| You avoid something nasty --?? $ATType == 1 AND $BB >= 0 ?? Roll *3|Agility [[ [nh|$ATAGI1] 1d20 + @{selected|AGI} + (?{ Boons} -?{Banes})d6kh1]] vs [! 10 !] --?? $ATType == 1 AND $BB < 0 ?? Roll *4|Agility [[ [nh|$ATAGI2] 1d20 + @{selected|AGI} - (?{Banes} - ?{Boons})d6kh1]] vs [! 10 !] --?? $ATAGI1 < 10 AND $BB >= 0 ?? Failure *3| [[ [txt] 1t[Failure] ]] --?? $ATAGI2 < 10 AND $BB < 0 ?? Failure *4| [[ [txt] 1t[Failure] ]] --?? $ATAGI1 >= 10 AND $BB >= 0 ?? Success *3| You avoid something nasty --?? $ATAGI2 >= 10 AND $BB < 0 ?? Success *4| You avoid something nasty
1435779762

Edited 1435780272
--?? $ATType == 0 AND $BB >= 0 ?? Roll *1|Strength [[ [nh|$ATSTR1] 1d20 + @{selected|STR} + (?{ Boons} -?{Banes})d6kh1]] vs [! 10 !] --?? $ATType == 0 AND $BB < 0 ?? Roll *2|Strength [[ [nh|$ATSTR2] 1d20 + @{selected|STR} - (?{Banes} - ?{Boons})d6kh1]] vs [! 10 !] --?? $ATSTR1 < 10 AND $BB >= 0 ?? Failure *1| [[ [txt] 1t[Failure] ]] --?? $ATSTR2 < 10 AND $BB < 0 ?? Failure *2| [[ [txt] 1t[Failure] ]] --?? $ATSTR1 >= 10 AND $BB >= 0 ?? Success *1| You avoid something nasty --?? $ATSTR2 >= 10 AND $BB < 0 ?? Success *2| You avoid something nasty --?? $ATType == 1 AND $BB >= 0 ?? Roll *3|Agility [[ [nh|$ATAGI1] 1d20 + @{selected|AGI} + (?{ Boons} -?{Banes})d6kh1]] vs [! 10 !] --?? $ATType == 1 AND $BB < 0 ?? Roll *4|Agility [[ [nh|$ATAGI2] 1d20 + @{selected|AGI} - (?{Banes} - ?{Boons})d6kh1]] vs [! 10 !] --?? $ATAGI1 < 10 AND $BB >= 0 ?? Failure *3| [[ [txt] 1t[Failure] ]] --?? $ATAGI2 < 10 AND $BB < 0 ?? Failure *4| [[ [txt] 1t[Failure] ]] --?? $ATAGI1 >= 10 AND $BB >= 0 ?? Success *3| You avoid something nasty --?? $ATAGI2 >= 10 AND $BB < 0 ?? Success *4| You avoid something nasty I'm not entirely sure, however it looks like you've forgot to include the $ATType check in the Success / Failure conditionals where I've bolded. So changing to something like the following might work; --?? $ATType == 0 AND $BB >= 0 ?? Roll *1|Strength [[ [nh|$ATSTR1] 1d20 + @{selected|STR} + (?{ Boons} -?{Banes})d6kh1]] vs [! 10 !] --?? $ATType == 0 AND $BB < 0 ?? Roll *2|Strength [[ [nh|$ATSTR2] 1d20 + @{selected|STR} - (?{Banes} - ?{Boons})d6kh1]] vs [! 10 !] --?? $ATType == 0 AND $ATSTR1 < 10 AND $BB >= 0 ?? Failure *1| [[ [txt] 1t[Failure] ]] --?? $ATType == 0 AND $ATSTR2 < 10 AND $BB < 0 ?? Failure *2| [[ [txt] 1t[Failure] ]] --?? $ATType == 0 AND $ATSTR1 >= 10 AND $BB >= 0 ?? Success *1| You avoid something nasty --?? $ATType == 0 AND $ATSTR2 >= 10 AND $BB < 0 ?? Success *2| You avoid something nasty --?? $ATType == 1 AND $BB >= 0 ?? Roll *3|Agility [[ [nh|$ATAGI1] 1d20 + @{selected|AGI} + (?{ Boons} -?{Banes})d6kh1]] vs [! 10 !] --?? $ATType == 1 AND $BB < 0 ?? Roll *4|Agility [[ [nh|$ATAGI2] 1d20 + @{selected|AGI} - (?{Banes} - ?{Boons})d6kh1]] vs [! 10 !] --?? $ATType == 1 AND $ATAGI1 < 10 AND $BB >= 0 ?? Failure *3| [[ [txt] 1t[Failure] ]] --?? $ATType == 1 AND $ATAGI2 < 10 AND $BB < 0 ?? Failure *4| [[ [txt] 1t[Failure] ]] --?? $ATType == 1 AND $ATAGI1 >= 10 AND $BB >= 0 ?? Success *3| You avoid something nasty --?? $ATType == 1 AND $ATAGI2 >= 10 AND $BB < 0 ?? Success *4| You avoid something nast Hope that helps!
1435780111

Edited 1435780374
DK Heinrich
Marketplace Creator
Sheet Author
insert cuss word here. I knew I was just staring at the screen to long. I think I convinced myself that since it was used to 'create' the $ATSTR# that it would not need to be called out again, but I used the $$BB again... so obviously I thought of that at some point. going to try it out, but I think you nailed it. Thanks. (EDIT: confirmed you are a wiz and I going insane staring at my macros... Thanks!)
1435781784

Edited 1435782480
I'm having a minor OCD crisis, my apologies in advance. So with the modification I made to the code thanks to SeanOG's help on line 307, I buffed up the padding a lot and I thought it was the culprit at first. However I've changed it back and made a comparison with the two and both suffer the same issue. On the left side of the divider, regardless of using ~L or leaving it as the base, both the text and the in-line rolling is a little lower placed than on the right side, which of course uses ~R. I'm not sure if I've done something horribly wrong, but I have worked out that the reason I didn't notice it earlier is because most of the Power Cards involve very little writing on the right side, coupled with almost no inline rolls on the left side. If anyone could show me how to fix this that would be an amazing help! It's not a big deal, but I'm never going to be able to unsee it now that I've noticed it. You can replicate this with a basic template such as: !power {{ --Testing Title:|~LLeft [[0]]~L~RRight [[0]]~R }} Which produces the same effect:
Okay so first off these all look amazing but the thing I can't figure out is how to actually get them to work for me to use them in a game. If anyone could help me out would really appreciate it. Sorry if this was a really newbie question.
Greysion, it has to do with how the ~R tag is set up. It raises it up like 2 pixels because in order to align right, we need a DIV layer floated to the right. If you leave the margin at 0px (default), it overlaps the bottom of the DIV layer row. To be honest, when I first set up an align right for PowerCards, I was doing it just to align inline rolls to the right side, as my own OCD wants everything easy to read, straight down the line. You can alter the ~R tag and change the margin from -2px, to 0px, which will drop that back down for you.
1435800418
Gen Kitty
Forum Champion
Unfortunately, Drakur, API is a Mentor-level perk. If and when you upgrade your subscription level , we'll happily walk you through installing the script and making your first cards. No worries about being a newbie, we all start as beginners! :)
Drakur said: Okay so first off these all look amazing but the thing I can't figure out is how to actually get them to work for me to use them in a game. If anyone could help me out would really appreciate it. Sorry if this was a really newbie question. If you're a player... the GM has to be a mentor and have this script installed. It's not something you can just use in any campaign by being a mentor.
Having a problem with the conditionals, I have one line that likes to change itself arbitrarily, at least for what I can tell. It's set to change an output on a critical, but it will sometimes do it on rolls as low as a 2. Or it won't change sometimes, even on a 20. !power {{ --txcolor|{@txcolor} --bgcolor|@{bgcolor} --name|Manyshot --leftsub|At-Will --rightsub|Standard Action --|@@<a href="http://www.dandwiki.com/wiki/SRD:Manyshot||Link@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Manyshot||Link@@</a> --hroll|[[ [$Multi] ?{How many Arrows to shoot? Min 2, Max 3|2} + 0d0 ]] [[ [$Sneak] ?{Sneak Attack? 0-No, 1-Yes|1} + 0d0 ]] --Range:|Single opponent within 30 ft. --Type:|Piercing ~~~ --?? $Multi.total == 2 ?? Attack:| [[ [$Atk1] 1d20cs&gt;19 - 4[Multi.] + 1[Ench.] + @{STR}[STR] + @{BAB}[BAB] + @{DEX}[DEX] ]] --?? $Multi.total == 2 AND $Atk1.base &lt; 19 ?? Damage:|[[ @{Arrow Damage}[Arrow] + 5[Concussion] + 1[Ench.] + @{STR}[STR] ]] --?? $Multi.total == 2 AND $Atk1.base &lt; 19 ?? Madness:|Will Save DC 17 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@</a>. --?? $Multi.total == 2 AND $Atk1.base &gt;= 19 ?? Damage:|[[ 3 * ( @{Arrow Damage}[Arrow] + 5[Concussion] + 1[Ench.] + @{STR}[STR] ) ]] --?? $Multi.total == 2 AND $Atk1.base &gt;= 19 ?? Madness:|Will Save DC 20 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@</a>. --?? $Multi.total == 2 AND $Sneak.total == 1 ?? Sneak:|[[ @{SneakA} ]] --?? $Multi.total == 2 ?? ^1Attack:| [[ [$AtkM1] 1d20cs&gt;19 - 4[Multi.] + 1[Ench.] + @{STR}[STR] + @{BAB}[BAB] + @{DEX}[DEX] ]] --?? $Multi.total == 2 AND $AtkM1.base &lt; 19 ?? ^1Damage:|[[ @{Arrow Damage}[Arrow] + 5[Concussion] + 1[Ench.] + @{STR}[STR] ]] --?? $Multi.total == 2 AND $AtkM1.base &lt; 19 ?? ^1Madness:|Will Save DC 17 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@</a>. --?? $Multi.total == 2 AND $AtkM1.base &gt;= 19 ?? ^1Damage:|[[ 3 * ( @{Arrow Damage}[Arrow] + 5[Concussion] + 1[Ench.] + @{STR}[STR] ) ]] --?? $Multi.total == 2 AND $AtkM1.base &gt;= 19 ?? ^1Madness:|Will Save DC 20 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@</a>. --?? $Multi.total == 2 AND $Sneak.total == 1 ?? ^1Sneak:|[[ @{SneakA} ]] --?? $Multi.total == 2 ?? Split ATK:|[[ [$Split1] 1d20cs&gt;19 - 4[Multi.] + 1[Ench.] + @{STR}[STR] + @{BAB}[BAB] + @{DEX}[DEX] ]] --?? $Multi.total == 2 ?? Split DMG:|[[ @{Arrow Damage}[Arrow] + 5[Concussion] + 1[Ench.] + @{STR}[STR] ]] --?? $Multi.total == 2 AND $Split1.base &lt; 19 ?? Split MAD.:|Will Save DC 17 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@</a>. --?? $Multi.total == 2 AND $Split1.base &gt;= 19 ?? Split MAD.:|Will Save DC 20 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@</a>. --?? $Multi.total == 2 ?? ^1Split ATK:|[[ [$Split2] 1d20cs&gt;19 - 4[Multi.] + 1[Ench.] + @{STR}[STR] + @{BAB}[BAB] + @{DEX}[DEX] ]] --?? $Multi.total == 2 ?? ^1Split DMG:|[[ @{Arrow Damage}[Arrow] + 5[Concussion] + 1[Ench.] + @{STR}[STR] ]] --?? $Multi.total == 2 AND $Split2.base &lt; 19 ?? ^1Split MAD.:|Will Save DC 17 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Shaken||Shaken@@</a>. --?? $Multi.total == 2 AND $Split2.base &gt;= 19 ?? ^1Split MAD.:|Will Save DC 20 or be @@<a href="http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Panicked||Panicked@@</a>. }} It's the bit involving the Madness DC check. See what I mean? It just never seems to work out the way it should. Calculating the 3x damage on a crit works fine, it's just the madness lines that give me issues. Any ideas?
GenKitty said: Unfortunately, Drakur, API is a Mentor-level perk. If and when you upgrade your subscription level , we'll happily walk you through installing the script and making your first cards. No worries about being a newbie, we all start as beginners! :) Done. lol HoneyBadger said: If you're a player... the GM has to be a mentor and have this script installed. It's not something you can just use in any campaign by being a mentor. And ty HoneyBadger that was also something I wanted to know.
Kerberos, it may be because you have tags that are the same name. I am at work and can't text it, but if you hide the tags and then add the row name you want using inline formatting to bold it... like this: !Split MAD *1|**Split MAD.:** Will Save DC 17 !Split MAD *2|**Split MAD.:** Will Save DC 20
1435836828

Edited 1435836940
SeanOG said: You can alter the ~R tag and change the margin from -2px, to 0px, which will drop that back down for you. SeanOG, you're the real MVP! Thanks buddy! I just had a quick search through the code for "-2" as you said and BAM there it was on Line 708! Looks much better now!
I forget why I had it at -2 px in the first place. Probably needs to go to zero now.
Greysion said: SeanOG said: You can alter the ~R tag and change the margin from -2px, to 0px, which will drop that back down for you. SeanOG, you're the real MVP! Thanks buddy! I just had a quick search through the code for "-2" as you said and BAM there it was on Line 708! Looks much better now! I would have found the proper line for you, but I was too tired to do it. I couldn't take it from mine because I have a lot of customized code in mine, and I just had no energy to go to the actual Gist and find it for you. I apologize.
HoneyBadger said: Kerberos, it may be because you have tags that are the same name. I am at work and can't text it, but if you hide the tags and then add the row name you want using inline formatting to bold it... like this: !Split MAD *1|**Split MAD.:** Will Save DC 17 !Split MAD *2|**Split MAD.:** Will Save DC 20 Alright, that worked like a charm. Thanks so much!
Kerberos said: HoneyBadger said: Kerberos, it may be because you have tags that are the same name. I am at work and can't text it, but if you hide the tags and then add the row name you want using inline formatting to bold it... like this: !Split MAD *1|**Split MAD.:** Will Save DC 17 !Split MAD *2|**Split MAD.:** Will Save DC 20 Alright, that worked like a charm. Thanks so much! I'm a dumbass... you don't need to do the **Split MAD**, because that's what the *1 *2 *3 is for. Different tag names and still showing the tag. This should work too. Split MAD.:*1|Will Save... Split MAD.:*2|Will Save...
I'm working on a weather generator, and I was thinking about combining multiple rollable tables with the conditionals ability of Power Cards, but I've never used them. Is this something that can be done with Power Cards? The idea is something like this: Table 1: 1-8 - no precipitation 9-14 - single cell storm (roll 1x on precipitation events) 15-18 - multi cell cluster (roll 1d6+2x on precipitation events etc.... Table 2 (precipitation events) 1 - .1 inch precipitation 2 - .2 inches precipitation etc... There would also be a roll for temperature (with multiple tables based on the terrain, climate zone, and month of the year), wind speed and direction, etc... I would like this all to display in a roll template format which looks something like this: Is this possible?
1435922135

Edited 1435922193
Yup. [[ [txt] 1t[TableName] ]] Just curious... what does PowerCards offer that Templates don't if you already have that working?
Well, I was hoping to take advantage of the conditional logic to make the tables work better (so as not to have to create one mega-table with all the possible variants. By the way, the above output is just something I put together to see what the visual output would look like. None of those values are rolled from a table, just input as text.
Should work. Let me know how it goes. :)
Oh, I will...I'm sure I'll need some help, but I'll try to get it started on my own.
Greysion said: I'm having a minor OCD crisis, my apologies in advance. So with the modification I made to the code thanks to SeanOG's help on line 307, I buffed up the padding a lot and I thought it was the culprit at first. However I've changed it back and made a comparison with the two and both suffer the same issue. On the left side of the divider, regardless of using ~L or leaving it as the base, both the text and the in-line rolling is a little lower placed than on the right side, which of course uses ~R. I'm not sure if I've done something horribly wrong, but I have worked out that the reason I didn't notice it earlier is because most of the Power Cards involve very little writing on the right side, coupled with almost no inline rolls on the left side. If anyone could show me how to fix this that would be an amazing help! It's not a big deal, but I'm never going to be able to unsee it now that I've noticed it. You can replicate this with a basic template such as: !power {{ --Testing Title:|~LLeft [[0]]~L~RRight [[0]]~R }} Which produces the same effect: Is that spell actually reducing the available spell slots on the sheet? If so, could you maybe post the code for it?
1435936457

Edited 1435936824
HoneyBadger said: Yup. [[ [txt] 1t[TableName] ]] Just curious... what does PowerCards offer that Templates don't if you already have that working? Holy Moly, I know people can be humble and all, but PowerCards is literally the best API out there at the moment, or at least most definitely the best one that I've used. The base template functions of Roll20 are pretty sub-standard to be honest, they don't really compare well at all to the customisability of Powercards, not even getting close to mentioning conditional functionality. Don't look down on yourself man, your shit is fantastic! Brian B. said: Is that spell actually reducing the available spell slots on the sheet? If so, could you maybe post the code for it? Sure does and I certainly can. It's using the !Ammo API in conjunction with PowerCards. I'll chop out all of the irrelevant / repeating stuff to keep it short so it doesn't fill up the entire page; !power {{ --hroll|[[ [$lvl] @{Selected|level} + 0d0 ]] --?? $lvl.total &gt; 0 ?? !rSpell1|**Level [[1]] Spells:**~R[[ {{ @{selected|level}+ X , X }kl1, 0d0}k1 + @{selected|spellclass-0-level- X -bonus} ]]~R }} !ammo @{selected|token_id} vLVL X [[ ({{ @{selected|level}+ X , X }kl1, 0d0}k1 + @{selected|spellclass-0-level- X -bonus} ) - @{selected|vLVL X } ]] So, I'll run you through a few things; Change this to the "Level Requirement" of the Spell level for the class, so that only the spells that the caster has access to display; --?? $lvl.total &gt; 0 ?? Change this; {{ @{selected|level}+X , X }kl1, 0d0}k1 + @{selected|spellclass-0-level-1-bonus} To the rough forumla of { Formula to generate the amount of base level X spells at any level , 0d0}k1 + INT/CHA (etc) bonus to the spells you get And change this; !ammo @{selected|token_id} vLVLX To a custom attribute of your own naming choice that you can add to the character's sheet. You cannot use the ones built into the character sheet (Or maybe you can, depends on the character sheet you are using). Just set the value to 0, it'll be declared properly from your Daily Refresh macro. To be honest, it's a little hard to give you a direct copy of what I'm using as different systems follow different rules, as well as the fact that you have to reference the character sheet for optimal results and that of course differs for basically anything. However you should be able to get to grips with a rough idea of how to manage your own spells from what I've left here. If you're still having some difficulty automating spell countdown / automatic daily refresh, toss me a private message and I'll give you a more thorough explanation of how to set it up when I've got some more free time. The way I've set it up means you basically never have to touch it after you've put in the macro. It'll automatically update itself based on your level and your spell bonuses. However when you put it in you'll also have to think about adding special slots for custom abilities (Like Lay on Hands or Ki Points) and you'll have to change the values to be correct for that specific class. Mine in action looks something like this;
Greysion said: HoneyBadger said: Yup. [[ [txt] 1t[TableName] ]] Just curious... what does PowerCards offer that Templates don't if you already have that working? Holy Moly, I know people can be humble and all, but PowerCards is literally the best API out there at the moment, or at least most definitely the best one that I've used. The base template functions of Roll20 are pretty sub-standard to be honest, they don't really compare well at all to the customisability of Powercards, not even getting close to mentioning conditional functionality. Don't look down on yourself man, your shit is fantastic! Brian B. said: Is that spell actually reducing the available spell slots on the sheet? If so, could you maybe post the code for it? Sure does and I certainly can. It's using the !Ammo API in conjunction with PowerCards. I'll chop out all of the irrelevant / repeating stuff to keep it short so it doesn't fill up the entire page; !power {{ --hroll|[[ [$lvl] @{Selected|level} + 0d0 ]] --?? $lvl.total &gt; 0 ?? !rSpell1|**Level [[1]] Spells:**~R[[ {{ @{selected|level}+ X , X }kl1, 0d0}k1 + @{selected|spellclass-0-level- X -bonus} ]]~R }} !ammo @{selected|token_id} vLVL X [[ ({{ @{selected|level}+ X , X }kl1, 0d0}k1 + @{selected|spellclass-0-level- X -bonus} ) - @{selected|vLVL X } ]] So, I'll run you through a few things; Change this to the "Level Requirement" of the Spell level for the class, so that only the spells that the caster has access to display; --?? $lvl.total &gt; 0 ?? Change this; {{ @{selected|level}+X , X }kl1, 0d0}k1 + @{selected|spellclass-0-level-1-bonus} To the rough forumla of { Formula to generate the amount of base level X spells at any level , 0d0}k1 + INT/CHA (etc) bonus to the spells you get And change this; !ammo @{selected|token_id} vLVLX To a custom attribute of your own naming choice that you can add to the character's sheet. You cannot use the ones built into the character sheet (Or maybe you can, depends on the character sheet you are using). Just set the value to 0, it'll be declared properly from your Daily Refresh macro. To be honest, it's a little hard to give you a direct copy of what I'm using as different systems follow different rules, as well as the fact that you have to reference the character sheet for optimal results and that of course differs for basically anything. However you should be able to get to grips with a rough idea of how to manage your own spells from what I've left here. If you're still having some difficulty automating spell countdown / automatic daily refresh, toss me a private message and I'll give you a more thorough explanation of how to set it up when I've got some more free time. The way I've set it up means you basically never have to touch it after you've put in the macro. It'll automatically update itself based on your level and your spell bonuses. However when you put it in you'll also have to think about adding special slots for custom abilities (Like Lay on Hands or Ki Points) and you'll have to change the values to be correct for that specific class. Mine in action looks something like this; Thanks a bunch for posting this. I'm not overly fluent in all the macro, API, character sheet stuff, but I think that I understand what I need to do to implement this into my campaign (I'm running 5e using the shaped character sheet). I really appreciate the help.
Ok, first check. I am not worrying about formatting right now - eventually I'll want it to match the 1e character sheet, but I can get that info from Vince. First I'm attacking temperature, since I already have a table made up, which looks like this: These are supposed to be low and high temps, and they're all appropriately weighted. Next, set up the following macro to roll from the table using Power Cards: !power {{ --name|Weather Report --Temp.:|[[ [txt] 1t[Temperate-Coast-Month2] ]] }} Then I get this output: It should read "5º/45º," but for some reason it's putting an extra 5 in there. Any ideas why? EDIT: It seems that whatever the result, that first number repeats. 10º/50º shows up as 1010º/50º, for example.