Difference between revisions of "User:JRoush"

Jump to navigation Jump to search
4,092 bytes removed ,  17:53, 20 August 2010
imported>JRoush
imported>JRoush
Line 21: Line 21:
The GetCursorPos function is a bit dodgy.  Returned positions are not consistent, and seem to depend on integrated movement history.  This, combined with the lack of a function to get screen resolution, makes it impractical for use in menus (specifically, I couldn't use it to script in a custom slider bar).
The GetCursorPos function is a bit dodgy.  Returned positions are not consistent, and seem to depend on integrated movement history.  This, combined with the lack of a function to get screen resolution, makes it impractical for use in menus (specifically, I couldn't use it to script in a custom slider bar).


== General Actor Value Mechanics ==
== Detection ==
There are six factors that contribute to an Actor Value:
{|border="1" cellpadding="5" cellspacing="0"  
{|border="1" cellpadding="5" cellspacing="0"  
|-
|-
! style="background:#efefef;" | <center> Factor </center>  
! style="background:#efefef;" | <center> Factor </center>  
! style="background:#efefef;" | <center> Description </center>  
! style="background:#efefef;" | <center> Shorthand </center>
! style="background:#efefef;" | <center> Value </center>
|-
|-
| <center> '''Base''' </center>
| <center> Max Detection Distance </center>
| The AV value from the Actor's ''base form'' - all instances of the actor share this value (e.g. all guards share the same Base Health).  This factor is set by the designer in the CS.  It is modified in-game by the [[SetActorValue|SetAV]] console+script commands, skill & attribute level increases, and certain Ability effects (see notes).
| <center> maxDist </center>
| [[fSneakMaxDistance]] ( * [[fSneakExteriorDistanceMult]], for exterior cells)
|-
|-
| <center> '''Calculated Base''' </center>
| <center> Distance Factor </center>
| The contribution to an AV from ''other'' AVs and game settings.  For example, the Calculated Base for the player's [[Health]] is [[fPCBaseHealthMult]] * [[Endurance]].  This factor generally used ''only for the player character'' - NPC and Creature health, to use the same example, do ''not'' depend on their endurance.
| <center> distmult </center>
| 1 - (distance between detector and target) / maxDist
|-
|-
| <center> '''Calculated Multiplier''' </center>
| <center> Movement Bonus </center>
| A multiplier to the AV from ''other'' AVs and game settings.  This factor is almost always 1.0; the exception is the [[MagickaMultiplier]] for the player character.  
| <center> moving </center>
|
[[fSneakBootWeightBase]] + [[fSneakBootWeightMult]] * (target boot weight) if target is moving
0.0 if target is stationary
|-
|-
| <center> '''Max Modifier''' </center>
| <center> In-Combat Bonus </center>
| For Actors with middle process or higher.  This factor is modified by 'recoverable' effects such as Fortify, Drain, Feather.
| <center> combat </center>
| [[fSneakTargetInCombatBonus]] if target is in combat
0.0 otherwise
|-
|-
| <center> '''Offset Modifier''' </center>
| <center> Running Factor </center>
| For all Actors.  This factor is doesn't seem to be used by the combat or magic systems.  It is modified only by the [[ModActorValue|ModAV]] and [[ForceActorValue|ForceAV]] ''script'' commands (''not'' the console versions).
| <center> running </center>
| [[fSneakRunningMult]] if target is running
1.0 otherwise
|-
|-
| <center> '''Damage Modifier''' </center>
| <center> Line-of-Sight Sound Factor </center>
| For Actors with low process or higher. This factor is modified by the [[ModActorValue|ModAV]] and [[ForceActorValue|ForceAV]] ''console'' commands, by direct damage from combat, falling, lava, etc., and by 'nonrecoverable' effects like Damage & Restore.  It is intended only for '''negative''' values; any change that would increase it above zero sets it to zero instead.
| <center> losSound </center>
| [[fSneakSoundLosMult]] if detector has line of sight to target
1.0 otherwise
|-
| <center> Line-of-Sight Light Factor </center>
| <center> losLight </center>
| 1.0 if detector has line of sight to target
0.0 otherwise
|-
| <center> Target Attack Bonus </center>
| <center> attack </center>
| [[fSneakTargetAttackBonus]] if target attacked detector
0.0 otherwise
|-
| <center> Swimming Light Factor </center>
| <center> swimLight </center>
| [[fSneakSwimmingLightMult]] if target is under water
1.0 otherwise
|-
|-
|}
|}
There are three different 'versions' of an Actor Value that play a role in Oblivion:
Calculated Base Value  =  (Base + Calculated Base) * (Calculated Multiplier)
    Maximum Value      =  Calculated Base Value + Max Modifier
    Current Value      =  Maximum Value + Offset Modifier + Damage Modifier
{|border="1" cellpadding="5" cellspacing="0"  
{|border="1" cellpadding="5" cellspacing="0"  
|-
|-
! style="background:#efefef;" | <center> Value </center>  
! style="background:#efefef;" | <center> Factor </center>  
! style="background:#efefef;" | <center> Used For </center>
! style="background:#efefef;" | <center> Value </center>
|-
| <center> '''Calculated Base Value''' </center>
| Returned by the [[GetBaseActorValue|GetBaseAV]] console+script commands.  This value is used to check mastery level in a skill, and (for Alchemy) to compute player-created potion strength.
|-
| <center> '''Maximum Value''' </center>
| The upper limit shown in the menu and HUD for the player's Health, Magicka, and Fatigue.
|-
|-
| <center> '''Current Value''' </center>
| <center> Sound Factor </center>
| Returned by the [[GetActorValue|GetAV]] console+script commands.  This is the value used for the vast majority of AV checks.  It is the value shown in the menu and HUD for the player's stats.
| [[fSneakSoundsMult]] * losSound *
|-
|-
|}
|}
 
=== Notes ===
* These formulas do not apply to '''Fame,Infamy,Bounty,or Encumbrance'''.  These AVs are calculated differently, and stored differently as well.
* When player stats are displayed in the menu, they are shown as <font color="Green">green</font> if the Current value is greater than the Calculated Base value, <font color="Red">red</font> if the Current value is less than the CBV, and <font color="Blue">blue</font> if the two are equal.  The exception is the players Health, Magicka, and Fatigue, where the comparison is between the Maximum value and the CBV.
* Since the Offset modifier is not affected by ordinary damage or magic, changes to it cannot be undone by restoration spells or chapel healing, etc.
* The Damage modifier is always negative or zero, but the Offset modifier can be positive, so it can be used to make the Current value greater than the Maximum value.  This isn't seen in game simply because nothing ever uses the Offset modifier.
* For (1) 'recoverable' effects from (2) Ability-type spells applied on the (3) player (and only the player), the ''Base'' factor is modified instead of the Max factor.  This is why benefits from birthsign and certain quest rewards (like the Skeleton Key) can actually alter the players skill mastery level.
=== Encumbrance ===
Encumbrance is calculated and displayed differently from other actor values. 
* The '''Base''' factor is ignored entirely.  It is not used in calculation, and cannot be altered by the SetAV command or any magical means.  It 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 strength.  Unlike most calculated factors, this applies to ''all'' actors, not just the player.
* The '''Maximum Value''' and '''Current Value''' are calculated differently:
Modifier Sum = (Max Modifier + Offset Modifier + Damage Modifier)
if (Modifier Sum < 0) :
Maximum Value = Calculated Base - Modifier Sum
Current Value = Carried Weight
if (Modifier Sum > 0) :
Maximum Value = Calculated Base
Current Value = Carried Weight + Modifier Sum
For this reason, 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.
* The GetAV command does not return the Current Value, but rather the sum of carried weight and all modifiers, ''even if the sum of the modifiers is negative'':
  GetAV Return Value = Carried Weight + Modifier Sum
This means that GetAV will return the '''wrong''' value if the actor is currently subject to enough effects that reduce encumbrance (e.g. Feather).
Anonymous user

Navigation menu