Skip to content

Change Conditions to be RPG-Specific - #328

Open
jayden-hunter wants to merge 1 commit into
Obsidian-TTRPG-Community:mainfrom
jayden-hunter:pf2e-conditions
Open

Change Conditions to be RPG-Specific#328
jayden-hunter wants to merge 1 commit into
Obsidian-TTRPG-Community:mainfrom
jayden-hunter:pf2e-conditions

Conversation

@jayden-hunter

Copy link
Copy Markdown

Pull Request Description

Add support for conditions to be Rpg-specific. I.e. If the system is set as Pf2e, then the Pf2e conditions will be loaded.

Changes Proposed

Add Pf2eConditions, and restructure the conditions so that they are linked to the RpgSystem.

  • moved condition.ts into a conditions folder, renamed to dnd5eConditions
  • added pf2eConditions
  • added support to change conditions in the settings menu, based on the system.
  • added support to keep custom conditions when swapping systems.

Related Issues

#276

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.

Additional Notes

  • I had to call display() in the settings menu to propagate the visual update for conditions from the XP setting box - there may be a better way I am unaware of.
    • This may be indicative that the rpgSystem should be higher in the hierarchy of settings? It doesn't just affect XP anymore. I didn't want to go so far as to make that change, though.
  • Also, I plan in future to see if I can implement the logic of the conditions in pathfinder through this and/or fantasy-statblocks. Ie. Off-Guard I would love to reduce AC by 2, but that's a fairly big job and this is what I imagine the start would look like.
  • The default settings confused me - I had to remove the [...Conditions] in DEFAULT_SETTINGS. In my testing this wasn't an issue, but potentially could error if you are loading the plugin for the first time? I was unclear on how I should handle that (or if I already had... the settings menu was a little confusing to wrap my head around).

@jayden-hunter

Copy link
Copy Markdown
Author

Noting that this might conflict with #323, since I added a new attribute to RpgSystem. Happy to fix this when/if needed!

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