Featsorting#177
Open
PJBrs wants to merge 10 commits into
Open
Conversation
Contributor
Author
|
Finetuned these patches more, added a test, removed one codepath that was never even hit (thanks, coverage). |
PJBrs
force-pushed
the
featsorting
branch
3 times, most recently
from
September 4, 2025 19:09
a84f1e7 to
b7e81f6
Compare
Contributor
Author
|
I suddenly realised that I could do the setting of the headers much more simply. |
This patch gives the option to sort feats by type instead of alphabetically. Basically, it just adds the feats in the same order that dungeonsheets finds them, which goes from character feat to class feats to racial feats to background feats. The patch implements this feature using a command-line option. The user can specify --feats-by-type or -N to order feats by type. Default is alphabetical order.
If the user has selected to order feats by type, this patch adds headers for each feat type instead of one Features heading. Headers include Feats (if applicable), Class Features, Racial Features and Background Features.
This patch enables additional sorting for features
that are classes of other features. This works
as is for metamagic, in the sense that it sorts
all metamagic options under the metamagic feature,
by checking whether a metamagic option is the direct
child of the Metamagic class.
The same is intended for other feature options. The
intended relations are:
Bloodhunter: Rites --> CrimsonRites
BloodCurses --> BloodMaledict
Formulas --> Formulas
Fighter: Maneuver --> CombatSuperiority
TrickShot --> AdeptMarksman
Warlock: Invocation --> EldritchInvocation
However, these need some additional work to lay the
right class relations.
Make the Maneuver class an alias to CombatSuperiority, so that Battle Master Maneuvers can be easily sorted as instances of CombatSuperiority.
Allow the player choices for Trick Shots of the Gunslinger Fighter subclass to be sorted as instances of AdeptMarksman, by aliasing AdeptMarksman as TrickShot and by making all Trick Shot features an instance of TrickShot
Make all Arcane Shot options a subclass of ArcaneShot, so that they all get sorted directly after the Arcane Shot feature text.
Allow Invocations to be sorted under the Eldritch Invocations feature by aliasing the EldritchInvocation class as Invocation.
This patch aliases Rites to CrimsonRites and BloodCurses to BloodMaledict, so that all rites can be sorted under the Crimson Rites feat, and all the blood curses under the Blood Maledict feat. Furthermore, it integrates the two Formulas classes.
Document the makesheets commandline option to sort features by type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new character attribute features_by_type that sorts features by type, and then adds additional patches to support features by subtype (e.g., metamagic options immediately after the metamagic feat).