Difference between revisions of "Actor Value"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
imported>Qazaaq
Line 4: Line 4:
[[Category:Actor]]
[[Category:Actor]]
'''Papyrus:''' [[ActorValue Script]]
'''Papyrus:''' [[ActorValue Script]]
=Overview=
Actor Values are properties that exist on Actors and other Object References. They are accessed and altered using Papyrus script functions, in the Console, and used in various forms in the Creation Kit.
For a full list of Papyrus script functions involving Actor Values, see the [[ObjectReference Script|Object Reference]] documentaion.


[[File:Actor Value Editor.png]]
[[File:Actor Value Editor.png]]
Line 25: Line 30:
*'''Additional Info:'''
*'''Additional Info:'''


=Overview=
Actor Values are properties that exist on Actors and other Object References. They are accessed and altered using Papyrus script functions, in the Console, and used in various forms in the Creation Kit.


For a full list of Papyrus script functions involving Actor Values, see the [[ObjectReference Script|Object Reference]] documentaion.


==Hard-coded Actor Values==
==Hard-coded Actor Values==

Revision as of 23:47, 12 July 2016

Papyrus: ActorValue Script

Overview

Actor Values are properties that exist on Actors and other Object References. They are accessed and altered using Papyrus script functions, in the Console, and used in various forms in the Creation Kit.

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

Actor Value Editor.png

Editor Dialog

  • ID: The editor ID which is used by the Creation Kit.
  • Type:
  • In-Game Name: The name as it will appear in-game.
  • Abbreviation:
  • Default Value:
  • Description:
  • Flags
    • Minimum 1:
    • Minimum 10:
    • Minimum 100:
    • Multiply By 100:
    • Percentage:
    • God Mode Immune:
    • HARDCODED:
    • Damage Is Positive:
  • Additional Info:


Hard-coded Actor Values

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

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

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

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

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

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