Configuration
General information
Slug
The slug is the unique identifier of your extension, and is generated when creating your extension based on its name. Once created, it cannot be modified. The slug of an extension only contains alphanumeric characters, and dashes.
Display name
This is the name of the extension, which will be displayed to other users in the list of extensions, and in the description of locks.
Subtitle
This is the subtitle of the extension, it is a short sentence explaining the concept of your extension, and will be displayed in the list of extensions.
Summary
This is the description of your extension, it is a paragraph explaining how your extension works, and what its purpose is.
Icon
The icon you choose must be one of the regular icons available on FontAwesome 5, which you can find list here. The icon will be displayed in the list of extensions.
Contact us if you want to change the icon of your extension.
Enabled
You can choose to enable or disable your extension to the public. If the extension is disabled, new people will no longer be able to create locks containing your extension, nor will they be able to load shared locks with your extension enabled. Old locks with your extension enabled will still be active.
Modes
Available modes
An extension can offer different modes, depending on the way it works and the actions to be performed. An action is a user interaction, for example in Chaster extensions, spinning the wheel of fortune, assigning a task, or checking in. The frequency of the actions can be defined and limited according to the mode chosen by the user among the modes offered by the extension.
- Non-cumulative: For extensions where the user can perform actions at a certain frequency, the non-cumulative mode can be selected. When the action is performed, the user will have to wait for the time specified in
regularity
before being able to perform the action again. - Cumulative: The number of possible actions to perform is cumulative from the beginning of the lock, according to the time set in
regularity
. - Unlimited: The user can perform the action in an unlimited way.
For extensions that do not require user action (random events, penalties), the default mode is Unlimited.
Default regularity
The default regularity displayed in the configuration, if the user chooses the cumulative or non-cumulative mode. If you enable only Unlimited mode, you don't need to fill this parameter.
Enable start timeout
If this option is enabled, once the lock is created the user will have to wait the time configured in regularity
before he can perform his first action. By default, the option is disabled, and the user can perform the action immediately after creating the lock.
Configuration
Default configuration (JSON)
A JSON object representing the default configuration of a session. Read the Configuration page section to learn more about it.
Default data (JSON)
A JSON object representing the default data of a session. Read the Custom data section to learn more about it.
Configuration description (Handlebars)
A Handlebars template displaying the configuration description. This is useful when your extension needs a configuration before loading the lock, and you want to display a description of the configuration to the user.
Chaster displays a text on each lock page describing the configuration of the extension. The Handlebars template takes as input the configuration object of your extension, and should return as output the configuration description, in textual form.
For example, if I develop a picture verification extension, and I need to configure a number of pictures required, I can create a configuration description like this:
With a default confiugration like this:
{ "nbPictures": 3 }
The configuration description will be displayed like this:
Read the Handlebars documentation to learn how to use Handlebars and create your template.
Additional helpers
We also support helpers provided by handlebars-helpers.
Custom handlebars helpers
To simplify the creation of your configuration description, we have added some custom helpers to the Handlebars engine.
durationFromSeconds
: Convert a number of seconds to a human-readable duration