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

Power Cards and Drop down menus

Ok, I'm sure that somewhere in the vast knowledge of the universe, i.e. Roll20 forums, there is something to do with power cards and drop downs. However, again because of the vastness of the forums, it is almost impossible to find. I'm interested in starting to use Power Cards but want to make sure that I can use a drop down menu or at least something similar to that. One of the things I would like to do is make a "Spell Book" for my players, where they would have all their spells (that they know, memorized, etc.)  right there for easy access, and when posted to chat would have all the viable info, such as: Name, Action, Range, Duration, School, Components, Description, Effect, Attack Roll or DC, and whether or not it is upgrade-able, all rolled up into a nice little frame. If anyone can help with this, please let me know. Thank you all in advance.
Dropdown menus aren't that great for calling other macros currently. It requires a lot of html character replacement to get them work right.
1445309295

Edited 1445309306
It might be best for you to just use a truckload of conditionals for a spellbook macro.
Dropdowns need better regexing.
API Command Buttons, too :P
Silvyre said: It might be best for you to just use a truckload of conditionals for a spellbook macro. What do you mean by a "truckload of conditionals"?
Check out the OP of the PowerCards thread ; "conditionals", a PowerCards feature, are discussed near the bottom.
1445344549
DK Heinrich
Marketplace Creator
Sheet Author
If you look at near the end of the above linked thread there are two examples of using API command buttons inside power cards to create 'spell books'. imho it is the cleanest and easiest current way to create one. When/If we get the opportunity to easily manipulate the look of the buttons themselves it will be even better. 
I have an idea about that... but the next few weeks are really bad for me to spend any time on PowerCards required to try my idea. Look for some updates mid-November.
I love updates anytime, and mid-November works to be sure -- especially if it helps me to make this better:
How'd you make that pretty table, SeanOG ? :)
1445354802
DK Heinrich
Marketplace Creator
Sheet Author
your favorite, html entities iirc (I asked a while back) Great looking list Sean!
OK, just so I can get my head around the Power Cards. Can someone post a basic code for an attack Power Card for 5e w/API buttons for say a short sword, long sword, and light crossbow with the finished product as well. That way I can kind of see what goes where and how it all pieces together. Unfortunately I'm more of a visual learner, than reading and saying "OK, this goes here and you have to add these tags to this, etc...and this is the outcome." If someone could do that, that would be awesome, then I can actually see where everything is, and hopefully be able to create my own.
SeanOG said: I love updates anytime, and mid-November works to be sure -- especially if it helps me to make this better: Also Sean if you could show me how you got the table in there like that, that would be awesome too. This is EXACTLY what I've been looking for.
1445636363

