Skip to main content

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

FieldTypeRequiredDescription
idStringThe id for the chip view. Should be unique.
textStatFormulaComponentShould 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_colorStatFormulaComponentOptional. The background color for the chip. Should compute to a string for an RPGColors or a hex code for a color.
border_colorStatFormulaComponentOptional. The border color for the chip. Should compute to a string for an RPGColors or a hex code for a color.
styleStatFormulaComponentOptional. The style color for the chip. Should compute to a string representing a ChipRPGViewStyle. Defaults to fullSize.
resource_idStringThe id of the resource the chip is going to display.
resource_instance_ids_statStringThe 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_statStringThe stat of the resource that should be used to display in the chip. Most usually it's name.