Roll From Compendium
Add compendium context menu option to roll an item (casting a spell, showing a feature, etc).
This module adds a new context menu button to the Compendium window. When right-clicking an item from the list, you will have a new option - Roll.
When clicking this option, the item will be "rolled", and a card will be shown in the chat:
- A spell will be cast
- A weapon will be used, allowing an attack and damage roll
- A feature will be described
- etc. for "Item" type compendiums (all of which have a roll() function, which this module calls)
- Journal Entries will show a message with their title and description
- Actors and Scenes will just have their basic info (image and name) shown in the chat
When Item items (spells, weapons, equipment, features...) are rolled, they will be rolled as if they belong to an actor.
If you are selecting a token while rolling, it will be as if the item is used by that actor. This means that, for example, a weapon will use the abilities of the character, and a 5e spell will have a saving throw DC based on the character's statistics.
However, if no token is selected, a "dummy actor" will be created (once) and used for that purpose. The dummy actor can be found in the Actors tab, named "(Compendium Roll)". If you want to change the default actor used to cast
Note for D&D 5th Edition
- When casting a spell with a dummy actor when your selected character doesn't have the spell slots for it, you'll want to toggle off "Consume spell slot" in the dialog that opens; otherwise it will fail to cast. This is because of a bug in the 5e system - its code can't deal with someone casting a spell they don't have the right spell slots for.
- If you press a button on the rolled item's chat message (e.g. the damage of a sword attack) - it will treat the item as if it belongs to the latest actor that used the compendium item, regardless of which actor was linked to the message. This means it might be using the wrong actor's stats if you press a button on an "old" message after switching your selected actor. This is a known bug (that I don't know how to solve).
- Automation Enhancers
- Tools and Controls