Skip to main content

Mmoitems Count Objective

Identify and count specific MMOItems from a fact

Fields

FieldTypeDefaultDescription
questRef<QuestEntry>——
factRef<MMOItemsCountFact>—The MMOItems Count Fact to pick items from.
MMOItemsCountFact (6)
FieldTypeDefaultDescription
commentString——
groupRef<GroupEntry>——
itemsList<MMOItemIdentifier>emptyList of MMOItems to count
MMOItemIdentifier (1)
FieldTypeDefaultDescription
typeVar<MMOItemType>—MMOItems type (e.g., SWORD, ARMOR)
itemMMOItemIdentifier—The MMOItem to count (used if items list is empty)
MMOItemIdentifier (1)
FieldTypeDefaultDescription
typeVar<MMOItemType>—MMOItems type (e.g., SWORD, ARMOR)
checkInventoryVar<Boolean>trueCheck items in player's inventory
checkHandVar<Boolean>falseCheck item in player's main hand
selectionModeMMOItemSelectionModeALLHow to choose items from the fact.Values:ALLINDEXESIDS
selectedIndexesList<Int>emptyIndices of items to select from the fact's list (if mode is INDEXES). 0-based.
selectedItemIdsList<String>emptyMMOItem IDs to select from the fact (if mode is IDS).
amountVar<Int>1The required amount of selected items to possess.
displayVar<String>——
onCompleteRef<TriggerableEntry>—The sequence to trigger when the objective is completed.
onCompleteModifiersList<Modifier>emptyModifiers to apply when the objective is completed.
Common TypeWriter fields (criteria, children, priorityOverride)
FieldTypeDefaultDescription
criteriaList<Criteria>empty—
childrenList<Ref<AudienceEntry>>empty—
priorityOverrideOptional<Int>——

How to use it​

This objective completes when the player holds at least amount items of the ones selected from the linked MMOItems Count Fact. It has no progress fact: the count is read live from the inventory, using the fact's checkInventory and checkHand settings.

selectionMode decides which items of the fact count:

  • ALL — every item listed in the fact.
  • INDEXES — the items at the positions in selectedIndexes (starting at 0).
  • IDS — the items whose MMOItems id is in selectedItemIds.

On completion the onCompleteModifiers are applied, then onComplete is triggered. It is checked again whenever the player picks up, drops, moves or swaps items, and on join.

The line shown in the quest tracker is built from your display text and two snippets, mmoitems.countObjective.display (in progress) and mmoitems.countObjective.completed (done), in plugins/Typewriter/snippets.yml. They accept <display>, <current> and <required>. See Objective display format.