Vixen
c7401864
csharp
public readonly record struct AttributeSchema

One stat's declaration: what it starts at, what it may not leave, and how it is rounded.

Read the guide page for this →

Remarks

The clamp is on the stat and not on the modifier, which is the arrangement that makes "health cannot go below zero" and "crit chance cannot exceed one" true no matter what applied them. A clamp per modifier would be a rule each caller has to remember, and the one that forgets is the one that ships.

Fields and properties (5)

  • public AttributeId Attribute

    Which stat.

  • public float Default

    What a freshly made AttributeSet has as its base.

  • public float Minimum

    The floor applied after the arithmetic.

  • public float Maximum

    The ceiling applied after the arithmetic.

  • public AttributeRounding Rounding

    What is done to the clamped result.

Methods (1)

  • public AttributeSchema(AttributeId Attribute, float Default = 0, float Minimum = -Infinity, float Maximum = Infinity, AttributeRounding Rounding = None)

    One stat's declaration: what it starts at, what it may not leave, and how it is rounded.

Used by (4)

  • CompositionTestsMmo.Realm.Tests
  • AttributeLayoutVixen.Gameplay
  • AttributeLayoutBuilderVixen.Gameplay
  • AttributeSetVixen.Gameplay