CreateChip
This formula allows to create a ChipRPGView. It is most usually used for
the ListItemRPGView chips property. The chip view allows to display
either a text from a stat formula or can be provided with resource data and
automatically display resources for you in the form of text with the given
stat.
JSON Format
{
"type": "createChip",
"id": ...,
"text": ...,
"background_color": ...,
"border_color": ...,
"style": ...,
"resource_id": ...,
"resource_instance_ids_stat": ...,
"resource_display_stat": ...
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | String | ✓ | The id for the chip view. Should be unique. |
text | StatFormulaComponent | Should compute to the text to be displayed on the chip. Either this property should be provided, or resource_id, resource_instance_ids_stat and resource_display_stat should be provided. | |
background_color | StatFormulaComponent | Optional. The background color for the chip. Should compute to a string for an RPGColors or a hex code for a color. | |
border_color | StatFormulaComponent | Optional. The border color for the chip. Should compute to a string for an RPGColors or a hex code for a color. | |
style | StatFormulaComponent | Optional. The style color for the chip. Should compute to a string representing a ChipRPGViewStyle. Defaults to fullSize. | |
resource_id | String | The id of the resource the chip is going to display. | |
resource_instance_ids_stat | String | The stat for the id or ids of resource instances that are going to be displayed in the chip. The stat has to have a string value or be an array of strings. | |
resource_display_stat | String | The stat of the resource that should be used to display in the chip. Most usually it's name. |