Skip to main content

Character Generator plus other tools for the Hyperborea RPG, 3rd Edition

Project description

hyperborea3

Tests Code style: black

An app for creating randomly-generated characters for the Hyperborea 3rd edition tabletop roleplaying game.

Table of Contents

Installation

$ python -m pip install hyperborea3

Usage

The main entry point to this application is the PlayerCharacter class. By default, a random character will be generated with the following options:

  • Abilities are rolled using dice method III (4d6 drop lowest)
  • Class is randomly selected from amongst those where ability score requirements are met
  • 0 experience points
  • All character class options are enabled
  • The by-the-book descending Armour Class system is used
from pprint import pprint
from hyperborea3.player_character import PlayerCharacter

pc = PlayerCharacter()
pprint(pc.to_dict())

See Sample Output for some examples of what the generated characters look like.

Parameters

Parameter Description
method int, default 3
Dice method used to roll ability scores.
Allowed Values: If no class_id is passed, 1, 2, 3, 4, 5 may be used. If a specific class_id other than 0 is passed, any value passed is ignored and method=6 is automatically used.
Example: pc = PlayerCharacter(method=5) to create a random-classed PC using dice method V for rolling ability scores.
class_id int, default 0
If 0, a random class will be selected and dice methods 1 through 5 can be used. Otherwise, a value of 1 to 33 can be entered, and the dice method will automatically be set to 6, regardless of what is passed.
Allowed Values: 0 through 33. See class_id_map below.
Example: pc = PlayerCharacter(class_id=10) to create a Ranger.
subclasses int, default 2
Determines which classes are selected from when generating a character of a random class.
Allowed Values: 0=Principal classes only (Fighter, Magician, Cleric, Thief); 1=Principal classes plus subclasses; 2=Principal classes, subclasses, and variant subclasses like the Ice Thief and Fell Paladin.
Example: pc = PlayerCharacter(subclasses=0) to create a random character from one of the 4 principal classes.
xp int, default 0
The number of experience points the character has. This will determine the character's level, which is capped at 12.
Allowed Values: Any positive integer
Example: pc = PlayerCharacter(class_id=1, xp=4000) to create a 3rd-level Fighter.
ac_type str, default "descending"
Choose whether to use ascending or descending AC system.
Allowed Values: "descending", "ascending"
Example: pc = PlayerCharacter(ac_type="ascending")

Sample Output

Check out the directory of sample characters to examine and explore the data structures.

class_id_map

Use this as a reference if you need to pass class_id to generate a character of a specific class.

1: "Fighter"
2: "Magician"
3: "Cleric"
4: "Thief"
# --------------> subclasses=0 will return a choice from above this line
5: "Barbarian"
6: "Berserker"
7: "Cataphract"
8: "Huntsman"
9: "Paladin"
10: "Ranger"
11: "Warlock"
12: "Cryomancer"
13: "Illusionist"
14: "Necromancer"
15: "Pyromancer"
16: "Witch"
17: "Druid"
18: "Monk"
19: "Priest"
20: "Runegraver"
21: "Shaman"
22: "Assassin"
23: "Bard"
24: "Legerdemainist"
25: "Purloiner"
26: "Scout"
# --------------> subclasses=1 will return a choice from above this line
27: "Fell Paladin"
28: "Ice Lord"
29: "Fire Lord"
30: "Death Soldier"
31: "Mountebank"
32: "Fire Thief"
33: "Ice Thief"
# --------------> subclasses=2 will return a choice from above this line

Use Cases

I developed this package to generate characters for my personal gaming group. I use the package along with FastAPI and host the app on Heroku. I use it in conjunction with Google's app script (javascript) to get the character data from the Heroku endpoint, and populate it into a Google Sheets character sheet. It's a bit janky, but it gets the job done for us. I put a lot of work into implementing the rules to generate characters of any class and any level up to the game's maximum of level 12.

If someone out there were to use this and create a proper front-end website for it, that would bring me much joy. If you use this, please share what you've built with it!

That being said, I also plan to hone my own web skills and try to build a web-based front end for it, but that will take time.

Links

App on Heroku: All the endpoints prefixed with /hyperborea3/ use this package. If you are curious about the container that gets deployed, see this repo.

Google Sheet: with character generator integrated via Google's Apps Script. If you are intersted in simply making a copy of the Google Sheet character generator for your gaming group to use, see this blog post for instructions on how to do that.

Future Development

I plan to implement the following features into this package, as time and motivation allows:

  • Additional character data:

    • Secondary Skills
    • Random name generation based on the tables in the rulebook
    • Height and Weight based on the tables in the rulebook
  • Add detailed html-formatted spell descriptions to the spells database table in order to enable spell lookups and possibly some sort of tool to create character spellbook documents. Detailed spell information could be added to the character output as well.

  • A fully-detailed monster database table that would enable the lookup of full monster stat blocks.

  • A random treasure generator tool. Pass the treasure type and get a randomly generated result with monetary treasure and/or magic items.

  • Given completed spells, monsters, and treasure data, I'd like to create compendiums for use with Foundry VTT.

Contributions

Pull requests for small updates and bug fixes are always welcome. If you have a larger update you're interested in contributing, please create an Issue and we can have a conversation about it. If you are a talented front end developer and are interested in creating pretty web tools for this, I'd love to do whatever I can to help you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperborea3-0.3.2.tar.gz (113.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperborea3-0.3.2-py3-none-any.whl (107.8 kB view details)

Uploaded Python 3

File details

Details for the file hyperborea3-0.3.2.tar.gz.

File metadata

  • Download URL: hyperborea3-0.3.2.tar.gz
  • Upload date:
  • Size: 113.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for hyperborea3-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4cbccad6fa0fda9ab6abf5c4416290fb7042b161758226a70c1736e01c2885ac
MD5 df645a70a705b31ac481f1995383f646
BLAKE2b-256 d7c507a9e955d12b2889951127d114e585462d7a0da062996968c11bed272cf7

See more details on using hashes here.

File details

Details for the file hyperborea3-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: hyperborea3-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 107.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for hyperborea3-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4cbc5cdb730e752972aee4c0838d7bd78a73db383ba1717cfb725946443c27e
MD5 cbb2fc407fe2739ab9c63f5ded64ebb2
BLAKE2b-256 75180b3a47738c2f7a320b3ce458bde3cf868cdc5d102cc491935a26d2abd81e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page