-
Notifications
You must be signed in to change notification settings - Fork 3
Random Periodic Interaction
Alite edited this page Sep 6, 2026
·
1 revision
This gene class causes the pawn to periodically interact and/or give thoughts to nearby pawns in the same faction. To use this, you need a special class and the EBSG Extension:
<geneClass>EBSGFramework.Gene_RandomPeriodicInteraction</geneClass>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
</li>
</modExtensions>
These are the relevant options from the extension:
- intervalRange : Default (6000~12000) : How many ticks to have between interaction attempts. When the interval is over, the pawn will see if there's a pawn nearby for them to interact with, and the next interval will start regardless of whether or not there is
- interaction : The InteractionDef to have between the pawns. If not used, then only the thought will happen
- interactionThought : The memory to give the pawn being interacted with. If not used, interaction is the only thing used
- thoughtAboutCarrier : Default (True) : When True, the target for interactionThought is the gene carrier. Otherwise, it's about a random pawn on the map in the same faction
This example is an adapted version of the Manipulative gene from the Highborn Xenotype which has the same functionality, but it uses this class for the gene and Random Opinion for the thought:
<GeneDef>
<defName>HBX_Manipulative</defName>
<label>manipulative</label>
<description>Carriers of this gene are born social butterflies, and enjoy using their talents to manipulate those around them through gossip in search of amusement.</description>
<customEffectDescriptions>
<li>Allows to engage in a special "gossip" social interaction with another pawn, changing their opinion of a random colonist to change in range from -10 to 10.</li>
</customEffectDescriptions>
<iconPath>UI/Gene_Manipulative</iconPath>
<displayCategory>Miscellaneous</displayCategory>
<displayOrderInCategory>128</displayOrderInCategory>
<geneClass>EBSGFramework.Gene_RandomPeriodicInteraction</geneClass>
<biostatCpx>1</biostatCpx>
<biostatMet>0</biostatMet>
<statOffsets>
<SocialImpact>0.15</SocialImpact>
<SlaveSuppressionOffset MayRequire="Ludeon.RimWorld.Ideology">-0.3</SlaveSuppressionOffset>
</statOffsets>
<modExtensions>
<li Class="EBSGFramework.EBSGExtension">
<intervalRange>600~1200</intervalRange>
<interaction>HBX_Gossip_Interaction</interaction>
<interactionThought>HBX_Gossip_Target</interactionThought>
<thoughtAboutCarrier>False</thoughtAboutCarrier>
</li>
</modExtensions>
</GeneDef>
<InteractionDef>
<defName>HBX_Gossip_Interaction</defName>
<label>gossip</label>
<symbol>Things/SpeechSymbols/HBX_Gossip</symbol>
<initiatorThought>HBX_Gossip_Thought</initiatorThought>
<initiatorXpGainSkill>Social</initiatorXpGainSkill>
<initiatorXpGainAmount>10</initiatorXpGainAmount>
<recipientThought>HBX_Gossip_Thought</recipientThought>
<logRulesInitiator>
<rulesStrings>
<li>r_logentry->[INITIATOR_nameDef] and [RECIPIENT_nameDef] exchanged gossip.</li>
<li>r_logentry->[INITIATOR_nameDef] shared a secret with [RECIPIENT_nameDef].</li>
<li>r_logentry->With a wry look, [INITIATOR_nameDef] told [RECIPIENT_nameDef] a rumor about a fellow colonist.</li>
</rulesStrings>
</logRulesInitiator>
</InteractionDef>
<ThoughtDef>
<defName>HBX_Gossip_Thought</defName>
<thoughtClass>Thought_MemorySocialCumulative</thoughtClass>
<stackLimit>1</stackLimit>
<durationDays>1</durationDays>
<maxCumulatedOpinionOffset>5</maxCumulatedOpinionOffset>
<developmentalStageFilter>Baby, Child, Adult</developmentalStageFilter>
<socialTargetDevelopmentalStageFilter>Baby, Child, Adult</socialTargetDevelopmentalStageFilter>
<nullifyingTraits>
<li>Psychopath</li>
</nullifyingTraits>
<nullifyingHediffs>
<li MayRequire="Ludeon.RimWorld.Anomaly">Inhumanized</li>
</nullifyingHediffs>
<stages>
<li>
<label>gossiped with</label>
<baseOpinionOffset>2</baseOpinionOffset>
</li>
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>HBX_Gossip_Target</defName>
<thoughtClass>EBSGFramework.Thought_MemorySocialRandomOpinion</thoughtClass>
<stackLimit>1</stackLimit>
<durationDays>5</durationDays>
<developmentalStageFilter>Baby, Child, Adult</developmentalStageFilter>
<socialTargetDevelopmentalStageFilter>Baby, Child, Adult</socialTargetDevelopmentalStageFilter>
<nullifyingTraits>
<li>Psychopath</li>
</nullifyingTraits>
<nullifyingHediffs>
<li MayRequire="Ludeon.RimWorld.Anomaly">Inhumanized</li>
</nullifyingHediffs>
<stages>
<li>
<label>target of gossip</label>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<range>-10~10</range>
</li>
</modExtensions>
</ThoughtDef>
- Ability Validator
- Add Things To Inventory
- Alter Genes
- Alter Xenotype (Ability)
- Blood Drain
- Blast Attacks
- Burst Attacks
- Change Faction
- Change Gender
- Change Ideology
- Change Traits
- Change Weather
- Charge Battery
- Create Items
- Create Linked Hediffs
- Deal Damage
- Destroy Corpse
- Destroy Filth
- Destroy Items
- Duplicate Pawn
- Fly to Map Tile
- Give Multiple Hediffs
- Instant Death
- Launch Projectile Burst
- Learn Skill
- Long Distance Teleport
- Love the Caster
- Offset Needs Ability
- Orbital Strike
- Push Target
- Reloadable Abilities
- Remove Multiple Hediffs
- Remove Things From Inventory
- Spawn Humanlike (Ability)
- Spawn Pawn Kinds
- Spew
- Stop Mental Break (No Psychic)
- Toggle Hediff
- Trigger Game Condition
- Abilities From Other Genes
- Additional Fertility by Age
- Additional Lovin' Results
- Aging Xenotype
- Biome Genes
- Butchery Changing Genes
- Coma Rest Genes
- Conflicting Genes
- Customizable Bloodclotting
- Damage Modifying Stats Extension
- EBSG Body
- Equip Restrict
- Evolving Genes
- Fertility by Age
- Gender by Age
- Genetic Romance Chance
- Hediff Adder
- Hediff on Consumption
- Hediffs at Age
- Hide Inactive
- Hive Mind Genes
- Inactive at Age
- Ingestible Dependency Genes
- Mutating Genes
- Pregnancy Replacing Genes
- Random Periodic Interaction
- Removed at Age
- Skill Changing Genes
- Spawn Age Limiter
- Thoughts on Down from Gene
- Vanishing Genes
- Various Conditional Stat Affecters
- Aging Hediff
- Alter Xenotype (Hediff)
- Attach Mote
- Create Items
- Create Other Hediffs
- Damage on Removal
- Damage Over Time
- Destroy on Death
- Display Severity
- Flip Gender Periodically
- Gender by Age Hediff
- Gene Randomizer
- Give Abilities at Severities
- Give Hediff to Killer
- Give Hediffs to Non-Allies
- Give Other Hediff Periodically
- Hediff on Kill
- Hediff While Moving
- Hediffs on Removal
- Hediffs While Drafted
- Hediffs While in Severity Ranges
- Hemogen on Kill
- Hemogen Regeneration
- Make Hediff Invisible at Stage
- Memory on Kill
- Modular Hediffs
- Multiple Lives
- Name Color Hediff
- Remove at Severities
- Remove/Damage Parts
- Remove on Faction Change
- Remove When Damaged
- Severity Change per Attack
- Severity Change When Hit
- Severity Per Day by Genes
- Severity per Interval by Terrain
- Shield Hediff
- Skill Change Hediffs
- Spawn Humanlike
- Spawn Pawn Kind on Removal
- Temporary Faction
- Temporary Genes
- Temporary Ideology
- Temporary Relation
- Terrain Cost Override
- Tiered Regeneration
- Various Explosion Hediff Comps
- Severity Setters
- Faction Bond
- Severity by Age
- Severity by Colony Genes
- Severity by Colony Wealth
- Severity by Equipped
- Severity by Gender
- Severity by Genes
- Severity by Light Level
- Severity by Map
- Severity by Mental State
- Severity by Nearby Pawns
- Severity by Need Level
- Severity by Other Hediff Severities
- Severity by Time of Day
- Severity When Downed
- Add or Append Hediff on Ingest
- Alter Genes on Ingest
- Alter Genes on Use
- Alter Xenotype on Ingest
- Alter Xenotype on Use
- Alter Xenotype on Use by Severity
- Damage Modifying Stats Extension
- Equip Restrict
- Flexible Entity Releaser
- Gatherer Spot
- Give Hediff Based on Severity
- Hediff on Damage
- Limited Charges
- Need Charger Buildings
- Projectile Impact Effects
- Random Shot
- Regenerating Things
- Shield Equipment
- Sleep Caskets
- Spawn Baby Thing Comp
- Turret Roof Blocked
- Weapon Trait Extension
- Desired Genes Precept
- Disliked in Faction
- Gene in Colony Mood Precept
- Gene in Colony Mood Toggle Precept
- Opinions About Genes
- People in the Colony
- Random Opinion
- Thought Mood by Hediff Severity
- Thought Multiplying Genes
- Thoughts About Water
- Xenophilobic Thoughts
- The Genes
- Resource Packs
- Craving and Overcharge Hediffs
- Resource Using Abilities
- Converting Resources
- Special DRG Abilities
- Special DRG Hediffs