Weapon Trait Extension - KonradHeinser/EBSGFramework GitHub Wiki
This mod extension can be added to WeaponTraitDefs to increase the variety of things that can be done with them. At the moment it doesn't have many options in it, but this may be extended in the future to include more things. All of the weapon trait extension stuff uses the same extension:
<modExtensions>
<li Class="EBSGFramework.WeaponTraitExtension">
</li>
</modExtensions>
These are the options currently available in the extension:
- extraMeleeDamages : As far as I can tell, the extraDamages that traits like EMP Rounds use don't apply to melee attacks, so this can be used to apply a similar effect as that node for melee attacks specifically
- meleeDamageDefOverride : As far as I can tell, the damageDefOverride that traits like Incendiary Rounds use don't apply to melee attacks, so this can be used to apply a similar effect as that node for melee attacks specifically
- projectileOverride : Completely replaces the ThingDef that the weapon shoots for this one. CE may not like this due to their ammo system, but I don't use CE so I can neither verify nor rectify the situation
For melee weapons, I made a specific unique longsword and related WeaponCategoryDefs. If you want to copy the examples on one of those pages to try out in the game, I have provided that weapon below:
<WeaponCategoryDef>
<defName>Melee</defName>
</WeaponCategoryDef>
<WeaponCategoryDef>
<defName>Sword</defName>
</WeaponCategoryDef>
<WeaponCategoryDef>
<defName>Blade</defName>
</WeaponCategoryDef>
<ThingDef ParentName="BaseMeleeWeapon_Sharp_Quality">
<defName>MeleeWeapon_LongSword_Unique</defName>
<label>longsword</label>
<description>The ancient weapon of kings, the longsword can be used for slashing or stabbing.</description>
<descriptionHyperlinks>
<ThingDef>MeleeWeapon_LongSword</ThingDef>
</descriptionHyperlinks>
<possessionCount>1</possessionCount>
<graphicData>
<texPath>Things/Item/Equipment/WeaponMelee/LongSword</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Medieval</techLevel>
<weaponTags>
<li>MedievalMeleeAdvanced</li>
<li>LongSword</li>
</weaponTags>
<costStuffCount>100</costStuffCount>
<thingSetMakerTags><li>RewardStandardQualitySuper</li></thingSetMakerTags>
<statBases>
<WorkToMake>18000</WorkToMake>
<Mass>2</Mass>
</statBases>
<relicChance>2</relicChance>
<equippedAngleOffset>-65</equippedAngleOffset>
<stuffCategories>
<li>Metallic</li>
<li>Woody</li>
</stuffCategories>
<tools>
<li>
<label>handle</label>
<capacities>
<li>Blunt</li>
</capacities>
<power>9</power>
<cooldownTime>2</cooldownTime>
</li>
<li>
<label>point</label>
<capacities>
<li>Stab</li>
</capacities>
<power>23</power>
<cooldownTime>2.6</cooldownTime>
</li>
<li>
<label>edge</label>
<capacities>
<li>Cut</li>
</capacities>
<power>23</power>
<cooldownTime>2.6</cooldownTime>
</li>
</tools>
<comps Inherit="False">
<li Class="CompProperties_EquippableAbilityReloadable" /> <!-- Props are populated by traits -->
<li Class="CompProperties_Forbiddable"/>
<li Class="CompProperties_Styleable"/>
<li Class="CompProperties_Biocodable"/>
<li>
<compClass>CompQuality</compClass>
</li>
<li Class="CompProperties_Art">
<nameMaker>NamerArtWeaponGun</nameMaker>
<descriptionMaker>ArtDescription_WeaponGun</descriptionMaker>
<minQualityForArtistic>Excellent</minQualityForArtistic>
</li>
<li Class="CompProperties_UniqueWeapon">
<weaponCategories>
<li>Melee</li>
<li>Sword</li>
<li>Blade</li>
</weaponCategories>
<namerLabels>
<li>excalibur</li>
<li>swordy mcswordface</li>
<li>yes, it's a blade</li>
<li>pointy metal</li>
</namerLabels>
</li>
</comps>
<generateAllowChance>0</generateAllowChance>
<possessionCount>0</possessionCount>
<tradeability>Sellable</tradeability>
<thingSetMakerTags Inherit="False" >
<li>RewardStandardLowFreq</li>
<li>UniqueWeapon</li>
</thingSetMakerTags>
<recipeMaker Inherit="False" IsNull="True" />
<thingCategories Inherit="False">
<li>WeaponsUnique</li>
</thingCategories>
</ThingDef>