RimWorld

RimWorld

456 ratings
Hair Modding Plus
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.1, 1.2, 1.3
File Size
Posted
Updated
433.522 KB
May 31, 2020 @ 7:53am
Oct 28, 2021 @ 4:31pm
15 Change Notes ( view )

Subscribe to download
Hair Modding Plus

Description
Hair Modding Plus
by Butterfish

For those of us that play RimWorld like The Sims, but with more equal amounts of murder.


Download
GitHub: https://github.com/TheButterfish/HairModdingPlus/releases/latest
Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=2114832515


Description
TLDR: This mod gives modders the ability to have a hair texture render behind a pawn, as well as use alpha masks on hair, without additional fiddling with XML.

If you've made/tried to make a hair mod, you'll likely realize that RimWorld just slaps the texture on top of the pawn, colors the entire thing, and calls it a day.
This mod gives modders an additional hair layer to work with that renders behind the pawn. So you'll be able to make, for example, long hair that flows down the back, without having to tailor-make it for one/each body type or make design compromises.
In addition, this mod also enables the use of alpha masks on hair, so you can make hair with decorations/accessories that can be colored separately in-game.
What's more, you don't even have to add more information to your HairDef XML, just provide the textures and you're done.

Hair that actually fits all[raw.githubusercontent.com]

Note: This mod will not magically convert existing hair to work as above. You'll have to get hair from other mods that utilize this mod. Below are a few examples of such hair mods:
Note 2: Gradient hair shown above is from Gradient Hair.


Dependencies
You'll need Harmony to use this mod. Get it at GitHub[github.com] or Steam.


Compatibility
Should be compatible with most mods, unless they skip RenderPawnInternal or ResolveAllGraphics.

Patched to be compatible with:

Secondary hair color is selectable with Prepare Carefully (select "Hair Color 2" from the dropdown).

Safe to add or remove from existing saves.


Known Issues
Semi-transparent portions of hair might appear significantly more transparent or significantly less transparent due to shader issues. This may cause certain hairstyles that rely on it (e.g. shaved hair) to appear wrong. No fix is possible at the moment.


How to Use
Note: The instructions below assume you already know how to make a regular hair mod.
If you're interested in making a hair mod and don't know where to start, check this guide out for more information.



Back Hair Layer
To have a texture render behind the pawn, simply add "_back" to the end of your texture's file name.
Example[raw.githubusercontent.com]

"demo_south.png" is your regular texture displayed when the pawn faces south, and "demo_south_back.png" is the texture that will be behind the pawn when the pawn faces south. This works the same for the other orientations, e.g. "demo_east.png" and "demo_east_back.png". Back textures are optional, textures without a corresponding "_back.png" will display as they usually would.

West or east back textures will NOT be automatically flipped if only one is provided. This is intentional, to allow modders to make asymmetrical hairs if they wish. To have a back texture be used for both east and west sides, just make a copy of it and rename the copy accordingly i.e "name_east_back.png" and "name_west_back.png".


Alpha Masks
For more information on alpha masks, check this guide[github.com] out.

To apply an alpha mask to a hair texture, simply add "m" to the end of your mask's file name. This works for both front textures and back textures.
Areas marked red (#FF0000) will be painted with the primary color, areas marked green (#00FF00) will be painted with the secondary color, and areas marked black (#000000) will not be painted.
Example[raw.githubusercontent.com]

"demo_southm.png" is the mask that will be applied to "demo_south.png", and "demo_south_backm.png" will be applied to "demo_south_back.png". Masks are optional, textures without a corresponding "m.png" will display as they usually would.

West or east masks will NOT be automatically flipped if only one is provided. This is intentional, to allow modders to make asymmetrical hairs if they wish. To have a mask be used for both east and west sides, just make a copy of it and rename the copy accordingly i.e "name_eastm.png" and "name_westm.png".


Examples
Download the demo hair mod from a source below to see working examples (includes the hair shown above):
Github: https://github.com/TheButterfish/HairModdingPlus/blob/master/ButterfishHairModdingPlusHairSamples.zip
Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=2324262910
or try out one of the mods mentioned under Description above.


Licensing
If you wish to improve, fork, add patches, borrow code snippets, include in a modpack, or take over if I go on hiatus, go ahead. Just mention me in the credits and you're good to go.


Credits
Andreas Pardeike, for creating Harmony
Killface, for a code snippet I borrowed from his Facial Stuff mod
sumghai, for contributing some hair samples for the demo mod
The various contributors to the RimWorld modding wiki[rimworldwiki.com]
4288, for helping me host this mod on Steam
Tynan Sylvester, for stealing my time and money creating RimWorld[en.wikipedia.org]
Popular Discussions View All (1)
10
Sep 12, 2022 @ 4:57am
PINNED: Bug Reports
TurtleShroom
177 Comments
Шашлычник ;р Mar 16, 2023 @ 2:32am 
Hey hey everyone! I made 1.4 fork. https://steamcommunity.com/sharedfiles/filedetails/?id=2947607004
I forked it for myself 4 months ago and didnt thought that anyone else needs it xD
reesely Mar 3, 2023 @ 12:35pm 
por favor.....
AlexiMonke Feb 12, 2023 @ 7:14pm 
1.4 ..................... please................................ i beg of thee...........................................
Rohzdear Feb 5, 2023 @ 11:00pm 
ONE DOT FOUR
AAAAAAAAAAA
Wolfette Feb 3, 2023 @ 10:11pm 
@Ickura ironic how I'm being chastised for my optimism by the one who originally requested the mod to be updated by Mlie in the first place, haha! But seriously the entry for HM+ shows activity only a few days ago, good things come to those who wait, so be patient!
sk¡t Jan 22, 2023 @ 4:30am 
@Reidlos go check his steam collection and click on the Trello button/link
Reidlos Jan 21, 2023 @ 10:15am 
where is this in progress list for mile? i checked his discord and only see completed and requests
Ickura Jan 19, 2023 @ 6:12pm 
@Wolfette The entire bloody workshop is on the "incoming" section :steamsad:. I wouldn't jump to conclusions and spread false hype that its gonna happen anytime soon.
Wolfette Jan 19, 2023 @ 9:44am 
@combatant It will be done when it's done, the fact that it's in the 'Incoming' section leads me to believe it will be soon enough.
combatant Jan 13, 2023 @ 11:36pm 
@Wolfette, I saw its in his queue, has he said its almost ready?