AHollowingSoul Posted July 13, 2021 Share Posted July 13, 2021 ----- The Problem -----In Fallout 4, damage resistance works something like this: Damage Reduction = 1 - (Damage * 0.15 / DamageResistance)0.365 ... But I don't like the effects this has on gameplay/balance (see: PSA: Damage Resistance) and would like to change it so that X amount of damage resistance provides the same % amount of damage reduction across all attacks. Whether the attack deals 5 damage or 500, X damage resistance should decrease it by Y %. Instead, it'd work something like this: Damage Reduction = (DamageResistance / DamageResistance + 100) From my understanding however, this formula is hardcoded and cannot be changed.----- The Solution? -----The only solution I could come up with is nullifying the original damage reduction formula, and then adding my own on top of it:If I modify the 0.15 multiplier to 0, then the default damage reduction should always be 0.01 (as 0 divided and multiplied by anything is always 0), so that takes care of removing the old formula... but I'm not sure how to go about adding my own.Would this be done through a universal and hidden perk applied to all actors? How would I go about doing that, and how would I make it calculate damage reduction for something "on hit"? - Any help is greatly appreciated, and thank you in advance! Link to comment Share on other sites More sharing options...
LarannKiar Posted July 13, 2021 Share Posted July 13, 2021 Since it's hardcoded, an F4SE would be needed. Attaching a hidden perk to all actors is not really a good idea. Link to comment Share on other sites More sharing options...
AHollowingSoul Posted July 13, 2021 Author Share Posted July 13, 2021 (edited) Since it's hardcoded, an F4SE would be needed. Attaching a hidden perk to all actors is not really a good idea.I see. Could you elaborate on that? Would I be able to change the hard-coded formula with F4SE or would I somehow use F4SE to make a custom on-hit event? Edit: If the second option, I'm still not entirely sure how to go about doing that... In the meantime I'll continue looking at f4se tutorials on youtube and such :) Edited July 13, 2021 by AHollowingSoul Link to comment Share on other sites More sharing options...
LarannKiar Posted July 13, 2021 Share Posted July 13, 2021 As far as I know, F4SE plugins are mostly written in C++. These plugins require F4SE because F4SE makes it possible for them to be loaded into the game. But you don't need F4SE to use the OnHit event in a script. Link to comment Share on other sites More sharing options...
AHollowingSoul Posted July 13, 2021 Author Share Posted July 13, 2021 As far as I know, F4SE plugins are mostly written in C++. These plugins require F4SE because F4SE makes it possible for them to be loaded into the game. But you don't need F4SE to use the OnHit event in a script.That makes sense. So you're saying I should make a papyrus script with the OnHit event in it, and then I'd be able to modify incoming damage and such before its applied to the player? Link to comment Share on other sites More sharing options...
LarannKiar Posted July 13, 2021 Share Posted July 13, 2021 You can change incoming damage by scripts, but you don't have to create such mod. See the mod SKK Dynamic Damage Manager. Link to comment Share on other sites More sharing options...
AHollowingSoul Posted July 13, 2021 Author Share Posted July 13, 2021 You can change incoming damage by scripts, but you don't have to create such mod. See the mod SKK Dynamic Damage Manager.This is not what I'm looking for :ermm: I'm not looking to change the damage multiplier of stuff, but rather the way damage resistance is calculated. See the links I posted initially Link to comment Share on other sites More sharing options...
LarannKiar Posted July 13, 2021 Share Posted July 13, 2021 Unfortunately, the formula of the damage resistance is fully hardcoded so it can't be modified by papyrus scripts. Without an F4SE plugin, you can only change the values of the Game Settings. Link to comment Share on other sites More sharing options...
AHollowingSoul Posted July 13, 2021 Author Share Posted July 13, 2021 Unfortunately, the formula of the damage resistance is fully hardcoded so it can't be modified by papyrus scripts. Without an F4SE plugin, you can only change the values of the Game Settings.Yes! We figured that out already :confused: I can negate the base damage resistance formula by changing the 0.15 multiplier to 0 in game settings, but I still need to add my own damage resistance formula, and am not sure how to go about doing that. If a custom OnHit event call would let me modify damage taken before it's applied then that should work, but I'm not sure if that's possible or how I'd go about writing such a script. Hopefully that makes more sense :happy: Link to comment Share on other sites More sharing options...
AHollowingSoul Posted July 13, 2021 Author Share Posted July 13, 2021 I found this from here:-Scriptname SKK_476UtilityQuestScript extends QuestObjectReference Property pPlayerRef Auto Const Mandatory;*********************************************************Event OnQuestInit()RegisterForHitEvent(pPlayerRef)EndEvent;*********************************************************Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial)If akTarget == pPlayerRefDebug.Trace ("SKK_476UtilityQuestScript.ONHIT,Target," + akTarget + ",Aggressor," + akAggressor + ",ActorBase," + (akAggressor as Actor).GetActorBase() + ",Weapon," + akSource + ",Range," + akAggressor.GetDistance(akTarget) as Int )RegisterForHitEvent(pPlayerRef)EndifEndEvent;*********************************************************Event OnQuestShutdown()UnregisterForAllEvents()EndEvent;*********************************************************-But in all honesty I still have no idea how I'd turn this into a damage reduction script, or why it's referenced to "Quest" Link to comment Share on other sites More sharing options...
Recommended Posts