-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Simulating hair growth, part 2 (fixed for trait variants) #70671
Simulating hair growth, part 2 (fixed for trait variants) #70671
Conversation
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.
Auto-requesting reviews from non-collaborators: @GuardianDll
I don't think forced change to cosmetics is an okay mechanic to add. This also apperas to do a lot of unnecessary change in the json for hair style traits. |
No hair growth should be the default that all characters get, including coming from saves prior to this, and the opt-in is to have hair growth. |
I've now made dynamic hair growth an opt-in feature for players, rather than one that they need to opt out of. This will prevent characters from previous saves from suddenly growing out their hair, thus keeping the style that they selected at the beginning of the game. |
I like the idea of this as an option but I think we need to hear from tileset people that it doesn’t mess up tiling and that it meets Kevin’s requirements for inclusion that he gave in the previous reversion. I think it’s cool. |
Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details. Click to expand
This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to |
My only strong stipulation is that it needs to be opt-in. Please revert the hair style description changes, that's out of scope for adding changing styles. The first several I looked at have issues but I'm not getting into reviewing them in this PR. One thing I'm not clear on, is this being applied to all npcs? They should also default to maintaining a style, even if it's chosen randomly, because otherwise they'll all converge on super long hair and all be the same. It looks like they aren't getting the trait assigned but I'd like a confirmation. |
I have made it an opt-in basis. Players will need to have the hair growth trait for their styles to naturally change, which can be selected at character creation, or toggled with the hairdresser NPC in the refugee center.
The NPC do get the new hair style traits, but they don't receive the trait that allows their hair to grow over time; they will always have the same style they did upon spawn. I still need to add code that has the NPCs maintain a style on their own, but I figured that would make this PR too large, so I reserved it for a followup. Their hair won't grow on their own. |
what is the point of shuffling around the contents of the hair style mutations? it's making it very difficult to actually see what did or didn't change. |
I must've shuffled them in development for ease of remebering which growth order they went in. I'll see about undoing this. |
"//3": "For ease of calculation, all math will be done with centimeters for hair growth.", | ||
"//4": "For reference starting point, a buzzcut is 0.32 centimeters long.", | ||
"//5": "1 inch is 2.54 centimeters.", | ||
"recurrence": { "math": [ "(648000000 - ((u_val('health') * 180000) ) )" ] }, |
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.
did you mixed up numbers here? even with 200 health, the result would be 612000000, which is 7083 days
i suspect you put two zeroes more than it should be (recurrence smallest value is 1 second, not 1 move)
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.
I likely misplaced some zeroes, yes. I'll see about having that fixed.
Summary
Content "Simulate hair growth over time."
Purpose of change
Simulate hair growth for NPCs and players over long periods of time. Hair will slowly grow out until it becomes long and can then be cut back. I have now fixed this to work with trait variants. I have also made this dependent on the hidden health stat, so healthier survivors will grow their hair faster.
There's a few things that need to happen before this is ready to go:This is ready to go, all tasks have been completed.
Describe the solution
Add supporting EOCs and mutations to simulate hair growth, allowing players to grow out their hair over time. This currently is only cosmetic in nature, but it provides good roleplaying opportunity and a way to passively change hair styles. This also adds color variants to the new hair styles, and finishes the descriptions of some trait variants which had placeholder descriptions.
This also includes a selectable starting trait that prevents all hair growth, for those who don't want their cosmetics to change. This can be toggled at Vanessa Toby once she can provide cosmetic services.
Describe alternatives you've considered
Not doing this.
Testing
Repeatedly tested during development cycle, everything works as expected.
Additional context
I have some bigger ideas for this, that might be added after the basic infrastructure is up and running:
This might also need #70086 to work properly. I don't know if there's a workaround for it, though.I have also wondered if I should have the beard growth EOCs track if the character is male or female, and work off of that for facial hair growth, but that might violate the game's development policy of selecting gender instead of sex.
Unfortunately, with the changes relying on trait variants, I don't know of a way to carry over trait variants between activation changes, since we can't use
u_has_trait
to check for variants.I've also changed this feature to work on an opt-in basis: Characters imported from previous saves won't begin having their hair grow unless the user toggles it. The trait for natural hair growth can also be selected at the start of the game, allowing new characters to use this system.