Butchery Changing Genes - KonradHeinser/EBSGFramework GitHub Wiki
This extension allows you to alter what is produced when the pawn is butchered. The basic extension looks like this:
<modExtensions>
<li Class="EBSGFramework.ButcherProductExtension">
</li>
</modExtensions>
-
meatReplacement : The ThingDef to replace the human meat with. The code will only pick the first meat replacement it can find, so you may need to add exclusionTags like EBSG_MeatReplacer to avoid issues. The amount this produces is equal to the amount of meat that would normally be produced
-
meatAmountFactor : Default (1) : The amount to multiply the meatReplacement by. If set to 0.5, then only half the amount will be generated. This cannot be used to change how much meat they normally produce, and will only impact the meatReplacement's final result
-
leatherReplacement : The ThingDef to replace the human leather with. The code will only pick the first leather replacement it can find, so you may need to add exclusionTags like EBSG_LeatherReplacer to avoid issues. The amount this produces is equal to the amount of leather that would normally be produced. Due to how Rimworld records statistics in the pawn statistics menu, this can't be shown in there
-
leatherAmountFactor : Default (1) : The amount to multiply the leatherReplacement by. If set to 0.5, then only half the amount will be generated. This cannot be used to change how much leather they normally produce, and will only impact the leatherReplacement's final result
-
things : 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 tags:
- 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
-
useEfficiency : Default (False) : Determines if the butcher's efficiency should impact the stack count of the things generated. If you are using meatReplacement or leatherReplacement, those will use efficiency regardless of what this says
This example makes it so the pawn will give steel instead of human meat, plasteel instead of human leather, and has a 50% chance of giving 20 uranium. Due to meatAmountFactor and leatherAmountFactor not being set, the steel and plasteel will be created in the same quantities as their fleshy and leathery counterparts. The exclusion tags are added to avoid having this gene taken with any other meat and/or leather replacing gene:
<GeneDef>
<defName>Terminatorish</defName>
<label>terminatorish</label>
<description>Carriers of this gene have flesh of steel, skin of plasteel, and a uranium heart that may not survive extraction.</description>
<iconPath>UI/Icons/Genes/Gene_HairColor</iconPath>
<displayCategory>Miscellaneous</displayCategory>
<exclusionTags>
<li>EBSG_MeatReplacer</li>
<li>EBSG_LeatherReplacer</li>
</exclusionTags>
<modExtensions>
<li Class="EBSGFramework.ButcherProductExtension">
<things>
<Uranium>
<count>20</count>
<chance>0.5</chance>
</Uranium>
</things>
<meatReplacement>Steel</meatReplacement>
<leatherReplacement>Plasteel</leatherReplacement>
</li>
</modExtensions>
</GeneDef>