SR5-FoundryVTT / Foundry-SR5-Hud

MIT License
1 stars 0 forks source link

Issue | Character Skills won´t be rendered #17

Closed shadows-eye closed 6 months ago

shadows-eye commented 6 months ago

The Skills of a Character will not import with the current handelbar, need support to get this to function.

Stexinator commented 6 months ago

skills: this.skills, is in get actorData() while you try to access it with {{#each this.actor.skillsWithRating}} the correct term would be {{#each this.data.skills}}

shadows-eye commented 6 months ago

I am still not able to pull the name or the value, I have tried {{this.data.skills.active.skill}}, {{this.data.name}}, {{this.name}}, {{this.data.skill}} None work, they will only provide empty divs, at least all are pulled but the name and values are not populated. Does this need to go into a seprate each?

shadows-eye commented 6 months ago

When I change the actor.Data.js to this it works just fine. get skills() { let allSkills = { ...this.actor.system.skills.active, ...this.actor.system.skills.knowledge, ...this.actor.system.skills.language, } let skillsWithRating = []; for (let skillName in allSkills) { let skill = allSkills[skillName]; if (skill.value > 0) { skillsWithRating.push({ name: skillName, value: skill.value }); } } return skillsWithRating; }

shadows-eye commented 6 months ago

I have the issue that this is now showing, but I can´t get the Localize to work as some skills are written with underscores. image Any help on writing the correct localize would be great.

shadows-eye commented 6 months ago

Also the skill does not seem to have a uuid, it stays blank...

Stexinator commented 6 months ago

Add a console.log or debug for the returned object and look into the data structure that is returned