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
- baseSuccessChance : Default (1) : Chance of the ability to succeed, with 1 being 100%
- casterStatChance : StatDef of the caster that is checked to determine success chance. Normally the higher above 0 this is, the higher the chance of success
- casterStatEffect : Default (Multiply) : Dictates what the stat does to the chance. The options are Multiply, Divide, OneMinusMultiply, and OneMinusDivide. The OneMinus options mean 1 - Stat Value
- targetStatChance : StatDef of the target that is checked to determine success chance. Normally the higher above 0 this is, the lower the chance of success
- targetStatEffect : Default (Divide) : Dictates what the stat does to the chance. The options are Multiply, Divide, OneMinusMultiply, and OneMinusDivide. The OneMinus options mean 1 - Stat Value
- successMessage : Optional. Message given if this comp succeeds and the caster is a player pawn
- failureMessage : Optional. Message given if this comp fails and the caster is a player pawn
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>