Hello
I want to add a new attack for a sword called PlasmaCut from charged edge but after starting the game the sword doesnt have that attack (no errors).
Do I need a C# for it?
I have made those xmls for it:
<tools>
<li>
<label>handle</label><chanceFactor>0.1</chanceFactor>
<capacities>
<li>Blunt</li>
</capacities>
<power>7</power>
<cooldownTime>0.5</cooldownTime>
</li>
<li>
<label>point</label>
<capacities>
<li>Stab</li>
</capacities>
<power>25</power>
<cooldownTime>1.0</cooldownTime>
</li>
<li>
<label>charged edge</label><chanceFactor>0.1</chanceFactor>
<capacities>
<li>PlasmaCut</li>
</capacities>
<power>80</power>
<cooldownTime>2</cooldownTime>
</li>
<li>
<label>edge</label>
<capacities>
<li>Cut</li>
</capacities>
<power>20</power>
<cooldownTime>1.0</cooldownTime>
</li>
</tools>
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<DamageDef>
<defName>PlasmaCut</defName>
<label>plasma</label>
<workerClass>DamageWorker_Cut</workerClass>
<externalViolence>true</externalViolence>
<armorCategory>Plasma_Heat</armorCategory>
<makesBlood>false</makesBlood>
<deathMessage>{0} has been cut to death.</deathMessage>
<hediff>Plasmaburn</hediff>
<hediffSkin>Plasmaburn</hediffSkin>
<hediffSolid>Plasmaburn</hediffSolid>
<impactSoundType>Slice</impactSoundType>
<cutExtraTargetsCurve>
<points>
<li>0, 0</li>
<li>0.6, 1</li>
<li>0.9, 2</li>
<li>1, 3</li>
</points>
</cutExtraTargetsCurve>
<cutCleaveBonus>1.4</cutCleaveBonus>
</DamageDef>
<HediffDef>
<defName>Plasmaburn</defName>
<label>burn</label>
<hediffClass>Hediff_Injury</hediffClass>
<tendable>true</tendable>
<displayWound>true</displayWound>
<comps>
<li Class="HediffCompProperties_TendDuration">
<labelTendedWell>bandaged</labelTendedWell>
<labelTendedWellInner>treated</labelTendedWellInner>
<labelSolidTendedWell>medicated</labelSolidTendedWell>
</li>
<li Class="HediffCompProperties_Infecter">
<infectionChance>0.05</infectionChance>
</li>
<li Class="HediffCompProperties_GetsPermanent">
<permanentLabel>burn scar</permanentLabel>
</li>
</comps>
<injuryProps>
<painPerSeverity>0.01875</painPerSeverity>
<averagePainPerSeverityPermanent>0.00625</averagePainPerSeverityPermanent>
<canMerge>true</canMerge>
<bleedRate>0.01</bleedRate>
<destroyedLabel>Sliced off</destroyedLabel>
<destroyedOutLabel>sliced out</destroyedOutLabel>
</injuryProps>
</HediffDef>
</Defs>
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ToolCapacityDef>
<defName>PlasmaCut</defName>
<label>plasma cut</label>
</ToolCapacityDef>
</Defs>
Did you forget the Maneuvers def? For your Plasma melee weapon?
I think it's required for making melee weapons with new attacks.
Here's the Slash Maneuver code from Edge melee weapons... That you have to copy first. Looking at the core files.
<ManeuverDef>
<defName>Slash</defName>
<requiredCapacity>Cut</requiredCapacity>
<verb>
<verbClass>Verb_MeleeAttackDamage</verbClass>
<meleeDamageDef>Cut</meleeDamageDef>
</verb>
<logEntryDef>MeleeAttack</logEntryDef>
<combatLogRulesHit>Maneuver_Slash_MeleeHit</combatLogRulesHit>
<combatLogRulesDeflect>Maneuver_Slash_MeleeDeflect</combatLogRulesDeflect>
<combatLogRulesMiss>Maneuver_Slash_MeleeMiss</combatLogRulesMiss>
<combatLogRulesDodge>Maneuver_Slash_MeleeDodge</combatLogRulesDodge>
</ManeuverDef>
Oh yes thats the problem.
Thank you now it works fine :)