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

Personal tools

Script:PowerCards Macro Helper

From Roll20 Wiki

Revision as of 17:17, 3 May 2020 by Andreas J. (Talk | contribs)

Jump to: navigation, search
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(Youtube) - 15min video on the PowerCards Helper, by Kurt Jaegers (February, 2019)

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) 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.