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

I can only get the first custom skill to show up #49

Closed SwordofSpirit closed 1 month ago

SwordofSpirit commented 1 month ago

This is similar to issue 47, but the versions are:

Foundry 12.330 D&D 3.3.1 5e Custom Skills 1.4.30

I'm not having the problem with getting hidden skills to stay hidden with the official 5e sheet, but it still seems to be happening with Tidy 5e.

SwordofSpirit commented 1 month ago

Okay, I did some more testing on different Foundry instances with some different version setups. New worlds, no other modules (I'm not even installing Tidy 5e).

For each of these three setups, I attempted (multiple times) to do the following tasks:

  1. Create a new ability
  2. Hide abilities (the created one and a default one)
  3. Remove created ability
  4. Create a new skill
  5. Hide skills (the created one and default ones)

The results are below.

First Setup Foundry 12.327 D&D 3.3.0 5e Custom Abilities & Skills 1.4.20

  1. Success
  2. Success
  3. Partial success. The ability can be removed, but its saving throw remains.
  4. Partial success. I can create one and only one new skill. All further ones will not show up on the character sheets.
  5. Success.

Second Setup Foundry 12.327 D&D 3.3.0 5e Custom Abilities & Skills 1.4.30

  1. Success
  2. Success
  3. Failure. Created abilities are permanently present (though they can be hidden).
  4. Failure
  5. Success

Third Setup Foundry 12.330 D&D 3.3.1 5e Custom Abilities & Skills 1.4.30

  1. Success
  2. Success
  3. Failure. Created abilities are permanently present (though they can be hidden).
  4. Failure
  5. Success
misthero commented 1 month ago

very odd, I tested all your steps in order:

  1. Create a new ability
  2. Hide abilities (the created one and a default one)
  3. Remove created ability
  4. Create a new skill
  5. Hide skills (the created one and default ones)

with this setup

Foundry 12.330 D&D 3.3.1 5e Custom Abilities & Skills 1.4.30

and I get

  1. Success
  2. Success
  3. Success
  4. Success
  5. Success

Are you allowing the reload of the world each time you save?

misthero commented 1 month ago

the only thing is not hiding is the saving throw when you hide an ability. But is removed when you remove it.

SwordofSpirit commented 1 month ago

Thanks. I did some more testing, and this time I tracked all the steps in precise detail. As far as I am aware, I did absolutely nothing other than the actions I'm going to list, with the exceptions of the clicks needed to get into and out of them (ie, getting into the configuration settings, clicking to close windows that don't close themselves, including the character sheet).

Foundry 12.330 D&D 3.3.1 5e Custom Abilities & Skills 1.4.30

(Setup) Create new 5e World, and log in Unpause game Activate the module Import Starter Hero Akra

(Creating a New Ability) Create "NewAbility1" (Type Physical) in first new ability slot Click Activate Click Apply - "NewAbility1" shows in list at bottom Save Open character sheet = Success

(Hiding and Unhiding Abilities) Hide "Strength" and "NewAbility1" Apply Save Open character sheet = Success, except saves not hidden Unhide "Strength" and "NewAbility1" Apply Save Open character sheet = Success

(Deactivating a New Ability) Deactivate "NewAbility1" Apply - "NewAbility1" does not disappear from list at bottom Save Open character sheet = Failure. "NewAbility1" still present on character sheet

(Creating a New Skill) Create "NewSkill1" in first new skill slot Apply - "NewSkill1" shows up in list at bottom Save Open character sheet = Failure. "NewSkill1" not present on character sheet

I ran the test several times. I ran it on both a Windows 10 Professional and a Windows 10 Home system, with Foundry installed on the system and using the built in client. I also ran the same test from each of those systems, but accessing a remote hosted Oracle Foundry install. Additionally, as a supplement for each of those four tests, I did a test where I only tried to create a skill. For each of these eight tests I started with a brand new world, and when I made a mistake in my order of operations (or experimented with something a bit different) I tried again so I could get consistent tests.

So it is weird! Maybe the naming conventions I used were a problem? Does it rely on some sort of library module or some such? Is the order of operations throwing something off?

I can do some more tests if you have any specific directions.

Love the module by the way! I really need 53 custom skills (though I didn't change the default number of skills for these tests), so I am highly motivated to get this ironed out.

misthero commented 1 month ago

hello @SwordofSpirit , I'm committed in finding the bug, but I'm unable to reproduce it, the only issue I see is the Save not hiding when hiding the ability as we already confirmed. I made a video trying to follow exactly your steps, did I made any mistake?

https://github.com/user-attachments/assets/1c5064f1-eb0e-46e6-aeb0-074a502463fd

SwordofSpirit commented 1 month ago

That is very helpful!

Here is what I've discovered: 1) After I click "Apply" it does not prompt me for an application refresh. Instead, I have to close that window and then click on "Save" in the general configuration page. I have no idea why it isn't prompting for a refresh, since I'm very familiar with that, and other modules in other worlds give me that prompt. Activating the module does prompt for a refresh, but Apply on any of the configuration options does not. 2) I don't know if this is relevant, given 1, but I was not creating scenes and making tokens. I was accessing the actor entirely from the sidebar.

EDIT: Confirmed that the refresh was the issue. If I press F5 to refresh after I click "Apply" it works beautifully. I got it to do everything I attempted (other than that one save bug we noted). I still don't know why it isn't automatically prompting for a refresh after I click Apply. I've tried it on Chrome, Firefox, and the native Foundry client, and none of them prompt for the refresh.

misthero commented 1 month ago

ok, the refresh is needed, I will investigate that and keep this issue open

thanks for your patience

misthero commented 1 month ago

I've released an update that should fix the reload prompt and the save not hiding.

https://github.com/misthero/dnd5e-custom-skills/releases/tag/v1.4.35