Toggable patches - AndroidQuazar/VanillaExpandedFramework GitHub Wiki

You can now add toggables patches, they can be turned on/off from the Vanilla Framework Expanded settings. This is how to define them (example from Vanilla Expanded - Royalty Patches), they still need to be in the Patches folder :

  <Operation Class="VFECore.PatchOperationToggableSequence">
    <enabled>False</enabled>
    <mods>
      <li>Vanilla Cooking Expanded</li>
      <li>Genetic Rim</li>
    </mods>
    <label>Rat cheese acceptable by royals:</label>
    <operations>
      <li Class="PatchOperationAdd">
        <xpath>/Defs/RoyalTitleDef[defName="Acolyte" or defName="Knight" or defName="Praetor" or defName="Baron" or defName="Count" or @Name="BaseEmpireTitleNPC"]/foodRequirement/allowedDefs</xpath>
        <value>
          <li>VCE_RatCheese</li>
        </value>
      </li>
    </operations>
  </Operation>
  • enabled: Default value of the patch
  • label: Text that will be used in the VFE settings
  • operations: same as the vanilla sequence operations tag Rimworld wiki

If you don't want to have the framework as a dependency, and only enable those patches when it is found, you need to use LoadFolders. For example, in a file named LoadFolders.xml, at the root of your mod:

<?xml version="1.0" encoding="utf-8" ?>
<loadFolders>
  <v1.3>	
    <!-- Vanilla -->
    <li>/</li>
    <li>1.3</li>	
    <!-- Mod Vanilla Expanded Framework-->
    <li IfModActive="OskarPotocki.VanillaFactionsExpanded.Core">Mods/1.3/Vanilla Expanded Framework</li>
  </v1.3>
</loadFolders>

Then, at the root of your mod (or it's version folder), you can the usual Patches folder with all your patches inside.

⚠️ **GitHub.com Fallback** ⚠️