foundryvtt / dnd5e

An implementation of the 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com).
MIT License
304 stars 210 forks source link

Tool categories cannot be favorited, only individual tool profs #2812

Open krbz999 opened 7 months ago

schultzcole commented 7 months ago

Alright, so adding tool categories as favorites will require that we have icons for each category. For specific tool proficiencies, we have a compendium item that we can pull the icon and description from, but we don't have that for tool categories. I'd like to do it like we do for skills, where in CONFIG.DND5E.skills we define a config object for each skill like

  acr: {
    label: "DND5E.SkillAcr",
    ability: "dex",
    fullKey: "acrobatics",
    reference: "Compendium.dnd5e.rules.JournalEntry.NizgRXLNUqtdlC1s.JournalEntryPage.AvvBLEHNl7kuwPkN",
    icon: "icons/equipment/feet/shoes-simple-leaf-green.webp"
  },

The current config for tool types is pretty minimal:

DND5E.toolTypes = {
  art: "DND5E.ToolArtisans",
  game: "DND5E.ToolGamingSet",
  music: "DND5E.ToolMusicalInstrument"
};

Changing it to be an object with an icon, reference, ability, etc. would be a breaking change, but I can mark the existing tool configs as deprecated and add a new config key for the full config objects.

If we're going to deprecate DND5E.toolTypes, I'll have to go through and make sure that we update all usages of it (pretty minimal) to use the new config.

Also, If we're adding config objects for tool types, we have the opportunity to use that to define initial values in the tools MappingField on the CreatureTemplate. Currently we hard code all tools and tool types to use a base ability of INT, but by using the config it would be possible to specify a different default for each tool type.

Given all of this, this is feeling like a 3.1 change to me. Even if we forego making the changes to the tools MappingField, the fact that we'll be marking DND5e.toolTypes as deprecated seems like not a patch release to me.