fantasycalendar / FoundryVTT-Tagger

Other
6 stars 4 forks source link

[Suggestion] PF2e getTrait #12

Open MrVauxs opened 2 years ago

MrVauxs commented 2 years ago

This suggestion mainly focuses on being able to use Tagger's getByTag, hasTags, and getTags functions with Pathfinder 2e's Traits system. Traits are a simple array of strings under traits.value array. In creatures, it's under data.traits.traits.value. There can be multiple traits contained in one statblock, such as a creature having magic items with the Magic trait, but the creature itself is just a mundane Humanoid.

For sake of this feature being feasible, I'd suggest just focusing on the "root" level traits.

It would be highly beneficial to be able to simply call on a function to find any and all creatures with say, the Undead trait, when using a Macro, rather than have to create your own filter functions to see what traits it has.

Haxxer commented 2 years ago

Every system has different properties, supporting one is a slippery slope to support all of them. I may investigate building an interface where systems can register ways to search through Tagger, maybe.