-
Notifications
You must be signed in to change notification settings - Fork 183
Fixed Non-Binary Pronoun Support for Personality Generator; Added Additional Quirks; Expanded Characteristic Variants; Fixed Personality Generator #6202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Introduced `PronounData` record to encapsulate gender-based pronoun information and pluralization logic.
- Added a new test `testFromString_FromOrdinal` in `AggressionTest` to validate `Aggression.fromString` functionality. - Expanded descriptions in `Aggression.properties` for various aggression traits, adding new variations to improve depth and clarity. - Refined phrasing in existing descriptions to include conditional choices, improving gender-neutral language support and overall correctness.
- Added additional description variants for all ambition traits to improve narrative depth and flexibility. - Integrated conditional messaging (`{7, choice}`) for dynamic pronoun and verb agreement.
…noun Handling - Increased `MAXIMUM_VARIATIONS` in the `Greed` enum from 3 to 6 to support additional description variations. - Refactored the pronoun handling logic in `getDescription` to leverage `PronounData` from `PersonalityController`, improving readability and maintainability. - Updated `GreedTest` unit tests to include tests for the new `INSATIABLE` enum value and other edge cases. - Expanded `Greed.properties` descriptions to accommodate new variations and integrated pluralization for gender-neutral pronouns.
- Replaced repetitive pronoun logic with `PronounData` for better encapsulation and code reuse. - Increased `MAXIMUM_VARIATIONS` from 3 to 6 to accommodate additional description variants. - Updated social descriptions in property files to support new variations and enhanced pluralization logic. - Adjusted `Social.fromString` to handle more flexible input formats. - Added test cases for validation of `fromString` functionality and expanded ordinal handling.
- Expanded the `ENCOURAGING` trait with four new detailed descriptions: `.3`, `.4`, and `.5`, enhancing its narrative depth. - Fixed minor formatting consistency issue in `PERSUASIVE.description.1`.
- Introduced `PronounData` class to simplify logic for gender-specific pronouns within the `getDescription` method. - Updated `getDescription` logic to streamline handling of intelligence descriptions by removing direct use of gender-specific enum descriptors. - Added pluralization options via a new token (`{7}`) to improve flexibility in descriptions across all intelligence levels in resource files. - Fixed incorrect logger reference in the `fromString` method, replacing `Greed.class` with `Intelligence.class`. - Enhanced `IntelligenceTest` with a new test case (`testFromString_FromOrdinal`) to improve coverage and validate `fromString` over ordinal strings. - Added inspection suppression annotations to the `Intelligence.properties` file for unused keys and parameters. - Updated resource file to include pluralization logic in multiple intelligence descriptions.
- Reorganized `getTraitDescriptions` to accept individual parameters for cleaner separation of responsibilities. - Moved handling of Intelligence and Personality Quirks descriptions out of `getTraitDescriptions` to simplify its scope. - Improved clarity and modularity by separating personality trait description logic into distinct sections. - Updated personality description assembly to handle Intelligence and Quirk descriptions separately and append them appropriately. - Adjusted documentation to reflect new parameterized `getTraitDescriptions` method.
- Corrected the variable name from `pronounDate` to `pronounData` in the `Greed`, `Social`, `Intelligence`, `Ambition`, and `Aggression` enums for consistency and readability. - Replaced repeated manual pronoun assignment logic in `PersonalityQuirk` with the `PronounData` helper class for better maintainability and cleaner code. - Streamlined pronoun-related operations across all personality-related classes to use `PronounData`, improving uniformity in handling gendered text.
- Introduced five new personality quirks (`PANTSLESS`, `MAKES_CLOTHES`, `DESTINY`, `ACTS_SUSPICIOUSLY`, and updated `CHRONIC_LATENESS`) in `PersonalityQuirk` enum. - Fixed formatting issues and standardized language in descriptions within `PersonalityQuirk.properties`. - Updated description text to use consistent naming, pronouns, and choice-based value substitution for flexibility. - Removed unused uppercase/lowercase variants in resource strings to simplify property usage. - Added unit test to validate `PersonalityQuirk.fromString` for ordinal values, ensuring proper functionality of new quirks.
- Introduced new personality quirks in `PersonalityQuirk` enum, expanding character trait options. - Fixed random generation logic in `PersonalityController` to correctly account for full enum range. - Updated unit tests in `PersonalityQuirkTest` to reflect changes in personality quirks and ensure proper validation. - Adjusted `PersonalityQuirk.properties` and descriptions for new quirks, enhancing narrative variety. - Made minor formatting adjustments for consistency and clarity in resources and descriptions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6202 +/- ##
============================================
+ Coverage 11.12% 11.13% +0.01%
- Complexity 6421 6428 +7
============================================
Files 1062 1062
Lines 140674 140681 +7
Branches 20943 20946 +3
============================================
+ Hits 15645 15665 +20
+ Misses 123404 123388 -16
- Partials 1625 1628 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! Whoever merges this, please make sure MegaMek/megamek#6674 has been merged first. Thanks!
- Added a method to check whether a character's gender is 'other' (i.e. non-binary). ### REQUIRED Required by MegaMek/mekhq#6202
REQUIRES
Requires MegaMek/megamek#6674
Dev Notes
This is the culmination of 5 dev days spent going through each of the now 2,353 different personality descriptions . At this point, outside of minor grammatical corrections, I really need the personality generator to be finished. Overall this has taken around 3 weeks of work to get where it is now. I'm hoping this will breathe new life into the characters in player's campaigns and better encourage emergent storytelling.
The next step will be tying it all into a random personality event system, but that's a ways off.