Skip to main content

Gloomhaven Helper Server Client

Supports Gloomhaven Helper with network sync up to version 8.4.x

This project provides an open source alternative to talk to the application "Gloomhaven Helper".

A simple example would be to run a headless server (no GUI) and connect to it with your clients. The purpose of this would be to have a small inexpensive always-on computer with your gloomhaven game state (like a raspberry pi). With port-forwarding enabled in your router, your friends can connect over the internet and you don't have to forward internet traffic to your personal computer.

Another use-case is to connect as a client and hook it up to a bounch of hardware that changes depending on the game state.

The original purpose for this project was to connect an inexpensive wifi-enabled micro-controller to Gloomhaven Helper app and scan rfid/nfc tags to interact with the game state (like setting initiative or adding/removing characters). Because of this, the core protocol is implemented in c++ and wrapped in swig for python bindings. If you want to use this project with c++ directly, look at the c++ codebase and the Makefile to figure out how to use it.

Installation

Requires python 3.7 or higher

For an x86 (intel/amd cpu) running linux or macos, install with pip (3):

pip install gloomhavenhelper

For arm64/aarch64 systems, install with:

pip install https://github.com/Gronis/gloomhaven-helper-rfid/releases/download/0.1.1/gloomhavenhelper-0.1.1-py3-none-linux_aarch64.whl

for older arm versions, open an issue and I can see if I can provide a build for those systems as well.

Windows is not supported or tested. If you have a windows machine and want to host a server, I recommend just to use the original Gloomhaven Helper java application as a server.

Usage:

Use as a sever

python -m gloomhavenhelper

Use as a client

#!/usr/bin/env python

import glommhavenhelper as ghh
import asyncio

TCP_IP = '127.0.0.1' # server ip
TCP_PORT = 58888     # server port


async def on_game_state(message_number, game_state):
    # Do things with the game state.
    print("Got game state {}, round {}".format(message_number, game_state.round))
    # To understand what you can get out of the game state print it out
    ghh.print(game_state)


async def main():
    client = ghh.Client(TCP_IP, TCP_PORT)
    client.on_game_state = on_game_state
    await client.connect()
    print("Connected")

asyncio.get_event_loop().create_task(main())
asyncio.get_event_loop().run_forever()

Example of projects:

  • Video of scanning a tag/card and changing initiative

Build

This project requires

  • g++/clang++ or another c++ compiler
  • python3
  • swig
  • wheels (build wheels binary)
  • twine (upload wheels binary to pypi repository)

How to build

Run make python to build python code. The python module is placed in a out directory. Change to this directory and import gloomhavenhelper to try out your new build: cd out && python.

Run make wheel to build wheel library. The build will be located in dist folder. You can then install it with pip install dist/gloomhavenhelper-<some-more-stuff-here>.whl

If you want to clean up the workspace because your build is failing because of some old cached file, or you just want to clean up the workspace, use make clean.

License: MIT

Contributers

- Robin Grönberg

Release files for gloomhavenhelper 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for gloomhavenhelper 0.1.3
File Interpreter ABI Platform
gloomhavenhelper-0.1.3-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details
gloomhavenhelper-0.1.3-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 4.3 MB

Release files / gloomhavenhelper-0.1.3-py3-none-manylinux1_x86_64.whl

Download URL gloomhavenhelper-0.1.3-py3-none-manylinux1_x86_64.whl
Size 3.6 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
76eb8db65fc68688a84f8242fe66954fc93a48e42ad0ab2bd7af1ea1fbec1392
BLAKE2b-256 checksum
How to use checksums
3cd154934017a862f47e84b6c76a6807784b3a412f4da223b8c582ad21ac1587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

Release files / gloomhavenhelper-0.1.3-py3-none-macosx_10_12_x86_64.whl

Download URL gloomhavenhelper-0.1.3-py3-none-macosx_10_12_x86_64.whl
Size 685.5 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1042b2397e3530af30b6a8ed7e9f1963c23d958aee99ee75efe324a3219c7636
BLAKE2b-256 checksum
How to use checksums
63ca117557ce0254fd484d7d9ab3c9c17ebb0ca3d177b8b4f64bd4501fbdad45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page