Skip to content

LootLevelSource ​

Inherits: Resource

Where the item level of a generated item comes from: loot of an NPC or object, a reward, a vendor.

Description ​

A loot rule has one, a loot table can have one that overrules the rule, and the Gameplay Config has a default for each kind of holder. INHERIT means "the next one in that order decides". See LootLevel.resolve.

Properties ​

SourcesourceSource.INHERIT
intfixed_level1
intlevel_offset0
intmin_level0
intmax_level0

Methods ​

Stringdescribe()
Array[String]validate()

Enumerations ​

enum Source ​

The options of source: inherit, fixed, holder, receiver, party, world.

  • INHERIT = 0 - The next source in the order decides (table, then rule, then the project default)
  • FIXED = 1 - A level written here
  • HOLDER = 2 - The level of the NPC that holds the loot (an object has none: it falls back to the party)
  • RECEIVER = 3 - The level of whoever gets the loot (the killer, the one who opens the chest, the one who gets the reward)
  • PARTY = 4 - The level of the party (average or highest, as the NPC level scaling setting says)
  • WORLD = 5 - The item level of the world the holder is in (World Config)

Property descriptions ​

Source source = Source.INHERIT ​

Where the level comes from (the holder, a fixed value, the level of the party ...).

int fixed_level = 1 ​

FIXED: the level

int level_offset = 0 ​

Added to the level the source gave (a boss: +3). Can be negative

int min_level = 0 ​

The result is not lower than this (0 = no limit): a weak NPC farmed at level 60 still drops from level 20 up

int max_level = 0 ​

The result is not higher than this (0 = no limit): a starting zone never drops above level 15

Method descriptions ​

String describe() ​

A short text for the editor: "Holder level +3 (not above 40)"

Array[String] validate() ​

Checks the settings. Gives the problems found (empty when it is fine).