Skyrim

File information

Last updated

Original upload

Created by

Jackfuzz

Uploaded by

JackFuzz

Virus scan

Safe to use

Tags for this mod

About this mod

This is a script that can be attached to any actor to make that actor take more damage from magic and weapon attacks, this is ideal for companions who you want to take more damage.

example: Is Lydia taking all your kills? Add this script to her papyrus scripts for her actor and she'll take more damage during combat, which means yo

Permissions and credits
This is a script that can be attached to any actor to make that actor take more damage from magic and weapon attacks, this is ideal for companions who you want to take more damage.

Example: Is Lydia taking all your kills? Add this script to her papyrus scripts for her actor and she'll take more damage during combat, which means you need to attack WITH her instead of letting her go at it alone. You need access to the creation kit for this script.

This script works on ANY Actor under the Actor tab in the Creation Kit. There are some companions that you can add to your skyrim game as a mod, if you find that companion too overpowered you can use this script to make them weaker so the Dragonborn maintains combat dominance.

You can use this script anyway you want and modify it anyway you want. If you end up using it just let me know for which mod so I can use your mod as well in my game, thanks!

=======================================================================================
The script - Compile this script then attach to an actor under papayrus scripts in creation kit
=======================================================================================

Scriptname NPCActorWeaker extends Actor

event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack,
bool abBashAttack, bool abHitBlocked)

float enemyMageBaseHealth
float enemyBaseHealth
float enemyLevel
float NPCActorDamageResistance

;Get the Base Health of whichever enemy mage is hitting NPCActor and multiply it by 0.005 , mage enemies only
enemyMageBaseHealth = (akAggressor as Actor).GetBaseAV("Health") * 0.005 ; you can change this value to make magic do more or less damage

;Get the Base Health of whoever is hitting NPCActor with a weapon and multiply it by 0.25
;Example: A bandits health is 110, we multiple 110 by 0.25 and get 27.5
enemyBaseHealth = (akAggressor as Actor).GetBaseAV("Health") * 0.4 ; you can change this .4 value higher or lower if you want your actor to take more or less damage

;Get the Level of whoever is attacking NPCActor and multiple it by 1.3
;Note: Basically whoever attacks NPCActor adds their level as actual damage value multiplied by 1.3
;Example: I'm level 4, so multiple 4 by 1.5 resulting in 6
enemyLevel = (akAggressor as Actor).GetLevel() * 2.5

;Get NPCActor's armor rating by multiplying her damage resist by 0.12, because for each point of damageresist results in 0.12% damage reduction
;Then divide by 100 so we get a damage reduction percentage
;Example: NPCActor's DamageResist is -187 so we multiply that by 0.12 and then divide by 100 resulting in -0.2244 aka 22% damage Reduction
NPCActorDamageResistance = (self.GetAV("DamageResist") * 0.12) / 100

;if NPCActor isn't blocking then perform the damage increase modifier
if (abHitBlocked == 0)

;is the source of damage a weapon?
if (akSource.GetType() == 41)
;Let's take the adjusted values of enemyBaseHealth and enemyLevel to use as a means of causing extra damage to NPCActor
;add them together then subtract damage based on her damage resistance calculated from her armor rating
;Example based upon above values specific in notes above (27.5 + 6) - (-.21 * (27.5 + 6))
DamageActorValue("Health", (enemyBaseHealth + enemyLevel) - (NPCActorDamageResistance * (enemyBaseHealth + enemyLevel)))
endIf

;shout
if (akSource.GetType() == 119)
DamageActorValue("Health", enemyMageBaseHealth)
endIf

;magic
if (akSource.GetType() == 22)
DamageActorValue("Health", enemyMageBaseHealth)
endIf

endIf

endEvent