SetAV does not stick past saveload

Post » Thu Jun 21, 2012 6:41 am

In a quest script, I can call:

Game.GetPlayer().SetAV ("Magicka", 200)

And when the script runs, if I do player.getBaseAV Magicka from console, it returns 200, even after save/load.

But then when I call

Game.GetPlayer().SetAV ("MagickaRate", 0.01)

the new Actor Value takes effect for the current game session, but does not "stick" past save/load; if I immediately do player.getbaseav MagickaRate, I receive 0.01. But if I save and load, MagickaRate goes back to the default value (3.00).

I know I could use a hidden perk or somesuch to accomplish this, but I'm curious as to why one change sticks through save/load and another does not.
User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Wed Jun 20, 2012 11:47 pm

SetAV has never persisted past a single session. If you want a permanent change, you'll have to use ModAV instead.
User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Wed Jun 20, 2012 6:11 pm

Cool, another way to make an onload check :) .
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Wed Jun 20, 2012 11:33 pm

Please read my original post. SetAV persists just fine for Magicka (or health or stamina for that matter). Just not for MagickaRate.
User avatar
Abi Emily
 
Posts: 3435
Joined: Wed Aug 09, 2006 7:59 am

Post » Thu Jun 21, 2012 12:10 am

Other values do stick it seems. The below works with "MagickaRate", but not "Health".
Bool Function bGetGameLoaded(Actor akActor = None)	If akActor.GetActorValue("EnduranceCondition")		akActor.SetActorValue("EnduranceCondition", 0)		Return True	Else		Return False	EndIfEndFunction 

Values that don't stick:
  • Aggression
  • Assistance
  • BowSpeedBonus
  • BrainCondition
  • CarryWeight
  • Confidence
  • CritChance
  • DamageResist
  • EnduranceCondition
  • EquippedItemCharge
  • EquippedStaffCharge
  • HealRate
  • InventoryWeight
  • LeftAttackCondition
  • LeftMobilityCondition
  • MagickaRate
  • Mass
  • MeleeDamage
  • Mood
  • Morality
  • NormalWeaponsResist
  • PerceptionCondition
  • RightAttackCondition
  • RightMobilityCondition
  • SpeedMult
  • StaminaRate
  • UnarmedDamage
  • VoiceRate
Also of interest:
[04/24/2012 - 11:40:50PM] error: Actor value "NormalWeaponsResist" does not exist.[04/24/2012 - 11:40:51PM] error: Actor value "EquippedItemCharge" does not exist.[04/24/2012 - 11:40:51PM] error: Actor value "EquippedStaffCharge" does not exist.
User avatar
Kyra
 
Posts: 3365
Joined: Mon Jan 29, 2007 8:24 am

Post » Thu Jun 21, 2012 12:31 am

Probably means that some AVs are computed instead of stored -- explains everything.
Damn, the wiki is lacking... Looks like Justin already added some notes, nice.
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Thu Jun 21, 2012 2:36 am

Very curious. I resolved it by a workaround, but good to know.
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am


Return to V - Skyrim