Sheet

A Sheet instance represents a Character Sheet or Craft.

Methods

get(id)

id, type: string return: Component|null

Get a component.

getVariable(id)

id, type: string Return: number|null

Get a variable's value. See : variables

setData(data)

data, type: object

Set multiple sheet data at once (including components values). You can only set 20 values at a time.

sheet.setData({
    "hp": 30,
    "mp": 12
    //...
});

getData()

Returns all the sheet data at once (including components values).

let values = sheet.getData();
/* 
values = { 
  avatar: { avatar: "y/x/....png", token: "k/g/....png"},
  hp: 30,
  mp: 12,
  ...
}
*/

prompt(title, view, callback, callbackInit)

See: Prompt API

id()

Return: string

The id of the sheet (ie the id of the top view component).

getSheetId()

Return: number

The unique ID of the sheet (ie a sheet creation order index on Let's Role). Used to distinguish a leaf from another leaf of the same type.

name()

Return: string

The name of the sheet.