Attributes

What are Attributes?

Attributes are key-value pairs that can be assigned to individual Marble items to represent any kind of numerical value associated with an item. Since attributes are attached to individual items they will travel with changes in ownership.

Below are a few sample Attributes and their associated point values.

Note that Attributes have specific actions that allow the point values to be manipulated directly, as opposed to Tags that can only be overwritten.

Shared Attributes

The Attributes layer also includes Shared Attributes that are assigned to a group rather than an individual item. Use Shared Attributes to apply attributes to all items in a group or to save RAM costs.

Table Breakdown

Table Name: attributes

Table Scope: item.serial

No extra indices.

Creating an Attribute

To assign a new attribute to an Item call the newattribute() action.

Required Authority: group.manager

Action Parameters

Examples

cleos push action {account} newattribute '[ {params} ]' -p {manager}

Set Attribute Points

To set an attribute's points to a specific value call the setpoints() action.

Required Authority: group.manager

Action Parameters

Examples

cleos push action {account} setpoints '[ {params} ]' -p {manager}

Increase Points

To increase an attribute's points call theincreasepts() action.

Required Authority: group.manager

Action Parameters

Examples

cleos push action {account} increasepts '[ {params} ]' -p {manager}

Decrease Points

To decrease an attribute's points call the decreasepts() action.

Required Authority: group.manager

Action Parameters

Examples

cleos push action {account} decreasepts '[ {params} ]' -p {manager}

Lock an Attribute

Lock an attribute and prevent future updates with the lockattr() action.

Required Authority: group.manager

Action Parameters

Examples

cleos push action {account} lockattr '[ ... ]' -p {account}

Remove an Attribute

To remove an attribute from an Item call the rmvattribute() action.

Required Authority: group.manager

Action Parameters

Examples

cleos push action {account} rmvattribute '[ {params} ]' -p {manager}

Last updated