dnd5e
dnd5e copied to clipboard
[#1933] Fix issues with default skills not using alternate ability defined in config
This removes the default values defined for abilities
and skills
in template.json
and modifies _prepareBaseAbilities
and _prepareBaseSkills
methods to get their data structures from the ability & skill schema fields rather than from the template.
To accomplish this I have implemented the dnd5e.utils.getSchemaField
method that transverses the provided key path to get the DataField
for a specific location within a specific DataModel
. This method will also be useful later for instances where we want to use information from our data models for tasks like applying active effects or preparing specific data.
A few changes also had to be made to AbilityConfig
, SkillConfig
, and ActorSheet5e#_onCycleSkillProficiency
to handle skills that don't yet exists in the source data.
Blocked by https://github.com/foundryvtt/foundryvtt/issues/8813 Resolves #1933