Skip to main content

Resource

Resources are one of the main constructs in your system. A resource represents a "component" of your TTRPG system. For example, a spell would be a resource. A class, weapon, armor, item, species, etc., would all be resources. It is, essentially, a model that holds data, with a defined schema.

Resources are very special and powerful. Each of them can interact with other resources, and support bringing mechanics that are associated to them to the table (pun-intended!). Going back to the spell example from earlier, a spell might have a mechanic to roll for damage and trigger the spells effects, for instance.

Resources don't need to be concrete—they can represent abstract concepts, in fact. A magical effect (if you want to allow players to be able to customize them) might be a resource. A levelled_feature (ie: a feature that has a level associated with it) could also be a resource (you might want to use it to be able to specify features that are unlocked at a specific level, for example).

You will have a lot (A LOT) of resources in your system. Some of them will be special, however, as they will be "core" resources. These resources are going to be displayed in the resource section of the app (the orange one), and will allow the player to edit and create them, search them (as a compendium) and share them.

Finally, resources can have views attached to them. Not all of them will, but resource views are very helpful when developing your system. These will tell the RPG Companion App how to display a resource visually for the player to interact with. Views are mandatory, however, for core resources. These must have all 4 views (display, edit, list and search) implemented. search, in fact, is only useful if the resource is a core resource.

JSON Format

{
"type": "Resource",
"id": ...,
"name": ...,
"plural": ...,
"abbreviation": ...,
"core": ...,
"color": ...,
"stats": ...,
"indexed_stats": ...,
"display_name": ...,
"display_view": ...,
"edit_view": ...,
"list_view": ...,
"search_item_view": ...,
"mechanics": ...,
"search_filters": ...,
"sort_options": ...
}

Fields

FieldTypeRequiredDescription
sort_optionsList<SortOption>Optional. Defaults to an empty list. A list of sort options which will be available for users when searching this resource type. Just think about how you would want to be able to sort your resource to make searching easier (e.g: you might want to sort by "level" for spells, or by "type" for weapons). By default the app will always include an "alphabetic" sort option on the display_name stat.