Clone Item
Clone Item¶
Creates a duplicate of an existing item or equipment in the inventory as a new instance with its own unique ID.
Properties¶
System¶
| Name | Explanation | Type |
|---|---|---|
| Ignore Constraints | When enabled, inventory constraints such as maximum stack size or carry limits are bypassed when adding the cloned item. | Toggle |
| Item or Equipment Unique ID | The unique ID of the item or equipment to clone. | Variable or Value |
| Result | The variable where the unique ID of the newly cloned item is stored. | Variable or Value |
| Store Results | When enabled, the unique ID of the cloned item is stored in the specified result variable. | Toggle |
Examples¶
Clone an Item by Unique Identifier Stored in Global Variable 0¶
This duplicates the item or equipment identified by the unique ID stored in Global Variable 0.
{"Data":{"Identifier":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"IgnoreConstraints":false,"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreResults":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Inventory.CopyItemCommand"}
Clone an Item and Store the New Unique Identifier¶
This duplicates the item identified by the unique ID in Global Variable 1, ignoring constraints, and stores the new item's unique ID in Global Variable 0.
{"Data":{"Identifier":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":1,"Metadata":null},"IgnoreConstraints":true,"Result":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreResults":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Inventory.CopyItemCommand"}