A package to calculate the probability of one-shotting monsters in Dungeons and Dragons
Project description
One-Shot Calculator
There's a saying in some RPGs: the best debuff for your enemies is dead.
In edition 3.5 of Dungeons and Dragons, it is possible to make a character that does vastly more damage than you will ever need. Once you can reliably one-shot the kinds of monsters you're likely to face, you can focus the rest of your character's resources on doing other things, like not dying.
Thus, one_shot_calculator. This is Python package to calculate your chances of one-shotting monsters of a particular challenge rating. It can print out a histogram of your chances for one-shotting monsters, and has various other functions you can use to calculate various other useful things.
Install
If you aren't used to using Python, the easiest way to use one_shot_calculator is to start from this Google Colab notebook. Just open up the notebook, try out the examples, then try modifying the code to do what you want to do.
If you are familiar with Python, you can instead install with:
pip install one-shot-calculator
Usage
The package contains three modules and a CSV file full of monsters.
The CSV is derived from an Excel sheet created by Giant in the Playground Forum user ezkajii. It contains nearly all monsters published by Wizards of the Coast for D&D 3.0 and D&D 3.5.
process_csv.py contains functions for processing the CSV file so it can be used in the other modules.
discrete_dists.py contains general functions for manipulating discrete probability distributions with integer outcomes.
one_shot_calculator_3p5.py contains functions for manipulating probability distributions that describe your chance of one-shotting opponents in D&D 3.5. This includes distributions for damage dealt by attacks and for saving throws. You build a distribution describing your chance of one-shotting opponents, then use the function one_shot_histogram to make a histogram of your chance of one-shotting opponents.
Future Extensions
That's up to you! Here are some things I could do if people are interested:
-
More user-friendliness: I could set this up so you can do some rudimentary things without programming, possibly with some sort of web interface.
-
More editions: I could do this for a different edition of D&D, Pathfinder, or some other appropriate RPG. In order to do that I need a CSV full of monsters for that edition. I have one for AD&D, so I might do that next.
-
More examples: I'd love to include a super-high-optimization build in the examples in the Colab notebook. If someone can walk me through a standard opener for the Mailman or Cindy or the like I can add that as an example.
-
More sensitivity: In order for the one-shot histograms to be fully accurate they need to take into account immunities. I could add some code to process_csv to add columns for common types of immunities so you can condition on them in your one-shot distributions.
-
More versatility: If you're skeptical about one-shotting things, there is a more "normal" concept, average damage per round (DPR). It would be easy to add a DPR calculator. I could also give you an overall one-shot percentage with a given encoutner table, or even try to make a setup to answer more complicated questions like whether you can kill a monster before it kills you.
-
More efficiency: This code is quite slow! It could probably be a lot faster.
-
More fun stuff: Want code for specific spells? Anarchic Initiate Chaotic Surges? Other specialized things?
Acknowledgements
This project would not be possible without ezkajii's laboriously compiled Monster Compendium.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file one_shot_calculator-0.1.0.tar.gz.
File metadata
- Download URL: one_shot_calculator-0.1.0.tar.gz
- Upload date:
- Size: 362.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39675ecefec0a2a9413851b2c0de8b40ff55f176238a307ed305833d8682d5df
|
|
| MD5 |
4cd4bef32c02d51c477ccb75deefe723
|
|
| BLAKE2b-256 |
d0bbcb087721165d14d3ca8440a2d53f32aed55e851efc5eabfc5bb061867bfd
|
File details
Details for the file one_shot_calculator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: one_shot_calculator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 365.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a63dc3b5abf92bb4df42c881474957707e1c672c747698eb7f13fb1735e3c2f
|
|
| MD5 |
be2c1c08d41e335db1a0548a408e7e86
|
|
| BLAKE2b-256 |
863dbd4008d37953f320597e3d620bc2ca3eae3071f53cb18045cf05e229dee5
|