NQualityOfLife.XML.PatchIfEnabledAndModsLoaded - Niilo007/RimWorld-NQoL GitHub Wiki
<Operation Class="NQualityOfLife.XML.PatchIfEnabledAndModsLoaded">
<settingKey>string</settingKey>
<useName>bool</useName> <!-- true -->
<useId>bool</useId> <!-- false -->
<mode>Any | All | Or | And</mode>
<debugAlwaysEnabled>bool</debugAlwaysEnabled> <!-- false -->
<applyVariables>bool</applyVariables> <!-- true -->
<mods>
<li>string</li>
</mods>
<loaded Class="PatchOperation">
</loaded>
<notLoaded Class="PatchOperation">
</notLoaded>
<disabled Class="PatchOperation">
</disabled>
<done Class="PatchOperation"> <!-- Optional -->
</done>
<error Class="PatchOperation"> <!-- Optional -->
</error>
</Operation>
Does not currently support using settings from other mods, but this is a planned feature.
If the <mods>
list is missing or empty, the following error will be printed:
Config error in Niilo's QoL patch NQualityOfLife.XML.PatchIfEnabledAndModsLoaded(null)(null): Incorrect usage of: 'NQualityOfLife.XML.PatchIfEnabledAndModsLoaded(null)(null)' In: 'D:\SteamLibrary\steamapps\common\RimWorld\Mods\Niilo's QoL\Conditional_Mod_Expansions\1.5\XMLE\Patches\WIP\Ancient_Radiation_Patch.xml'! - 'mods' list is null or empty!
Not providing the <mode>
will result in the following error:
Config error in Niilo's QoL patch NQualityOfLife.XML.PatchIfEnabledAndModsLoaded(Vanilla Factions Expanded - Vikings)(Vanilla Factions Expanded - Vikings): Incorrect usage of: 'NQualityOfLife.XML.PatchIfEnabledAndModsLoaded(Vanilla Factions Expanded - Vikings)(Vanilla Factions Expanded - Vikings)' In: 'D:\SteamLibrary\steamapps\common\RimWorld\Mods\Niilo's QoL\1.5\Patches\Misc\Misc_Patches_Sound.xml'! - 'mode' is 'Invalid'!
<Operation Class="NQualityOfLife.XML.PatchIfEnabledAndModsLoaded">
<settingKey>NiilosQoL_Settings_Work_CPR</settingKey>
<mode>Any</mode>
<useName>true</useName>
<useId>false</useId>
<mods>
<li>Death Rattle [1.4]</li>
<li>Death Rattle [1.5]</li>
<li>Death Rattle</li>
<li>Death Rattle (Continued)</li>
<li>Death Rattle (Continued) [1.2+]</li>
<li>Death Rattle Continued [1.2+]</li>
</mods>
<loaded Class="PatchOperationAdd">
<xpath>Defs</xpath>
<value>
<JobDef>
<defName>PerformCPR</defName>
<driverClass>NQualityOfLife.Medical.JobDriver_Perform_CPR</driverClass>
<reportString>performing CPR on TargetA.</reportString>
<casualInterruptible>false</casualInterruptible>
</JobDef>
<WorkGiverDef>
<defName>DoctorPerformCPR</defName>
<label>perform cpr</label>
<giverClass>NQualityOfLife.Medical.NQoL_WorkGiver_CPR_Other</giverClass>
<workType>Doctor</workType>
<verb>perform CPR on</verb>
<gerund>performing CPR on</gerund>
<priorityInType>145</priorityInType>
<requiredCapacities>
<li>Manipulation</li>
</requiredCapacities>
<prioritizeSustains>true</prioritizeSustains>
<emergency>true</emergency>
</WorkGiverDef>
</value>
</loaded>
</Operation>