Hi Guys,
I'm new to modding rimworld, so sorry if this is known issue/feature/bug that came up before
In a nutshell, cutoutcomplex shaders do not apply to worn apparel, only when the apparel is on the floor. XML:
<shaderType>CutoutComplex</shaderType>
Example Images (the skull should remain white regardless of colour shader):
(https://i.imgur.com/EdyiryF.png)
Example Result:
(https://i.imgur.com/YsYUmTw.png)
I've narrowed down the possible problem to the following method in the source code which is applying a hard-coded shader. Is this a bug? Or intentional?
I can't figure out a way of overriding this method either, so seems like I'm stuck.
// RimWorld.ApparelGraphicRecordGetter
public static bool TryGetGraphicApparel(Apparel apparel, BodyType bodyType, out ApparelGraphicRecord rec)
{
if (bodyType == BodyType.Undefined)
{
Log.Error("Getting apparel graphic with undefined body type.");
bodyType = BodyType.Male;
}
if (apparel.def.apparel.wornGraphicPath.NullOrEmpty())
{
rec = new ApparelGraphicRecord(null, null);
return false;
}
string path;
if (apparel.def.apparel.LastLayer == ApparelLayer.Overhead)
{
path = apparel.def.apparel.wornGraphicPath;
}
else
{
path = apparel.def.apparel.wornGraphicPath + "_" + bodyType.ToString();
}
Graphic graphic = GraphicDatabase.Get<Graphic_Multi>(path, ShaderDatabase.Cutout, apparel.def.graphicData.drawSize, apparel.DrawColor);
rec = new ApparelGraphicRecord(graphic, apparel);
return true;
}
Any info would be appreciated
Thanks