Skip to content

Customizing Droplet Toolbox

Dani LaMarca edited this page Jan 7, 2020 · 4 revisions

Customizing Droplet Toolbox

The standard toolbox which is generated when you create a new level will set up the blocks in the right categories with the standard parameters. However sometimes you want to specify specific parameters or move blocks to different categories. This goes over how to further customize the droplet toolbox.

For reference blocks normally show up like this in the toolbox

{
  "blockName": null
}

Setting the category of a block

To set the category of a block you need to specify the category you want it in:

{
  "blockName": {
    "category": "categoryName"
  }
}

For example in Gamelab you could move stopSound to the World Category:

{
  "stopSound": {
    "category": "World"
  }
}

Another use of this is if you want to all a bunch of blocks of different categories all show up together with no categories. Then for every block you would leave the category name blank. Example Level.

Setting the params of a block

If you want to set what the available params should be on a block and what value they should have you can do that as follows:

"rect": {
        "paletteParams": [
          "x",
          "y"
        ],
        "params": [
          "200",
          "200"
        ]
      },

If you want to get rid of the params for a block you can do (It will use the default params behind the scenes):

"turnLeft": {
        "params": [
          ""
        ],
        "paletteParams": [
          ""
        ]
      },
Clone this wiki locally