Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Difference between revisions of "Script:PowerCards Macro Helper"

From Roll20 Wiki

Jump to: navigation, search
m (update "5E OGL" mentions to "D&D 5E by Roll20")
m
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
{{script overview
+
{{revdate}}{{script overview
 
|name=PowerCards Macro Helper
 
|name=PowerCards Macro Helper
 
|author={{user profile|2365448|Kurt J.}}
 
|author={{user profile|2365448|Kurt J.}}
Line 5: Line 5:
 
|lastmodified=2019-02-25}}
 
|lastmodified=2019-02-25}}
  
PowerCards Macro Helper is a companion to [[Script:PowerCards]]. PCMHelper generates macros, templates, and replacement handouts to enable the automatic creation of PowerCards for PC Attacks, NPC Actions, NPC Legendary Actions, and PC and NPC Spellcasting.
+
'''PowerCards Macro Helper(PCMHelper)''' is a companion to [[Script:PowerCards|PowerCards]] API script. PCMHelper generates macros, templates, and replacement handouts to enable the automatic creation of PowerCards for PC Attacks, NPC Actions, NPC Legendary Actions, and PC and NPC Spellcasting for those using the '''[[D&D 5E by Roll20]]'''-character sheet.
 +
 
 +
{{yt|watch?v=PVjs39dzaUA | Roll20 PowerCards - PCMHelper}} - 15min video on the PowerCards Helper, by {{user profile|2365448|Kurt Jaegers}} (February, 2019)
  
 
== Available API Commands ==
 
== Available API Commands ==
Line 12: Line 14:
 
   !pcm - With one or more tokens selected, prompts the PCMHelper script to update the attribute lists on the associated characters (See below)
 
   !pcm - With one or more tokens selected, prompts the PCMHelper script to update the attribute lists on the associated characters (See below)
 
</pre>
 
</pre>
 
+
{{apiboxRec}}
 
== Installation and Configuration ==
 
== Installation and Configuration ==
 
PCMHelper can be installed via the Roll20 One-Click Install system. While it will not fail without PowerCards installed, it will also not produce useful results unless that API script is also installed in the game. At launch of PCMHelper, PowerCards 3.8.11 or higher is required.
 
PCMHelper can be installed via the Roll20 One-Click Install system. While it will not fail without PowerCards installed, it will also not produce useful results unless that API script is also installed in the game. At launch of PCMHelper, PowerCards 3.8.11 or higher is required.
  
 
== Script Use ==
 
== Script Use ==
PCMHelper has two primary tasks : first, to establish a set of handouts and macros used by the PowerCards API script to generate PowerCards based on information from the '''[[D&D 5E by Roll20]]''' Character sheet, and second to monitor changes to characters (PC and NPCs) and generate a set of character attributes used by these macros.
+
PCMHelper has two primary tasks : first, to establish a set of handouts and macros used by the PowerCards API script to generate PowerCards based on information from the '''[[D&D 5E by Roll20]]'''-character sheet, and second to monitor changes to characters (PC and NPCs) and generate a set of character attributes used by these macros.
  
== The Attributes ==
+
=== The Attributes ===
The following attributes are generated on NPCs when the !pcm command is run with their tokens selected, when they are created, or when their actions or legendary actions are updated:
+
The following attributes are generated on NPCs when the <code>!pcm</code> command is run with their tokens selected, when they are created, or when their actions or legendary actions are updated:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 85: Line 87:
 
These attributes are formatted with vertical bars between each entry, allowing them to be used as the text content of a roll query.
 
These attributes are formatted with vertical bars between each entry, allowing them to be used as the text content of a roll query.
  
== The Templates & Replacements ==
+
=== The Templates & Replacements ===
  
 
When !pcmsetup is executed, PowerCards Macro Helper will create (or recreate) two handouts in your game:
 
When !pcmsetup is executed, PowerCards Macro Helper will create (or recreate) two handouts in your game:
Line 101: Line 103:
 
|}
 
|}
  
== The Macros ==
+
=== The Macros ===
  
