feat: Allow Json to Specify Swappable Traits#8372
Open
AzmodiusX wants to merge 6 commits intocataclysmbn:mainfrom
Open
feat: Allow Json to Specify Swappable Traits#8372AzmodiusX wants to merge 6 commits intocataclysmbn:mainfrom
AzmodiusX wants to merge 6 commits intocataclysmbn:mainfrom
Conversation
Contributor
|
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
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.
Purpose of change (The Why)
Character creation has several traits that are mutually exclusive. A while back I made it so you could swap these traits, partially to enforce having one of them as mandatory, and partially so you could swap between them for the preview (these are typically appearance traits).
I wanted to abstract this to JSON, but it was out of scope.
Describe the solution (The How)
Implemented 4 new mutation flags:
MALE_EXCLUSIVEFEMALE_EXCLUSIVEMALE_PREFERREDFEMALE_PREFERREDThese new flags just handle gendered mutation blocking. Scenarios, classes, etc. can bypass this easily enough. Now you can have your hyper anime hair mod only spawn on women, I guess.
It also abstracted the implementation for facial hair on women already in the game; They don't spawn with it, but the player can pick it at the start if they want to, because choice is cool.
Added optional field to mutation_type
mandatory_onerequiring at least one of that type to be picked in the trait selection screen.Added optional field to mutation_type
swap_on_conflictwhich does as the name implies. mandatory_one implies this for convenience.Describe alternatives you've considered
We could just keep it all hard-coded.
Testing
Compiled and checked character creation and such.
Additional context
Needs docs, will do tomorrow.