Table of Contents

Class NPCAttribute

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

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

isScalar bool

Whether the value is scaled from the template.

isRandom bool

Whether the value is randomized between min and max.

min int

Minimum value for the attribute.

max int

Maximum value for the attribute.

template CharacterAttributeTemplate

The 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

bool

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

bool

Max

The maximum value for the attribute.

public int Max

Field Value

int

Min

The minimum value for the attribute (used if IsRandom is true).

public int Min

Field Value

int

Template

The template that defines the type and base value of this attribute.

public CharacterAttributeTemplate Template

Field Value

CharacterAttributeTemplate