When !pcmsetup is executed, PowerCards Macro Helper will create (or recreate) thirteen macros in your game. Each of these macros will query the appropriate attribute list for the character whose token is selected and present this as a dropdown list to select an ability/attack/spell to use. After selection, an appropriate PowerCard will be generated based on the attributes of the ability/attack/spell in the character sheet.
+
When <code>!pcmsetup</code> is executed, PowerCards Macro Helper will create (or recreate) 13 macros in your game. Each of these macros will query the appropriate attribute list for the character whose token is selected, and present this as a dropdown list to select an ability/attack/spell to use. After selection, an appropriate [[PowerCard]] will be generated based on the attributes of the ability/attack/spell in the character sheet.

Latest revision as of 09:48, 18 February 2022

API ScriptAuthor: Kurt J.
Version: 1.0.5
Last Modified: 2019-02-25
Code: PowerCards Macro Helper
Dependencies: None
Conflicts: None

PowerCards Macro Helper(PCMHelper) is a companion to PowerCards API script. PCMHelper generates macros, templates, and replacement handouts to enable the automatic creation of PowerCards for PC Attacks, NPC Actions, NPC Legendary Actions, and PC and NPC Spellcasting for those using the D&D 5E by Roll20-character sheet.

Roll20 PowerCards - PCMHelper - 15min video on the PowerCards Helper, by Kurt Jaegers (February, 2019)

Contents

[edit] Available API Commands

  !pcmsetup - Creates (or recreates) all handouts, templates, and macros associated with the PCMHelper system
  !pcm - With one or more tokens selected, prompts the PCMHelper script to update the attribute lists on the associated characters (See below)

[edit] Installation and Configuration

PCMHelper can be installed via the Roll20 One-Click Install system. While it will not fail without PowerCards installed, it will also not produce useful results unless that API script is also installed in the game. At launch of PCMHelper, PowerCards 3.8.11 or higher is required.

[edit] Script Use

PCMHelper has two primary tasks : first, to establish a set of handouts and macros used by the PowerCards API script to generate PowerCards based on information from the D&D 5E by Roll20-character sheet, and second to monitor changes to characters (PC and NPCs) and generate a set of character attributes used by these macros.

[edit] The Attributes

The following attributes are generated on NPCs when the !pcm command is run with their tokens selected, when they are created, or when their actions or legendary actions are updated:

Attribute Purpose
npcactionlist A list of entries in the Actions area of the NPC character sheet
npclegendaryactionlist A list of entries in the Legendary Actions area of the NPC character sheet

The following attributed are generated on PCs when the !pcm command is run with their tokens selected, when they are created, or when their attack list is updated:

Attribute Purpose
attack_list A list of entries in the Attacks & Spellcasting area of the PC character sheet

Finally, the following attributes are generated on both PC and NPC characters under the same trigger conditions as above:

Attribute Purpose
cantrip_list A list of all of the cantrips known by the PC/NPC
l1_spell_list A list of all of the level 1 spells known by the PC/NPC
l2_spell_list A list of all of the level 2 spells known by the PC/NPC
l3_spell_list A list of all of the level 3 spells known by the PC/NPC
l4_spell_list A list of all of the level 4 spells known by the PC/NPC
l5_spell_list A list of all of the level 5 spells known by the PC/NPC
l6_spell_list A list of all of the level 6 spells known by the PC/NPC
l7_spell_list A list of all of the level 7 spells known by the PC/NPC
l8_spell_list A list of all of the level 8 spells known by the PC/NPC
l9_spell_list A list of all of the level 9 spells known by the PC/NPC

These attributes are formatted with vertical bars between each entry, allowing them to be used as the text content of a roll query.

[edit] The Templates & Replacements

When !pcmsetup is executed, PowerCards Macro Helper will create (or recreate) two handouts in your game:

Handout Description
PowerCard Replacements PCMHelper Contains the "Advantage" replacement, allowing scripts to substitute die roll information based on the Advantage Toggle option in the D&D 5E by Roll20 sheet.
PowerCard Templates PCMHelper Contains PowerCards templates named "Basics", "NPCBasics","NPCAttack","PCAttack","CantripAttack", and "SpellCast". These templates are used by the macros created by the script.

[edit] The Macros

When !pcmsetup is executed, PowerCards Macro Helper will create (or recreate) 13 macros in your game. Each of these macros will query the appropriate attribute list for the character whose token is selected, and present this as a dropdown list to select an ability/attack/spell to use. After selection, an appropriate PowerCard will be generated based on the attributes of the ability/attack/spell in the character sheet.