-
Notifications
You must be signed in to change notification settings - Fork 177
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
Personality Revamp #5998
Open
IllianiCBT
wants to merge
20
commits into
MegaMek:master
Choose a base branch
from
IllianiCBT:personality_revamp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Personality Revamp #5998
Conversation
This file contains 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
Moved personality-related classes and controllers from the "personnel.randomEvents" package to the "randomEvents.personalities" package. Updated all affected imports and references across various files to align with the new structure. Added a helper method to `PersonalityController` for calculating personality values.
Replaced ordinal-based traits with name-based handling for better readability, removing outdated compatibility logic. Centralized resource management for personality descriptions using properties files, improving maintainability and localization support. Streamlined enum trait methods and added descriptive accessors for consistency.
This update introduced new fields for personality trait description indices and initialized them with random values using `randomInt(3)`. The changes enable more detailed and randomized personality descriptions and extended XML handling for saving and loading these indices. Additionally, personality description property files were updated to support multiple descriptions per trait.
Revised character trait descriptions to use gender-neutral pronouns and phrasing, enhancing inclusivity. This applies to both Aggression and Ambition property files across multiple traits.
Added ".regexp" suffix to resource keys in personality enums to align with expected format. This ensures proper localization lookup and resolves potential inconsistencies in description retrieval.
Replaced existing description keys with `.regexp` counterparts for better consistency and potential adaptability. This change aligns the property structure to a more standardized format across the file.
Revised and expanded intelligence and greed property descriptions to use regex for enhanced flexibility and customization. Corrected terminology inconsistencies, replacing 'Mech with 'Mek across multiple entries to ensure alignment with proper usage.
…rals Adjusted the personality description logic to include proper paragraph formatting. Fixed single-quote escaping in resource files to ensure consistency and prevent errors.
Replaced hardcoded names and pronouns with dynamic placeholders in Social.properties. This improves reusability and allows descriptions to adapt to different characters automatically.
Simplified property key structure by removing ".regexp" suffix in Intelligence and Aggression property files. This ensures consistency and reduces redundancy in key naming while maintaining the same functional content.
Expanded the descriptions for all Personality Quirks, adding nuance and depth through multiple detailed variants. This enhances the context and characterization, creating more immersive and relatable attributes for each quirk.
…descriptions. Updated descriptions in resource files for better narrative depth and clarity, distinguishing between combatant and civilian personas. This improves immersion and contextual storytelling for characters.
Expanded the descriptions of various personality quirks in the `PersonalityQuirk.properties` file. Each quirk now includes nuanced backstories and motivations tailored to both combatant and civilian contexts, enhancing depth and character immersion.
Removed "DEBRIS_SLINGER" from quirks, updated civilian roles to support roles, and added numerous new personality quirks to enhance diversity. Adjusted descriptions to align with the support role context for consistency.
Added campaign context to personality generation and description logic, enabling context-sensitive behavior for factions and roles. Updated related classes and methods to support this refactor, ensuring accurate generation and descriptions based on campaign information.
# Conflicts: # MekHQ/src/mekhq/campaign/personnel/Person.java # MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java
Moved the `getPersonalityValue` method from `CommandRating` to `PersonalityController` to centralize personality-related logic. Updated imports and documentation to align with the refactor. Consolidated copyright year updates across multiple files.
Added test classes for personality-related enums (Greed, Aggression, Social, Intelligence, Ambition, and PersonalityQuirk). These include validation for string parsing, labels, and descriptions to ensure proper functionality.
Replaced redundant calls to PersonalityController with a static import for writeDescription. Ensured consistent usage of writeDescription during role updates and name changes for improved code clarity and maintainability.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5998 +/- ##
============================================
+ Coverage 10.32% 10.38% +0.06%
- Complexity 6113 6129 +16
============================================
Files 1038 1038
Lines 139294 139379 +85
Branches 20662 20673 +11
============================================
+ Hits 14382 14479 +97
+ Misses 123468 123457 -11
+ Partials 1444 1443 -1 ☔ View full report in Codecov by Sentry. |
Replaced numerical keys with descriptive "lance" keys for Inner Sphere terminology in PersonalityQuirk.properties. This enhances clarity and improves maintainability of resource definitions.
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.
getPersonalityValue
method out of Reputation class and into Personality Controller, as it made more sense for it to live there.Taking everything into consideration we have gone from 120 individual personality characteristics to 360. Intelligence has gone from 24 to 72. And personality quirks have gone from 217 quirks (with one description each) to 229 individual quirks and 1,374 descriptions.
And for anyone wondering what the difference looks like, we go from this...
![image](https://private-user-images.githubusercontent.com/103902653/410754435-83b02e7a-cc2b-4efd-b2c4-e1dab392428f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjA0MzksIm5iZiI6MTczODk2MDEzOSwicGF0aCI6Ii8xMDM5MDI2NTMvNDEwNzU0NDM1LTgzYjAyZTdhLWNjMmItNGVmZC1iMmM0LWUxZGFiMzkyNDI4Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QyMDI4NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NmJiNjUzYTg1YmYxZTJkOTgwN2E3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