RimWorld

RimWorld

Anima Fruit
velcroboy333 9. dec. 2021 kl. 11:21
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>
< >
Viser 1-8 af 8 kommentarer
RealLifeHobgoblin 11. dec. 2021 kl. 15:07 
What patch would VIE need? Easier for users to add the patch themselves than wait for Oskar.
Sidst redigeret af RealLifeHobgoblin; 11. dec. 2021 kl. 15:14
velcroboy333 13. dec. 2021 kl. 9:19 
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 🌠  [udvikler] 22. dec. 2021 kl. 1:43 
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 kl. 8:24 
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 kl. 11:50 
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 kl. 20:16 
does this fix the grass eating issue.
Stardust 🌠  [udvikler] 23. dec. 2021 kl. 22:41 
Thanks for your help :) I've implemented the patch to the best of my abilities. We'll see if it fixes anything!
< >
Viser 1-8 af 8 kommentarer
Per side: 1530 50