Vixen
c7401864
csharp
public record class ItemDefinition

An item, as a designer wrote it.

Read the guide page for this →

Remarks

Doc 28 § Items' own example, near enough verbatim: a display name, a rarity, a slot, an item level, tags, stats, effects, an icon and a prefab. What it does not carry is anything per-copy — that is ItemInstance, and the split is the whole point.

⚠ Slot is a tag and Rarity is an address, and the two being different shapes is deliberate. A slot is asked about hierarchically — any one-handed weapon — and never sorted; a rarity is sorted and never asked about hierarchically. Each is the shape its questions want.

Fields and properties (13)

  • public string DisplayName

    What it is called in the UI.

  • public string Rarity

    The address of its ItemRarityDefinition.

  • public string Slot

    Which equipment slot it goes in — Item.Slot.MainHand. Empty is not equippable.

  • public int ItemLevel

    How good it is, which is what affix ranges scale against.

  • public int MaximumStack

    How many fit in one container slot. One is unstackable.

  • public int MaximumDurability

    How much wear it takes before it stops working. Zero is indestructible.

  • public int Sockets

    How many sockets it has.

  • public ItemBinding Binding

    When it stops being tradeable.

  • public List<string> Tags

    What it is — Item.Weapon.Sword, Item.Source.Raid.

  • public List<ItemStatDefinition> Stats

    What it grants when equipped, before affixes.

  • public List<string> AffixPools

    The addresses of the affix pools it rolls from.

  • public string Icon

    The address of its icon.

  • public string Prefab

    The address of the prefab it spawns as in the world.

Methods (1)

  • public override void CollectTags(ICollection<string> tags)

    Every tag this definition mentions, so the content build can bake the tag table.

Used by (17)

  • ReferenceTestsMmo.Content.Tests
  • ContentVixen.Editor.Gameplay.Loot.Tests
  • LootOutlineVixen.Editor.Gameplay.Loot
  • LootSimulatorVixen.Editor.Gameplay.Loot
  • ContainerSetVixen.Gameplay.Inventory
  • ContentVixen.Gameplay.Items.Tests
  • ContentVixen.Gameplay.Loot.Tests
  • ContentVixen.Gameplay.Inventory.Tests
  • ContentVixen.Gameplay.Economy.Tests
  • DefinitionContentTestsVixen.Gameplay.Content.Tests
  • EconomyLibraryTestsVixen.Gameplay.Economy.Tests
  • ItemLibraryVixen.Gameplay.Items
  • ItemLibraryTestsVixen.Gameplay.Items.Tests
  • ItemTemplateVixen.Gameplay.Items
  • ItemsModuleVixen.Gameplay.Items
  • TypeRegistrationVixen.Gameplay.Items
  • Vixen_Gameplay_Items_ItemDefinitionSerializerVixen.Gameplay.Items