itemCondition

Module: itemCondition — player_itemCondition.lua

What it does

Sets the condition of the items currently held in the player's primary and secondary hand slots. The action parameter controls the direction: "full" restores both held items to their maximum condition value, while "zero" degrades both to 0 (broken). Only items that are actually equipped in hand are affected; empty hand slots are safely skipped.

Trigger type

itemCondition

Parameters

ParameterTypeDefaultValid ValuesDescription
type string required "itemCondition" Module trigger identifier.
action string none "full", "zero" What to do to the held items' condition. "full" repairs to max; "zero" destroys. If omitted or unrecognised, no change is applied.

Examples

Repair held items to full condition
{ type="itemCondition", action="full" }
Destroy held items (set condition to 0)
{ type="itemCondition", action="zero" }
Repair with viewer attribution
{ type="itemCondition", action="full", viewer="HelpfulViewer" }