henbagle / LE1CommunityPatch

Issue tracker for the Community Patch mod for Mass Effect 1: Legendary Edition
13 stars 0 forks source link

Hair and accessory meshes not disabled on certain armor #85

Closed henbagle closed 2 years ago

henbagle commented 2 years ago

Bug report from Lord Nyriox on ME Modding Discord :

Specifically, hair and/or accessory meshes are not correctly disabled when the helmet is active, for "hidden" armors using the asymmetric model.

Tested with both Hazard and Crisis armors from Jormangund, on a male Shepard. Accessory meshes—whether applied as "hair" or "accessory" in the save file—remain visible while wearing that armor (and clip through in an ugly manner). The symmetric armor model (used by most human armors) properly disables character hair (and accessories) while the helmet is enabled.

henbagle commented 2 years ago

I have a fix for this, but it only seems to work for Shepard (not Ashley and Kaidan), and would be incompatible with most existing clothing and armor mods. Need to investigate further to see if I can solve the root problem, instead of using this workaround.

The issue is that the check for m_bIsHairHidden when updating appearance does not correctly use the WeightVisualOverride ArmorSpec. When using a Light or Heavy version of the MEDc armor, the armor spec it checks does not have a third element (as there is no HVYc or LGTc), so the hair hidden seems to error out and default to false. This is unfortunately buried in native code as best as I can tell. This can be fixed by adding empty third modelspecs to ArmorSpecs 2 and 4, with the m_bIsHairHidden set to true. This would also affect any armors added in the future, so fixing the root cause is ideal. BIOG_Player_MEDcHairFix.zip

henbagle commented 2 years ago

I think I'll include this in update 1.3, with the warning that the fix may not work with many armor and clothing mods. Full fix info: In BIOG_Female_Player_C.pcc export 265, and BIOG_Male_Player_C.pcc export 256, a third modelspec is added to m_aArmorSpec[2] and m_aArmorSpec[4]. These added model specs have m_bIsHairHidden set to true.

image