Pigtails Glitch Fix

SCREENSHOTS
Downloaded 11,822 times 231 Thanks 85 Favourited 32,256 Views
 Say Thanks!
Uploaded: 4th Apr 2023 at 12:12 PM
Updated: 6th Nov 2024 at 4:03 PM
This mod fixes the infamous 'pigtails glitch' caused by CC hairstyles. Sims will no longer age up or take showers/baths with the pigtails (or other weird hairstyles). Please read information regarding existing saves below.
The mod also fixes a few related issues, such as sims losing eyebrows when aging up, child sims aging up with hairstyles for the opposite gender, and the game's inability to use most CC hairstyles flagged as 'Valid for Random' as genetic hairstyles.

NRaas MasterController Integration is recommended for best results (requires the base NRaas MC mod).

Updates:
  • 6 Nov 2024
    - An additional restriction for genetic hairstyles has been added. Previously, a genetic hairstyle could be any hairstyle flagged as 'Valid for Random'. It is now additionally required that it not be categorized as 'Hats' in CAS.
    - Genetic hairstyles will no longer reappear on young adult and older sims after aging up. In other words, only teen and younger sims can receive them. I made sure that this does not apply to genetic body hair, which will still reappear whenever a sim ages up. Note that genetic hair does not appear on sims who have their hair lock unlocked in CAS.
  • 5 Nov 2024
    The mod no longer replaces the core files, so it is now a script mod. Big thanks to Lazy Duchess for discovering how to replace the game methods without core modding.

Compatibility
This mod will conflict with non-core mods that replace the following methods:
CAS.OutfitUtils::GetNakedKey
ActorSystems.SimBuilderTask::AddGeneticPart

Information regarding existing saves
To get the mod to work in existing saves that are already plagued by the pigtails disease, you need to follow a few steps:
1. Remove all Naked outfits via MasterController. Click on a City Hall and select: NRaas > MasterController > Sim > Basic > Remove Outfit > "x" > (All) > Naked.
2. Remove the pigtails from all affected sims. Click on a City Hall and select: NRaas > MasterController > Sim > Stylist > "x". Select all sims with pigtails and give them acceptable hairstyles.
3. Remove genetic hair via Overwatch. Click on a City Hall and select: NRaas > Overwatch > Immediate > Purge Genetic Hair.

Information regarding new saves
If you import a custom household that is predetermined to suffer from the glitch, follow the same steps above. Otherwise, no additional actions are needed.

The 'glitch' explanation
There is nothing wrong with the hairstyle itself. Here's a detailed explanation of the 'glitch' by MaryJane on Tumblr and an alternative way to fix it:
PIGTAILS BE GONE - FOR REAL THIS TIME
My mod prevents the game from using the CasPart1Index hairstyle if the base hairstyle is valid for the Naked category. Even if it's not, the game will check the CasPart1Index hairstyle, and if it is suspicious, will instead use a different hairstyle enabled for random selection.