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

[Script] PowerCards 3 (Thread 3)

Arthur B. said: Also, if there's no way to call another API script "in" the power cards, is there a way to simulate, in the power cards, what the Ammo API does? No, PowerCards cannot call any other scripts.
1445803829
HoneyBadger said: Arthur B. said: Also, if there's no way to call another API script "in" the power cards, is there a way to simulate, in the power cards, what the Ammo API does? No, PowerCards cannot call any other scripts. In this one I wasn't asking if it would call any other scripts, but rather if PowerCards could simulate the Ammo API through either variables/conditionals/etc...?
1445837202
SeanOG said: Not that I am aware of. I don't know why it's not working for you, unless there is some sort of a typo somewhere. I have no problems using it, and I have it hard coded into my character sheet for spells, ammo and class resources. So, it's a little weird. Got it to work. I think I had a typo somewhere. I copied and pasted from your post and then just changed the name to whatever ammo/ability/etc. Working just fine now.
1446151988
HoneyBadger said: Arthur B. said: Also, if there's no way to call another API script "in" the power cards, is there a way to simulate, in the power cards, what the Ammo API does? No, PowerCards cannot call any other scripts. I have a new question for this. Is there a way to grab the output from chat from an API (say Ammo API) and use it in the PowerCards? Example:  Character attacks using their crossbow. PowerCards puts output to chat, however it's set up, and Ammo API also send to chat in a whisper to the player that 1 Ammo was used and now has a remaining Ammo of "?". Could PowerCards grab that output, especially since it's printed before the PowerCard is printed and put that output into the PowerCard output? Here is an example of the output that comes up in chat with Powercards and Ammo API:
1446152744

Edited 1446153102
Silvyre
Roll20 Mod Team
!ammo @{Zerkius|character_id} Bolts -?{Bolts fired|1} !power {{ [...] --!|Zerkius fires ?{Bolts fired} bolt(s) and has @{Bolts} bolts remaining. [...] }}
1446155560
Silvyre said: !ammo @{Zerkius|character_id} Bolts -?{Bolts fired|1} !power {{ [...] --!|Zerkius fires ?{Bolts fired} bolt(s) and has @{Bolts} bolts remaining. [...] }} Thank you so much Silvyre, that's exactly what I wanted!
1446184377
Ravenknight
KS Backer
HoneyBadger said: Peter Bergholtz said: I have noticed that I can't use Powercards III together with the Mapdiscovery script. Anyone else ran into this? Sorry for not seeing this post before. Can you link to the Map Discovery script and post the error you get when trying to run them both? Thanks. Hi Honeybadger. It seems that it was an error on my end. Thanks.
1446200816
Ziechael
Pro
Sheet Author
Pure speculation, but how possible would it be to create a reserved tag that was hidden from the output but prompted Power Cards to play a sound: --sound|Fanfare For example would play the track labelled Fanfare in the jukebox? ps. I know with the wedding and all it wouldn't even hit the 'to do list' but just thought i'd put it out there...
There's another SoundFX script out there already. You could just call that before or after the powercard part of the macro. !soundfx stuff !powercard stuff
1446205140
Ziechael
Pro
Sheet Author
Very true, but then i couldn't pester you for conditional sound support: --?? att.total > @{target|armourclass ?? sound|Scream ;)
True. I will put it on the wishlist.
1446209099
DK Heinrich
Marketplace Creator
Sheet Author
Ziechael said: Very true, but then i couldn't pester you for conditional sound support: --?? att.total > @{target|armourclass ?? sound|Scream ;) so glad you asked - I did not want to pester him anymore, but wanted the same thing!
1446237883
Variables come before sound support ;)
1446294924

