MonsterGen
MonsterGen is based on Fortuna and Storm by Robert Sharp.
- Fortuna: Random Value Toolkit for Generative Modeling.
- Storm: High-performance Random Number Engine.
Installation
$ pip install MonsterGen
Index
- CR
- Random Monsters
- Random NPCs
- Random Traps
- Random Treasure
CR Class
CR(cr) -> CR
- cr: required int, -3 to 30
The CR class is a numeric system representing the relative power of a monster in D&D 5e. This system is a bit funky with values below 1, be careful... here be dragons! CR less than 1 are printed as fractions but valued mathematically as integers [-3, 0]. See below:
CR Mapping
from MonsterGen import CR
print(f"CR: {CR(-3)}")
print(f"CR: {CR(-2)}")
print(f"CR: {CR(-1)}")
print(f"CR: {CR(0)}")
print(f"CR: {CR(1)}")
print(f"CR: {CR(2)}")
print(f"CR: {CR(3)}")
print('...')
print(f"CR: {CR(30)}")
CR: 1/16
CR: 1/8
CR: 1/4
CR: 1/2
CR: 1
CR: 2
CR: 3
...
CR: 30
Party Adapter Class Method
CR.player_adapter(average_level, num_players=5, difficulty=0) -> CR
Class method for computing CR from party composition and difficulty setting.
- average_level: required int, 1 to 20
- num_players: optional int, 1 to 9
- difficulty: optional int, -5 to 5
- Stupid Easy: -5 to -4
- Easy: -3 to -2
- Normal: -1 to 1
- Epic: 2 to 3
- Legendary: 4 to 5
Monster Class
Monster(cr, monster_type=None) -> Monster
- cr: required int, -3 to 30
- monster_type: optional str, ["Aberration", "Beast", "Celestial", "Construct", "Dragon", "Elemental", "Fey", "Fiend", "Giant", "Humanoid", "Monstrosity", "Plant", "Ooze", "Undead"]
from MonsterGen import Monster, CR
monster_cr = CR(10)
print(Monster(monster_cr, monster_type='Aberration'))
Name: Grell
Type: Aberration
CR: 7
Hit Points: 164
Armor Class: 12
Attack Bonus: 9
Typical Damage: 45 - 50
Save DC: 15
XP Value: 2900
NPC Class
Npc() -> Npc
Produces a random NPC.
from MonsterGen import Npc
print(Npc())
Profession: Bookbinder
Race: Tiefling
Background: Soldier
Appearance: Flamboyant or outlandish clothes
Mannerism: Speaks in rhyme
Hit Points: 8
Armor Class: 11
Damage: 1
Random Trap Factory Function
random_trap(cr, dam_type=None) -> Trap
- cr: required int, -3 to 30
- dam_type: optional str, ['bludgeoning', 'falling', 'piercing', 'slashing', 'poison', 'acid', 'fire', 'lightning', 'cold', 'necrotic']
Produces a random trap. If dam_type is None it will choose a random damage type.
from MonsterGen import random_trap
print(random_trap(10, dam_type="fire"))
Name: Inferno
Type: Minor Trap
CR: 10
Spot & Disarm: DC: 10
Save vs: WIS DC 11 for half damage
Damage: 3d4 fire
Disarm XP: 5900
Monster Loot Factory Function
monster_loot(cr) -> Loot
- cr: required int, -3 to 30
Produces random treasure for a single monster. Typically this is just coinage.
from MonsterGen import monster_loot
print(monster_loot(10))
Copper Coins: 1800
Electrum Coins: 50
Horde Loot Factory Function
horde_loot(cr) -> Loot
- cr: required int, -3 to 30
Produces random treasure for a boss or horde of monsters. High-quality loot with magic items appropriate to the CR.
from MonsterGen import horde_loot
print(horde_loot(10))
Copper Coins: 400
Silver Coins: 7000
Gold Coins: 2200
Platinum Coins: 140
Jewels: 50 GP
Oil of etherealness
Quaal's feather token
Metadata
Release files for MonsterGen 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| MonsterGen-0.0.7.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| MonsterGen-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.0 kB
Release files / MonsterGen-0.0.7.tar.gz
| Download URL | MonsterGen-0.0.7.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1ee317dae2238efa0590f946e49cc4458cbdf2256a9ddd4940c89d87f6c86b7
|
|
BLAKE2b-256 checksum How to use checksums |
0f10c87eb48e185b413fb8bf48a9da5707f3053b5dc3b049decdb4070e9c3462
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / MonsterGen-0.0.7-py3-none-any.whl
| Download URL | MonsterGen-0.0.7-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4f104bd8f66e42bc42db2620a77a678f593ce54b8592d8fa42f688108f9cc9e
|
|
BLAKE2b-256 checksum How to use checksums |
d8fff194b323d44798455790ede695162eea8500977a8b8f0717752c03ac2b96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|