canismarko / dungeon-sheets

A tool to create character sheets and GM session notes for Dungeons and Dragons fifth edition (D&D 5e).
https://dungeon-sheets.readthedocs.io/en/latest/
GNU General Public License v3.0
157 stars 65 forks source link

Specifying Bloodhunter's Patron #134

Open kompoth opened 2 years ago

kompoth commented 2 years ago

I am trying to generate a Bloodhunter of the Order of the Profane Soul and can't figure out how to select a Patron. I see that patron option is a FeatureSelector, just like a Fighting Style, so it seemed logical that patron should be specified the same way:

classes = ['Blood hunter']
levels = [3]
subclasses = ['Order of the Profane Soul']
...
features = ('Crossbow Expert')
feature_choices = ('Archery', 'Undying')

This works for Archery, but the Undying still is unspecified in the resulting character sheet. Also tried other options like 'Fiend' (used values from OtherworldlyPatron class).

Is it a bug? Thank you.

canismarko commented 2 years ago

Hi, there.

Try putting the patron in the subclasses list: subclasses = ["Order of the Profane Soul", "Undying"]

This is how warlocks handle patron features: https://github.com/canismarko/dungeon-sheets/blob/master/examples/warlock1.py

I haven't tested it with Bloodhunters, so please let me know if that works.

kompoth commented 2 years ago

Thank you for quick response!

Yes, I tried this and got an exception: class and subclass lists must have equal sizes, here - character.py:258

ср, 27 июл. 2022 г., 19:17 Mark Wolfman @.***>:

Hi, there.

Try putting the patron in the subclasses list: subclasses = ["Order of the Profane Soul", "Undying"]

This is how warlocks handle patron features: https://github.com/canismarko/dungeon-sheets/blob/master/examples/warlock1.py

I haven't tested it with Bloodhunters, so please let me know if that works.

— Reply to this email directly, view it on GitHub https://github.com/canismarko/dungeon-sheets/issues/134#issuecomment-1196968924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ6PBQOZF3DVIQ3QFZHAE5DVWFOJ7ANCNFSM54ZYQV7Q . You are receiving this because you authored the thread.Message ID: @.***>

canismarko commented 2 years ago

Ah, yeah I think I understand the problem.

Patrons were initially included for Warlocks, and apparently the subclasses became the Patrons, but I think this is incorrect. I think Pact Boon is actually what it should be since it occurs at lvl 3 just like all the other classes. If we made the patron at feature choice like you selected then Pact of the Whatever became the subclass, I think it would all work properly for BloodHunter classes as well.

That would be a breaking change, so it will take some careful thought. I'll work on it when I have some free time, unless you feel motivated to submit a PR.

canismarko commented 1 year ago

Note to self: make sure to include spells and damage resistances from https://github.com/canismarko/dungeon-sheets/pull/135

PJBrs commented 3 weeks ago

The options need to be non-capitalized in dungeonsheets/features/bloodhunter.py:

diff --git a/dungeonsheets/features/bloodhunter.py b/dungeonsheets/features/bloodhunter.py
index 9d6f943..f6a5c21 100644
--- a/dungeonsheets/features/bloodhunter.py
+++ b/dungeonsheets/features/bloodhunter.py
@@ -1102,12 +1102,12 @@ class OtherworldlyPatron(FeatureSelector):
     """

     options = {
-       "Archfey": ArchfeyPatron,
-       "Celestial": CelestialPatron,
-       "Fiend": FiendPatron,
-       "Great Old One": GreatOldOnePatron,
-       "Hexblade": HexbladePatron,
-       "Undying": UndyingPatron,
+        "archfey": ArchfeyPatron,
+        "celestial": CelestialPatron,
+        "fiend": FiendPatron,
+        "great old one": GreatOldOnePatron,
+        "hexblade": HexbladePatron,
+        "undying": UndyingPatron,
     }
     name = "Otherworldly Patron (Select One)"
     source = "Blood Hunter (Order of the Profane Soul)"

I've added this patch to the following commit https://github.com/canismarko/dungeon-sheets/pull/147/commits/cd9e7d491413882c92ff6b2ac402baed6d5627ae

canismarko commented 2 weeks ago

@PJBrs Ah interesting. Somewhere then there must a str.lower() call, right?

Thanks for implementing that fix. Could it be a separate PR instead of getting lumped into those other ones? They're already complicated enough that I don't have bandwidth to process them, and adding more stuff makes that worse. Ideally, each PR would address one thing, like multiple issues are mutually related or something.

PJBrs commented 2 weeks ago

Over here: https://github.com/canismarko/dungeon-sheets/pull/167