This project is a command-line tool that automatically generates high-quality talent cards for the Genesys Roleplaying Game. It reads talent data from a JSON file that follows the community-standard schema from Genesys Ref and uses an HTML template to render a PNG image for each talent, ready for printing.
The primary goal is to provide a simple and fast way to create physical assets for your game sessions without manual design work.
- Automated Card Generation: Run a single command to generate cards for every talent in a sourcebook.
- High-Quality PNG Output: Creates crisp, print-ready PNG images suitable for physical cards.
- Customizable Templates: The look and feel of the cards can be changed by editing a single HTML and CSS file.
- Advanced Tag Parsing: Accurately renders Genesys-specific formatting, including dice symbols.
Here's are some example cards generated by this tool:
| Counteroffer | Encouraging Song | Distinctive Style | Blood Sacrifice |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- Go: Version 1.18 or later must be installed.
- Google Chrome: The tool uses Chrome in headless mode to render the HTML. Google Chrome must be installed.
- A Genesys Data File: A
.jsonfile containing game data. You should own the content contained in the json file (see https://genesysref.netlify.app/disclaimer)
-
Clone the repository:
git clone <your-repo-url> cd <your-repo-name>
-
Run the generator: The program takes two command-line arguments: the path to your sourcebook
.jsonfile and the desired output directory.go run main.go /path/to/your/sourcebook.json ./output-directory
For example:
go run main.go "./data/core-rulebook.json" "./cards"
-
The generated PNG files will be saved in the output directory.
For those interested in the technical workflow, here is the high-level process:
- Load Data: The program starts by loading and parsing the talent data from the sourcebook
.jsonfile into Go structs. - Process Tags: It then iterates through each talent's description, parsing the special Genesys tags (like
{@dice}or{@skill}) into the appropriate HTML. It uses an "inside-out" parsing strategy to correctly handle nested tags. - Inject into Template: The processed data for each talent is injected into a customizable HTML template.
- Render and Screenshot: Finally, it uses a headless Chrome browser to render the final HTML for each card, takes a screenshot of the card element, and saves it as a high-quality PNG file.
- Go: The core application logic.
chromedp: A Go library for controlling a headless Chrome browser.- HTML & CSS: For templating the cards.
- Tailwind CSS: Used in the template for rapid UI development.
This project can be expanded. Feel free to fork the repository, make improvements, and submit a pull request. Bug reports and feature requests are welcome. Potential ideas include:
- Support for other card types (adversaries, items, etc.).
- Additional card templates.
- The JSON schema used is created by Genesys Ref.
- The card background image is from c-bec-k/GenesysRPG.
- The Genesys dice and symbol font is a fork from themensch/FFG-Genesys-Glyphs-and-Dice.



