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

feat: Initial implementation of pathbuilder import #447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scooper4711
Copy link

@scooper4711 scooper4711 commented Aug 13, 2024

Pull Request Description

Add the ability to import PCs (and NPCs) from Pathbuilder2e

Changes Proposed

  • Added new class - PathbuilderImport.ts - does the main lifting of the import
  • Added new class - Pathbuilder.d.ts - defines the datastructure of the JSON output by pathbuilder2e
  • Added the export keyword on a few methods in pf2eMonsterToolImport.ts for consistent formatting and code reuse.
  • Added code to the import worker to handle Pathbuilder
  • Added code to the settings to allow for importing Pathbuilder

Related Issues

Fixes - #448

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.
  • I have run linters and fixed any issues.
  • I have checked for any potential security issues or vulnerabilities.

Screenshots (if applicable)

image

Additional Notes

The intent here is to have a quick reference for the GM for all the shenanigans that a Player gets up to, so the emphasis has been on listing and linking all feats, spells and items.

Pathbuilder makes no distinction in its data structure between melee and ranged weapons. I have them all listed as 'Melee" because that's closer to a normal bestiary card, but was debating replacing that with the word "attack" or "weapon".

I specify the json file as the source. Not sure if that's what you intended. I'm thinking that the next feature I want to add is to have the program prompt for a JSON id (a pathbuilder concept) and then the importer makes a restful API call to fetch the JSON without the need for the GM first storing the data on disk and then loading that file. Then the source would be the JSON id. (for an even more future possibility of a refresh enhancement).

Hope you like the code - more than willing to make adjustments.

@scooper4711
Copy link
Author

Don’t merge yet - I just thought of how I want to change [[Scroll of Spell]] to Scroll of [[Spell]]

@scooper4711
Copy link
Author

Ok - fixed Potion of, Wand of, and Scroll of. Should now link to the spell.

@scooper4711
Copy link
Author

scooper4711 commented Aug 19, 2024

I'm not sure why, but this branch of code doesn't render traits as hyperlinks. e.g.
trait_01: [[evil]] renders as ((evil)) instead of a hyperlink to the traits evil.

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