Conflicting Genes - KonradHeinser/EBSGFramework GitHub Wiki

This addition to the EBSGExtension allows for specific genes to be marked as conflicting without using the exclusion tag system. This is mostly useful for situations where you want one gene to conflict with multiple genes, but don't want those genes to conflict with each other. Instead of making individual exclusion tags for each conflict, add this to the conflictor in question:

        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
                <conflictingGenes>
                    <li></li>
                    <li></li>
                </conflictingGenes>
            </li>
        </modExtensions>

This example adds a new ability that acts similar to fire spew, but has multiple charges and longer range. conflictingGenes is being used to make it incompatible with acid spray, foam spray and fire spew without having those genes be incompatible with each other or needing to make individual exclusion tags for each one. This only needs to be added to greater fire spew, so no patches are made to add it to the other 3 ability genes:

    <GeneDef>
        <defName>EBSG_GreaterFireSpew</defName>
        <label>greater fire spew</label>
        <description>There was a description here.</description>
        <iconPath>UI/Icons/Genes/Gene_Firespew</iconPath>
        <displayCategory>Ability</displayCategory>
        <marketValueFactor>2</marketValueFactor>
        <abilities>
            <li>EBSG_GreaterFireSpew</li>
        </abilities>
        <descriptionHyperlinks>
            <AbilityDef>EBSG_GreaterFireSpew</AbilityDef>
        </descriptionHyperlinks>
        <biostatMet>-5</biostatMet>
        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
                <conflictingGenes>
                    <li>AcidSpray</li>
                    <li>FoamSpray</li>
                    <li>FireSpew</li>
                </conflictingGenes>
            </li>
        </modExtensions>
    </GeneDef>

    <AbilityDef>
        <defName>EBSG_GreaterFireSpew</defName>
        <label>greater fire spew</label>
        <description>And here.</description>
        <iconPath>UI/Abilities/FireSpew</iconPath>
        <cooldownTicksRange>300000</cooldownTicksRange>
        <aiCanUse>true</aiCanUse>
        <ai_IsIncendiary>true</ai_IsIncendiary>
        <sendMessageOnCooldownComplete>true</sendMessageOnCooldownComplete>
        <warmupStartSound>FireSpew_Warmup</warmupStartSound>
        <charges>3</charges>
        <cooldownPerCharge>true</cooldownPerCharge>
        <verbProperties>
          <verbClass>Verb_CastAbility</verbClass>
          <range>9.9</range>
          <warmupTime>1</warmupTime>
          <soundCast>FireSpew_Resolve</soundCast>
          <targetParams>
            <canTargetLocations>true</canTargetLocations>
          </targetParams>
        </verbProperties>
        <comps>
          <li Class="CompProperties_AbilityFireSpew">
            <range>9.9</range>
            <lineWidthEnd>5</lineWidthEnd>
            <filthDef>Filth_FlammableBile</filthDef>
            <effecterDef>Fire_Spew</effecterDef>
            <canHitFilledCells>true</canHitFilledCells>
          </li>
        </comps>
    </AbilityDef>
⚠️ **GitHub.com Fallback** ⚠️