Skip to content

cu_item_set_property en

mouse114514 edited this page Sep 12, 2026 · 1 revision

Set Item Property

Set Item Property

Overview

Modifies a property of a custom item. This is a post-registration tweak block used to fine-tune an item's stats. Usually placed after the registration blocks under the when mod awakes event.

Slots

Slot Type Description
TARGET_ITEM Item slot The target item. Fill with an item / custom item value block
PROP Dropdown slot The property to change (see below)
VALUE Combined slot The new value. Type depends on the selected property: numbers for numeric stats, booleans for usable/wearable/destroyAtZeroCondition/placeable, strings for name/description

Connections

Connection Type Description
Top / Bottom Statement can join a statement chain

Dropdown Options

Option Value Meaning
Condition condition current durability
Weight weight item weight
Value value item value
Usable usable whether the item can be used
Wearable wearable whether the item can be worn
Use limb action useLimbAction whether the item is used via a limb action on the left hand
Destroy at zero condition destroyAtZeroCondition whether the item is destroyed when durability hits zero
Placeable placeable whether the item can be placed as a building/tile

Typical Uses

  • Tune a custom weapon's weight and value
  • Make a custom item placeable and link it with a building registration
  • Prevent an item from being destroyed at zero durability

Generated Code

Emits the matching assignment, e.g. item.weight = 2.5;; placeable also toggles tags and usable.

Example

when mod awakes
├── register item id "customSword" name "Sample Sword" desc "A test sword" sprite "sword.png"
└── set item custom item"customSword" property weight to 2.5

Block ID: cu_item_set_property


中文 | Registration Blocks | Block Reference

Clone this wiki locally