Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Spells added to items temporarily filtered out when Prepared filter is activated (restored on closing and reopening sheet) #100

Open
TremendoDude opened this issue Mar 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@TremendoDude
Copy link

TremendoDude commented Mar 24, 2024

Module Version: v1.7.2

Console message
No console errors.

Describe the bug
Because the default Spell Preparation mode for most compendium spells is set to Prepared with the checkbox unchecked, spells added to Magic Items will be filtered out when using the Filter to filter out unprepared spells. This is undesirable behavior, as Magic Items almost never have a spell preparation system, classes whose spell lists are filled to the brim with unprepared spells will be unable to use the Filter to view all of their currently available spells without inadvertently hiding Magic Item spells as well, and the module's system of only referencing abilities from the Items tab or Compendiums instead of adding a unique instance prevents the user from editing the spell to check the Prepared box to circumvent the issue.

However, this undesirable behavior seems to only be a temporary hiccup, as closing and reopening the Character Sheet will keep the Prepared filter on but with the Magic Item spells now completely visible.

To Reproduce

  1. Add any SRD spell to a Magic Item.
    The spell will appear at the bottom of the character's Spells tab.
  2. On the character's Spells tab, use the Filter to filter for Prepared (aka available) spells.
    Magic Item spells will be hidden away (despite not needing to be prepared to use).
  3. Close and reopen the character sheet.
    The Filter should still be active, but Magic Item spells are now visible and accessible.

Expected behavior
The spells either should not be affected by the Prepared filter. Perhaps the Prepared checkbox should be considered checked by default to avoid the spell being filtered out.

Browser:
Built-in Foundry

Foundry Version:
v11 Stable Build 315

Game System:
D&D5e v3.1.0

@TremendoDude TremendoDude added the bug Something isn't working label Mar 24, 2024
@PwQt PwQt added this to Magic Items Mar 24, 2024
@PwQt PwQt moved this to Task in Magic Items Mar 24, 2024
@leojackson
Copy link

leojackson commented Mar 25, 2024

I see similar behavior as well in the most recent version of Magic Items. I wanted to add a few additional notes, as it appears all of the filters for spells are impacted by this bug, not only the Prepared filter.

  1. If the Prepared filter is removed before closing and re-opening the character sheet, only one spell is shown for each item, even if the item has multiple spells.

    Before applying Prepared filter, all spells shown on all items:
    Image

    After applying Prepared filter, no spells shown on any items:
    Image

    After removing Prepared filter, only one spell shown for each item:
    Image

  2. While marking the spell as Prepared or changing it to Always Prepared would modify the underlying item and therefore would not be a viable alternative, I confirmed that even doing this has no impact on the behavior. With spells marked as Always Available or with the Prepared checkbox checked, the spells are still filtered out by the Prepared spell filter.

  3. The same behavior observed on the Prepared filter is also observed on the Bonus Action, Reaction, Concentration, and Ritual filters, as well as all of the magic school filters - Abjuration, Conjuration, etc. All spells are filtered out, whether they should match the filter or not. Only the last spell in the list on each magic item is added back when the filter is removed.

  4. The Action filter will show only the last spell in the list for each magic item, whether that spell uses an Action or not. Removing the Action filter has no effect.

Module Version:
4.0.0

Browser:
Chrome & Edge

Foundry Version:
v11 Stable Build 315

Game System:
D&D5e v3.1.0

@PwQt
Copy link
Owner

PwQt commented Mar 25, 2024

D&D5e v3.1.0

It might be due to this, 4.1 will disable support for 3.1 but I'll investigate further, it might be due to MI not necessarily being the same thing as a proper spell

@PwQt PwQt self-assigned this Mar 26, 2024
@PwQt
Copy link
Owner

PwQt commented Mar 26, 2024

I am currently on D&D5e 3.1.x, I will check that.

@PwQt PwQt moved this from Task to In Progress in Magic Items Apr 11, 2024
@PwQt PwQt added this to the 4.1.4 milestone Apr 11, 2024
@PwQt PwQt modified the milestones: 4.1.5, 4.1.6 May 23, 2024
@PwQt PwQt modified the milestones: 4.1.7, 4.1.8 Jun 25, 2024
@PwQt PwQt removed this from the 4.2.1 milestone Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Task
Development

No branches or pull requests

3 participants