misthero / dnd5e-custom-skills

Foundry VTT module for DnD5e System to easily add custom skills and abilities to player characters.
MIT License
7 stars 4 forks source link

Module Compatibility #6

Closed ShadowRedfox closed 1 year ago

ShadowRedfox commented 2 years ago

I was wondering if it would be possible to make this module compatible with module Token Action HUD. https://foundryvtt.com/packages/token-action-hud/

Currently I have problem caused by this module and it disables HUD for every other actor, but owned players.

misthero commented 2 years ago

hello, thank you for your report.

You are right there is an incompatibility, specifically token-action-hud gives an error about an "undefined" skill or "ability" value.

Problem is I don't know how to fix it from this module, token-action-hud assume every skill/ability is in every actor without checking it before. That cause an error.

You should try to open the issue for token action, if you want I tried to patch the file: modules/token-action-hud/scripts/bundle.min.js

bundle.min.zip

this will check if abilities or skills exists and will not give error.

ShadowRedfox commented 2 years ago

So I made post on the other module. I hope they can fix it

Larkinabout commented 2 years ago

I think this would be better resolved on this side by updating the game.dnd5e.config... and actor.system... objects with matching schemas for added abilities/skills and removing objects for abilities/skills that are hidden; storing those objects somewhere safe for adding them back in.

This would guarantee any module that is using the config and system data will recognise the new abilities/skills lists created by this module.

misthero commented 2 years ago

this is already done, but changes in config are done in memory at startup since if anything goes wrong messing with that data would destroy your world.

one of this module purposes is to be as safe as possible for the user world.

there was another module doing something similar and it was very dangerous to use, also, once you enabled it you could not disable. https://github.com/ElfFriend-DnD/foundryvtt-dnd5eExtender

Known Issues

DO NOT DISABLE THIS MODULE IF YOU HAVE CONFIGURED A CUSTOM SKILL OR ABILITY SCORE.
The issues involving the character sheets above should be considered known issues. I am not inclined to fix these within this module as the fixes will quickly add more problems than solutions.
Localization of Custom Ability Scores on certain NPC Sheets is broken. If there's enough issues opened about this I'll see if I can fix it.
Larkinabout commented 2 years ago

I think I'm seeing a mismatch between schemas for skills because I'm running on FVTT v10, DnD5e 2.0.2: dnd5e config skills

Token Action HUD is currently failling to add the custom skills because it's looking for the skill label. That should solve adding custom skills to the HUD without any extra intervention from the HUD module. Custom abilities are already picked up correctly.

Hiding core abilities/skills is a different matter as I can see this module is removing them on renderActorSheet. I'm assuming removing them in reality would break anything that looks at those core skills/abilities, such as the Initiative roll looking at DEX. A core 'hidden' value against abilities/skills would be helpful for modules in this instance.

misthero commented 2 years ago

while this is the new stucture for the just released DnD5e 2.0.2 on foundry v10, Token Action HUD wasn't working since Foundry v9

Thank you, the structure change will be respected in the future.

Yes they are just visually removed to avoid conflict with every other module and potentially breaking the world...