Adjusting armour layers/morphing

Is anyone aware of how exactly the game adjusts the character models based on what clothing item they have equipped? I’m trying to fix an issue where certain body plate pieces remove the collar of the below clothing garment. The collar is an attachment to the item, that I’ve figured out myself - but something is causing the collar to be removed when I equip the body plate. This occurs with most items in that slot, but the Dyed Milanese Brigandine doesn’t remove the collar when equipped oddly. I’d like to know how I can adjust this so that the collar isn’t removed when other items are equipped.

In addition, when the body plate is added, a small amount of the below garment is removed from the neck region - if I force the body plate item to use the same clothing attachment, there is a gap between the collar and clothing which doesn not exist without the body plate.

Figuring this out could possibly also help with adjusting the morphing to reduce/remove the “Crushed neck” effect that some pieces also cause when combined together.

Here are some screenshots of what I am describing:

Without body plate:
With body plate:

I don’t know if this will help or not but…

In the clothing.xml each wearable item has an ‘armor_archetype’. There is another file called ‘armor_archetype2body_subpart.xml’. This file defines what body layer and body subparts that armor archetype covers.
‘body_subpart.xml’ defines 89 different parts of the body. So, if there are two pieces of clothing/armor that have different archetypes but include the same body subpart, then the armor/clothing with the higher layer will win, and the subparts of the lower layer will disappear.

Entries in Clothing.xml also have an argument called ‘morph_target="#V_0XX"’, where the XX can range from 01 to 17. I don’t know where those are defined, but you can play with those and see what happens. I know that changing those values on a shirt will make it go from tight to loose fitting.