[MOD] Dice API [dice_api]

Post Reply
User avatar
Extex
Member
Posts: 249
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

[MOD] Dice API [dice_api]

by Extex » Post

DICE_API

Image

Have you ever wanted to flip a coin, make a board game, or run a TTRPG in Luanti? Well now you can!
This mod makes all of that possible with fun and easy-to-use API.

Image


Example usage:

Code: Select all

dice.register_die("my_dice_pack:d6", {
    preset = "d6",
    tooltip = {
        "\\CYAN\\My D6!",
        "",
        "\\GREEN\\Six-Sided",
        "\\GREEN\\    -    My Dice Pack",
        "\\GREEN\\    -    Made with Dice API",
        "\\PINK\\Forged in the fires of mount Gloom."
    },
    textures = {"my_dice_pack_d6.png"},
    -- Pre-packaged sound pack
    sounds = dice.sounds.die,
    groups = {
        my_dice_pack = 6,
    }
})
Image

Die Types:
Supports: Coins, D4, D6, D8, D12, D20, and custom!
Image


Personalize your die with:

Code: Select all

/rename_die <name>
Command Example:
Image

Updated tooltip:
Image

Roll-result chat message:
Image

Disclaimer:
Spoiler
This mod is not intended to be used in the gambling of real-world currency, crate-keys or any other pay-to-obtain in-game currency.
Depends: none
Source: Extex101/dice_api
Download: dice_api

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests