Those functions must be defined in the global scope. If you do not want to use one of there features, simply don't define the function.


sheet, type: Sheet, The sheet to initialize Return void

Initialize a sheet, as a character sheet or a craft. You can see what type of sheet it is via Tabs entries are not initialized individually, and should be initialized as if they were part of the parent view.


init = function(sheet) {
    if ( === "main") {
    } else if ( === "weapon") {

const initMain = function(sheet) {
    // initialize the main sheet
    sheet.get("hp"); //...

const initWeapon = function(sheet) {
    // initialize the weapon sheet

drop(from, to)

from, type: Sheet, Source's sheet to, type: Sheet, Target's sheet Return void|string

Called when dropping a craft onto a character sheet. If you simply want to append the data to a repeater, return the repeater's id. Otherwise, you'll have to manipulate the target sheet data.

For now, it is only possible to drop craft into character sheet.


drop = function(from, to) {
    if ( === "weapon" && === "main") {
        return "weapons"; // "weapons" is a repeater id
drop = function(from, to) {
    if ( === "heal" && === "main") {
        ); // set the target's hp to the source maxhp

dropDice(result, to)

result, type: DiceResult, A dice result from the dice log. sheet, type: Sheet, Target's sheet

For some systems, it can be useful to drag'n drop a dice result onto the sheet. With this function, you can create interaction between the dice log and a character sheet or craft.


dropDice = function(result, sheet) {
    if (result.containsTag("heal")) {
        let hp = sheet.get("hp");
        hp.value(hp.value() +; // the character is healed by the total of the roll

initRoll(result, callback)

result, type: DiceResult, A dice result from the dice log. callback,type: Function, A callback to render the dice result.

This function allows you to customize the rendering of a dice result. You should call the callback with two arguments :

  • view: string the id of the view you want to use to render the dice result
  • onRender: Function a function called when rendering the view, where you can change the view values. Please note the view is also initialized in the global init function.


initRoll = function(result, callback) {
    callback('diceresult', function(sheet) { // diceresult is the id of the view you want to use
        sheet.get('total').text(; // apply various changes to the view
        if ( > 20) {


sheet, type: Sheet, The sheet Return Object

Players can connect bars to some attributes with this method. It is required to have a value, and a maximum value. The method should return an Object with the titles as keys, and an Array(2), with the first element being the value, and the second the max value.

The bar updates when the sheet is changed, and the sheet updates when the bar value is changed.


getBarAttributes = function(sheet) {
    if ( === "main") {
        return {
            "HP": ["hp", "hpmax"],
            "Quick Resource": ["quickResource", "quickResourceMax"]
    if ( === "monster") {
        return {
            "HP": ["hp", "hpmax"],
            "Mana": ["mana", 30] // you can use numbers directly for maximums
    return {};


result, type: DiceResult

This global function allows you to customise the colours of the die roll results.


It must return an object, with another object for each die dimension that associates a colour with the possible values.

Here's an example:

getCriticalHits = function(result) {
    return {
        "20": {
            "critical": [20, 19],
            "fumble": [1],
        "6": {
            "critical": [],
            "fumble": [],
            "cyan": [2, 3],
            "pink": [1]

In this example, the dice will be displayed in green for "critical" on 19 and 20, and in red for "fumble" on 1s, only on d20s. On d6s, the colours don't change for criticals and fumbles, but 2s and 3s are blue, and 1s are pink.

result is an object of type DiceResult which allows you to modify the behaviour according to the results or tags associated with the throw, for example.

The different colours available are as follows: