Structure of ModularPartDef
Added 2023-05-27 16:36:14 +0000 UTC
ModularPartDef is a Def that defines a part that can be attached to a modular weapon. It's written as follows;

- <defName>
The name of the def. Required like any other Defs.
- <label>
The name of the part displayed in the game.
- <description>
Description of the part displayed on the gunsmith screen.
- <kind>
Classification of the part. Enter the same as defined in CompModularParts.
- <path>
File path of the part graphic. Write the path below the AssetBundle.
- <overrideAssetBundleName>
File path of AssetBundle. Write only when you want to use different AssetBundle than Base.
- <costList>
Materials consumed at the Gunsmith Workbench.
- <researchPrerequisites>
Required research to attach this part.
- <isRare>
Boolean variable, sat false as default. If this true, this part will require the Gunsmith Workbench to attach, and will consume materials regardless of difficulty.
- <massFactor>
Weight to be added (kg).
- <AccTouchFactor>
- <AccShortFactor>
- <AccMediumFactor>
- <AccLongFactor>
Accuracy added at each range. 1.0=100%
- <dmgMultiplierFactor>
Addition to damage and AP value multipliers. 0.1→+10%.
- <rangeFactor>
Range to be added (tiles).
- <burstCountFactor>
Burst count to be added. Final value cannot be less than 1.
- <flashlightFactor>
Boolean variable. If this true, the part adds blinding effect to nearby enemies.
- <projectileFactor>
If you write this, the bullets fired will be replaced with the specified ThingDef.
- <toolFactor>
If you write this, the part will add a means of melee attack.
- <underbarrelVerb>
If you write this, the part adds a gizmo separate from normal shooting.
- <MoveSpeedFactor>
- <MentalBreakThresholdFactor>
- <SocialImpactFactor>
- <InjuryHealingFactor>
- <PainShockThresholdFactor>
- <EquipDelayFactor>
Works similarly to equippedStatOffsets of ThingDef.
- <PsychicSensitivityFactor>
- <PsychicEntropyGainFactor>
- <PsychicEntropyRecoveryRateFactor>
- <PsychicEntropyMaxFactor>
- <MeleeDodgeChanceFactor>
- <MeleeHitChanceFactor>
- <MeleeAverageDPSFactor>
- <MeleeAverageAPFactor>
- <MeleeCooldownMultiplierFactor>
- <MeleeDamageMultiplierFactor>
Works similarly to equippedStatOffsets of ThingDef.
- <ARSharpFactor>
- <ARBluntFactor>
- <ARHeatFactor>
Armor ratings to be added. Only works on apparel.
- <InsulationColdFactor>
- <InsulationHeatFactor>
Insulation to be added. Only works on apparel.