Difference between revisions of "Category:Actor Values"

977 bytes added ,  18:50, 23 September 2011
Rewrote encumbrance section - a lot of it was outdated and embarrassingly incorrect
imported>JRoush
m (Added Note on bug in Damage modifier code)
imported>JRoush
(Rewrote encumbrance section - a lot of it was outdated and embarrassingly incorrect)
Line 66: Line 66:
=== Encumbrance ===
=== Encumbrance ===
Encumbrance is calculated and displayed differently from other actor values.  
Encumbrance is calculated and displayed differently from other actor values.  
* The '''Base''' factor is ignored entirelyIt is not used in calculation, and cannot be altered by the SetAV command or any magical meansIt is, however, still included in the return value of the GetBaseAV command, making this command effectively useless.
 
* The '''Calculated Base''' is the total encumbrance bonus from strengthUnlike most calculated factors, this applies to ''all'' actors, not just the player.
* The maximum encumbrance of an actor is calculated from their ''current'' strength:
* Maximum encumbrance and current encumbrance are calculated differently:
Maximum Encumbrance = (Current Strength) * [[fActorStrengthEncumbranceMult]]
 
* For NPCs and Creatures, [[GetBaseActorValue|GetBaseAV]] returns the total weight of items in the inventory of the actor's ''base form''.  This value is largely useless, since the inventory of an actor reference almost always differs from the base form.
  [[GetBaseActorValue|GetBaseAV]] Encumbrance = (Weight of items in base inventory)
 
* For the Player, [[GetBaseActorValue|GetBaseAV]] will also include the calculated maximum encumbrance.  This value is doubly useless; adding maximum encumbrance to default encumbrance makes no sense at all.  The player's default inventory has a total weight of 4, so:
[[GetBaseActorValue|GetBaseAV]] Encumbrance = (Player Strength) * fActorStrengthEncumbranceMult + 4
 
* For calculating the current encumbrance of an actor, the '''Base/Calculated Base''' factor is the total weight of items in the actor's current inventory (including effects from armor perks)The '''Max''', '''Script''', and '''Damage''' modifier are added to this as usual (except for display in the inventory menu; see below).
  [[GetActorValue|GetAV]]  = (Weight of items in inventory) + Max Modifier
                        + Script Modifier + Damage Modifier
 
* For the Inventory menu, where negative encumbrances would be confusing, the game generates slightly different values for maximum and current encumbrance.  This means that the encumbrance returned by GetAV will not always match what is shown in the menu.
  Modifier Sum = (Max Modifier + Script Modifier + Damage Modifier)
  Modifier Sum = (Max Modifier + Script Modifier + Damage Modifier)
  Maximum Encumbrance = Calculated Base ( - Modifier Sum, if Modifier Sum < 0)
  Displayed Maximum Encumbrance = Calculated Base ( - Modifier Sum, if Modifier Sum < 0)
  Current Encumbrance = Carried Weight ( + Modifier Sum, if Modifier Sum > 0)
  Displayed Current Encumbrance = Carried Weight ( + Modifier Sum, if Modifier Sum > 0)
:This means that the current encumbrance of an actor will never be less than their total carried weight, and the maximum encumbrance will never be less than the value calculated from their strength.
 
* However, the GetAV command still returns the encumbrance as it would be calculated from the default formula, e.g. as if the modifier sum were always > 0This means that GetAV will return the '''wrong''' value if the actor has enough effects that reduce encumbrance (e.g. Feather).
* Because the '''Base''' factor of encumbrance is calculated dynamically, [[SetActorValue|SetAV]] has no effect on player encumbrance.  Due to the way encumbrances are cached, however, it ''will'' temporarily affect high-process NPCs.  Any changes made with [[SetActorValue|SetAV]] will be discarded when the actor's cell is unloaded.


== List of Actor Values ==
== List of Actor Values ==
Anonymous user