Change Ideology - KonradHeinser/EBSGFramework GitHub Wiki

This ability comp allows you to convert the ideology of the target into the caster's or the primary ideology of a specified FactionDef:

        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityChangeIdeology">
            </li>
        </comps>

These are the options available in the comp:

  • certainty : Default (1~1) : The range to set the new ideology certainty. If set to 0, then certainty is not changed from what the pawn had before conversion
    • Due to how certainty is handled in the code, the pawn's certainty may not reach the exact value picked but will instead go for a middle point between the initial and the target
  • factionOfIdeo : A FactionDef to pull the ideology from. This may have unexpected results if the faction in question does not have a primary ideology
  • successChance : A special item that dictates the chance of success. If you don't add this to the comp, then it will always work

This example converts the pawn into the caster's ideology:

    <AbilityDef>
        <defName>InstantConversion</defName>
        <label>test ability</label>
        <description>.</description>
        <iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
        <cooldownTicksRange>60</cooldownTicksRange>
        <hostile>false</hostile>
        <verbProperties>
            <verbClass>Verb_CastAbility</verbClass>
            <range>30</range>
            <warmupTime>0.5</warmupTime>
            <requireLineOfSight>False</requireLineOfSight>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityChangeIdeology" />
        </comps>
    </AbilityDef>

This example converts the pawn into the ideology that the ancients faction is using at around 50% certainty:

    <AbilityDef>
        <defName>ForTheAncients</defName>
        <label>for the ancients!</label>
        <description>.</description>
        <iconPath>Things/Mote/SpeechSymbols/Speech</iconPath>
        <cooldownTicksRange>60</cooldownTicksRange>
        <hostile>false</hostile>
        <verbProperties>
            <verbClass>Verb_CastAbility</verbClass>
            <range>30</range>
            <warmupTime>0.5</warmupTime>
            <requireLineOfSight>False</requireLineOfSight>
        </verbProperties>
        <comps>
            <li Class="EBSGFramework.CompProperties_AbilityChangeIdeology">
                <factionOfIdeo>Ancients</factionOfIdeo>
                <certainty>0.5</certainty>
            </li>
        </comps>
    </AbilityDef>
⚠️ **GitHub.com Fallback** ⚠️