Murderous Need - KonradHeinser/EBSGFramework GitHub Wiki
This need class allows you to create a customizable version of kill thirst that allows you to specify the rate that it falls and recovers, along with what counts as a kill. For this need to function, it requires the related class, and if you want to add specifications it needs the EBSG Extension. Unlike most needs, it uses a fall rate designated in the extension rather than in the NeedDef itself:
<needClass>EBSGFramework.Need_Murderous</needClass>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
</li>
</modExtensions>
These are the options available within the extension:
- fallPerDay : Default (0.0333) : Amount to reduce per day. Defaults to 3.33%
- minAgeForNeed : Default (13) : Minimum age for the need to be active
- maxAgeForNeed : Default (9999) : Maximum age for the need to be active
- increasePerKill : Default (1) : Increase when the pawn kills any valid target with any weapon or body part
- increasePerMeleeKill : Default (0) : Increase when the pawn kills any valid target with a melee weapon or body part
- increasePerRangedKill : Default (1) : Increase when the pawn kills any valid target with a ranged weapon
- thresholdPercentages : Default ([0.3]) : A list of percentages to place a small marker at
- displayLowAlert : Default (False) : If false and there is at least one item in the thresholdPercentages list, this will make an alert while the need is below the first point in the list
Conditionals
- allowHumanoids : Default (True) : Killing humanoids satisfies the need
- allowMechanoids : Default (True) : Killing mechanoids satisfies the need
- allowDryads : Default (True) : Killing dryads satisfies the need. This is separate from animals
- allowInsects : Default (True) : Killing insects satisfies the need. This is separate from animals
- allowAnimals : Default (True) : Killing animals satisfies the need
- allowEntities : Default (True) : Killing entities satisfies the need
For a related need thought, see Need Thoughts.
This example creates a variation of the kill thirst gene that accepts any kill to satisfy the need. The need will display the small tick marks at the 30% and the 60% thresholds. Because it just uses the default increasePerKill it technically doesn't need to have that tag at all, it's just there to provide a more thorough example of what it would look like:
<GeneDef>
<defName>Murderous</defName>
<label>murderous</label>
<labelShortAdj>murderous</labelShortAdj>
<description>This person just wants to kill things and doesn't really care how.</description>
<displayCategory>Violence</displayCategory>
<displayOrderInCategory>61</displayOrderInCategory>
<iconPath>UI/Icons/Genes/Gene_Killthirst</iconPath>
<geneClass>EBSGFramework.HediffAdder</geneClass>
<causesNeed>Murderous</causesNeed> <!--Any need adding method works, gene was just easiest here-->
<biostatMet>3</biostatMet>
<minAgeActive>13</minAgeActive>
<exclusionTags>
<li>KillThirst</li>
</exclusionTags>
</GeneDef>
<NeedDef>
<defName>Murderous</defName>
<needClass>EBSGFramework.Need_Murderous</needClass>
<label>murderous</label>
<description>This person just wants to kill things and doesn't really care how.</description>
<baseLevel>0</baseLevel>
<minIntelligence>ToolUser</minIntelligence>
<colonistAndPrisonersOnly>true</colonistAndPrisonersOnly>
<onlyIfCausedByGene>true</onlyIfCausedByGene>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
<increasePerKill>1</increasePerKill>
<thresholdPercentages>
<li>0.3</li>
<li>0.6</li>
</thresholdPercentages>
</li>
</modExtensions>
</NeedDef>