Skip to main content

Modify Accessory (Entity Action Type)

Runs an action on the accessories the entity currently has equipped, optionally filtering which ones and how many.

Type ID: apoli:modify_accessory (alias apoli:modify_trinket)

note

This type only exists when an accessory mod is installed: Trinkets, Accessories or Curios, depending on your loader. A pack that uses it must depend on one.

Fields

FieldTypeDefaultDescription
slotsArray of slots[]The accessory slots to look in. A string is slot, group/slot or group/slot/index, such as "ring", "hand/ring" or "hand/ring/0". An empty list means every slot.
item_conditionItem Condition TypeoptionalOnly acts on accessories that pass it.
item_actionItem Action TypeoptionalRuns on each matching accessory.
entity_actionEntity Action TypeoptionalRuns once on the wearer, if anything matched.
limitInteger0Stops after this many matches. 0 means no limit.
unequipBooleanfalseRemoves each matching accessory after acting on it.

Examples

{
  "type": "apoli:modify_accessory",
  "item_action": { "type": "apoli:damage", "amount": 1 }
}

This damages every equipped accessory by one point.

{
  "type": "apoli:modify_accessory",
  "limit": 1,
  "unequip": true,
  "item_condition": {
    "type": "apoli:ingredient",
    "ingredient": { "tag": "c:ingots/iron" }
  },
  "entity_action": {
    "type": "apoli:text",
    "text": { "translate": "mypack.accessory.stripped" }
  }
}

This takes off one iron accessory and tells the wearer, which is the shape a disarming ability needs.