ModAV DamageThreshold

Post » Fri Apr 30, 2010 4:19 am

How reliable/accurate is it?

Cause I'm trying to use it to modify a setting of a creature, but when i use to console to get it's DamageThreshold i get values that don't make sense.

When i spawn the creature it has 0 DT, i cast an effect on the creature, which executes and should modify it's DT. While it does, it does not give me the right values.

Here is the relevant part of the code:
float TurretDTfloat Debug1begin ScriptEffectStart		Set TurretDT to aaaTEControlQ.BaseDTAssault + aaaTETurretLevelingQ.LevelAssault/2		Set Debug1 to GetAV DamageThreshold		PrintC "Step 1 DT: DT = %.2f - TurretDT = %.2f" Debug1 TurretDT		if GetAV DamageThreshold != TurretDT			Set TurretDT to (aaaTEControlQ.BaseDTAssault + aaaTETurretLevelingQ.LevelAssault/2) -GetAV DamageThreshold			PrintC "Step 2 DT: TurretDT = %.2f" TurretDT		endif	ModAV DamageThreshold TurretDTend

Basicly it should add 1 DT for every 2 levels the creature gets.

What happens is this. I spawn the creature, it is level 1 and it sets it's DT to 4. But that's what's odd. It should been 2, though i could understand 3 even, but 4?
The PrintC is reporting something differently. It Gives me "Step 1 DT: DT = 0.00 - TurretDT = 2.50", so the ModAV should set DT to 3, no?

(TurretDT = 2 + 1/2) This sets TurretDT to 2,5 since it's a float value, (and its what PrintC is reporting as well) then if it modifies the default DT of 0 of the turret, how can it end up as 4?

Then when the turret increases it's level and gets level 2, another strange things happens. It sets it's DT from 4 to 2.

Long story, but i was wondering if i was doing something wrong, or if DT behaves differently then what i expect?

Edit - These values I'm Getting:
Level 1:
PrintC: DT = 0.00 - TurretDT = 2.50
GetAV DamageThreshold: 4
Level 2:
PrintC: DT = 4.00 - TurretDT = 3.00
GetAV DamageThreshold: 2
Level 3:
PrintC: DT = 2.00 - TurretDT = 3.50
GetAV DamageThreshold: 4
Level 4:
PrintC: DT = 4.00 - TurretDT = 4.00
GetAV DamageThreshold: 12
Level 5:
PrintC: DT = 12.00 - TurretDT = 4.50
GetAV DamageThreshold: -2
Level 5:
PrintC: DT = -2.00 - TurretDT = 5.00
GetAV DamageThreshold: 12
User avatar
remi lasisi
 
Posts: 3307
Joined: Sun Jul 02, 2006 2:26 pm

Post » Fri Apr 30, 2010 11:47 am

There is a known bug that DT added through effects/direct modification of the actor value are doubled. This is fixed in the next patch.
User avatar
Danii Brown
 
Posts: 3337
Joined: Tue Aug 22, 2006 7:13 am

Post » Fri Apr 30, 2010 2:55 pm

Ah right. That would explain the eratic behaviour. Thanks. I'll have to wait for the next patch then before i can use it.. shame.
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm


Return to Fallout: New Vegas