{"id":26005179,"url":"https://github.com/finitum/roll-rs","last_synced_at":"2025-03-05T20:41:27.811Z","repository":{"id":52904345,"uuid":"316023093","full_name":"finitum/roll-rs","owner":"finitum","description":"Rust dice roller using dice notation","archived":false,"fork":false,"pushed_at":"2022-10-30T13:28:52.000Z","size":90,"stargazers_count":4,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-09T18:37:04.649Z","etag":null,"topics":["dice","dice-notation","dice-roller","dnd","dnd-tools","hacktoberfest","wasm"],"latest_commit_sha":null,"homepage":"https://finitum.github.io/roll-rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finitum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-25T18:29:26.000Z","updated_at":"2024-04-05T21:09:50.000Z","dependencies_parsed_at":"2022-09-12T22:00:16.156Z","dependency_job_id":null,"html_url":"https://github.com/finitum/roll-rs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finitum%2Froll-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finitum%2Froll-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finitum%2Froll-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finitum%2Froll-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finitum","download_url":"https://codeload.github.com/finitum/roll-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242100498,"owners_count":20071735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dice","dice-notation","dice-roller","dnd","dnd-tools","hacktoberfest","wasm"],"created_at":"2025-03-05T20:41:23.285Z","updated_at":"2025-03-05T20:41:27.795Z","avatar_url":"https://github.com/finitum.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roll-rs\nroll-rs is a dice roller that allows one to roll arbitrary dice and potentially combine them with arithmetic \n\n## Usage Modes\n**Normal usage**\n```\n$ roll d8 + 2d4\nd8    d4\nd8 + 2d4 = 8\n3     1\n      4\n```\n**Short mode**\n```\n$ roll -s d8 + 2d4\nd8 + 2d4 = [3] + [1, 4] = 8\n```\n**Advanced mode**    \n_this allows using dice rolls to determine the sides and amount of another roll_\n```\n$ roll -a (d8)d(2d4)\n d8 d7 d4\n(d8)d(2d4) = 5\n 2  3  3\n    2  4\n```\n\n## Notation\n**Standard**  \nStandard notation allows you to roll any sided die any number of times\n```shell script\nd     # roll a single 20 sided die\n1d20  # equivalent\n```\n**Percentile**  \nYou can use `%` as a shorthand for 100 sides\n```shell script\n3d%   # roll a percentile die 3 times and add them together\n3d100 # equivalent\n```\n**Keep**  \nThe keep modifier allows you to roll multiple dice but only keep the highest or lowest result(s)\n```shell script\n4d8kh2 # roll a d8 4 times and keep the highest 2 rolls\n4d8k2  # equivalent to the above\n4d8kl1 # roll a d10 4 times and keep the lowest roll\n```\n**Drop**  \nThe keep modifier allows you to roll multiple dice but drop the highest or lowest result(s)\n(Opposite of Keep).\n```shell script\n4d8dl2 # roll a d8 4 times and drop the lowest 2 rolls\n4d8d2  # equivalent to the above\n4d8dh1 # roll a d8 4 times and drop the highest roll\n```\n\n## Maths\nRoll-rs supports the following arithmetic operators\n\n| Operator | Description |\n| -------- | ----------- |\n| +        | Plus |\n| -        | Minus |\n| *        | Multiplication |\n| /        | Division |\n| //       | Integer division |\n| mod      | Modulo |\n| **       | Exponentiation |\n\nRoll-rs follows the normal order of operations and also allows the use of parenthesis to affect this.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinitum%2Froll-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinitum%2Froll-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinitum%2Froll-rs/lists"}