RimWorld

RimWorld

[SYR] Marbled Marble
Triss 13 Mar, 2020 @ 1:48am
Duplicate XML issue
Running this mod and the 'Cupro's Stones update by Dr_Zhivago and Ogliss' produced this error:
XML error: Duplicate XML node name texPath in this XML block: <graphicData><color>(176,179,176)</color><texPath>Cupro/Object/Structure/RockMarbled_Atlas</texPath><texPath>Things/Building/Linked/Rock_Atlas_Marble</texPath></graphicData>

Root node: <ThingDef ParentName="UglyRockBase" Name="MarbleBase"><defName>Marble</defName><label>marble</label><description>A soft metamorphic rock.</description><graphicData><color>(176,179,176)</color><texPath>Cupro/Object/Structure/RockMarbled_Atlas</texPath><texPath>Things/Building/Linked/Rock_Atlas_Marble</texPath></graphicData><statBases><MaxHitPoints>450</MaxHitPoints><Beauty>-1<Beauty>1</Beauty></Beauty></statBases><building><mineableThing>ChunkMarble</mineableThing><mineableDropChance>0.25</mineableDropChance><smoothedThing>SmoothedMarble</smoothedThing></building></ThingDef>
Verse.Log:Error(String, Boolean)
Verse.XmlInheritance:CheckForDuplicateNodes(XmlNode, XmlNode)
Verse.XmlInheritance:CheckForDuplicateNodes(XmlNode, XmlNode)
Verse.XmlInheritance:ResolveXmlNodeFor(XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodesRecursively(XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodesRecursively(XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodesRecursively(XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodesRecursively(XmlInheritanceNode)
Verse.XmlInheritance:ResolveXmlNodes()
Verse.XmlInheritance:Resolve()
Verse.LoadedModManager:DMD<DMD<ParseAndProcessXML_Patch1>?-1415435392::ParseAndProcessXML_Patch1>(XmlDocument, Dictionary`2)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.<>c:<Start>b__6_1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()


Apparently it's likely patches through xpath. Specifically adding in a field that already exists.
May I suggest that you do checks on all your 'add' patches so they won't duplicate?
Otherwise us troubleshooters get pummeled with this kind of error, and often aren't sure what's causing it, which sucks.

'Nother suggestion, hopefully helpful:
Patching defensively, which is either
a) Stopping your patches from working if X
b) Overwriting other patches if X
c) Search for X, if X, then do Y. If no X, then do Z