tidy5e-sheet icon indicating copy to clipboard operation
tidy5e-sheet copied to clipboard

Minor Issue: NPC Skills list not alphabetized if custom skills added. (dnd5e+dark matter)

Open Android8675 opened this issue 3 years ago • 4 comments

Hey all, First all, love this character sheet, by far my favorite. I found a minor "thing", but wanted to put in a issue report because, it's beyond my ability to fix myself.

So I'm tinkering with a small add-on for Dark Matter (Sci-fi setting) that adds 3 skills to Players/NPCs (Data, Pilot, Technology).

Usually the Skills list sorts in the 3 skills, but occasionally they are left at the end of the Skills list (unsorted). On Tidy the Player Skills list looks OK, but the NPC sheet does not.

Player: image

NPC: image

Fix or no fix, up to you. We had a similar issue with the dnd5e game system and they fixed it.

Thanks for your work on this. -A.

Android8675 avatar Jan 10 '22 16:01 Android8675

Hi, little late response ... Is this still an issue? I actually don't sort abilities - neither for pcs nor npcs. So this must be something that is handled by the core system. That's why I'm a litlle bit puzzled why one sheet does it right and the other doesn't. Also I don't know how I could sort them myself ... so if this is still an issue I'm afraid I currently lack the ability to fix it. Sorry!

sdenec avatar May 09 '22 16:05 sdenec

@sdenec Yeah, this is a core 5E bug that ability lists aren't sorted properly for NPCs. They are sorted once too early initially, but not after settings/modules are applied (i.e. the above, or localization).

This used to be the case for PCs too, but I reported that one... and it got fixed, but not for NPCs somehow. https://github.com/foundryvtt/dnd5e/issues/1070

Really this is a core 5E bug that needs to be reported and fixed there, I guess. I went ahead and did just that: https://github.com/foundryvtt/dnd5e/issues/1635

346184 avatar Jul 12 '22 12:07 346184

Not a dnd5e issue, you just need to modify how you are looping over the skills so you loop using the order in CONFIG.DND5E rather than the order in the character's data:

Old:

{{#each data.skills as |skill s|}}

New:

{{#each config.skills as |skill s|}}

That is the change we made in the core 5e sheets back in the day.

arbron avatar Aug 08 '22 00:08 arbron

I think that has sorted itself out with v10 and the 5e update? At least it seems skills are now alphabetically sorted for npcs.

sdenec avatar Sep 09 '22 09:09 sdenec

I confirm we can close the ticket.

p4535992 avatar Dec 17 '22 11:12 p4535992