AvatarSection
This is a special view that allows you to handle progression systems in your character sheet (e.g: allowing your players to level up), as well as editing, deleting, copying and sharing a character. As such, it is often crucial to include this special view in your character sheet, more often than not at the top.
JSON Format
{
"type": "avatarSection",
"id": ...,
"type": ...,
"margin_left": ...,
"margin_right": ...,
"margin_top": ...,
"margin_bottom": ...,
"is_visible": ...,
"validation_message": ...,
"bottom_right_stack": ...,
"bottom_left_stack": ...,
"center_content": ...,
"bottom_left_button_title": ...,
"bottom_left_button_event": ...,
"bottom_right_button_title": ...,
"bottom_right_button_event": ...
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | String | ✓ | A unique identifier for the view. You can use it to reference view values in stat formulas by doing $view.view_id (where view_id is the id that was assigned to this view by you in the system definition) |
type | RPGViewType | ✓ | The type of this view. Note that these are all in camelCase. |
margin_left | double | Optional. How much margin to add to the left of this view. | |
margin_right | double | Optional. How much margin to add to the right of this view. | |
margin_top | double | Optional. How much margin to add to the top of this view. | |
margin_bottom | double | Optional. How much margin to add to the bottom of this view. | |
is_visible | StatFormulaComponent | Optional. A formula to specify if the view should be visible or not. Must return a bool. | |
validation_message | StatFormulaComponent | Optional. If this view is an input, you can define this formula to return a message when the input value is invalid. If the input is valid, you should return null. Otherwise, make the formula return the string that should be shown to the user. | |
bottom_right_stack | List<RPGView> | Optional. List of RPGViews to display at the bottom-right corner of this section. The first elements will display on top of the subsequent elements in the list. | |
bottom_left_stack | List<RPGView> | Optional. List of RPGViews to display at the bottom-left corner of this section. The first elements will display on top of the subsequent elements in the list. | |
center_content | List<RPGView> | ✓ | The RPGView to display in the center of this section. It is usually an Avatar view. |
bottom_left_button_title | StatFormulaComponent | Optional. A title for the bottom-left button in this section. | |
bottom_left_button_event | Event | Optional. The event to fire when the player taps on the bottom-left button. | |
bottom_right_button_title | StatFormulaComponent | Optional. A title for the bottom-right button in this section. | |
bottom_right_button_event | Event | Optional. The event to fire when the player taps on the bottom-right button. |