Skip to main content

EnumeratedType

An enumerated type allows you to define options in the app. You can use them for things that have a finite amount of options (e.g: alignment, types, dice types, hit point modes, etc).

JSON Format

{
"type": "EnumeratedType",
"id": ...,
"name": ...,
"plural": ...,
"abbreviation": ...,
"extends_type": ...,
"types": ...
}

Fields

FieldTypeRequiredDescription
idStringThe id for this type instance. This should be unique.
nameStringThe name for this type instance.
pluralStringOptional. The plural form of the name for this type instance (e.g: "Items" if the name is "Item").
abbreviationStringOptional. Abbreviation of the name for this type instance (e.g: "STR" for Strength).
extends_typeStringEnumerated types can extend from other enumerated types. For example, if you have an enumerated type defined as weapon_types, and you would want to also include a "other" option (but only in certain places of the system), you could create a weapon_types_plus_other enumerated type and have its extends_type property be weapon_types. With this, you will only need to add the "other" option in the types list, without needing to copy and paste the other types again.
typesList<DisplayableData>The list of options this type is made of. For example, for a dice_types enumerated type, you might want to have the following options (just including ids in this example, but names should be provided to): d4, d6, d8, d10, d12, d20.