RimWorld

RimWorld

42 ratings
Hair Modding Plus
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.1
File Size
Posted
Updated
0.353 MB
May 31 @ 7:53am
Jun 8 @ 2:44pm
7 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
Nexus: https://www.nexusmods.com/rimworld/mods/339
ModDB: https://www.moddb.com/mods/hair-modding-plus/


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 made with this mod in mind. I myself am in the process of making one, releasing SoonTM.
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 Facial Stuff and Gradient Hair.
Also makes those two mods compatible with each other.
Secondary hair color is selectable with Prepare Carefully (select "Hair Color 2" from the dropdown).

Safe to add or remove from existing saves.


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 HairSamples.zip from this repo[github.com] to see working examples (includes the hair shown 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
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]
< >
30 Comments
4288  [author] 16 hours ago 
also @hpevler if you mean you want to make a hair mod, follow this great guide: https://steamcommunity.com/sharedfiles/filedetails/?id=1899180537
4288  [author] 16 hours ago 
Rimworld 1.2 update? At this time of year? At this time of day? In this part of the country? Localized entirely within Steam?

Looks like I have some work to do. At the moment I'm waiting for Facial Stuff to be updated first so I can just do it in one shot, but if it takes too long I would update it regardless. However, as I am not as free as I used to be, the update may or may not take longer than expected. Thanks for your patience.
hpevler Aug 6 @ 10:46am 
butterfish please tell me how to make a mod i dont know how :steamsad:
tris Jul 24 @ 5:20pm 
kirigiri!
Abraxas Jun 28 @ 4:11pm 
No problem, the important part is it is reported.
Best of luck
4288  [author] Jun 28 @ 9:57am 
@Abraxas, sorry for the late reply, been busy with work. I think I know what is causing the issue, but atm I don't have a particular fix for that. I'll look into it.
Abraxas Jun 22 @ 2:59am 
forgot to mention only on facing north the issue happens
Abraxas Jun 22 @ 12:50am 
looks like I found a small issue, below is the Vanilla Tribal Start they don't have any special gear.

https://imgur.com/a/U62wvXi

Turrets from the mod Mechanoid Blaster seem to be placed behind the hair of certain hairs.
the hairs don't seem be part of the same mod, and I can't see anything similar in file names for Mechanoid blaster and the hair mods.
BlueTressym Jun 9 @ 6:47pm 
@4288 Yay! Thank you!
4288  [author] Jun 8 @ 11:53am 
@Vinzero @llt whoops, fixed now. thanks for the heads up!