Patch operation Verse.PatchOperationFindMod(More Vanilla Turrets 1.0) failed

Started by PartyCowboy, August 03, 2019, 07:55:28 AM

Previous topic - Next topic

PartyCowboy

Hello, I'm trying to make a patch for my mod Thinking Spot to lock the mud moat of More Vanilla Turrets 1.0 behind a tech with defName TS_BasicTraps, but the error in the title shows up.

The Operation I made currently looks like this:
<?xml version="1.0" encoding="utf-8" ?>

<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>More Vanilla Turrets 1.0</li>
</mods>
<match Class="PatchOperationAdd">
<xpath>*/TerrainDef[defName = "MudMoat"]</xpath>
<value>
<researchPrerequisites>
<li>TS_BasicTraps</li>
</researchPrerequisites>
</value>
</match>
</Operation>

</Patch>


I already made Thinking Spot patches for 5 other mods using the PatchOperationFindMod and this is the only one that does not want to work (despite copying the <name> from the about file of More Vanilla Turrets).

If anybody could tell me what's going on, I'd greatly appreciate it.
Thanks.

Kirby23590

Hello!

I think that "MudMoat" should be called "Mudmoat" note that moat is in a lowercase...

I think that has to be the cause why it's not working and failing,
it has to be case sensitive and XPathing or Patching is very case sensitive.
So yeah remove the uppercase in "Moat" to a lowercase. Should probably fix it...

One "happy family" in the rims...
Custom font made by Marnador.



PartyCowboy

That was indeed the issue. I kinda stared myself blind at it, so thank you for spotting it!