Can an xml patch be coded to only work if it detects two mods simultaneously?

Started by Jackdawson, August 12, 2021, 07:59:09 AM

Previous topic - Next topic

Jackdawson

Let's say I want to use the FindMod operation

Quote<Operation Class="PatchOperationFindMod">
      <mods>
         <li>Ideology</li>
      </mods>

How would I format this if I wanted to have it require both ideology and another mod to activate?

RawCode


Jackdawson

I don't really have any attempts to make. There's no info on this on google

Quote<Operation Class="PatchOperationFindMod">
      <mods>
         <li>Ideology</li>
                        <li>ExampleMod</li>
      </mods>
      
<match Class="PatchOperationSequence">

For example if I did it like above it will only mean that the operation is looking for either one of those mods, not that it REQUIRES both of them. That's the only thing I tried and I have no other ideas.

RawCode

QuoteThere's no info on this on google

really?
not ever single post on stackoverflow about using xpath with multiple conditions?




Jackdawson

@RawCode
I have no idea how to apply this to rimworld's PatchOperationFindMod. It doesn't seem to be in the same format at all. I already found tutorials explaining that the PatchOperationFindMod operation is an "OR" operation, but there's not even a single mention of it being possible to override that and add two simultaneous conditions

RawCode

what about using other operations, like PatchOperationConditional ?