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

Assistance with Macro Building

Good Evening all,  I have been attempting to make my first power card macro and I am finding it very confusing, I have read so much nd have been trying but I guess I really do not understand how it is done.  I would like to make a Two Weapon Fighting power card macro and others, but this one first, I have been playing around with things and am just not figuring it out.  Could someone please assist with my badly started macro? !power {{ --desc|Two Weapon Fighting --format|Joxar --leftsub|**Main Hand** --rightsub|**Off Hand** --Main Hand|[[1d20+@{Joxar|strength_mod}]]vs AC }} I am trying to get my proficiency score added to this and the second weapon and am not figuring out how.  Also the title is not coming up, this is what I get with what I have If someone could offer me guidance I would truly appreciate it. Thanks Firefox1968
1640784291
Kurt J.
Pro
API Scripter
FireFox1968 said: Good Evening all,  I have been attempting to make my first power card macro and I am finding it very confusing, I have read so much nd have been trying but I guess I really do not understand how it is done.  I would like to make a Two Weapon Fighting power card macro and others, but this one first, I have been playing around with things and am just not figuring it out.  Could someone please assist with my badly started macro? !power {{ --desc|Two Weapon Fighting --format|Joxar --leftsub|**Main Hand** --rightsub|**Off Hand** --Main Hand|[[1d20+@{Joxar|strength_mod}]]vs AC }} I am trying to get my proficiency score added to this and the second weapon and am not figuring out how.  Also the title is not coming up, this is what I get with what I have If someone could offer me guidance I would truly appreciate it. Thanks Firefox1968 @Firefox1968 first a suggestion: Take a look at ScriptCards instead of PowerCards. I wrote ScriptCards to overcome some of the limitations inherit in the way PowerCards was originally designed. ScriptCards acts much more like a scripting language (it has actual variables, loops, subroutines, and the like). I have a couple of YouTube videos ( ScriptCards Intro - YouTube  and  ScriptCards Deep Dive Magic Missile - YouTube ) that walk through creating ScriptCard macros. There is also the ScriptCards GitHub Repo  that contains sample macros and other goodies. PowerCards is not currently being expanded upon, and the only changes I've been making are critical bug fixes and adding support for metascripts. The same os true of the PCMHelper script. There is an equivalent ScriptCard (no additional API script needed) that does essentially the same thing in the Repo. If you are committed to using PowerCards here are items that address your issues above: The title bar of the PowerCard is set via the "name" tag, so --name|Two Weapon Fighting To include the proficiency bonus (assuming you are using the 5E sheet), you would add @{Joxar|pb} to the roll, so: --Main Hand|[[1d20+@{Joxar|strength_mod}+@{Joxar|pb}]]vs AC Continuing the ScriptCard track, a roughly equivalent ScriptCard for this would looks something like: !script {{   --#title|Two Weapon Fighting   --/|Roll attack and potential damage for the Main Hand attack   --=MainHand|1d20 + @{selected|strength_mod} [STR] + @{selected|pb} [PROF]   --=MainDamage|1d8 + @{selected|strength_mod} [STR]   --/|Roll attack for the Off Hand attack   --=OffHand|1d20 + @{selected|strength_mod} [STR] + @{selected|pb} [PROF]   --/|Off hand attacks only apply ability modifiers to damage if negative...   --?@{selected|strength_mod} -lt 0|[     --=OffDamage|1d8 + @{selected|strength_mod} [STR]   --]|[     --=OffDamage|1d8   --]|   --/|Display the results   --+Main Hand|Attack roll of [$MainHand] vs target's AC for [$MainDamage] on a hit   --+Off Hand|Attack roll of [$OffHand] vs target's AC for [$OffDamage] on a hit }} The --/| lines are comments and are ignored by the parser. I've also genericized it to run against whatever token is selected. You could replace @{selected| with the name of a character if desired. As a simple breakdown, --# statements set a script parameter, --= statements assign a roll variable, --? statements are conditionals, --] statements manage code blocks, and --+ statements display a line of output.
Kurt, Thank you for assisting me, I have had to make changes to the !script because it did not work in the game I am in, I turned it into a !power macro.  So, could you explain to me how you can install the iscript into our game??  I am not understanding how to do it.  Does this help users create scripts for the game, I am not the GM I am just a player. Let me know. Thanks Firefox1986
1640895871
timmaugh
Pro
API Scripter
ScriptCards is another script like PowerCards... so you would get it through the 1-click interface in the script page for your game, or you can copy and paste the code for it manually. It, like any script, parses the message text (the command line) sent to the API. PowerCards will react to a command line that begins with !power. ScriptCards will react to a command line that begins with !script. In that way, they are the same kind of animal. What separates ScriptCards is that the parsing of the command line is more robust... with greater options available to you as a macro-builder. That means you can do things in the text of your command line (e.g., your macro) to make use of the features Kurt mentioned: loops, counters, variables, subroutines, etc. So it doesn't help you to *write* the macro, per se... it just gives you a lot more tools to make the macro do what you want it to do, if that makes sense. I would suggest you install ScriptCards from the one-click, then peruse the ScriptCard Working and Sharing  thread for more examples.