Character Generator plus other tools for the Hyperborea RPG, 3rd Edition
Project description
hyperborea3
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 render. I use it in conjunction with Google's app script (javascript) to get the character data from the REST 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.
Links
App on render: 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.
Web-based Print-and-Play Character Generator: Generate a character using the dropdowns to set options. Note that if you generate a specific class, the dice method automatically changes to VI. You should be able to fit the resulting character sheet on a single printed page. In my own experimentation, I've needed to set the scale to 70% to get everything to fit. Enjoy!
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
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 hyperborea3-0.7.2.tar.gz.
File metadata
- Download URL: hyperborea3-0.7.2.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01be052343975b1b54fe067bc0165ec7feb4b467a3bc623d5e3020a9befe9c56
|
|
| MD5 |
59bd55dde68530173db1ed32e2553134
|
|
| BLAKE2b-256 |
2ad82c8a4ce327db7d192dbe0a948fd451259ace6a489cd6aac9df6c11c7d176
|
Provenance
The following attestation bundles were made for hyperborea3-0.7.2.tar.gz:
Publisher:
publish.yml on jderam/hyperborea3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hyperborea3-0.7.2.tar.gz -
Subject digest:
01be052343975b1b54fe067bc0165ec7feb4b467a3bc623d5e3020a9befe9c56 - Sigstore transparency entry: 1050642711
- Sigstore integration time:
-
Permalink:
jderam/hyperborea3@9be6761342619676c5b9b8a7ab12cd0d6f8fbd6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jderam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9be6761342619676c5b9b8a7ab12cd0d6f8fbd6f -
Trigger Event:
push
-
Statement type:
File details
Details for the file hyperborea3-0.7.2-py3-none-any.whl.
File metadata
- Download URL: hyperborea3-0.7.2-py3-none-any.whl
- Upload date:
- Size: 267.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bddc178da9a0ce476c066a4a3faf7a2bc2268095dc3bcf030e029c94704e6120
|
|
| MD5 |
f9b11b886ff80754430bfc034b6e5221
|
|
| BLAKE2b-256 |
b97c10815628ca4de6bd81ed6861a8b8ea7d2cf734a4bff78fc134bf0e7ac208
|
Provenance
The following attestation bundles were made for hyperborea3-0.7.2-py3-none-any.whl:
Publisher:
publish.yml on jderam/hyperborea3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hyperborea3-0.7.2-py3-none-any.whl -
Subject digest:
bddc178da9a0ce476c066a4a3faf7a2bc2268095dc3bcf030e029c94704e6120 - Sigstore transparency entry: 1050642715
- Sigstore integration time:
-
Permalink:
jderam/hyperborea3@9be6761342619676c5b9b8a7ab12cd0d6f8fbd6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jderam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9be6761342619676c5b9b8a7ab12cd0d6f8fbd6f -
Trigger Event:
push
-
Statement type: