Create Minigame

When building a minigame you can add:

Adding a SlotMachine

Properties

PropertyRequiredTypeDescriptionDefault
title✓stringThe title of the slot machine
descriptionstringThe description of the slot machine
startBalanceintegerThe starting balance of the user10
winningProbabilitystringSet to Low, Medium or HighMedium

Example object

{
    "title": "Spin the slot machine",
    "description": "Try your luck!",
    "type": "SlotMachine",
    "startBalance": 1000,
    "winningProbability": "High"
}

Adding a WheelSpinner

Properties

PropertyRequiredTypeDescriptionDefault
title✓stringThe title of the wheel spinner
descriptionstringThe description of the wheel spinner
items✓object[]An array of the items on the wheel, see WheelSpinnerItem properties below

WheelSpinnerItem properties

PropertyRequiredTypeDescriptionDefault
title✓stringThe title of the item
type✓stringSet to either Win, Loss, or FreeSpin
percent✓integerThe percentage of the item on the wheel; 0-100
award✓stringThe award the user gets
backgroundColorstringThe background color of the itemrgba(255, 255, 255, 1)
textColorstringThe text color of the itemrgba(0, 0, 0, 1)
mediastringThe URL of the media file

Example object

{
    "title": "Spin the wheel",
    "description": "Try your luck!",
    "type": "WheelSpinner",
    "items": [
        {
            "title": "Win 100$",
            "type": "Win",
            "percent": 50,
            "award": "100$"
        },
        {
            "title": "Lose 50$",
            "type": "Loss",
            "percent": 30,
            "award": "-50$"
        },
        {
            "title": "Free spin",
            "type": "FreeSpin",
            "percent": 20,
            "award": "Free spin"
        }
    ]
}

Full example

{
    "type": "Minigame",
    "build": {
        "title": "Minigame example (Builder API)",
        "blocks": [
            {
                "title": "Spin the slot machine",
                "description": "Try your luck!",
                "type": "SlotMachine",
                "startBalance": 1000,
                "winningProbability": "High"
            },
            {
                "title": "Spin the wheel",
                "description": "Try your luck!",
                "type": "WheelSpinner",
                "items": [
                    {
                        "title": "Win 100$",
                        "type": "Win",
                        "percent": 50,
                        "award": "100$"
                    },
                    {
                        "title": "Lose 50$",
                        "type": "Loss",
                        "percent": 30,
                        "award": "-50$"
                    },
                    {
                        "title": "Free spin",
                        "type": "FreeSpin",
                        "percent": 20,
                        "award": "Free spin"
                    }
                ]
            }
        ]
    }
}

Next steps

Now that you know the basics of building a minigame, you might want to learn how to: