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

Update builder table #312

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

celbig
Copy link

@celbig celbig commented Feb 3, 2025

Pull Request Description

The encounter builder table is not very useful when dealing with pathfinder 2nd edition (PF2e) monsters. For some reason the export of PF2e monsters as yaml monster stats blocks does not follow the same pattern as DnD 5e monsters. In particular, traits (a system that to my knowledge does not exist in 5e) are not provided in a nice array, but rather with a list of several keys starting by "trait_" and followed by a 2 digits number containing each a single trait. The level field is also problematic since it is not provided in a numeric format but rather as a string with the "creature type" coming first followed by level (with a space for separator).

The point of this MR is to implement new filters and column types better suited for PF2e DM.

Changes Proposed

Changes in the table part of the encounter builder:

  • New filters:
    • "PF2 - Level" : Slider,, filter on creature level
    • "PF2 - Monster type" : Search field, Filter on monster type (e.g. "Creature", "Hazard", "Army")
    • "PF2 - Trait" : Search field, Filter based on traits (the search in performed accross every traits of the monster)
  • New Column headers:
    • "PF2 - Level" : Display the monster level (numeric value, can be used to sort)
    • "PF2 - Monster type" : Display the monster type (string, can be used to sort)
    • "PF2 - Trait" : Display the list of traits separated by commas (string, cannot be used to sort for now)
  • UI:
    • Update the modify header modal to add the new column types
    • Update the modify filty modal to add the new filters

Notes:

  • For "Level" and "Monster type" filter/header, the corresponding column must be "level"
  • For "Trait" filter/header, the corresponding column must be "trait" (a column that does not exist, but stands for "trait_XX")

Related Issues

No relevant issue.

Checklist

  • I have read the contribution guidelines and code of conduct.
  • I have tested the changes locally and they are working as expected.
  • I have added appropriate comments and documentation for the code changes.
  • My code follows the coding style and standards of this project.
  • I have rebased my branch on the latest main (or master) branch.
  • All tests (if applicable) have passed successfully. (didn't see any test)
  • I have run linters and fixed any issues.
  • I have checked for any potential security issues or vulnerabilities.

Screenshots (if applicable)

The interface with the new column and new filters:

image

Sorting on level, trait, and source:

image

Sorting on Monster type:

image

Create header modal:

image

Edit Filter Modal:

image

Additional Notes

I hope you are interested in this feature even if the plugin seems to focus on 5e conventions. Do not hesitate to tell me if you think some features are missing or need more polishing.

Thanks in adavance for your review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant