Skip to main content

DnD4py - A collection of codes for D&D 5th Edition

Installation

DnD4py can be installed through pip via

pip install DnD4py

It can also be installeded by running

make install

from inside the respository.

Usage

DnD4py contains a number of miscelanious codes for use with D&D 5th edition. They include:

Roll4Me

Simulate a complex roll of many dice and modifiers Gives result, individual rolls, the mean of the distribution and the percentile of that roll relative to the distribution.

Example:

$ roll 3d8 + 1d6 + 10

returns a roll similar to:

*************
Total:   25
*************
= 12      + 3   + 10
[7 2 3] + [3] + 10
Mean: 27.0
Percentile: 28.9%

Lookup5e

Lookup D&D terms on Roll20.

Currently supported: spells, items, and monsters

Example:

$ lookup5e potion of healing

returns

Potion Of Healing

Item Type: Adventuring Gear
Subtype: Potion
Weight: 0.5

Description
===========================
You regain 2d4 + 2 hit points when you drink this potion.  The potion's red
liquid glimmers when agitated.

You can shorten the lookup time if you know what category your search falls under:

$ lookup5e --monster goblin

is also identical to

$ monster5e goblin

with both returning:

Goblin

HP: 7 (2d6)
AC: 15 (Leather Armor, Shield)
Speed: 30 ft.
Challenge Rating: 1/4

STR	DEX	CON	INT	WIS	CHA
8 (-1)	14 (+2)	10 (+0)	10 (+0)	8 (-1)	8 (-1)

Type: humanoid (goblinoid)
Size: Small
Alignment: Neutral Evil
Senses: Darkvision 60 Ft.
Skills: Stealth +6
Languages: Common, Goblin


Description
===========================
*Traits*
Nimble Escape: The goblin can take the Disengage or Hide action as a
bonus action on each of its turns.

*Actions*
Scimitar: Melee Weapon Attack: +4
to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage.

Shortbow:
Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: 5 (1d6 + 2)
piercing damage.

You can also try:

$ spell5e fireball

and

$ item5e deck of many things

Metadata

Release files for DnD4py 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DnD4py 1.0.5
File Size Uploaded Provenance
DnD4py-1.0.5.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for DnD4py 1.0.5
File Interpreter ABI Platform
DnD4py-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / DnD4py-1.0.5.tar.gz

Download URL DnD4py-1.0.5.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
156cd78f1d8ab78989c62a53029de57c824443fb0735ffa3563b8ccc3787b4c4
BLAKE2b-256 checksum
How to use checksums
590840236ac75fddb812401fb1c8f1c372987ad9017567118a80d77aacccaee2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.9 CPython/3.6.4

Release files / DnD4py-1.0.5-py3-none-any.whl

Download URL DnD4py-1.0.5-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43da3f2017b5ca3012aaba3de0d8064ff6a77fb0d8e1ef394744caab91996dd4
BLAKE2b-256 checksum
How to use checksums
529bb6d0b603132e8c875848d0d61559139ac791a38eb750e764e10497fc6ae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.9 CPython/3.6.4

Security for DnD4py 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page