Options
All
  • Public
  • Public/Protected
  • All
Menu

Object representing one of the entries (items) of the loot table pool. Returned by LootPool.addEntry.

since

1.0

Hierarchy

  • LootEntry

Index

Methods

  • Specifies the item by given numeric ID.

    since

    1.0

    Parameters

    • numericId: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item by given namespace and identifier.

    since

    1.0

    Parameters

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item's count

    since

    1.0

    Parameters

    • count: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item's count, in this case it'll be chosen randomly every time between given minimum and maximum value.

    since

    1.0

    Parameters

    • min: number
    • max: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies custom name that will be set to item

    since

    1.0

    Parameters

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item's damage. Technically the same as LootEntry.setData, but uses "set_damage" entry function instead of "set_data".

    since

    1.0

    Parameters

    • damage: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item's damage, in this case it'll be chosen randomly every time between given minimum and maximum value. It can be used, for example, to put some tool or armor element with random durability. Technically the same as LootEntry.setData, but uses "set_damage" entry function instead of "set_data".

    since

    1.0

    Parameters

    • min: number
    • max: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item's data.

    since

    1.0

    Parameters

    • data: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the item's data, in this case it'll be chosen randomly every time between given minimum and maximum value. It can be used, for example, to put some tool or armor element with random durability.

    since

    1.0

    Parameters

    • min: number
    • max: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Sets the item's quality.

    It's not known reliably where this value is used, but talking about the vanilla loot tables, it's used in fishing tables.

    Values are -2 for junk, -1 for fish and 2 for treasure.

    since

    1.0

    Parameters

    • quality: number

    Returns LootEntry

    reference to itself to be used in sequential calls

  • Specifies the weight value, that will be used in weighted random logics when choosing the list of randomly chosen items from a loot table. If there is more than one entry in a pool, the more the item's weight will be, the more likely for this item to be chosen. If you have only one entry, you can skip specifying this parameter. Actually you can skip it anyway, as it defaults to 1.

    since

    1.0

    Parameters

    • weight: number

    Returns LootEntry

    reference to itself to be used in sequential calls

Generated using TypeDoc