The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

General help and technical troubleshooting. Ask for help here if you can't find an answer in the FAQ.
Post Reply
GalenKnight56
Posts: 33
Joined: Tue Oct 09, 2018 1:21 am

Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by GalenKnight56 » Sun May 22, 2022 1:08 am

I noticed when purchasing the Sub-Dermal Armor implant from Dr. Usanagi or taking the Toughness perk on level up, my character's damage threshold does not increase at all. I checked both in the Pip-Boy and by using the command "player.getav damagethreshold" before and after taking those perks and my DT did not change at all. I ended up fixing this myself by copying over the changes that regular YUP makes to those perks using xEdit. In short, I added ability entries to both of those perks so that the actual "Increased Damage Threshold" effect would actually be applied to my character. After doing that, my character's DT increased as expected from both of those perks. Is there a more proper fix for this issue?

User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by RoyBatty » Sun May 22, 2022 7:39 pm

Yes they do, you can't always see perk modifiers in the pipboy depending on what UI mod you use. If you use DarnUI it doesn't show for some reason, need to fix this.

Perk modifiers also do not apply to the actor value, they are modifiers. So you're just giving yourself double the bonus. The YUP change is wrong.
Image

GalenKnight56
Posts: 33
Joined: Tue Oct 09, 2018 1:21 am

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by GalenKnight56 » Mon May 23, 2022 4:44 am

I am using Vanilla UI Plus, so presumably there should be no issues there. So you're saying that when I used the console command "player.getav damagethreshold", I was not viewing the proper variable or command? How do I properly check to make sure the DT bonuses are actually being applied to my character?

User avatar
Risewild
Posts: 3219
Joined: Mon Oct 01, 2012 9:14 am

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by Risewild » Mon May 23, 2022 6:07 am

IIRC Vanilla UI+ also doesn't display those values. At least it didn't use to a few months ago. I don't use it so I have no idea if it was ever implemented after that or not.

About using the console command "player.getav damagethreshold", that only shows the actor values, not the value modifiers.
A way of explaining this very easy is to remember that modifiers are placed "on top" of the actor values.

I don't know if there's any console command that will show the total of values + modifiers, but I don't keep up to date on all the new NVSE plugins and new stuff.
Signature:

User avatar
Bullfrog
Posts: 146
Joined: Mon Jun 13, 2022 3:01 pm

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by Bullfrog » Wed Jun 15, 2022 5:24 pm

I'm currently trying to solve a similar issue with oHud. oHud also uses "Player.Getav DamageThreshold" to figure out the current value for Damage Threshold. This provides the base value, but misses the Toughness perk and therefore the Pipboy shows the higher correct value and the UI shows the lower incorrect value.

I thought I could use the JIP LN function "Player.GetActorValueModifier DamageThreshold", but that returns 0. The way Toughness is implemented doesn't seem to be covered by this function.
I could hard code the perk in oHud, but that would only mask a part of the problem.

User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by RoyBatty » Wed Jun 22, 2022 8:59 am

You need to use GetPerkModifier.

Don't forget to floor the AV before adding the modifier.
Image

User avatar
Bullfrog
Posts: 146
Joined: Mon Jun 13, 2022 3:01 pm

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by Bullfrog » Wed Jun 22, 2022 9:50 am

Thank you. I tried to use GetPerkModifier, but it doesn't show the proper value either. According to the GECK Wiki I need to use 56 ("Modify Damage Threshold (defender)") as the entry point. At least that is what the perk uses.

Code:

Code: Select all

let dt := Player.Getav DamageThreshold
printc "Base DT = %.2f" dt
let dt := Player.GetPerkModifier 56 dt
printc "Modified DT = %.2f" dt
Output:

Code: Select all

[test.esp] Base DT = 19.00
[test.esp] Modified DT = 19.00
I have rank 2 of the Toughness perk. The Pipboy correctly displays a DT value of 25.

User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by RoyBatty » Thu Jun 23, 2022 9:17 pm

Code: Select all

		set fTemp to player.GetAV DamageThreshold
		set fTemp to Floor fTemp
		set rRef to player.GetEquippedObject 5
		if rRef == 0
			set rRef to Fists
		endif
		set fTemp2 to player.GetPerkModifier 56 fTemp player rRef
		if rRef2
			set fTemp2 to player.GetPerkModifier 56 fTemp rRef2 rRef
		endif
Image

User avatar
Bullfrog
Posts: 146
Joined: Mon Jun 13, 2022 3:01 pm

Re: Sub-Dermal Armor Implant and Toughness perk don't increase damage threshold

Post by Bullfrog » Fri Jun 24, 2022 7:50 am

Fantastic! I didn't know that this particular entry point requires additional parameters. Now it works. Thank you.

I have shortened the code a little:

Code: Select all

let dt := Player.Getav DamageThreshold
let dt := Player.GetPerkModifier 56 dt Player Fists

Post Reply