Talk:SetActorValue

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

It actually seems to me that SetActorValue really acts as a ModBaseActorValue function. It doesn't seem to set the base actor value, but rather it seems to just modify it. SBKing

No, it definately sets it. ("Set" as in setting to a certain value as opposed to "modify" (adding a certain value to the current value) Note that the Actor Value Functions work differently in the console than they do in scripts.--JOG 09:52, 14 June 2006 (EDT)

SetActorValue does not seem to let you set (at least certain stats) below 0. So far I have only tested with strength. For instance SetActorValue Strength -1000 was returning 24?! ForceActorValue and ModActorValue however both seem to let you set this stat to negative values.

Darknel 19:38, 29 August 2006 (EDT)

Jep. A base-value can't go below 0... --JOG 04:43, 30 August 2006 (EDT)

Weird Negatives[edit source]

GuidoBot 04:51, 12 October 2006 (EDT): I was trying to use SetAV in the way described on the WIKI. From a script player.SetAV X actually actually performs the equivalent to player.ModBaseAV X. That is X if +ve. If X is -ve then the result is equivalent to player.SetBaseAV 65536-X (i.e. the result is > 65536)! I also tried using a variable that was an int rather than a short for the -ve value. No difference. I also tried setting the value to 65536+X (X<0) and this gave the exactly same value (i.e. as X>0)! Very strange behavior. Not only that but my base health value also got changed by +256. I think what could be happening is that the command takes an unsigned short as an argument but is applying this to an int in memory? I'm not sure why my base Health stat also got changed but it might have been when I tested using the int variable (?).

Dragoon Wraith TALK 05:15, 12 October 2006 (EDT): Why are you setting a stat to a negative value?
GuidoBot Only because SetAV appeared to be doing a MOD rather than a SET when applied to the player. The whole thing I was trying to accomplish was to change the way magicka and health are recovered when you sleep.
To summerize what I said above, player.SetAV X does appear to perform a player.ModBaseAV X for X >= 0, but gives unexpected results if X < 0.