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

PowerCard Macro 'breaks'

1568520418

Edited 1568520740
Hey there, new to all of this API and macro business but so far its pretty neat.  Had a quick question about writing this stuff out; I know in HTML you can type in something like <--Text--> if you want to make a visual partition of the code that won't affect the code itself in anyway; is there a similar command or trick for making PowerCards?  I find when making really long macros I can get lost as to what's what. Thanks for your time.
Rindali said: Hey there, new to all of this API and macro business but so far its pretty neat.&nbsp; Had a quick question about writing this stuff out; I know in HTML you can type in something like &lt;--Text--&gt; if you want to make a visual partition of the code that won't affect the code itself in anyway; is there a similar command or trick for making PowerCards?&nbsp; I find when making really long macros I can get lost as to what's what. Thanks for your time. You may find this useful, I hope. **Bold** //Italics// __Underline__ ~L, ~C, ~R aligns text in between those tags to the (L)eft, (C)enter, and (R)ight. ~L This text would be left aligned. ~L ~C This text would be centered. ~C ~R This text would be right aligned. ~R ~~~ inserts a horizontal rule. ^^ adds a line break [! and !] surrounding text will format the contained text as an inline roll ^*Indents the first line of a paragraph in the content of a tag. (note that this is a literal asterisk and not the level of the indent. If you wish to add additional indent levels, specify the modifier more than once. Also note that this tag needs to be at the front of the content. @@url@@ - Naked url, requires that ALLOW_URLS to be set to true in the script. @@url||test@@ - Hidden url, requires that ALLOW_HIDDEN_URLS to be set to true in the script. Double vertical bars (||) are required between the URL and the display text.&lt;/nowiki&gt; $$#900|This text will appear in red$$ - There can be either 3 or 6 digits after the # and specify a color value in hex. In fact, you will find lots of help right here in the Power Cards Wiki:&nbsp; <a href="https://wiki.roll20.net/Script:PowerCards#Introduction" rel="nofollow">https://wiki.roll20.net/Script:PowerCards#Introduction</a>
Hey Dave! Been pretty ravenously looking the Wiki over to answer whatever questions I have since I started this little venture of mine, and for the most part it's done the trick.&nbsp; However, I don't think what I'm looking for is either a horizontal rule or a line break (pretty sure both of those have an output).
I wasn't sure if it was what you needed help with. I was actually going to just put the link to the Wiki up. But maybe someone else may glean something from it. Are you looking for help with the syntax of Power Cards or more along the HTML route? If it's the latter then you are way ahead of me in that regard lol.&nbsp; I hope you find the answer to your problem. I'm sure you will, the Forum people are really great and go out of their way to help out. Good luck!
They have been so far, yes.&nbsp; And it's not really a 'problem' persay, just something that would help me organize my syntax.&nbsp; Lets say part of the syntax has to do with damage, and another part has to do with the attack roll.&nbsp; Is there a way to annotate the syntax with a label or something similar that doesn't change the output result?&nbsp; For example, I'll post a long macro I've made, and then I'll post it again with what I'm looking for. !power {{ --name|**Basic ([[ [TXT] {@{MBASIC} + @{WS}} ]])** --leftsub|Melee (Basic) --rightsub|Versatile --Attack Roll:|[[ [$Atk|XPND] 1d100 + @{WS} [Weapon Skill] +@{MBASIC} [Melee (Basic)] ]] --hroll|[[ [$Loc] 1d100 ]] --?? $Loc &lt;= 9 ?? Hit Location:| Head --?? $Loc &gt;= 10 AND $Loc &lt;= 24 ?? Hit Location:| Left Arm --?? $Loc &gt;= 25 AND $Loc &lt;= 44 ?? Hit Location:| Right Arm --?? $Loc &gt;= 45 AND $Loc &lt;= 79 ?? Hit Location:| Body --?? $Loc &gt;= 80 AND $Loc &lt;= 89 ?? Hit Location:| Left Leg --?? $Loc &gt;= 90 ?? Hit Location:| Right Leg --?? $Atk &gt;= 100 AND $Atk &lt; 110 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 0 ]] --?? $Atk &gt;= 110 AND $Atk &lt; 120 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 1 ]] --?? $Atk &gt;= 120 AND $Atk &lt; 130 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 2 ]] --?? $Atk &gt;= 130 AND $Atk &lt; 140 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 3 ]] --?? $Atk &gt;= 140 AND $Atk &lt; 150 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 4 ]] --?? $Atk &gt;= 150 AND $Atk &lt; 160 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 5 ]] --?? $Atk &gt;= 160 AND $Atk &lt; 170 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 6 ]] --?? $Atk &gt;= 170 AND $Atk &lt; 180 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 7 ]] --?? $Atk &gt;= 180 AND $Atk &lt; 190 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} +8 ]] --?? $Atk &gt;= 90 AND $Atk &lt; 100 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 1 ]] --?? $Atk &gt;= 80 AND $Atk &lt; 90 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 2 ]] --?? $Atk &gt;= 70 AND $Atk &lt; 80 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 3 ]] --?? $Atk &gt;= 60 AND $Atk &lt; 70 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 4 ]] --?? $Atk &gt;= 50 AND $Atk &lt; 60 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 5 ]] --?? $Atk &gt;= 40 AND $Atk &lt; 50 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 6 ]] --?? $Atk &gt;= 30 AND $Atk &lt; 40 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 7 ]] --?? $Atk &gt;= 20 AND $Atk &lt; 30 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 8 ]] --?? $Atk &gt;= 10 AND $Atk &lt; 20 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 9 ]] --?? $Atk &lt; 10 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 10 ]] --?? $Atk.base &gt;= 96 ?? !Crit:|~C $$#9B0000| **CRITICAL HIT!** $$ ~C }} So there's a lot of info there to scroll through.&nbsp; I'd like to be able to do something like this, where I can mark out different sections of the syntax for reference in case I need to go back later and edit it (represented here by &lt;----TEXT---&gt;). !power {{ --name|**Basic ([[ [TXT] {@{MBASIC} + @{WS}} ]])** --leftsub|Melee (Basic) --rightsub|Versatile &lt;---ATTACK ROLL---&gt; --Attack Roll:|[[ [$Atk|XPND] 1d100 + @{WS} [Weapon Skill] +@{MBASIC} [Melee (Basic)] ]] &lt;---LOCATION---&gt; --hroll|[[ [$Loc] 1d100 ]] --?? $Loc &lt;= 9 ?? Hit Location:| Head --?? $Loc &gt;= 10 AND $Loc &lt;= 24 ?? Hit Location:| Left Arm --?? $Loc &gt;= 25 AND $Loc &lt;= 44 ?? Hit Location:| Right Arm --?? $Loc &gt;= 45 AND $Loc &lt;= 79 ?? Hit Location:| Body --?? $Loc &gt;= 80 AND $Loc &lt;= 89 ?? Hit Location:| Left Leg --?? $Loc &gt;= 90 ?? Hit Location:| Right Leg &lt;---DAMAGE---&gt; --?? $Atk &gt;= 100 AND $Atk &lt; 110 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 0 ]] --?? $Atk &gt;= 110 AND $Atk &lt; 120 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 1 ]] --?? $Atk &gt;= 120 AND $Atk &lt; 130 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 2 ]] --?? $Atk &gt;= 130 AND $Atk &lt; 140 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 3 ]] --?? $Atk &gt;= 140 AND $Atk &lt; 150 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 4 ]] --?? $Atk &gt;= 150 AND $Atk &lt; 160 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 5 ]] --?? $Atk &gt;= 160 AND $Atk &lt; 170 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 6 ]] --?? $Atk &gt;= 170 AND $Atk &lt; 180 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} + 7 ]] --?? $Atk &gt;= 180 AND $Atk &lt; 190 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} +8 ]] --?? $Atk &gt;= 90 AND $Atk &lt; 100 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 1 ]] --?? $Atk &gt;= 80 AND $Atk &lt; 90 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 2 ]] --?? $Atk &gt;= 70 AND $Atk &lt; 80 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 3 ]] --?? $Atk &gt;= 60 AND $Atk &lt; 70 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 4 ]] --?? $Atk &gt;= 50 AND $Atk &lt; 60 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 5 ]] --?? $Atk &gt;= 40 AND $Atk &lt; 50 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 6 ]] --?? $Atk &gt;= 30 AND $Atk &lt; 40 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 7 ]] --?? $Atk &gt;= 20 AND $Atk &lt; 30 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 8 ]] --?? $Atk &gt;= 10 AND $Atk &lt; 20 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 9 ]] --?? $Atk &lt; 10 ?? Base Damage:|[[ 4 + @{SB} + @{MBD} - 10 ]] &lt;---CRITICAL---&gt; --?? $Atk.base &gt;= 96 ?? !Crit:|~C $$#9B0000| **CRITICAL HIT!** $$ ~C }}
You are missing the ! in the comment. It should be &lt;!-- Text --&gt;