Skip to content

About

A recipe lets you tell Wavewall how to combine the tiles you've created to form an output image. recipes is where you... well, define the recipes! It's a table with this shape:

recipes = {
    recipe name = recipe definition
}

Below are the fields you can set in each recipe definition

Fields

  • tiles - nil, list of string, table

What tiles should be used in the recipe.

Nil

If tiles is nil, Wavewall will use any and all tiles in the tileset.

List of string

If tiles is a list of strings (here tile names), Wavewall will only select from tiles in the list.

Example
lua
tileset = {
    recipes = {
        recipe_list = {
            tiles = {
                "tile_a",
                "tile_b",
                "tile_c"
            }
        }
    }
}
Table

Setting tiles as a table allows you to control the likelihood with which each tile is chosen.

The numbers here are weights, which means that what matters is how large they are compared to each other, rather than how big the number itself is. That said, an easy way to reason about it is to make sure all the numbers add to 100 as if they were percentages.

Example
lua
tileset = {
    recipes = {
        recipe_weights = {
            tiles = {
                tile_a = 80,
                tile_b = 15,
                tile_c = 5
            }
        }
    }
}