Actor Value

From the Fallout4 CreationKit Wiki
(Redirected from Actor Values)
Jump to navigation Jump to search

Type: AVIF
Papyrus: ActorValue Script

Actor Values are properties that exist on Actors and other ObjectReferences. They are accessed and altered using Papyrus script functions, in the Console, and used in various forms in the Creation Kit. The Actor Value object is found within the Object Window under the Miscellaneous Category.

Editor Dialog[edit | edit source]

Actor Value Editor.png
  • ID: The ID, also referred to as Editor ID, is used by the Creation Kit to uniquely identify this record within a Data File.
  • Type
    • AI ATTRIBUTE:
    • CONDITION:
    • DERIVED ATTRIBUTE:
    • INT VALUE:
    • RESISTANCE:
    • RESOURCE:
    • SKILL:
    • SPECIAL (ATTRIBUTE):
    • VARIABLE:
  • In-Game Name: The name as it will appear in-game.
  • Abbreviation: The abbreviated name as it will appear in-game.
  • Default Value: The default value of this Actor Value.
    • Derived: The value is read only as its value is derived from other values.
  • Description: The object's description as it will appear within user interface menus.
  • Flags
    • Minimum 1:
    • Minimum 10:
    • Minimum 100:
    • Multiply By 100:
    • Percentage:
    • God Mode Immune:
    • HARDCODED:
    • Damage Is Positive:
  • Additional Info:
    • Enumeration: The value represents an enumeration of values.

Hard-coded Actor Values[edit | edit source]

There are a number of Actor Values that are defined in the code. This is because the code needs to be able to access them directly. In-game information about these Actor Values can be modified in the Creation Kit. You can see a list of Actor Values in the "Misc" section of the Object Window. There is a column that will show the word "HARDCODED" to let you know which Actor Values are hard-coded.

Hard-coded Actor Values generally include actor stats, such as Health, Action Points, limb conditions, SPECIALs, etc.

Editor-Defined Actor Values[edit | edit source]

You can use the Creation Kit to create new Actor Values. Just right click in the Actor Value list in the Object Window and choose New or Duplicate, as with any other type of form. You give the Actor Value a unique name, which is its form ID, and have the option of specifying a default value for the Actor Value (this is normally 0.0). Once you've added a new Actor Value, it can be used elsewhere in the Creation Kit, in Papyrus or via the Console.

Actor Values on Actors and other Object References[edit | edit source]

Most Actor Values are primarily used on Actors, but that's not required. If an Actor Value uses a formula to calculate the base value, the formula won't be used on a non-actor Object Reference. Instead, a base value of 0.0 will be used.

Actor Value functions in Papyrus[edit | edit source]

For a full list of Papyrus script functions involving Actor Values, see the Object Reference documentation.

On Object References:

  • Function DamageValue(ActorValue akAV, float afDamage)
    • Damages the given actor value
  • float Function GetBaseValue(ActorValue akAV)
    • Gets the base value of the specified actor value - returns 0 and logs an error if the value is unknown
  • float Function GetValue(ActorValue akAV)
    • Gets the specified actor value - returns 0 and logs an error if the value is unknown
  • float Function GetValuePercentage(ActorValue akAV)
    • Gets the specified actor value as a percentage of its max value - from 0 to 1
  • Function ModValue(ActorValue akAV, float afAmount)
    • Modifies the specified actor value
  • Function RestoreValue(ActorValue akAV, float afAmount)
    • Restores damage done to the actor value(up to 0 damage)
  • Function SetValue(ActorValue akAV, float afValue)
    • Sets the specified actor value

In the Game Script:

  • ActorValue Function GetAggressionAV()
    • Get the Aggression Actor Value
  • ActorValue Function GetAgilityAV()
    • Get the Agility Actor Value
  • ActorValue Function GetCharismaAV()
    • Get the Charisma Actor Value
  • ActorValue Function GetConfidenceAV()
    • Get the Confidence Actor Value
  • ActorValue Function GetEnduranceAV() native global
    • Get the Endurance Actor Value
  • ActorValue Function GetHealthAV()
    • Get the Health Actor Value
  • ActorValue Function GetIntelligenceAV()
    • Get the Intelligence Actor Value
  • ActorValue Function GetLuckAV()
    • Get the Luck Actor Value
  • ActorValue Function GetPerceptionAV()
    • Get the Perception Actor Value
  • ActorValue Function GetSuspiciousAV()
    • Get the Suspicious Actor Value
  • ActorValue Function GetStrengthAV() native global
    • Get the Strength Actor Value

Actor Value functions in the Console and Batch Files[edit | edit source]

These all work on the selected reference, or you can preface the function with "Reference.":

  • GetAV ACTORVALUE -- Returns the value of ACTORVALUE on the Reference
  • SetAV ACTORVALUE VALUE -- Sets the value of ACTORVALUE on the reference to VALUE
  • ModAV ACTORVALUE VALUE -- Modifies the value of ACTORVALUE on the reference by VALUE
  • DamageAV ACTORVALUE VALUE -- Damages the value of ACTORVALUE on the reference by VALUE
  • RestoreAV ACTORVALUE VALUE -- Restores VALUE points of damage done to ACTORVALUE on the Reference
  • GetBaseAV ACTORVALUE -- Returns the base value of ACTORVALUE on the Reference
  • GetValuePercent ACTORVALUE -- Returns the current value of ACTORVALUE on the Reference as a percentage of its max value, from 0-1.

Reserved use Actor Values[edit | edit source]

The actor values in this table are deprecated. Papyrus scripts using them should instead use new Actor Values created in the Creation Kit.

Variable Reserved Use
Variable01
Variable02
Variable03
Variable04
  • Used to turn on forcegreeting in ForceGreetPatrolConditional package template.
Variable05
Variable06
  • Used for LD combat scripting / package control.
Variable07
Variable08
Variable09
Variable10
  • Used to turn off RE "offer to join workshop" dialogue after player says no - temporary NPCs so this shouldn't be bothered by another specific use.

See Also[edit | edit source]