View on GitHub

Rpg-cards

RPG spell/item/monster card generator

Download this project as a .zip file Download this project as a tar.gz file

What it does

This project generates cards for spells, items, or monsters for RPG games. The cards are packed on an A4 page such that you can print it double sided and get cards with a front and back. Here's an example of what you can create:

You can define the content of the cards yourself using simple JSON data. The above example was generated by this:

{
    "count": 1,
    "color": "dimgray",
    "title": "Full Plate",
    "icon": "custom-armor-heavy",
    "contents": [
        "subtitle | Heavy armor (1500gp)",
        "rule",
        "property | AC | 18",
        "property | Strength required | 15",
        "property | Stealth | Disadvantage",
        "rule",
        "fill-2",
        "description | Heavy | Your speed is reduced by 10 feet.",
        "description | Stealth | You have disadvantage on Stealth.",
        "fill-3"
    ]
}

Live demo

Try it out yourself

Documentation

This is not a complete documentation, but some information that should help you get started.

Card JSON data

Card elements

Each card element is a string of the following format:

element | param1 | param2

The following elements are available:

FAQ

Is there a user interface for defining the cards?

No, at this point, you need to be able to understand and edit JSON data to define the cards.

Why is there no user interface for defining the cards?

I don't know how to create nice user interfaces, and a text-based input works just fine for me. You are welcome to contribute to this project though if you feel it should have a graphical UI.

Can I change the layout of the cards?

You'll need to edit the CSS and Javascript files to change the layout at this point. I might add some customization options later on.