Difference between revisions of "Script:PowerCards Macro Helper"
From Roll20 Wiki
Andreas J. (Talk | contribs) m (update "5E OGL" mentions to "D&D 5E by Roll20") |
|||
Line 17: | Line 17: | ||
== 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 5E | + | 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 == | ||
Line 95: | Line 95: | ||
|- | |- | ||
| PowerCard Replacements PCMHelper | | PowerCard Replacements PCMHelper | ||
− | | Contains the "Advantage" replacement, allowing scripts to substitute die roll information based on the Advantage Toggle option in the 5E | + | | 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 | | PowerCard Templates PCMHelper |
Revision as of 21:18, 16 April 2020
Version: 1.0.5
Last Modified: 2019-02-25
Code: PowerCards Macro Helper
Dependencies: None
Conflicts: None
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.
Contents |
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)
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.
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.
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.
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. |
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.