Jump to content

WeaponSpeedMult bug problem


tg08096

Recommended Posts

I am posting this here because I got no luck in mod trobleshooting.

 

Basically, I am trying to modify the WeaponSpeedMult actor value to produce an increased attack speed effect. The base actor value is 1, so any modification made has to be done as a decimal, i.e, .25 for 25% increase. The problem is that if you open the console and chech the AV, it is displayed as 0. If I produce an effect that increases it by .25, the AV becomes 1.25. If I stack two effects that modify WeaponSpeedMult, the result looks like this:

 

WeaponSpeedMult is 0

 

Add .25

 

WeaponSpeedMult is 1.25

 

Add .25

 

WeaponSpeedMult is 2.5

 

What it does if first set the AV correctly to 1, adds .25, then adds 1.25, instead of just adding .25 to 1 - and then doing it again.

 

I don't know the best way to fix this, but if I SetAVWeaponSpeedMult 1 in the console before I do anything, the effects all work properly.

 

My instinct is to run a script when the mod loads that will set the av to 1, but I fear this may cause problems. More importantly, I don't know how to make such a script.

 

Any thoughts/ideas/help? Thank you very much in advance.

Link to comment
Share on other sites

I'll just go ahead and assume you're using papyrus somewhere to mod the actor value... I know you mentioned effects, but I've only barely touched on that part of the CK myself.

 

This snippet will probably help point you in the right direction though... you'd want this to execute whenever your effect is applied, there are probably fragments somewhere you could put it into (changing pActorRef to whatever the particular script fragment provides for the target or whatever... maybe akTarget or some other equally hard to guess variable.)

 

(assuming pActorRef is the actor in question)

 

if pActorRef.GetAV("WeaponSpeedMult") == 0.0
   pActorRef.SetAV("WeaponSpeedMult",1.0)
endif

 

 

this would need to be executed before your effect actually applies the +.25 or whatever, to ensure that the AV won't go crazy.

Edited by Vamyan
Link to comment
Share on other sites

  • Recently Browsing   0 members

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