Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - HalfdeadKiller

#1
Help / Re: A quick tutorial of xpathing and patching
January 27, 2019, 02:46:29 PM
For anyone who may find this useful. If you need to edit a specific <li> you can do so with this sort of format.


<Patch>
<Operation Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationTest">
<xpath>/StorytellerDefs/StorytellerDef[defName = "Phoebe-DoublePop"]</xpath>
</li>
<li Class="PatchOperationReplace">
<xpath>/StorytellerDefs/StorytellerDef[defName = "Phoebe-DoublePop"]/comps/li["StorytellerCompProperties_CategoryMTB"]/allowedTargetTypes</xpath>
<value>
<allowedTargetTypes>MapPlayerHome, MapMisc</allowedTargetTypes>
</value>
</li>
</operations>
</Operation>
</Patch>


This particular patch was for a mod for an older version of the game, but I think the format still works.