Heya,
I was wondering how I might go about adding/changing layers for clothing. As of now, Rimworld has 5 layers defined in ApparelLayer:
OnSkin,
Middle,
Shell,
Belt,
Overhead
These are a bit random and not very useful, especially when you get a lot of mods adding things to different layers. What I want to do is reclassify the layers to something more reasonable, such as the following:
Naked Body > Onskin/Underwear > Shirts > Pants > Jackets > Head Graphic > Hair > Hats > Accessories (jewelry, scarves, belts, etc)
The purpose would be ultimately for integrating it with prepare carefully so that you could dress up your pawns in a more more reasonable and intuitive way without conflicts that make no sense, plus add a lot more fashionable accessories and variety of clothing items. As of now, for example, there are a lot pants that for some reason can't be worn over certain bottom clothing, or conflict with tops which are on the same layer, while meanwhile you can wear pants under your pants because some pants are classified as pants while some are middle clothing, and on top of that skirts are shell clothing so you can wear a skirt over your two pairs of pants but not with a jacket.
I imagine it isn't as simple as just changing it in ApparelLayer, do I have to override, say, PawnRender.RenderPawnInternal? With my mediocre understanding of the Rimworld codebase and C# in general, I can't work out what's going on in that method at all. Are there any other places where it would need to be updated (opening up some massive can of worms to be untangled)? Patching the clothes themselves to follow the new structure should be trivially easy, and I'm pretty confident I can figure out how to patch prepare carefully, but last time I made one of these dll mods back in a14 I spent like 3 days just trying to trace back the entire structure of how Rimworld runs and what classes do what so I could figure out where I need to actually make a change, so I'd like to avoid that this time around. Thanks for any info that might help me out!
I was wondering how I might go about adding/changing layers for clothing. As of now, Rimworld has 5 layers defined in ApparelLayer:
OnSkin,
Middle,
Shell,
Belt,
Overhead
These are a bit random and not very useful, especially when you get a lot of mods adding things to different layers. What I want to do is reclassify the layers to something more reasonable, such as the following:
Naked Body > Onskin/Underwear > Shirts > Pants > Jackets > Head Graphic > Hair > Hats > Accessories (jewelry, scarves, belts, etc)
The purpose would be ultimately for integrating it with prepare carefully so that you could dress up your pawns in a more more reasonable and intuitive way without conflicts that make no sense, plus add a lot more fashionable accessories and variety of clothing items. As of now, for example, there are a lot pants that for some reason can't be worn over certain bottom clothing, or conflict with tops which are on the same layer, while meanwhile you can wear pants under your pants because some pants are classified as pants while some are middle clothing, and on top of that skirts are shell clothing so you can wear a skirt over your two pairs of pants but not with a jacket.
I imagine it isn't as simple as just changing it in ApparelLayer, do I have to override, say, PawnRender.RenderPawnInternal? With my mediocre understanding of the Rimworld codebase and C# in general, I can't work out what's going on in that method at all. Are there any other places where it would need to be updated (opening up some massive can of worms to be untangled)? Patching the clothes themselves to follow the new structure should be trivially easy, and I'm pretty confident I can figure out how to patch prepare carefully, but last time I made one of these dll mods back in a14 I spent like 3 days just trying to trace back the entire structure of how Rimworld runs and what classes do what so I could figure out where I need to actually make a change, so I'd like to avoid that this time around. Thanks for any info that might help me out!

