Vixen
c7401864
csharp
public sealed class AttributeLayout

The compiled stat table: names resolved to slots, slots to schemas.

Read the guide page for this →

Remarks

Shared and immutable, the way BlackboardLayout is, and for the same reason: ten thousand characters with the same stats should hold ten thousand small arrays and one table, not ten thousand dictionaries of names.

A slot is an index into AttributeSet's arrays. It is layout-local and never persisted or sent — AttributeId is the durable name, exactly as Symbol is for a tag.

Fields and properties (4)

  • public static AttributeLayout Empty

    A layout with no stats in it.

  • public int Count

    How many stats it declares.

  • public ReadOnlySpan<AttributeSchema> Schemas

    The declarations, in the order they were added.

  • public ref readonly AttributeSchema this[int slot]

    The declaration in a slot.

Methods (2)

  • public int SlotOf(AttributeId attribute)

    Where a stat lives in an AttributeSet's arrays.

  • public bool Declares(AttributeId attribute)

    Whether the layout declares a stat.

Used by (16)

  • CompositionTestsMmo.Realm.Tests
  • AttributeLayoutBuilderVixen.Gameplay
  • AttributeLayoutTestsVixen.Gameplay.Tests
  • AttributeSetVixen.Gameplay
  • AttributeSetTestsVixen.Gameplay.Tests
  • CombatModuleTestsVixen.Gameplay.Combat.Tests
  • ContentVixen.Gameplay.Combat.Tests
  • EffectSetTestsVixen.Gameplay.Tests
  • EventBusTestsVixen.Gameplay.Quests.Tests
  • GameplayCompositionVixen.Gameplay
  • GameplayConfigTestsVixen.Gameplay.Tests
  • GameplaySubjectVixen.Gameplay
  • ItemStatsTestsVixen.Gameplay.Items.Tests
  • ProgressionModuleTestsVixen.Gameplay.Progression.Tests
  • ProgressionStateTestsVixen.Gameplay.Progression.Tests
  • QuestJournalTestsVixen.Gameplay.Quests.Tests