Wiered Patching issue

Started by Deathawaits4, March 06, 2021, 11:40:56 AM

Previous topic - Next topic

Deathawaits4

Hello guys,

I created a patch for VGP to change the parent of a thingdef to a custom one, now for some reason when i patch it and my patch is loaded AFTER VGP, im getting errors that the parent cannot be found. This does not really make sense to me as xml patches are usually applied after all the defs are loaded. Means, i have to load my patch before any of the affected mods which is kinda weired.. Any ideas why this is happening? <li Class="PatchOperationAttributeSet">
<xpath>/Defs/ThingDef[@ParentName="VG_RawFruitBase"]</xpath>
<attribute>ParentName</attribute>
<value>Organize_RawFruitBase</value>
</li>

RawCode

make invalid patch
check log for error message
open sources with your favorite decompiler (and you favorite is dnspy)
trace codeflow in order to determinate exact execution order

this will give you correct and scientific answer to question "why is something happened this way and not some other way"