8000 GitHub - ViciousSquid/diceroll: API library for simulating dice rolls and dice-related operations.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ViciousSquid/diceroll

Repository files navigation

dicerollimage

diceroll is a Python library that provides API functionality (dicerollAPI) for simulating dice rolls and performing dice-related operations.

It includes classes for rolling dice, tracking & saving roll results, and animating dice rolls using Pygame (optional)

API documentation starts here: https://github.com/ViciousSquid/diceroll/blob/main/Docs/dicerollAPI.md

Features

  • Roll various types of dice (e.g., 2d6, 1d20, 3d8+1d4) and get the roll results
  • Console printing and logging
  • Save the last 5 roll results to a file (.txt or .json)
  • Retrieve the last 5 roll results
  • Saving throws and skillchecks
  • Set/Get the dice/font color (red, white, blue, black, green, custom)
  • Animations (optional, requires Pygame)

Further Documentation

https://github.com/ViciousSquid/diceroll/tree/main/Docs


Source files:

Run the example files: roll_dice_example.py (console based) and roll_dice_example_GUI.py (GUI based, uses Pygame)


This API was custom-designed for use in the Adventure! Interactive story engine : https://github.com/ViciousSquid/Adventure

How to integrate the API into your own projects is demonstrated by the above game engine

Releases

No releases published

Packages

No packages published

Languages

0