[HELP] Unknown Parse Failure

Started by chaserchim, March 14, 2020, 11:09:08 PM

Previous topic - Next topic

chaserchim

Hello! Im working on my first Rimworld mod and im new to using XML. Im getting this error about Unknown Parse Failure. I have the XML file posted below but I really dont know whats wrong with it. Maybe im just super lost.


<?xml Versions="1.0" encoding="utf-8" ?>
<Defs>
    <!-- Tarkov Armor -->
    <!-- Module-3M Body Armor -->
    <ThingDef ParentName="ApparelMakeableBase">
<defName>TA_3M</defName>
<label>Module-3M</label>
<description>A light bulletproof best of second class protection, used in private security companies.</description>
<graphicData>
<texPath>Things/3M</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Industrial</techLevel>
<tradeability>Sellable</tradeability>
        <generateCommonality>0.25</generateCommonality>
<costList>
<Cloth>40</Cloth>
<Steel>20</Steel>
</costList>
<statBases>
<MaxHitPoints>200</MaxHitPoints>
<WorkToMake>10000</WorkToMake>
<Mass>3</Mass>
<ArmorRating_Sharp>1.08</ArmorRating_Sharp>
<ArmorRating_Blunt>0.22</ArmorRating_Blunt>
<ArmorRating_Heat>0.17</ArmorRating_Heat>
<Insulation_Cold>1</Insulation_Cold>
<Insulation_Heat>0</Insulation_Heat>
            <EquipDelay>3.5</EquipDelay>
</statBases>
<thingCategories Inherit="False">
<li>Apparel</li>
</thingCategories>
    <equippedStatOffsets>
      <MoveSpeed>-0.7</MoveSpeed>
    </equippedStatOffsets>
<apparel>
<bodyPartGroups>
<li>Torso</li>
</bodyPartGroups>
<wornGraphicPath>Things/3M</wornGraphicPath>
<layers>
<li>Middle</li>
</layers>
<tags>
<li>IndustrialBasic</li>
<li>IndustrialMilitary</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
            </defaultOutfitTags>
</apparel>
<recipeMaker>
<skillRequirements>
<Crafting>6</Crafting>
</skillRequirements>
<recipeUsers Inherit="False">
<li>TableMachining</li>
</recipeUsers>
</recipeMaker>
    </ThingDef>

    <!-- Zhuk-3 Body Armor -->
    <ThingDef ParentName="ApparelMakeableBase">
<defName>TA_Z3</defName>
<label>Zhuck-3 Press Armor</label>
<description>An armoured vest for journalists in the field of combat.</description>
<graphicData>
<texPath>Things/Z3</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Industrial</techLevel>
<tradeability>Sellable</tradeability>
        <generateCommonality>0.2</generateCommonality>
<costList>
<Cloth>30</Cloth>
<Steel>40</Steel>
</costList>
<statBases>
<MaxHitPoints>225</MaxHitPoints>
<WorkToMake>12000</WorkToMake>
<Mass>3.4</Mass>
<ArmorRating_Sharp>1.2</ArmorRating_Sharp>
<ArmorRating_Blunt>0.34</ArmorRating_Blunt>
<ArmorRating_Heat>0.1</ArmorRating_Heat>
<Insulation_Cold>1</Insulation_Cold>
<Insulation_Heat>0</Insulation_Heat>
            <EquipDelay>4</EquipDelay>
</statBases>
<thingCategories Inherit="False">
<li>Apparel</li>
</thingCategories>
    <equippedStatOffsets>
      <MoveSpeed>-0.1</MoveSpeed>
    </equippedStatOffsets>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Neck</li>
</bodyPartGroups>
<wornGraphicPath>Things/Z3</wornGraphicPath>
<layers>
<li>Middle</li>
</layers>
<tags>
<li>IndustrialBasic</li>
<li>IndustrialMilitary</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
            </defaultOutfitTags>
</apparel>
<recipeMaker>
<skillRequirements>
<Crafting>7</Crafting>
</skillRequirements>
<recipeUsers Inherit="False">
<li>TableMachining</li>
</recipeUsers>
</recipeMaker>
    </ThingDef>

    <!-- 6B13 Body Armor -->
    <ThingDef ParentName="ApparelMakeableBase">
<defName>TA_6B</defName>
<label>6B13 Assult Armor</label>
<description>An armored vest for personnel of combat units of the ground forces, airborne troops, marines, etc. The vest is designed to protect vital organs from being hit by firearms, shell fragments, mines, grenades, and cold weapons, reducing the severity of armor contusion injury when performing combat missions.</description>
<graphicData>
<texPath>Things/6B</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Industrial</techLevel>
<tradeability>Sellable</tradeability>
        <generateCommonality>0.15</generateCommonality>
<costList>
<Cloth>30</Cloth>
<Steel>40</Steel>
<Plasteel>10</Plasteel>
</costList>
<statBases>
<MaxHitPoints>250</MaxHitPoints>
<WorkToMake>14000</WorkToMake>
<Mass>3.8</Mass>
<ArmorRating_Sharp>1.5</ArmorRating_Sharp>
<ArmorRating_Blunt>0.5</ArmorRating_Blunt>
<ArmorRating_Heat>0.2</ArmorRating_Heat>
<Insulation_Cold>1</Insulation_Cold>
<Insulation_Heat>0</Insulation_Heat>
            <EquipDelay>4.2</EquipDelay>
