Apparel Conditional Stat Affecter - KonradHeinser/EBSGFramework GitHub Wiki
Return to Main Conditional Stat Affecters Page
This gene conditional stat affecter causes stat changes when the pawn has certain apparel, with options for things like specific defs, what it's made of, what layers are covered, and what body parts are covered. The stat affects are applied if any apparel meets all conditions set. Unlike most conditional stat affecters, this does not appear in any of the multi affecters, and it doesn't appear on any of the main wiki lists as overusing this can potentially lead to performance issues caused by the multitude of checks happening regularly if pushed to its limits:
<conditionalStatAffecters>
<li Class="EBSGFramework.ConditionalStatAffecter_Apparel">
<label>label</label>
<statFactors>
</statFactors>
<statOffsets>
</statOffsets>
</li>
</conditionalStatAffecters>
- label : A label to override the default. The default is extremely generic, so it is recommended to include this
- defaultActive : Default (True) : If, for some weird reason, the pawn doesn't have an apparel tracker, this determines if the stat affects are active. If the pawn has a tracker but no apparel, they still go through the normal checks and defaultActive does not matter to them
These are the options which actually check the apparel. They are grouped with the other check that usually covers the same ground:
These are the most restrictive checks in that they often remove the most apparel from the potential match list. If you are using apparel, there is little need for these or the coverage checks:
- apparel : List of ThingDefs to check for. This is used for any situation where there are very specific apparels you are looking for
- apparelCheck : Default (Required) : What the list is checking for, with the options being Required or Forbidden
- tags : List of tags set in apparel to check for. This is for stuff like the SpacerMilitary which power armor contains, or things like IndustrialBasic which a lot of industrial clothing contains
- tagCheck : Default (Required) : What the list is checking for, with the options being Required or Forbidden
Unlike the other checks, stuffing and stuffCategories are both done at the same time, allowing you to filter by category while also including some defs not included in that category (i.e. get all metallic while including wood logs specifically). In most cases though, you'll want one or the other:
- stuffing : List of ThingDefs to check for as stuffing. If the apparel has a static recipe that doesn't involve picking stuffing, then that apparel won't be included in this stuff check
- stuffCategories : List of StuffCategoryDefs to check for. Same recipe rules as stuffing
- stuffingCheck : Default (Required) : What the list is checking for, with the options being Required or Forbidden. Unlike the other check restrictions, this covers both stuffing and stuffCategories
These check what the apparel is covering. They are checked separately, so if you want to see if the pawn is wearing any outer or middle apparel that covers the arms without including skin layer apparel that covers the arms, you can. In many cases though, you'll end up only needing one or the other so double-check that you aren't doing redundant checks (i.e. headwear that covers the head group)
- layers : List of ApparelLayerDef to check for. This can be used to get headwear without getting eyewear, for example. If you do want to get everything that covers the eyes in any way, bodyPartGroups is probably what you're looking for
- layerCheck : Default (Required) : What the list is checking for, with the options being Required or Forbidden
- bodyPartGroups : List of BodyPartGroupDef to check for. If multiple apparels on separate layers cover the same parts, they will all be included in this
- bodyPartGroupCheck : Default (Required) : What the list is checking for, with the options being Required or Forbidden