RimWorld

RimWorld

Marine Armor Materials
Joe the Tech  [developer] 2 Oct, 2020 @ 8:46am
Modding Questions
If you have any mod creation specific questions, post them here and I'll attempt to answer them. I'm not a professional, by any means, but I can still try and help.
< >
Showing 1-5 of 5 comments
Joe the Tech  [developer] 2 Oct, 2020 @ 8:55am 
@Armorguy1
Copied from your comment:
"decided to work with defname instead. still errors. I don't understand what's going on.
this is what it should be right?
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationSequence">
<!-- <success>Always</success> -->
<operations>
<!-- Remove Plasteel Component and Add Metallic to PioneerArmor -->
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]</xpath>
<value>
<stuffCategories />
</value>
</li>"

Without seeing the rest of your code, I'm not sure what's wrong. That line should add a stuffCategories field to your armor code block, but from there you'd need to specify at least one stuffCategory in it. In this case metallic. So the following lines would read:
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[ defName = "Apparel_PioneerArmor"]/stuffCategories</xpath>
<value>
<li>Metallic</li>
</value>
</li>
Armorguy1 3 Oct, 2020 @ 4:58am 
ah, ok. sorry. I kinda gave up on it tbh. But I think there is something about the mods structure that makes patches like this somehow not worked. I literally took the patch from spartan foundry and it couldn't find the defname despite clearly being listed in the mods apparel xml. I still have the file if you're interested.
Armorguy1 3 Oct, 2020 @ 4:59am 
this is what the whole thing should've looked like for one armor:
<!-- Remove Plasteel Component and Add Metallic to PioneerArmor -->
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]</xpath>
<value>
<stuffCategories />
</value>
</li>
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/stuffCategories</xpath>
<value>
<li>Metallic</li>
</value>
</li>
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]</xpath>
<value>
<costStuffCount />
</value>
</li>
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/costStuffCount</xpath>
<value>
40
</value>
</li>
<li Class="PatchOperationRemove">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/costList/Plasteel</xpath>
</li>
<li Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/statBases/ArmorRating_Sharp</xpath>
<value>
<StuffEffectMultiplierArmor>1</StuffEffectMultiplierArmor>
</value>
</li>
<li Class="PatchOperationRemove">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/statBases/ArmorRating_Blunt</xpath>
</li>
<li Class="PatchOperationRemove">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/statBases/ArmorRating_Heat</xpath>
</li>
<li Class="PatchOperationRemove">
<xpath>/Defs/ThingDef[defName = "Apparel_PioneerArmor"]/statBases/MarketValue</xpath>
</li>
Armorguy1 3 Oct, 2020 @ 5:02am 
this is what the armor structure is like in rimsenal for that specific armor (path: <workshop ID>\1.2\Defs\ThingDefs\Apparel_RS.xml):
<thingDef ParentName="RSApparelMakeableBase">
<defName>Apparel_PioneerArmor</defName>
<label>pioneer armor</label>
<description>An armor designed primarily for combat engineer, Greydale "Laconian" pioneer armor has integrated tool set. It's a pretty good gear for builds something while gunfight.</description>
<techLevel>Spacer</techLevel>
<graphicData> <texPath>Things/Apparel/Laconian</texPath>
<graphicClass>Graphic_Single</graphicClass> </graphicData>
<thingCategories>
<li>Apparel</li>
</thingCategories>
<recipeMaker>
<unfinishedThingDef>UnfinishedTechArmor</unfinishedThingDef>
<researchPrerequisite>ReconArmor</researchPrerequisite>
<recipeUsers>
<li>GDTable</li>
</recipeUsers>
<skillRequirements>
<Crafting>8</Crafting>
</skillRequirements>
</recipeMaker>
<costList>
<Steel>120</Steel>
<ComponentIndustrial>12</ComponentIndustrial>
<Plasteel>40</Plasteel>
</costList>
<statBases>
<Mass>13.8</Mass>
<WorkToMake>55000</WorkToMake>
<MaxHitPoints>350</MaxHitPoints>
<ArmorRating_Blunt>0.40</ArmorRating_Blunt>
<ArmorRating_Sharp>0.97</ArmorRating_Sharp>
<ArmorRating_Heat>0.47</ArmorRating_Heat>
<Insulation_Cold>30</Insulation_Cold>
<Insulation_Heat>10</Insulation_Heat>
<EquipDelay>10</EquipDelay>
</statBases>
<equippedStatOffsets>
<ConstructionSpeed>0.2</ConstructionSpeed>
<SmoothingSpeed>0.3</SmoothingSpeed>
<MiningSpeed>0.3</MiningSpeed>
<MoveSpeed>-0.2</MoveSpeed>
</equippedStatOffsets>
<generateCommonality>0.1</generateCommonality>
<apparel>
<bodyPartGroups>
<li>Neck</li>
<li>Torso</li>
<li>Shoulders</li>
<li>Arms</li>
<li>Legs</li>
</bodyPartGroups>
<wornGraphicPath>Things/Apparel/Laconian</wornGraphicPath>
<layers>
<li>Middle</li>
<li>Shell</li>
</layers>
<tags>
<li>SpacerMilitary</li>
<li>RoyalCombatGear</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
</defaultOutfitTags>
<useDeflectMetalEffect>true</useDeflectMetalEffect>
</apparel>
</thingDef>
Armorguy1 3 Oct, 2020 @ 5:43am 
Also there is this mod called "fantasy materials" that has this ore that emits light, would armors also get this characteristic when made of it? I don't think I have seen it do that.
< >
Showing 1-5 of 5 comments
Per page: 1530 50