Additional Lovin' Results - KonradHeinser/EBSGFramework GitHub Wiki
This gene mod extension allows you to set up genes that causes things to happen when the carrier gets some lovin'. This extension does not require any of the gene classes from this framework to function:
<modExtensions>
<li Class="EBSGFramework.PostLovinThingsExtension">
</li>
</modExtensions>
These are the options that dictate when the rest of the stuff can occur:
- partnerRequiresOneOf : A list of GeneDefs that the partner must have at least one of. If they do not, then nothing will occur
- partnerHasNoneOf : A list of GeneDefs that the partner must lack or nothing will occur
- gender : The gender the carrier must have for the effects to trigger
- partnerGender : The gender the partner must have for the effects to trigger
These are the more generic options available:
- selfMemory : ThoughtDef that replaces the got some lovin' memory. The ThoughtDef here also needs to be a memory
- partnerMemory : ThoughtDef that replaces the got some lovin' memory. The ThoughtDef here also needs to be a memory
- filth : The filth to make around the pawn
- filthCount : The amount of the filth to make
- spawnThings : A list of thing def count classes that handles spawns. Unlike standard lists, the li is replaced with the ThingDef that you would like to make. The bottom of the example shows various ways that this may look like. This is what you can place between the ThingDef nodes:
- stuff : If the ThingDef is made of stuff, this is what to make it out of
- count : Default (1) : How many to make
- chance : Default (1) : The probability of this actually succeeding
- color : The color to make the item, if possible to change
- quality : Default (Normal) : The quality to give the item, if the item uses quality. The options are Awful, Poor, Normal, Good, Excellent, Masterwork, and Legendary
- hediffsToApplySelf : A special list of items that can add hediffs to parts, or just add hediffs in general. Both this and hediffsToApplyPartner accept the same information
- hediffsToApplyPartner : A special list of items that can add hediffs to parts, or just add hediffs in general. Both this and hediffsToApplySelf accept the same information
- hediff : The HediffDef to add. This is required for each li you add for obvious reasons
- bodyParts : The list of BodyPartDefs to add the hediff to. If left blank, then it will add to the full body
- onlyIfNew : Default (False) : While True, the hediff won't be added to a pawn/pawn part if the pawn already has it
- severity : Default (0.5) : The severity to apply/add to the hediff
- chance : Default (1) : The chances of the hediff actually being added
- validAges : If included, the pawn's age must be in the range you specify (i.e. 20~30 requires the pawn be within 20 and 30 years old)
To apply damage to a pawn, these are the options available:
- damageToSelf : The DamageDef to use
- damageToSelfAmount : Default (-1) : The amount of damage to deal. If left at -1, it uses the DamageDef's default
- selfBodyParts : A list of BodyPartDefs to try to limit the damage to. A random one from this list will be picked to damage. If no part can be picked or this is left empty, a completely random part is picked
- selfDamageChance : Default (1) : The chances of the damage actually occurring
- damageToPartner : The DamageDef to use
- damageAmount : Default (-1) : The amount of damage to deal to the partner. If left at -1, it uses the DamageDef's default
- partnerBodyParts : A list of BodyPartDefs to try to limit the damage to. A random one from this list will be picked to damage. If no part can be picked or this is left empty, a completely random part is picked
- partnerDamageChance : Default (1) : The chances of the damage actually occurring
In this example, whenever two pawns with the WeirdLovinNonsense gene engage in lovin' if at least one of them is a male, they will have a psychic bond created between them, and some things will be made. The male will also gain 10% bloodloss. If both people are male, then both of them will try to create items, and will lose some blood
<GeneDef>
<defName>WeirdLovinNonsense</defName>
<label>stuff happens</label>
<description>.</description>
<iconPath>UI/Icons/Genes/Gene_HairColor</iconPath> <!--Using a generic icon that's I know will be there-->
<displayCategory>Reproduction</displayCategory>
<modExtensions>
<li Class="EBSGFramework.PostLovinThingsExtension">
<partnerRequiresOneOf>
<li>WeirdLovinNonsense</li>
</partnerRequiresOneOf>
<gender>Male</gender>
<hediffsToApplySelf>
<li>
<hediff>PsychicBond</hediff>
<onlyIfNew>True</onlyIfNew>
</li>
<li>
<hediff>BloodLoss</hediff>
<severity>0.1</severity>
</li>
</hediffsToApplySelf>
<hediffsToApplyPartner>
<li>
<hediff>PsychicBond</hediff>
<onlyIfNew>True</onlyIfNew>
</li>
</hediffsToApplyPartner>
<spawnThings>
<Steel> <!--Creates 10 steel-->
<count>10</count>
</Steel>
<WoodLog /> <!--Creates one log-->
<Plasteel> <!--50% chance of getting 1 plasteel-->
<chance>0.5</chance>
</Plasteel>
</spawnThings>
<filth>Filth_Blood</filth>
</li>
</modExtensions>
</GeneDef>