[Bombastic Perks] Add overwriting perkchain support #71898
Merged
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.
Summary
Mods "[Bombastic Perks] Add overwriting perkchain support"
Purpose of change
I wanted to add additional +1 stat perks to Bombastic Perks but not clutter up the mutation menu, but since the basic engine used
u_add_trait
there was no way to do that. However, swapping it over tou_mutate_towards
should keep all basic behavior the same while allowing perks later in chains to overwrite perks earlier in chains, so that (for example)Stronger
becomesEven Stronger
and +1 STR becomes +2, rather than simply havingEven Stronger
give you another +1 and having both in your menu simultaneously.Describe the solution
Change
u_add_trait
tou_mutate_towards
. Add additional +1 stat perks that overwrite the previous perks in their chain, allowing +2 to all stats (at the cost of 8 perk points).Describe alternatives you've considered
Testing
Previous perks are properly selectable, new perks in the chain are not selectable unless previous perks are taken, previous perks in the chain cannot be selected a second time after taking the later perks, and part 2 of the chain properly overwrites part 1:
Additional context
This should also allow adding otherwise-unselectable starting traits as perks, since
u_mutate_towards
respects thecancels
field.