Edited 1445668617
Sorry folks -- I've been busy as hell with school... To answer your question on the table, I made some custom PowerCode mark-up that allows me to add tables. Here is the custom mark-up I add (but keep in mind, this is so very unpolished, just so I could make it work): .replace(/\~\T(.*?)\~\T/g, "<table width='85%' align='center'>$1</table>") .replace(/\~\O(.*?)\~\O/g, "<tr>$1</tr>") .replace(/\~\D([0-9]{2})(.*?)\~\D([0-9]{2})/g, "<td style='font-size: 12px; border: 1px dotted; padding: 2px; width: $1%;'>$2</td>") .replace(/\~\D\L(.*?)\~\D\L/g, "<td style='font-size: 12px; text-align: left; border: 1px dotted; padding: 2px; width: 33.33%;'>$1</td>") .replace(/\~\D\R(.*?)\~\D\R/g, "<td style='font-size: 12px; text-align: right; border: 1px dotted; padding: 2px; width: 33.33%;'>$1</td>") .replace(/\~\D\C(.*?)\~\D\C/g, "<td style='font-size: 12px; text-align: center; border: 1px dotted; padding: 2px; width: 33.33%;'>$1</td>") .replace(/\~\D\S([0-9]{1})(.*?)\~\D\S([0-9]{1})/g, "<td colspan=$1 style='font-size: 12px; text-align: left; border: 1px dotted; padding: 2px;'>$2</td>") .replace(/\~\H([0-9]{1})(.*?)\~\H([0-9]{1})/g, "<th colspan=$1 style='font-size: 14px; text-align: center; border: 1px dotted; padding: 2px;'>$2</th>")                  Each markup serves its own purpose, and I just haven't had the time to remove all the redundancies to make it easier to use. Then, for the PowerCard macro itself, I have this (Edit: Forgot this stupid thing replaces HTML code): !power {{ @{selected|format} --charid|@{character_id} --whisper|self --name|@{selected|character_name}’s Spell Book --leftsub|Prepare Per Day --rightsub|[[ [txt] @{selected|spells_prepared_druid} +0d0]] --!Spell Slots|~C ~T ~O ~H3 **$$#cf0000|~$8|Spell Slots~$ $$** ~H3  ~O ~O ~D33 ~$8|Level~$ ~D33 ~D33 ~$8|Used~$ ~D33 ~D33 ~$8|Remaining~$ ~D33 ~O ~O ~D33 ~$8|1~$ ~D33 ~D33 ~$8|[[ [txt] @{selected|spell_slots_l1} +0d0 ]]~$ ~D33 ~D33 ~$8|[[ [txt] 4 - @{selected|spell_slots_l1} +0d0 ]]~$ ~D33 ~O ~O ~D33 ~$8|2~$ ~D33 ~D33 ~$8|[[ [txt] @{selected|spell_slots_l2} +0d0 ]]~$ ~D33 ~D33 ~$8|[[ [txt] 3 - @{selected|spell_slots_l2} +0d0 ]]~$ ~D33 ~O ~O ~D33 ~$8|3~$ ~D33 ~D33 ~$8|[[ [txt] @{selected|spell_slots_l3} +0d0 ]]~$ ~D33 ~D33 ~$8|[[ [txt] 3 - @{selected|spell_slots_l3} +0d0 ]]~$ ~D33 ~O ~O ~D33 ~$8|4~$ ~D33 ~D33 ~$8|[[ [txt] @{selected|spell_slots_l4} +0d0 ]]~$ ~D33 ~D33 ~$8|[[ [txt] 3 - @{selected|spell_slots_l4} +0d0 ]]~$ ~D33 ~O ~O ~D33 ~$8|5~$ ~D33 ~D33 ~$8|[[ [txt] @{selected|spell_slots_l5} +0d0 ]]~$ ~D33 ~D33 ~$8|[[ [txt] 2 - @{selected|spell_slots_l5} +0d0 ]]~$ ~D33 ~O ~T ~C --!Cantrips|~C ~$8|$$#fff|Cantrips$$~$ ~C ~~~ ~$6| ~C [**@{selected|repeating_spellbookcantrip_0_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbookcantrip_0_customspellmacro})[**@{selected|repeating_spellbookcantrip_1_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbookcantrip_1_customspellmacro})[**@{selected|repeating_spellbookcantrip_2_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbookcantrip_2_customspellmacro})[**@{selected|repeating_spellbookcantrip_3_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbookcantrip_3_customspellmacro})[**@{selected|repeating_spellbookcantrip_4_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbookcantrip_4_customspellmacro}) ~C ~$ --!1 Level|~C ~$8|$$#fff|Level 1$$~$ ~C ~~~ ~$6| ~C [**@{selected|repeating_spellbooklevel1_3_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel1_3_customspellmacro})[**@{selected|repeating_spellbooklevel1_9_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel1_9_customspellmacro})[**@{selected|repeating_spellbooklevel1_10_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel1_10_customspellmacro}) ^^[**@{selected|repeating_spellbooklevel1_6_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel1_6_customspellmacro}) ~C ~$ --!2 Level|~C ~$8|$$#fff|Level 2$$~$ ~C ~~~ ~$6| ~C [**@{selected|repeating_spellbooklevel2_9_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel2_9_customspellmacro})[**@{selected|repeating_spellbooklevel2_11_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel2_11_customspellmacro})[**@{selected|repeating_spellbooklevel2_22_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel2_22_customspellmacro}) ~C ~$ --!3 Level|~C ~$8|$$#fff|Level 3$$~$ ~C ~~~ ~$6| ~C [**@{selected|repeating_spellbooklevel3_0_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel3_0_customspellmacro})[**@{selected|repeating_spellbooklevel3_3_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel3_3_customspellmacro})[**@{selected|repeating_spellbooklevel3_17_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel3_17_customspellmacro}) ~C ~$ --!4 Level|~C ~$8|$$#fff|Level 4$$~$ ~C ~~~ ~$6| ~C [**@{selected|repeating_spellbooklevel4_0_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel4_0_customspellmacro})[**@{selected|repeating_spellbooklevel4_3_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel4_3_customspellmacro})[**@{selected|repeating_spellbooklevel4_15_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel4_15_customspellmacro}) ~C ~$ --!5 Level|~C ~$8|$$#fff|Level 5$$~$ ~C ~~~ ~$6| ~C [**@{selected|repeating_spellbooklevel5_2_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel5_2_customspellmacro})[**@{selected|repeating_spellbooklevel5_8_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel5_8_customspellmacro})[**@{selected|repeating_spellbooklevel5_12_spellname}**](!&#13&#0059;&#64&#0059;{selected|repeating_spellbooklevel5_12_customspellmacro}) ~C ~$ }} Yes, I know there is a LOT of stuff that may look whacked out at first (especially in the Spell Slots table field), but it does work fine. Right now, I only have it giving me to level 5 spells because that's the highest level my Druid has. Normally, I'd have it calculate spell slots remaining using  [[ [txt] @{selected|spell_slots_l5_max} - @{selected|spell_slots_l5} +0d0 ]] , but for whatever reason, Max is always being pulled in as 0... so I hardcoded the numbers into there for now. I also chose to add the overall macro formatting to the Spell Book itself, in the Custom Spell Macro field, while I figure out something else. Also, the markup for areas like this:  ~$8|$$#fff|Level 5$$~$ (specifically ~$8| ..... ~$) refer to some other custom markup I added some time ago to change the size of the font for whatever is within the tags. That allowed me to have variable text sizes: .replace(/\~\$([0-9]{1}|[0-9]{2})\|(.*?)\~\$/g, "<span style='font-size: $1pt;'>$2</span>"
Very cool; thanks for sharing!
No problem. I became tired of my Druid (who has access to all  the spells in the book) having a character sheet take forever to open and/or switch between tabs for casting spell, and decided to do it this way. It makes it easier.