Apparel Shaders in 1.1?

Started by Fart Shartley, March 23, 2020, 09:33:16 AM

Previous topic - Next topic

Fart Shartley

Hi,

I was working on a mod for personal use that adds new apparel into the game when 1.1 hit, and after designing all the textures for 1.0, I've finally moved to update it to 1.1, to remain current with other mods that I use. However, I ran into a snag on shaders, which don't seem to be working when apparel is worn in 1.1, despite working in 1.0. Does anyone know what could be causing this? Did 1.1 change how shaders work, or are apparel shaders affected by something else?

Here is a picture of the issue I'm having, and the texture files:


my xml for this reads:
Quote<ThingDef ParentName="ApparelMakeableBase">
      <defName>Armour_Longcoat</defName>
      <label>Musketeer's Longcoat</label>
      <description>A longcoat worn by musketeers. It has several layers of fabric, and an impressive formal appearance, but can do very little to stop a bullet.</description>
      <graphicData>
         <texPath>Apparel/Longcoat/Longcoat</texPath>
         <graphicClass>Graphic_Single</graphicClass>
         <shaderType>CutoutComplex</shaderType>
      </graphicData>
      ...ect.

Any pointers will be greatly appreciated!

ethouiche

Are they made of stuff ?

<costStuffCount>25</costStuffCount>
<stuffCategories>
      <li>Fabric</li>
      <li>Leathery</li>
</stuffCategories>

Or do they have a color comp ?
<comps>
  <li><compClass>CompColorable</compClass></li>
</comps>

Fart Shartley

They are stuffed, so they should match the colour of the material.

Here is the full xml for the piece in the picture:

<ThingDef ParentName="ApparelMakeableBase">
<defName>Armour_Longcoat</defName>
<label>Musketeer's Longcoat</label>
<description>A longcoat worn by musketeers. It has several layers of fabric, and an impressive formal appearance, but can do very little to stop a bullet.</description>
<graphicData>
<texPath>Apparel/Longcoat/Longcoat</texPath>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
</graphicData>
<techLevel>Medieval</techLevel>
<tradeability>Sellable</tradeability>
        <generateCommonality>1</generateCommonality>
<costStuffCount>90</costStuffCount>
<stuffCategories>
<li>Leathery</li>
<li>Fabric</li>
</stuffCategories>
<statBases>
<MaxHitPoints>200</MaxHitPoints>
<WorkToMake>14000</WorkToMake>
<Mass>5.5</Mass>
<StuffEffectMultiplierArmor>0.45</StuffEffectMultiplierArmor>
<StuffEffectMultiplierInsulation_Cold>0.25</StuffEffectMultiplierInsulation_Cold>
<StuffEffectMultiplierInsulation_Heat>0.25</StuffEffectMultiplierInsulation_Heat>
<EquipDelay>6</EquipDelay>
</statBases>
<thingCategories>
<li>Apparel</li>
</thingCategories>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Arms</li>
</bodyPartGroups>
<wornGraphicPath>Apparel/Longcoat/Longcoat</wornGraphicPath>
<layers>
<li>Middle</li>
<li>Shell</li>
</layers>
<tags>
<li>Baroque_Armour</li>
<li>Late_Baroque_Armour</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
</defaultOutfitTags>
</apparel>
<recipeMaker>
<researchPrerequisite>BaroqueMilitary</researchPrerequisite>
<skillRequirements>
<Crafting>8</Crafting>
</skillRequirements>
<recipeUsers Inherit="False">
<li>ElectricTailoringBench</li>
<li>HandTailoringBench</li>
</recipeUsers>
</recipeMaker>
<colorGenerator Class="ColorGenerator_StandardApparel" />
</ThingDef>


Tenshi~Akari

I'm also having this exact same problem. Originally able to do apparel cutout shading with 1.0, but found out that was mostly due to other apparel modders including the now-outdated GraphicApparelDetour.dll file with their mods.

After the 1.1 update, I was originally using Cpt. Ohu's Faction Colors as a workaround, but there seems to be some compatibility issues with other mods I use. (One being with Children & Pregnancy, it overrides some things with pawn rendering and makes the game look for apparel graphics with "(ImageName)_Child_(direction).png", causing pink box glitches on any item child pawns wear. Another issue I ran across was the inability to use it with any other apparel items that rely on "thingClass" to define special features, namely if you wanted to make a fancier shield belt for some reason.) This one will work out best for folks who don't really mind having a defined thingClass or don't use C&P, but with any given mod, should be aware of any other potential incompatibilities with your current active mod list.

I saw another mod named "Garam, Advanced Apparel" that's supposed to enable Cutout shaders, and currently trying to figure out how to use this one as an alternative... not too much luck so far, but if I do figure it out, I will definitely report back for others interested.

I've always been curious as to why Cutout & CutoutComplex shaders haven't been enabled by default on apparel items anyways...  :-\