Class NPCAttribute
Represents an attribute for an NPC, with options for scaling, randomization, and value range. Used to define how an NPC's attribute is calculated and applied from a template.
[Serializable]
public class NPCAttribute
- Inheritance
-
NPCAttribute
- Inherited Members
Constructors
NPCAttribute(bool, bool, int, int, CharacterAttributeTemplate)
Constructs a new NPCAttribute with the specified scaling, randomization, range, and template.
public NPCAttribute(bool isScalar, bool isRandom, int min, int max, CharacterAttributeTemplate template)
Parameters
isScalarboolWhether the value is scaled from the template.
isRandomboolWhether the value is randomized between min and max.
minintMinimum value for the attribute.
maxintMaximum value for the attribute.
templateCharacterAttributeTemplateThe attribute template to use.
Fields
IsRandom
If true, the attribute value will be randomly chosen within the min/max range; otherwise, the maximum value is used.
[Tooltip("If true the value will be within the min/max range. Otherwise the maximum value is used.")]
public bool IsRandom
Field Value
IsScalar
If true, the attribute value is scaled from the standard attribute value; otherwise, it is simply added.
[Tooltip("Determines if the attribute value is scaled from the standard attribute value or simply added on.")]
public bool IsScalar
Field Value
Max
The maximum value for the attribute.
public int Max
Field Value
Min
The minimum value for the attribute (used if IsRandom is true).
public int Min
Field Value
Template
The template that defines the type and base value of this attribute.
public CharacterAttributeTemplate Template