ArcCW Attachment Item Definition¶
ArcCW attachment items give, remove, and restore ArcCW attachments through normal item actions. These items are generated by default when ArcCW attachment generation is enabled, so you should not create them manually unless you are intentionally replacing the generated result with custom behavior.
Placement¶
Generated ArcCW attachment items should follow the same shared output path used by the generators:
Avoid registering ArcCW attachment items manually in normal setups. Let the generator create them by default, and only override a generated item when you need custom fields or behavior that the generated version does not provide.
Reference¶
| Field | Type | Purpose |
|---|---|---|
name |
string |
Display name shown in the inventory. |
desc |
string |
Description text shown to the player. |
category |
string |
Inventory category used for sorting. |
model |
string |
World and inventory model used by the item. |
width |
number |
Inventory width in slots. |
height |
number |
Inventory height in slots. |
att |
string |
ArcCW attachment ID managed by this item. |
Callback Fields¶
| Callback | Purpose |
|---|---|
paintOver(item, w, h) |
Draws equipped-state UI over the inventory icon. |
removeAttachment(client) |
Removes the ArcCW attachment from the player and clears equip state. |
addAttachment(client) |
Gives the ArcCW attachment to the player. |
hook("transfer", fn) |
Removes the attachment if the equipped item is transferred away. |
hook("drop", fn) |
Removes the attachment if the equipped item is dropped. |
functions.Unequip |
Adds an Unequip inventory action. |
functions.Equip |
Adds an Equip inventory action. |
OnCanBeTransfered(_, newInventory) |
Blocks transfer while the attachment is equipped. |
onLoadout() |
Re-applies the attachment when the item loads out on the player. |
onRemoved() |
Cleans up equipped state when the item leaves the inventory permanently. |
Notes¶
- ArcCW attachment items should normally come from the generator rather than hand-written item files.
- Override a generated item only when you need to change metadata or add custom logic beyond the default generated version.
- For shared built-in base fields, see the Item Reference page.