Ludeon Forums

RimWorld => Mods => Help => Topic started by: TenaeqQuabris on February 19, 2023, 07:06:20 AM

Title: How to make double-colored apparel?
Post by: TenaeqQuabris on February 19, 2023, 07:06:20 AM
Trying to make an armor that has a shirt under it. I want it to have two required stuff categories in cost list (metallic and fabric) and also that the bottom part of the armor will change the color depending on the fabric material. But I have no idea on how to do it. I tried looking through core and dlc defs, nothing that would help.


So far, the def looks like this :

    <ThingDef ParentName="ArmorSmithableBase">
        <defName>Armor_FV_Plated</defName>
        <label>FV plated armor</label>
        <description>Plated armor from the FV culture. Used by knights and soldiers.</description>
        <techLevel>Medieval</techLevel>
        <possessionCount>1</possessionCount>
        <recipeMaker>
            <unfinishedThingDef>UnfinishedMetallicTechArmor</unfinishedThingDef>
            <researchPrerequisite>forestVSmithing</researchPrerequisite>
            <skillRequirements>
                <Crafting>8</Crafting>
            </skillRequirements>
            <recipeUsers>
                <li>ElectricSmithy</li>
                <li>FueledSmithy</li>
            </recipeUsers>
        <displayPriority>200</displayPriority>
        </recipeMaker>
        <graphicData>
        <texPath>Things/Pawn/Humanlike/Apparel/Armor_FV_Plated/Armor_FV_Plated</texPath>
        <graphicClass>Graphic_Multi</graphicClass>
        </graphicData>
        <statBases>
            <WorkToMake>44000</WorkToMake>
            <MaxHitPoints>300</MaxHitPoints>
            <Mass>18</Mass>
            <StuffEffectMultiplierArmor>0.8</StuffEffectMultiplierArmor>
            <StuffEffectMultiplierInsulation_Cold>1.2</StuffEffectMultiplierInsulation_Cold>
            <StuffEffectMultiplierInsulation_Heat>1.1</StuffEffectMultiplierInsulation_Heat>
            <EquipDelay>3</EquipDelay>
        </statBases>
        <thingSetMakerTags>
            <li>RewardStandardQualitySuper</li>
        </thingSetMakerTags>
        <equippedStatOffsets>
            <MoveSpeed>-1</MoveSpeed>
        </equippedStatOffsets>
        <thingCategories>
            <li>ApparelArmor</li>
        </thingCategories>
        <costList>
            <Metallic>220</Metallic>
            <Fabric>60</Fabric>
        </costList>
        <tradeTags>
            <li>FVArmor</li>
        </tradeTags>
        <apparel>
            <countsAsClothingForNudity>false</countsAsClothingForNudity>
            <bodyPartGroups>
                <li>Torso</li>
                <li>Neck</li>
                <li>Shoulders</li>
                <li>Arms</li>
                <li>Hands</li>
                <li>Legs</li>
                <li>Feet</li>
            </bodyPartGroups>
            <wornGraphicPath>Things/Pawn/Humanlike/Apparel/Armor_FV_Plated/Armor_FV_Plated</wornGraphicPath>
            <layers>
                <li>Middle</li>
                <li>Shell</li>
            </layers>
            <tags>
                <li>MedievalMilitary</li>
            </tags>
            <defaultOutfitTags>
                <li>Soldier</li>
            </defaultOutfitTags>
        </apparel>
    </ThingDef>
Title: Re: How to make double-colored apparel?
Post by: Shinzy on February 22, 2023, 05:04:34 PM
Royalty dlc does this exact thing with the prestige armors! (You'll find them at Royalty/Defs/ThingDefs_misc/apparel_various.xml), the shader type and the worngraphicmask bits are the important parts in achieving the thing you want, if I remember correctly, as I've not done this myself in maybe 2 years my memory's bit hazy :P

and the art source files should have an example of the mask graphics you need to have for them
https://ludeon.com/forums/index.php?topic=2325.0
Title: Re: How to make double-colored apparel?
Post by: TenaeqQuabris on February 23, 2023, 06:08:24 AM
Not exactly what I had in mind, but this will come useful later. Thanks.


I'll try to explain again.
I'm trying to make an armor, that will require both x amount of metallic, and x amount of fabric/leathery material. Metallic material will color the plates, while the fabric/leathery material will color the clothes underneath, and maybe some accessory cloth around the plates.
This prestige armor locks the golden color, meaning the gold will be always there.

Does it makes more sense now?
Title: Re: How to make double-colored apparel?
Post by: LWM on February 25, 2023, 07:29:17 PM
QuoteI want it to have two required stuff categories in cost list (metallic and fabric)

This is not possible in vanilla thingdefs, by the way. The <costlist> section only accepts single thingdefs, not thingcategories, so unless there's some mod that allows multiple types, you'll need to rethink this  :(
Title: Re: How to make double-colored apparel?
Post by: TenaeqQuabris on February 26, 2023, 03:35:34 AM
Well that's shame. I'll try to look for something like that. Probably won't find anything, but at least I can separate the apparel into two.
Thanks for help.