Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

Reference · Rolls and exact odds

setQueryfunction

A set as a link's query: the dice and the name, for anybody to open and keep.

Import it

import { setQuery } from "@johnmorrisdotca/korokoro";

Definition

function setQuery(set: DiceSet): string

Parameters

NameTypeDescription
setDiceSet

The saved set to add or share.

Returns

string

A set as a link's query: the dice and the name, for anybody to open and keep.

Examples

import { setQuery } from "@johnmorrisdotca/korokoro";
import { makeSet } from "@johnmorrisdotca/korokoro";
const set = makeSet("Longsword", "1d8+3")!;
console.log(setQuery(set));
dice=1d8%2B3&name=Longsword&v=2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.