I everyone,
I'm come here to ask your help because all the patches files I found modify a file with a defname as definition (I mean <defname>XX</defname> so they target using this defname [defname="XX"]. I currently trying to modify the global stats for tree (plant_base) in which there is no such defname to target. I can't nether just modify all the stats of all the bush/tree there since I only want to modify tree.
So, I use this code :
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>/Defs/ThingDefs_Plants/ThingDef ParentName="PlantBase" Name="TreeBase" Abstract="True"/pathCost</xpath>
<value>
<pathCost>12</pathCost>
</value>
</Operation>
</Patch>
The problem is :
1- should the game throw back an error if a patches files is not valide ?
2- I can't use the name of the file "plant_base" because I want to be able to modify any mod with its own name. With the code I used, the game will look for "<ThingDef ParentName="PlantBase" Name="TreeBase" Abstract="True"> in all the files in the "ThingDef_Plants" folder or I didn't understant something ?
3-I try to reduce as much as possible the number of operation for my xpath to operate. Should I always start the path setting from the begining (so the general Defs folder) and so on, or must I only start the path setting from the subfolder there there is the files I want to change ?
Sorry for the noob questions. I was able to manage near everything in A16 by looking how other mods do and then learning but it's a little bit harder for the xpathing method. I hope someone will be able to help me there ^^
Thanks anyway for reading this

Double thanks if you take time to answer