Skip to content

DiceMaster is a Python project that can be used for rolling any quantity of dice of any number of faces. It is also my first Python project by the way :D

License

Notifications You must be signed in to change notification settings

lmisea/dicemaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiceMaster

Version Open Source Made with Python Love Smyles

Copyright (C) 2023 - Luis Miguel Isea.

DiceMaster is a Python project that can be used for rolling any number of dice of any number of faces. It is also my first Python project by the way.

The amazing thing about this project is that it has a basic menu, allowing the user to read the instructions as many times as desired. Also DiceMaster can do as many rollings as the user wants without having to reinitialize or exit the program.

Python 3 Compatibility: 3.7 3.8 3.9 3.10.

HOW TO RUN?

It's really easy: first, clone the repository, then make sure the sshkeyboard library is installed and, finally, run run.py.

Step 1: Clone the dicemaster repository

Open a terminal in the directory where you want to install the program and then clone this repository by typing this command:

git clone https://github.com/lmisea/dicemaster.git

Step 2: Install the requirements

A third-party Python library called sshkeyboard under the MIT License is required for running DiceMaster. Note: For Python 3.7 it is also required typing_extensions, that is why it is on requirements.txt.

GitHub Repository of the third-party Library: Sshkeyboard-Repository.

How to install the requirements? Make sure the terminal is open in the directory where the repository was clone and the execute this command in the terminal:

pip3 install -r requirements.txt

This will install the exact same library version I used for my project and therefore there will not be any issue.

Step 3: Run the DiceMaster program with python 3

Make sure the terminal is open in the directory where the repository was clone and run run.py with Python 3:

python3 run.py

HOW TO ROLL?

You can now roll any kind of die you want, as many times as you desire.

The standard syntax for rolling is: [num_dice]d[num_faces]+/-[modifier].

Where [num_dice] is an integer who specifies how many dice to roll.

And [num_faces] is an integer who specifies how many faces each die has.

For example:

If you write 2d6, this will roll 2 dice of 6 faces.

If you write 100 d 20, this will roll 100 dice of 20 faces.

Note that is okay to add a space before and/or after the d.

HOW TO ADD A MODIFIER?

After [num_faces] add: +/-[modifier]. Where [modifier] is an integer.

For a bonus modifier use +[modifier] and use -[modifier] for a penalty modifier. This will increase or decrease the total sum of the dice rolled by the [modifier] value.

For example:

If you write 1d8+2, this will roll 1 die of 8 adding a modifier of +2.

If you write 8d12 - 5, this will roll 8 dice of 12 faces adding a modifier of -5.

Note that it is okay to add a space before and/or after the + or -.

LICENSE

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

DiceMaster is a Python project that can be used for rolling any quantity of dice of any number of faces. It is also my first Python project by the way :D

Topics

Resources

License

Stars

Watchers

Forks

Languages