death-save / combat-utility-belt

Combat Utility Belt module for Foundry Virtual Tabletop
https://deathsave.dev
GNU General Public License v3.0
53 stars 58 forks source link

Condition that adds item/ability to inventory #673

Closed lucaspicerni closed 2 years ago

lucaspicerni commented 2 years ago

In some systems, the condition is an item that is added to the character's inventory upon application of the condition. It could be implemented via drag and drop in the conditions lab, below the reference entry, to specify which item/feature to add to the inventory.

eclarke12 commented 2 years ago

Thanks for the suggestion! Do you have an example of a system that handles conditions this way?

lucaspicerni commented 2 years ago

Sure! In Chronicles of Darkness 2e, there are two types of "status": Tilts (temporary and often combat-related) and Conditions (usually long-term or sometimes permanent). Conditions have longer descriptions and are related to how the character earns XP. There is an item template just for Conditions and also a special space for them on the character sheet: image image

Even on systems that don't use conditions in this way, I can imagine uses for this function: in D&D itself, I limit the visibility of the active effects tab for my players (not very friendly settings for boomers like me and my friends hahaha) , so it would be interesting to be able to add a passive feature, merely informative, so that they could read the description of the effects that affect them without having to look for the reference that the CUB sent to the chat, in situations where many rolls have already passed. Something like that: image

Thanks for the willingness!

eclarke12 commented 2 years ago

This is not going to make it into CUB... HOWEVER with the ability to trigger macros from Conditions you should be able to get the functionality you desire.

Something like:

const item = game.items.getName("Scary Condition Item");
actor.createEmbeddedDocuments("Item", item);
ui.notifications.info(`${item.name} added to ${actor.name}`);

I am closing this issue but feel free to comment if you have questions.

lucaspicerni commented 2 years ago

Just to confirm: does this macro example you used create the item in inventory? Or import it?

eclarke12 commented 2 years ago

Just to confirm: does this macro example you used create the item in inventory? Or import it?

This would add an existing "world" item into an Actor's inventory. If the item resides in a Compendium there's some additional steps required. I would suggest jumping into the macro-polo channel of the official Foundry Discord if you need assistance.

lucaspicerni commented 2 years ago

Thank you for your assistance.