Edited 1446295010
GenKitty said: Variables come before sound support ;) Word. Especially variables usable everywhere... I'd be like Oprah for my players: You get a variable! And you get a variable! EVERYONE GETS A VARIABLE! Charge it!
1446295458
Of course, now that I think about it... it would be awesome (though I am sure quite difficult, if not impossible at the moment), if we could actually have a tag in PowerCards that could be used for variables for calling other scripts. I know HB hates automation (it's why we all use computers, don't ya' know?), and that would be one step closer to SkyNet taking over the world, ruling our collective lives through extermination and driving over our degrading, yet fossilized skulls, but it would still be awesome. I mean, there are some scripts I would love to only run if things happened, rather than have them run, then come up with some way to short them (e.g.: using Aaron's ammo script for spell slots for a paladin's Divine Smite depending on if he/she smites or not). But... that's not altogether necessary -- just awesome. Besides, HB is busy right now with his impending doo--I mean awesome journey he's about to begin with the soon-to-be-missus and her overbear--I mean future in-laws..
Actually already married. That was last Friday, the 23rd. Next up is our mini-honeymoon next weekend. :D
1446296204
Well I feel like a douchebag now...
Haha, don't worry about it. :D
1446318618
Ziechael
Pro
Sheet Author
Congratulations HB, I hope it was a great day... I remember it just being nice not having to have a wedding to plan anymore ;) Have a great honeymoon!! (and to keep this post on-topic: Power Cards rock, wooooo! yeah!)
1446325796

Edited 1446326045
This is my thread. Nothing is off topic, muahaha. And thank you. It went really well. ^_^
I was looking for a way to use repeated tags to implement DnD 3.5 style attacks. Each attack is at -5 from the previous one so ideally I'd need to get hold of the "repeat number" and put it in the attack calculation Something like --Attack#4|[[1d20+@{Melee}-(%%repeat%%-1)*5]] where %%repeat%% starts at 1 and iterates up to 4 Is this currently possible and if so what is the correct syntax? If not, would you consider it for a feature request please?
Not currently possible. May be possible when I get to adding variables.
OK - thanks
1446748891
DK Heinrich
Marketplace Creator
Sheet Author
you could have it show the main roll + modifiers (and damage) and then set up a query to ask how many extra attacks you have (default to 0 or your norm), based on that answer you can use conditionals to show something like:  Main Attack = [?] vs. AC [?], if hits deal [?] damage 2nd attack = Main Attack -5, if hits deal [?] additional damage 3rd attack = Main Attack -10, if hits deal [?] additional damage It does not do all the math for you, but lets you quickly subtract 5, 10, 15, 20 as needed and will only list the ones you use (due to the query) - and will roll all the damage, allowing you to add them up based on what ones hit.  Not perfect, but might be better than having 3 or 4 cards fly by for one set of attacks. 
Iterative attacks are pretty set in stone and you don't get more of them or less them. I personally would use something like the following, since you wouldn't be changing it all the time. Just when you level up enough to get another attack. --!Attack|**Attacks:** ^^ ^* [[1d20 + BaB + Mods]] | [[1d20 + BaB + Mods - 5]] | [[1d20 + BaB + Mods - 10]] | [[1d20 + BaB + Mods - 15]] --!Damage|**Damage:** ^^ ^* [[1d8+3]] | [[1d8 + 3]] | [[1d8 + 3]] | [[1d8 + 3]]
1446754952

Edited 1446755858
I don't know a ton about the rules for D&D 3.5 so please forgive me if this is totally ignorant but you might try using conditionals to determine if a character's iterative attacks hit. As i understand it, each iterative attack is just the initial roll(plus skills and modifiers and whatnot) -(5 * (number of attacks)). So a character attacking a target with an AC of 15 would have to roll 20 or higher (with bonuses) to successfully attack twice in a row. I hope i'm getting that right.  As it stands, you can't do math with a rolltag, but you can do math with anything you compare it against. So, while $ATK -5 >= @{target|AC} is not ok. $ATK >= [[@{target|AC} +5]] is perfectly ok. This is good because, as we learned in algebra: x-5 > 10 can also be expressed as x > 15. Thus, if we are comparing an attack roll to a target's AC: [[1d20+@{Melee}-(%%repeat%%-1)*5]] VS AC can be expressed as [[1d20+@{Melee}]] VS [[AC + ((%%repeat%%-1)*5)]] for iterative attacks. I'd try something like this: --roll|[[ [$ATK] 1d20 + @{melee} + ?{Modifier} ]] --?? $ATK >= @{target|AC} ?? Attack 1 *1|Hit! [[Damage roll]] --?? $ATK >= [[@{target|AC}+5]] ?? Attack 2 *2|Hit! [[Damage roll]] --?? $ATK < @{target|AC} ?? Attack *1|Miss! --?? $ATK < [[@{target|AC}+5]] ?? Attack 2 *2|Miss!
1446754977
man, i just cannot get that table thing right.
1446755395
DK Heinrich
Marketplace Creator
Sheet Author
thats true - been a long while since i delved into the system. short version is that I think you can still use powercards to show you what you need to see, just not in the manner that was originally asked.
1446755525
DK Heinrich
Marketplace Creator
Sheet Author
Dylan S. said: man, i just cannot get that table thing right. click the paragraph icon and choose 'code' - should work
1446755672
Yeah, it definitely can't show the math on that the way Daryl wants, but it can determine what he wants to know (the success of iterative attacks) and still show the roll total for the character in case he wants to determine crits and stuff. I really can't think of a better way to do it quickly.
1446755707
DK Heinrich said: Dylan S. said: man, i just cannot get that table thing right. click the paragraph icon and choose 'code' - should work Thank you!
1446756953

