Applying melee damage and cooldown to an item

Started by crusader2010, December 30, 2017, 03:09:36 PM

Previous topic - Next topic

crusader2010

Hello,

I would like to add melee damage and cooldown to a custom item (I'm basically trying to fix the following error:  https://ludeon.com/forums/index.php?topic=35678.msg388478#msg388478).

Can someone teach me how to do this properly in B18 (or what I'm missing)?

Thanks :)
My mod pack: {A13} Mod Mega Pack

jamaicancastle

The way damage is recorded for melee weapons was changed in B18 to allow them multiple types of attacks per item with different combat log text. You'll want to remove those two lines from the item's statBases and add a block at the end of the def like this:
    <tools>
      <li>
        <label>point</label>
        <capacities>
          <li>Scratch</li>
          <li>Stab</li>
        </capacities>
        <power>17</power>
        <cooldownTime>1.85</cooldownTime>
      </li>
      <li>
        <label>base</label>
        <capacities>
          <li>Blunt</li>
        </capacities>
        <power>8</power>
        <cooldownTime>1.85</cooldownTime>
      </li>
    </tools>

(This is from the core elephant tusk.) Power indicates how much damage it does, cooldown time is the cooldown, and the capacities list dictates what descriptions it can get in the combat log.

I think this replaces the A17 "verbs" block for melee weapons, or at least none of the core melee weapons has that block that I can see. (Ranged weapons have a verbs block for their shooting attack and a tools one for melee attacks like rifle butts and the like.)

crusader2010

Thank you very much! It seems to be working properly now :) (at least the error is gone).
My mod pack: {A13} Mod Mega Pack