Combatant
JSON Format
{
"type": "Combatant",
"id": ...,
"name": ...,
"plural": ...,
"abbreviation": ...,
"template_resource_id": ...,
"instance_resource_id": ...,
"header_view": ...,
"card_view": ...,
"on_create": ...,
"side": ...,
"shows_in_party": ...
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | String | ✓ | The id for this type instance. This should be unique. |
name | String | ✓ | The name for this type instance. |
plural | String | Optional. The plural form of the name for this type instance (e.g: "Items" if the name is "Item"). | |
abbreviation | String | Optional. Abbreviation of the name for this type instance (e.g: "STR" for Strength). | |
template_resource_id | String | Optional. The resource type ID for the template/source resource. This is the resource that serves as the base or template for creating combatant instances. Examples: - "character" for player characters - "monster" for monster templates in a bestiary - "npc" for NPC templates When null, this combatant type has no template and instances are created from scratch using only the instanceResourceId. When both templateResourceId and instanceResourceId are present, the template resource is available as the $resource stat when working with instances. | |
instance_resource_id | String | Optional. The resource type ID for the instance resource. This is the resource type that represents actual combatant instances. Examples: - "monster_instance" for individual monster instances with their own HP, conditions, etc. - "summoned_creature" for summoned entities with no template When null, the combatant directly uses the template resource (no separate instance). This is typical for player characters where the character sheet itself is the combatant. When present, new instances of this resource type are created for each combatant, and the onCreate effect can populate instance stats from the template. | |
header_view | RPGView | ✓ | The view to be displayed at the top of the combat tracker during a combatant's turn. It usually contains fast stats to help make combat tracking easier. This view operates on the instance resource (or template resource if no instance type exists). |
card_view | RPGView | ✓ | The view to be displayed in the combat (turn) tracker itself for this combatant type. Usually a card with its name, HP and a couple other properties. This view operates on the instance resource (or template resource if no instance type exists). |
on_create | Effect | Optional. This effect executes when a combatant instance is first created. It will only be executed once per instance. Common uses: - Rolling HP for monster instances from a template's hit dice - Initializing temporary stats or conditions - Copying stats from the template resource (available as $resource) to the instance Only applicable when instanceResourceId is present. Has no effect for template-only combatants. | |
side | String | ✓ | A string tag that represents the side of this combatant type in a combat. For most systems, this will either be "party" or "enemies", but some systems may require more than 2 sides to a battle which is why this field exists. |
shows_in_party | bool | Optional. Bool indicating if this combatant type should be shown in the party section of the app, or not. |