/partyKeeper

A tabletop RPG inventory/character manager with deep party integration

Primary LanguagePython

Party Keeper

Party keeper is a character / inventory manager for tabletop RPGs like DnD, Pathfinder or Cyberpunk.

It combines party elements such as Item creation and sharing allowing a DM to create items as cards in the application which can be given to players through the course of play and which players themselves can swap with each other as the need arises.

Item cards are also integrated with the inventory and character sheets in such a way that dropping an item card that represents a piece of armor, clothing, jewelery or weaponry into a slot on your character sheet will augment your characters statistics in the same way you would expect in an ARPG like Diablo or Grim Dawn.

The application has scope to add session planning features including a calendar feature for a party to coordinte availability to play.

There should be a way to have several characters kept in the application that may potentially belong to different gaming parties.

The DM should be able to allocate experience to players on the fly. There would be two categories of experience that can be awarded. RP experience and combat experience. It would be at the DMs discression as to whether they allocate experience during a session, for example RP experience might be awarded after a social encounter as a bonus to the players involved. Combat experience may be awarded at the end of a combat. The DM may also choose to award experience for the whole session at once when the session is finished. Players should receive an alert when they level up, and have the option to run the level up routine immediately or at a later time.

Application design and architecture

The application will be built on either PostgreSLQ or MariaDB. The application front end will be written in Vue.js and will consume an API that is driven by the Django REST Framework and use JWT authentication

The frontend will also utilise the DND5E API for things like character creation, spells, classes, levels etc

Character architecture

PartyKeeper Architecture

Overview mockup

Overview mockup

Setup

Clone the repo

cretate a virtual environment to install deps into and activate it. Then install your deps

python -m venv venv && source venv/bin/activate

pip install -r requirements.txt

You will need MySQL or MariaDB

sudo apt update
sudo apt install mariadb-server
sudo mysql_secure_installation

Connnect to the DB as the root user and create a new database, admin user and a user for partyKeeper

sudo mysql

> CREATE DATABASE partyKeeper

> GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

> CREATE USER 'pkUser'@'localhost' IDENTIFIED BY 'somePassword';

> GRANT ALL ON 'partyKeeper'.* TO 'pkUser'@'localhost';

> FLUSH PRIVILEGES;

create an env file and move your secret key and database details there

import os

os.environ.setdefault("DB_USER", 'pkUser')

os.environ.setdefault("DB_PASS", 'somePassword')

os.environ.setdefault("DB_ADDRESS", "localhost")

os.environ.setdefault("DB_NAME", "partyKeeper")

run your migrations create a superuser

python manage.py makemigrations && python manage.py migrate
python manage.py createsuperuser

create a branch and get to work

git checkout -b new_branch

Build

There may be several dependencies that need to be installed. For instance you may need the mysql driver installed and other python packages for to build those drivers. I will add all that later

For now just have two terminal windows open and in one, from inside the project run

cd pkFrontend
npm run dev

in the other terminal

python3 manage.py runserver 5000