Jump to content

Photo

Applying silver weapon effect when a ring is equipped

silverperk silver weapons apparel enchantments perks question

  • Please log in to reply
2 replies to this topic

#1
NationalSpearmint

NationalSpearmint

    Journeyman

  • Members
  • Pip
  • 29 posts

Hi all,

I've been trying to apply the "silver weapon effect" (fixed +20 damage to undead when using silver weapons) to a ring, so that when the ring is equipped weapons do +20 damage to undead. It looks like the way Silver weapons handle this is on first equipping a silver weapon, they add the SilverPerk to the holder, and this perk checks whether the held weapon has keyword WeapMaterialSilver - if it is, it checks whether the Target is a Werewolf, Vampire or Undead. If they are, it adds 20 onto Weapon damage. After equipping a silver weapon this perk is never removed, but the checks within the perk deal with the damage increase.

 

I've been able to get my Silver effect ring to behave similarly by duplicating the above setup - once the ring is equipped all weapons deal +20 damage to undead through the same method. However, as above, the perk is never disabled, so all weapons deal extra damage forever. The check for keyword WeapMaterialSilver in the above can only be done on Weapons, as far as I can tell, so I can't check whether the equipped ring has a given keyword. I can check against the player in the "Perk Owner" condition area - is there a Condition Function to check whether a player has an item with a given keyword equipped?

Otherwise, would a viable solution be to remove the Silver Effect Ring perk after unequipping the ring, and if so how would I go about doing this?

 

I've also tried looking into adding this as an enchantment, but I can't work out how to get a damage increase on weapon attacks from an enchantment on a ring. This would probably be a preferred method, since I want my Silver effect ring to be enchanted anyway and the details of the effect to show up on the enchantment information. Any advice would be much appreciated.

 

Thanks

National Spearmint



#2
Rasikko

Rasikko

    The Arbiter of Time

  • Members
  • PipPipPipPip
  • 1,146 posts

Use the condition function WornHasKeyword. Give your ring a unique keyword so that it's singled out by the function. When it's not worn, the perk is not applied.


Edited by Rasikko, 13 January 2018 - 05:46 AM.


#3
NationalSpearmint

NationalSpearmint

    Journeyman

  • Members
  • Pip
  • 29 posts

Thanks very much Rasikko, that works just as I wanted. I've uploaded the mod onto Nexus.







Also tagged with one or more of these keywords: silverperk, silver weapons, apparel, enchantments, perks, question

Page loaded in: 0.998 seconds