Jump to content

Recommended Posts

Posted

I'm trying to remake the Fists of Steel perk. The perk is an ability, so I'm trying to partially remake the skill in Papyrus. The trouble I'm having is I cannot find a way to get the armour rating on the gauntlets. Any suggestions?

 

 

If anyone is interested I'm trying to make brawling more endgame viable without changing too much, a patch essentially. What I planned to do was use the players current Heavy Armor rating as a modifier (30 Heavy Armor = 30%), and then take that from your current armour rating on your gauntlets, adding that to your unarmoured damage. I think it will make unarmed viable without too strong. I might have to modify the percentage.

Posted (edited)
Maybe I am just stupid, but would that not give me the total armour rating for the player? I'm just trying to get the value of the gauntlets. Edited by KennEH
Posted

Just a guess, but maybe this could work:

 

 

Armor Gauntlets = Game.GetPlayer().GetWornForm(0x00000008) as Armor
int AR = Gauntlets.GetArmorRating()

(SKSE function)

Posted
Yeah I'm a little slow, I was confused with what GetWornForm actually did. Thanks for the help. Albeit a dumb question that I should've been able to get myself.
Posted

So after about a day of work, this is what I got. Not sure where I went wrong, but the script isn't working. I think I messed up the end event.

 

Scriptname FistsOfSteel extends Perk  
{Fist of Steel Perk Reamke}

Event Oninit()
; Heavy Armour for damage boost percentage
int HeAr = Game.GetPlayer().GetActorValue("HeavyArmor") as int

; Obtain the armor rating of the player currently equipped gauntlets
Armor Gauntlets = Game.GetPlayer().GetWornForm(0x00000008) as Armor
int AR = Gauntlets.GetArmorRating() as int

Float UD = game.getplayer().getav("UnarmedDamage")
EndEvent

; Equation to amplify damage
Float boost
Float Function Boost (int AR, int HeAr, Float UD)
return AR * (HeAr/100) + UD
EndFunction

; Replaces Unarmed Damage with new value
Event OnObjectEquipped(armor gauntlets)
if gauntlets as armor
	Game.GetPlayer().ModActorValue("UnarmedDamage", boost)
endif
EndEvent

Posted
Quick note: ModActorValue (or ModAV) is cumulative, if the player equips/un-equips/re-equips the boost will be doubled, and then subsequently trebled, quadrupled etc. as I can't see anything to remove the boost.
Posted
Thanks for the note. Would a function to reduce damage back to normal suffice, or is there a way to make a temp value?
Posted

The ony way to remove it AFAIK would be to reverse it on un-equip something like

 

Event OnObjectEquipped(armor gauntlets)
       if gauntlets as armor
               Game.GetPlayer().ModActorValue("UnarmedDamage", (0 - boost ))
       endif
EndEvent

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...