MCDM-Productions / mcdm-core

Common driver for MCDM-specific functionality introduced by their dnd5e supplements for FoundryVTT
Other
3 stars 2 forks source link

BH: Ferocity dependent on deprecated Resource 1/2/3 attributes #8

Open chipperme opened 6 months ago

chipperme commented 6 months ago

The latest versions of the dnd5e system are working toward deprecating the following actor-level attributes:

The Beastheart class implementation is dependent on these attributes for its Ferocity resource.

Impacted Areas

The following parts of the Beastheart functionality in scripts/plugin/beastheart.mjs are dependent on the deprecated Resource 1/2/3 attributes:

Solution Proposal

The dnd5e 3.0.0 release said that Items with Uses should be used instead of Resource 1/2/3 going forward.

Here's how I'm thinking this could be done here, for the Beastheart:

Pull Request notes

I've gone full corporate drone with this write-up. I haven't contributed to Foundry, or GitHub, like this before. I want to give as many chances as possible to call me out and update me on how things are done—"hang on, there's an existing solution" "that's not how we do things around here" etc.

Unless someone "No, thank you"s me or beats me to it, I figure I'll try and create a PR for this. I haven't worked on Foundry modules before—but I need it done, and I'll be happy to share my work once it's done.

trioderegion commented 6 months ago

At this point in time, I don't have much to add to the proposal other than a potential simplification of the Ferocity item lookup/creation.

Items can be created with an arbitrary ID, rather than an automatically created random one. It only needs to be 16 characters [a-z, A-Z, 0-9], so using something like mcdmFerocity0000 gives us a known and static ID for which to look for. e.g: if (actor.items.get(feroID)) console.log('actor has ferocity resource')

Doing this completely avoids the issue of finding/linking/storing data related to which item resource to use for ferocity operations.