RimWorld

RimWorld

Anima Fruit
velcroboy333 9 Dec, 2021 @ 11:21am
Conditional Patch Edit
Edit:


<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]</xpath>
<value>
<plantsToNotOverwrite>
<li>Plant_AnimaFruit</li>
</plantsToNotOverwrite>
</value>
</Operation>

To:


<Operation Class="PatchOperationConditional">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]/plantsToNotOverwrite</xpath>
<match Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]/plantsToNotOverwrite</xpath>
<value>
<li>Plant_AnimaFruit</li>
</value>
</match>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]</xpath>
<value>
<plantsToNotOverwrite>
<li>Plant_AnimaFruit</li>
</plantsToNotOverwrite>
</value>
</nomatch>
</Operation>
< >
Showing 1-8 of 8 comments
RealLifeHobgoblin 11 Dec, 2021 @ 3:07pm 
What patch would VIE need? Easier for users to add the patch themselves than wait for Oskar.
Last edited by RealLifeHobgoblin; 11 Dec, 2021 @ 3:14pm
velcroboy333 13 Dec, 2021 @ 9:19am 
On the VIE side, it would look like,

<Operation Class="PatchOperationConditional">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]/plantsToNotOverwrite</xpath>
<match Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]/plantsToNotOverwrite</xpath>
<value>
<li>Plant_PodGauranlen</li>
<li>Plant_TreeGauranlen</li>
<li>Plant_MossGauranlen</li>
</value>
</match>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Plant_TreeAnima"]/comps/li[compClass="CompSpawnSubplant"]</xpath>
<value>
<plantsToNotOverwrite>
<li>Plant_PodGauranlen</li>
<li>Plant_TreeGauranlen</li>
<li>Plant_MossGauranlen</li>
</plantsToNotOverwrite>
</value>
</nomatch>
</Operation>
Stardust 🌠  [developer] 22 Dec, 2021 @ 1:43am 
I apologise for getting to this late, which file do i put this code/which file contains the code that i need to replace? If you would be so kind to tell me i could implement this today.
velcroboy333 22 Dec, 2021 @ 8:24am 
Wolfcub05, with this conditional patch, you'll want to load this mod after VIE-Anima (unless they also change their patch to a conditional one.) This way, their patch will add the initial node(list) and yours will add the anima fruit to the list.
velcroboy333 22 Dec, 2021 @ 11:50am 
I should also note, in my comment on the main page, both mods don't need to have the conditional patch. It's ideal if they do. But, as long as the mod with it is loaded after the one w/out, it will be fine. (I must not have had any coffee yet that day. :espresso::isa:)
BruhRaptor123 23 Dec, 2021 @ 8:16pm 
does this fix the grass eating issue.
Stardust 🌠  [developer] 23 Dec, 2021 @ 10:41pm 
Thanks for your help :) I've implemented the patch to the best of my abilities. We'll see if it fixes anything!
< >
Showing 1-8 of 8 comments
Per page: 1530 50