Edited 1446757135
Furthermore, if you want to make more generic macros that can be used by multiple characters, give characters a "Number of attacks" attribute (or whatever you want to call it) then use the AND condition so that they'll only get the correct number of attacks. That way you won't have to make several macros for each number of attacks: 1 attack macro, 2 attack macro, etc. !power {{ --roll|[[ [$ROLL] 1d20 + @{melee} + ?{Modifier|0} ]] --hrolls| [[ [$ATKS] @{numberOfAttacks} +0d0 ]] --?? $ATKS >= 1 AND $ROLL >= @{target|AC} ?? Attack 1 *1|Hit! --?? $ATKS >= 2 AND $ROLL >= [[@{target|AC}+5]] ?? Attack 2 *1|Hit! --?? $ATKS >= 1 AND $ROLL < @{target|AC} ?? Attack 1* 2|Miss! --?? $ATKS >= 2 AND $ROLL < [[@{target|AC}+5]] ?? Attack 2 *2|Miss! --?? $ATKS >= 3 AND $ROLL >= [[@{target|AC}+10]] ?? Attack 3 *1|Hit! --?? $ATKS >= 3 AND $ROLL < [[@{target|AC}+10]] ?? Attack 3 *2|Miss! }} When a character gets an extra attack from leveling up, you can just adjust that attribute and forget it until they get another attack. or you could just go with a rollquery if you've got 1283279834753498 character sheets you don't feel like adjusting.
Thanks for the suggestions. Since each attack rolls separately, I guess I'm stuck with hard coding conditionals and using a variant of HoneyBandger's suggestion that stores each attack roll as $R1, $R2, $R3 ... There are LOTS of options once you add in the critical confirm dice rolls too!
1446998140
Isembard
Pro
Sheet Author
Hello. I have just read through the thread after not using Power Cards for some time. The advances to the script are amazing, super work!! I am struggling somewhat to write a couple of macros, I don't have the most logical brain, and hoped for some help or a steer to some examples that would help me. I am setting up a game of Blood & Treasure (a mix between OSR and paired down 3.5 SRD). I have set up three Saving Throw Macro's Fort, Ref & Will as below: !power {{ --charid|@{selected|character_id} --emote|//@{selected|token_name} is attempting a Fortitude Save...// --bgcolor|#000000 --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|Fortitude Save --leftsub|Saving Throw --rightsub|Constitution --!Save|[[ [$Save]1d20+@{selected|CON}+?{Racial Bonus|0} ]] vs FORT --?? $Save.base == 1 OR $Save.total < @{selected|FORT}?? !Fail:|$$#FF0000|FAILURE$$ --?? $Save.total >= @{selected|FORT} AND $Save.base <> 1?? !Success:|$$#7CFC00|SUCCESS$$ }} The Macro works as intended but I wondered if I could make 1 Saving throw Macro that allows the choice via Drop Down Query which of the 3 Saving Throws to Roll? I would also like to use a Macro for Heroic Tasks, I am floundering completely with this one. The rules for Heroic Tasks are: For each of the actions described below, the conditions required to elevate a simple task to the level of a heroic task are briefly described. In addition, several difficulties are listed that impose a penalty on the player’s roll. Each difficulty a character faces when attempting a heroic task imposes a ‐2 penalty on his dice roll. For example, riding a mount during combat is difficult, and therefore requires a heroic task check to do without falling off. Riding an untamed flying mount that has been frightened during combat involves three difficulties, and thus imposes a ‐6 penalty. The dice to be rolled and the number needed for success depends on whether the person attempting the task is unskilled, has a knack or is skilled at the task. UNSKILLED: The unskilled can succeed at a difficult task by rolling 1d20, adding the relevant ability modifier, and trying to equal or beat an “18”. KNACK: An unskilled person with a knack for something (such as an elf’s knack for finding secret doors or a gnome’s knack for listening at doors) can succeed at a difficult task by rolling 1d20, adding the relevant ability modifier, and trying to equal or beat a “15”. SKILLED: A character skilled at a task improves his chances of success as he or she advances in level. A skilled task check is made by rolling the indicated saving throw, modifying the roll with the indicated ability score modifier instead of the normal ability score modifier. There are 20 different Tasks/Skills: Is there a way to have one macro that allows players to select the Task they are attempting and apply the correct modifiers/target numbers based on their choice? Any advice appreciated. I have found plenty of combat macro examples and have been able to write Macros for what I need there but the stuff above, struggling. Many Thanks
1447005285

Edited 1447005437
Silvyre
Roll20 Mod Team
FGIsembard said: I have set up three Saving Throw Macro's Fort, Ref & Will as below: !power {{ --charid|@{selected|character_id} --emote|//@{selected|token_name} is attempting a Fortitude Save...// --bgcolor|#000000 --orowbg|#F5DEB3 --erowbg|#FFFFF0 --name|Fortitude Save --leftsub|Saving Throw --rightsub|Constitution --!Save|[[ [$Save]1d20+@{selected|CON}+?{Racial Bonus|0} ]] vs FORT --?? $Save.base == 1 OR $Save.total < @{selected|FORT}?? !Fail:|$$#FF0000|FAILURE$$ --?? $Save.total >= @{selected|FORT} AND $Save.base <> 1?? !Success:|$$#7CFC00|SUCCESS$$ }} The Macro works as intended but I wondered if I could make 1 Saving throw Macro that allows the choice via Drop Down Query which of the 3 Saving Throws to Roll? The simplest way to do this would be to replace @{selected|CON} with ?{Saving throw|Fort,@{selected|CON}|Ref,@{selected|DEX}|Will,@{selected|WIS}}. On second glance, you'd need at least two Roll Queries to do this "simply". You could look into nesting Roll Queries and place (a modified version of) the entirity of each whole macro within their respective positions within the drop-down.
1447005948
Isembard
Pro
Sheet Author
Thank You. I will give it a go.
1447005960
Silvyre
Roll20 Mod Team
FGIsembard said: I would also like to use a Macro for Heroic Tasks [...] There are 20 different Tasks/Skills: Is there a way to have one macro that allows players to select the Task they are attempting and apply the correct modifiers/target numbers based on their choice? Within this thread , I helped work out a macro for WFRP1e standard tests that would likely be similar, at least in structure, to one that you're envisioning for heroic tasks. The macro prompts for choice of test, and then prompts a choice from a list of skills/modifiers relevant to each test.
1447038554

Edited 1447038811
Hey guys, a little more help please? I'm trying to do a code for critical hits where the character gets a Crit on a 19 or 20. This is what I have so far, but it doesn't seem to be working. What am I doing wrong? --?? $Atk.base >= 19 ?? Critical Hit|~R[[ [NH] 4d12]]~R It works fine when I have it set to == 20 for a regular Crit but not like this. EDIT:  Also if I am doing a roll with STD/ADV/DIS with just a double die roll would I need to do a separate string of code for each one? For example, this is what I have: --Attack|~R[[ [$Atk] 1d20 + @{Melee To Hit} ]] | [[ [$Atk] 1d20 + @{Melee To Hit} ]] vs. [[0+ %%AC%% ]] (AC) (%%token_name%%)~R Should I instead put this: --Attack|~R[[ [$Atk] 1d20 + @{Melee To Hit} ]] | [[ [$Atk2] 1d20 + @{Melee To Hit} ]] vs. [[0+ %%AC%% ]] (AC) (%%token_name%%)~R ... ... ... --?? $Atk.base >= 19 ?? Critical Hit|~R[[ [NH] 4d12]]~R --?? $Atk2.base >= 19 ?? Critical Hit|~R[[ [NH] 4d12]]~R
1447039050
Silvyre
Roll20 Mod Team
Yeah, avoid identical Roll IDs.
1447041090
Silvyre said: Yeah, avoid identical Roll IDs. Ok, but what about the original code for the Crit rolls at 19 and 20?
1447043021
Silvyre
Roll20 Mod Team
Looks like you've figured that out. People have posted tons of examples of D&D 5e attack PowerCards that use conditionals earlier on the thread; I recommend skimming the thread and checking them out.
1447045270
Silvyre said: Looks like you've figured that out. People have posted tons of examples of D&D 5e attack PowerCards that use conditionals earlier on the thread; I recommend skimming the thread and checking them out. I have looked through the other posts and I thought that I had it correct, but it doesn't seem to be working. It's not showing the Crit roll for a 19. I don't know if I'm missing something or if I have a typo or what the problem is. That's why I'm asking for some help with it.
1447045670
Silvyre
Roll20 Mod Team
What's your macro look like now?
1447045867
Silvyre said: What's your macro look like now? !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** slashes at his foe with his greataxe. --format|encounter --name|Greataxe --leftsub|Action --rightsub|Reach 5’ --target_list|@{target| |token_id} --Attack|~R[[ [$Atk] 1d20 + @{Melee To Hit} ]] | [[ [$Atk2] 1d20 + @{Melee To Hit} ]] vs. [[0+ %%AC%% ]] (AC) (%%token_name%%)~R --Hit|~R[[ [NH] d12+@{STR}+@{Rage Damage} ]]~R --?? $Atk.base >= 19 ?? Critical Hit|~R[[ [NH] 4d12]]~R --?? $Atk2.base >= 19 ?? Critical Hit 2|~R[[ [NH] 4d12]]~R --Properties|~RSlashing, Heavy, 2-Handed~R --?? $Atk.total < @{target| |bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Atk2.total < @{target| |bar3} AND $Atk2.base == 1 ?? !Miss *1:|2 You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ }}
1447048122
Silvyre
Roll20 Mod Team
I was able to have the both the Critical Hit and Critical Hit 2 tags display on 19's with a stripped down version of your macro. !power {{ --Attack|~R[[ [$Atk] 1d20 + 0 ]] | [[ [$Atk2] 1d20 + 0 ]]~R --?? $Atk.base >= 19 ?? Critical Hit|~R[[ [NH] 4d12]]~R --?? $Atk2.base >= 19 ?? Critical Hit 2|~R[[ [NH] 4d12]]~R }}
1447049525
Silvyre said: I was able to have the both the Critical Hit and Critical Hit 2 tags display on 19's with a stripped down version of your macro. !power {{ --Attack|~R[[ [$Atk] 1d20 + 0 ]] | [[ [$Atk2] 1d20 + 0 ]]~R --?? $Atk.base >= 19 ?? Critical Hit|~R[[ [NH] 4d12]]~R --?? $Atk2.base >= 19 ?? Critical Hit 2|~R[[ [NH] 4d12]]~R }} So, why isn't it working with the full macro?
1447051794
Silvyre
Roll20 Mod Team
I don't know; why don't you incrementally add to the macro to pinpoint the issue?
1447053318
Silvyre said: I don't know; why don't you incrementally add to the macro to pinpoint the issue? Got it, Thanks again Silvyre!!!
1447053426
Silvyre said: I don't know; why don't you incrementally add to the macro to pinpoint the issue? Is there a way to make the inline roll highlight on a Crit roll of 19?
1447055220
Silvyre
Roll20 Mod Team
1d20cs>19