What it does
This project generates cards for spells, items, or monsters for RPG games. The generator is web-based and runs in your browser, there is no need to install any software. 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 from the data shown below. Don't worry if you don't want to edit the raw data - there is a simple user interface for creating the cards.
{
"count": 1,
"color": "maroon",
"title": "Burning Hands",
"icon": "book-cover",
"contents": [
"subtitle | 1st level evocation",
"rule",
"property | Casting time | 1 action",
"property | Range | Self (15ft cone)",
"property | Components | V, S",
"rule",
"fill | 1",
"text | Each creature in a 15-foot cone takes 3d6 fire damage.",
"text | The fire ignites any flammable objects in the area.",
"fill | 3",
"section | At higher levels",
"text | +1d6 damage for each slot above 1st"
]
}
Live demo
Try it out yourself. Press "Load sample" in the menu, then press "Generate" and have a look at the newly opened window/tab that contains all the generated cards.
Documentation
This is not a complete documentation, but some information that should help you get started.Card JSON data
-
countThe number of times this card is repeated. Useful for consumable items that you hand out multiple times. -
colorName of the card color. You can use all CSS color names. -
iconName of the card icon. You can use most icons from game-icons.net. For example, the file name of this dagger is "plain-dagger.png", so you would use "plain-dagger" as the icon name. Additional custom icon names are defined incss/custom-icons.css. -
icon_backOptional. Name of the big icon on the card back. If not specified, the icon from the "icon" property is used. -
background_imageOptional. URL of a backgound image for the card back. If specified, replaces the back icon. -
titleThe title of the card. -
contentsAn array of strings, specifying all card elements, in top to bottom order (see below).
Card elements
Each card element is a string of the following format:
"element | param1 | param2 | ..."
The following elements are available:
-
subtitleSlightly larger italic text.- Param1 - the subtitle text.
- Param2 - right aligned additional content.
-
ruleA horizontal rule. -
dottedruleA horizontal "dotted" line. (WIP) -
propertyA property line. The property description is indented if it spans more than one line.- Param1 - the property name (in bold).
- Param2 - the property description.
-
ulpropertyA property line. The property name is underlined and bold, the property description is indented if it spans more than one line.- Param1 - the property name (in bold and underlined).
- Param2 - the property description.
-
detlistA detail list, with a name, descirption and bullet point list- Param1 - the name of the list (in bold)
- Param2 - description of the list
- Param3+ - continuous bullet points for the list
-
descriptionSame as property, but text is not indented. -
textA simple paragraph of text.- Param1 - the text.
-
sectionA subsection header, with a horizontal rule below the subsection name.- Param1 - the subsection name.
- Param2 - right aligned additional content.
-
boxesA line full of empty boxes. Useful for items with charges and actions with limited use.- Param1 - number of boxes.
- Param2 - size of a box (in "em" css unit, where 1.0 is the size of the letter 'e').
- Param3 - text.
-
dndstatsA Dungeons&Dragons stat block.- Param1 - Strength score.
- Param2 - Dexterity score.
- Param3 - Constitution score.
- Param4 - Intelligence score.
- Param5 - Wisdom score.
- Param6 - Charisma score.
-
swstatsA Savage Worlds stat block.- Param1 - Agility dice.
- Param2 - Smarts dice.
- Param3 - Spirit dice.
- Param4 - Strength dice.
- Param5 - Vigor dice.
- Param6 - Pace score.
- Param7 - Parry score.
- Param8 - Toughness score.
- Param9 - Loot value.
-
fillA dynamically resized empty element that takes up a portion of unused space on the card. You can use this to vertically center text by adding one of these before and after the text you want to center.- Param1 - the number of units of empty space to use.
-
bulletA bulleted text line.- Param1 - the text.
-
boldbulletA bold bulleted text line.- Param1 - the text (in bold).
-
pictureAn inline picture.- Param1 - URL of the picture.
- Param2 - Height in pixels.
-
desclist (WIP)A continous described line of text, parameters go in pairs, first one is bold next is not.- Param1 - The Name of the item
- Param2 - The Description
- Param3+ - continue in pairs for a list of described items
-
tableheadA Table with a header- Param1 - The number of colums for your table
- Param2-(the number in param1) - The Header
- Param?-? - The Rest of the table, goes in groups based on Param1
-
tableA Table without a header- Param1 - The number of colums for your table
- Param?-? - The table, goes in groups based on Param1
Special tags
You can use special non-standard HTML tags created especially for this card editor:
<tag param1="" param2="" ...>
The following special HTML tags are available:
-
iconPrints a Game Icon using the gameicons-font.- name - the name of the icon.
- size - size of the icon (in "pt" css unit).
FAQ
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.