Create Minigame

When building a minigame you can add:

Adding a SlotMachine

Properties

PropertyRequiredTypeDescriptionDefault
titlestringThe 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
titlestringThe title of the wheel spinner
descriptionstringThe description of the wheel spinner
itemsobject[]An array of the items on the wheel, see WheelSpinnerItem properties below

WheelSpinnerItem properties

PropertyRequiredTypeDescriptionDefault
titlestringThe title of the item
typestringSet to either Win, Loss, or FreeSpin
percentintegerThe percentage of the item on the wheel; 0-100
awardstringThe 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",
    "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"
                }
            ]
        }
    ]
}