</statBases>
<thingCategories Inherit="False">
<li>Apparel</li>
</thingCategories>
    <equippedStatOffsets>
      <MoveSpeed>-0.12</MoveSpeed>
    </equippedStatOffsets>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Neck</li>
</bodyPartGroups>
<wornGraphicPath>Things/6B</wornGraphicPath>
<layers>
<li>Middle</li>
</layers>
<tags>
<li>IndustrialBasic</li>
<li>IndustrialMilitary</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
            </defaultOutfitTags>
</apparel>
<recipeMaker>
<skillRequirements>
<Crafting>9</Crafting>
</skillRequirements>
<recipeUsers Inherit="False">
<li>TableMachining</li>
</recipeUsers>
</recipeMaker>
    </ThingDef>

    <!-- IOTV Gen4 Body Armor -->
    <ThingDef ParentName="ApparelMakeableBase">
<defName>TA_IOTV</defName>
<label>IOTV Gen. 4 IV BOdy Armor</label>
<description>The Improved Outer Tactical Vest (IOTV) Gen IV is designed to permit maximum freedom of movement required to assume correct firing positions with the agility to execute and maneuver tasks. Optimal design characteristics ensure the best possible weight distribution of both the ballistic body armor system as well as additional load bearing equipment, thus providing enhanced comfort, wear duration, and mobility. Increased mobility and comfort kit.</description>

</description>
<graphicData>
<texPath>Things/IOTV</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Industrial</techLevel>
<tradeability>Sellable</tradeability>
        <generateCommonality>0.1</generateCommonality>
<costList>
<Cloth>20</Cloth>
<Steel>30</Steel>
<Plasteel>30</Plasteel>
</costList>
<statBases>
<MaxHitPoints>275</MaxHitPoints>
<WorkToMake>16000</WorkToMake>
<Mass>4.2</Mass>
<ArmorRating_Sharp>1.6</ArmorRating_Sharp>
<ArmorRating_Blunt>0.6</ArmorRating_Blunt>
<ArmorRating_Heat>0.25</ArmorRating_Heat>
<Insulation_Cold>1</Insulation_Cold>
<Insulation_Heat>0</Insulation_Heat>
            <EquipDelay>4.5</EquipDelay>
</statBases>
<thingCategories Inherit="False">
<li>Apparel</li>
</thingCategories>
    <equippedStatOffsets>
      <MoveSpeed>-0.16</MoveSpeed>
    </equippedStatOffsets>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Neck</li>
</bodyPartGroups>
<wornGraphicPath>Things/IOTV</wornGraphicPath>
<layers>
<li>Middle</li>
</layers>
<tags>
<li>IndustrialBasic</li>
<li>IndustrialMilitary</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
            </defaultOutfitTags>
</apparel>
<recipeMaker>
<skillRequirements>
<Crafting>10</Crafting>
</skillRequirements>
<recipeUsers Inherit="False">
<li>TableMachining</li>
</recipeUsers>
</recipeMaker>
    </ThingDef>


    <!-- 6B43 Body Armor -->
    <ThingDef ParentName="ApparelMakeableBase">
<defName>TA_6B43</defName>
<label>6B43 Zabralo Armor</label>
<description>The 6B43 bulletproof vest of 6A protection class is designed for protection from light weapons bullets, fragments of grenades, mines, and melee weapons, as well as reducing the risk of after-penetration effects during combat situations.</description>

</description>
<graphicData>
<texPath>Things/6B43</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Industrial</techLevel>
<tradeability>Sellable</tradeability>
        <generateCommonality>0.3</generateCommonality>
<costList>
<Cloth>10</Cloth>
<Steel>10</Steel>
<Plasteel>60</Plasteel>
</costList>
<statBases>
<MaxHitPoints>325</MaxHitPoints>
<WorkToMake>20000</WorkToMake>
<Mass>5</Mass>
<ArmorRating_Sharp>2</ArmorRating_Sharp>
<ArmorRating_Blunt>0.8</ArmorRating_Blunt>
<ArmorRating_Heat>0.4</ArmorRating_Heat>
<Insulation_Cold>1</Insulation_Cold>
<Insulation_Heat>0</Insulation_Heat>
            <EquipDelay>5</EquipDelay>
</statBases>
<thingCategories Inherit="False">
<li>Apparel</li>
</thingCategories>
    <equippedStatOffsets>
      <MoveSpeed>-0.4</MoveSpeed>
    </equippedStatOffsets>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Neck</li>
<li>Arms</li>
</bodyPartGroups>
<wornGraphicPath>Things/6B43</wornGraphicPath>
<layers>
<li>Middle</li>
</layers>
<tags>
<li>IndustrialBasic</li>
<li>IndustrialMilitary</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
            </defaultOutfitTags>
</apparel>
<recipeMaker>
<skillRequirements>
<Crafting>12</Crafting>
</skillRequirements>
<recipeUsers Inherit="False">
<li>TableMachining</li>
</recipeUsers>
</recipeMaker>
    </ThingDef>

</Defs>

LWM

I highly recommend getting an editor that automatically validates xml files.  Notepad++ is popular on Windows machines.

Speaking of which, your XML is invalid.

You have to close description tags.

chaserchim

Oh. Thanks. I didnt see that. I thought VSCode did that, Ill try Studio I guess.

chaserchim

SO I fixed that whole mess and got the graphics to load on the ground, but not on the sprite. <wornGraphicPath>Things/3M/Texture_Name<wornGraphicPath> is correct isnt it? How do i tell it which ones to show when a pawn is turned or something?

LWM

I think this is when you start a new topic or change the subject of this one.

I, alas, have no clue.