Character Sheet Generator

My Character Sheet Generator has evolved from a simple random character generator for B/X D&D (Basic and Expert Set from 1981) or Labyrinth Lord (its retroclone), and my Halberds and Helmets house rules, to a flexible tool that takes SVG files and does something like a “form fill” using URL parameters.

2015-10-05 Character Sheet Generator Using New Face Generator

My Character Sheet Generator now uses my Face Generator. The rewrite is done and it’s time to go back to drawing some face elements! Elves!


Comments on 2015-10-05 Character Sheet Generator Using New Face Generator

Now drawing: dwarf beards.

– Alex Schroeder 2015-10-07 09:39 UTC

Add Comment

2015-09-03 How to add a new Character Sheet to Halberds n’ Helmets

My Character Sheet Generator is also a very general tool to parametrize SVG sheets. I use it as part of my Campaign Wiki. For my Greyheim campaign I generated a bunch of characters and most of the time, my players just pick one of them. No rolling of dice and purchasing of equipment before you can get started. If you click on any of the characters listed, it will take you to a page that integrates an SVG graphic.

Let’s take Aurora as an example. If you look at the raw data, you’ll see the parameters used:

name: Aurora
str: 9
dex: 16
con: 13
int: 9
wis: 11
cha: 7
level: 1

This gets translated into an URL for the image:;str=9;dex=16;con=13;int=9;wis=11;cha=7;level=1;... You can bookmark this URL and that’s your character sheet.

This is what it will look like:

Click to view just the image

If you want to edit the parameters, that’s easy to do. The SVG contains a link at the bottom. Or you can simply add /link to the URL:;str=9;dex=16;con=13;int=9;wis=11;cha=7;level=1;... Edit the parameters, submit, and update your bookmark.

You can provide your own character sheet. One of the parameters you provide is the URL to the character sheet. Here are some examples:

Let’s start with the basics.

  1. You need a SVG document like some of the above; use Inkscape to create such documents
  2. The SVG document needs text fields identified by id attributes; we’ll be using those as parameters
  3. You also need the fonts available as web fonts unless you rely on standard fonts
  4. Your SVG file needs to have the appropriate style information in order to use those fonts
  5. If you want to print the document, you probably also need the font installed on your computer

If you want to create an SVG character sheet by hand, you can read the W3C Recommendation and the Jenkov Tutorials. Documents created using Inkscape are usually quite bloated. I still prefer using Inkscape. :)

Let’s look at this id business. Consider the default character sheet. We’ll be using the “name” parameter. Look at the source code of the document (cmd u on my laptop using Firefox) and search for id="name". You’ll find the following:

       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Purisa;-inkscape-font-specification:Purisa Light"

This is a lot of bloat. This would be enough, I guess:


When our URL now contains name=Aurora, the text element with the id “name” will contain the value “Aurora”.

You can actually use the Character Sheet Generator to show you what the ids are:

Click to view just the image

Multi-line fields such as “abilities” or “property” are simply text elements with at least two lines of text, two tspan elements.

My guess is that what you’d actually prefer is to convert an existing character sheet PDF. Let’s take the One Seven Design character sheet for Stars Without Number. John Harper did these character sheets. He says: “Yes, you have my permission.” You can find his other character sheets on his blog. He also runs a patreon which I currently support because of the many cool game he has created (Lady Blackbird, The Regiment: Colonial Marines 2.5, World of Dungeons 1979 – note the b/w variant – and many more).

You need a build of Inkscape with Poppler. If you’re using Homebrew on a Mac:

alex@Megabombus:~$ brew info inkscape
homebrew/x11/inkscape: stable 0.91 (bottled), HEAD
A professional vector graphics editor
/usr/local/Cellar/inkscape/HEAD (983 files, 120M) *
  Built from source with: --with-poppler
==> Dependencies
Build: boost-build ✔, intltool ✔, pkg-config ✔
Required: bdw-gc ✔, boost ✔, cairomm ✔, gettext ✔, glibmm ✔, gsl ✔, gtkmm ✔, hicolor-icon-theme ✔, little-cms ✔, pango ✔, popt ✔
Optional: poppler ✔
==> Options
	Build with poppler support
	Install HEAD version

So, now we’re set. We have Inkscape. It has Poppler support. This will allow you to open PDF files using Inkscape. You’ll have to pick one page:

Let’s say you picked the Warrior page. Load it into Inkscape. This is what it looks like:

Use Ctrl-Shift-T for text styles and pick a nice font and size and set it as the default. I used Noticia Text which I downloaded from Google Fonts.

Click or double-click on an element such as the letter “E” in “NAME” in order to select it.

Switch to the text tool using F8 and create a text field where you want the name to appear. Put some text into the text field – I like to use a bunch of underscores: “”. You can remove these at the end by editing the SVG file in a text editor. If you remove them now, Inkscape will delete the empty text field. Also, once you have removed the text content, you shouldn’t edit these files using Inkscape. That’s why I like those underscores.

In this example, I’m going to write “Alex” into the text field. Basically, that’ll be the default value if you don’t provide a name parameter.

Use F1 to switch back to selecting objects. This allows you to move the text around. I like to use the arrow keys at this point.

Use Ctrl-Shift-O for object properties and set the id to the parameter name you want (i.e. “name”) and delete the label (we have no use for it).

If you want, you can take a look at the XML of the text element you just created using Ctrl-Shift-X.

Repeat as necessary. This is tedious job.

I’ve done it for three fields. This is the SWN Warrior SVG using three default values:

Click to view just the image

And here’s the same file with three parameters set:

Click to view just the image

If you want to edit it, use /link in the URL to edit the parameters.

You can debug it using /show in the URL:

Click to view just the image

Now all we need to do is add the remaining fields and do it for all the character sheets...

If you want to add a character sheet to Campaign Wiki, you’ll need to contact me, or you’ll need to host it on a public host. Or you could download and install the script on your own server...


Add Comment

2014-12-08 Character Generator with Random Pictures

My Halberds and Helmets Character Sheet Generator now picks a random portrait for characters. Take a look at the folders men and women on this page. Here is also where you can find links to the book tags mentioned below.

A few days ago I wondered about a face generating web service. Unfortunately, I didn’t really find anything useful. I wondered about random Mii generation, looked at some random avatar designing services, and pondered my options. I started looking at a prototype which would take a very simple face from an SVG file and just randomly alter some stuff. But then I realized that the haircut was going to be really important to distinguish one sex from the other and that I would never be able to do interesting haircuts using a few lines placed by an algorithm. Not without some serious thinking about automatic haircut generation, at any rate.

That’s when I decided to look at extracting faces from freely available fotos. Sometimes these can be found on Flickr, for example. I looked for databases of faces. When I looked at a database of faces from Flickr it had plenty of kids and babies, however. Not suitable for random D&D characters.

I started wondering about public domain images in old books. There’s an account on Flickr called Internet Archive Book Images which posts images extracted from the scanned pages of books available from the Internet Archive. And so I started from there. I searched this account for pictures of men and women, then I searched for particular countries, all in an effort to find some interesting images, and click through to the book they came from (distinguished by a tag on Flickr). Then I went through the images of the book, saved them to disk, extracted the faces I found interesting, and continued from there.

I now have 323 pictures of men and women! Yay! The distribution of gender, race and age is absolutely skewed, unfortunately, and I’d love to add some more interesting white women, for example. And East Asians. And Sinti, Roma and Yeniche (Jenische). So much more to do! And what about elves? And dwarves? Mission Impossible, I think.

Anyway. The books are in the public domain. The faces I extracted are also in the public domain. Feel free to use these images in any way you like.


Comments on 2014-12-08 Character Generator with Random Pictures

Wohoo, lots more faces added. My wife is suspecting me to be obsessive compulsive about adding more faces, but I keep thinking, just one more face!! She says, “you do realize that all you will ever need are at most twenty men and twenty women, right?” But I keep thinking: 287– 289 men and 177– 205 women! Yay! :) 🐒

– Alex Schroeder 2014-12-09 01:26 UTC

Adding the photos that you did definitely started me imagining some sort of early 20th century setting in which certain chosen ones of varied backgrounds (PCs) suddenly come to identify with some vaguely theosophical hidden soul and realize they are an “elf” or a “halfling” or a “thief” or whatever and must follow the pull of their own and other souls to manifest their soul’s urges in life, regardless of society’s censure and punishment. Kind of an unhappy, alienated setting.

Nathaniel 2014-12-10 09:46 UTC

I’m surprised how reading the class makes me reinterpret the picture and has me nodding my head. Yeah, that would be a cool dwarf. This looks like a halfling.

– Alex Schroeder 2014-12-10 11:15 UTC

Add Comment

2014-11-30 SVG Charactersheet

I’ve been using the character tool for Halberds and Helmets to maintain character sheets on Campaign Wiki. Some examples?


Labyrinth Lord:

How does it work?

You need a SVG character sheet. The easiest way to create these would be Inkscape. Example: Charactersheet.svg

Any text element with a particular id can be replaced with a parameter. But which ids are in that SVG file? The tool will show them to you:

Note how you can provide the URL to any SVG file on the web!

You can now provide values using parameters.

The tool actually has an editor, where you can edit the parameters:

The format used by the editor is the same format used on the Campaign Wiki pages containing a character sheet.

The code will compute various things for you, if it knows how to do it. It will compute the strength bonus if you provide the strength parameter, for example. See the documentation for more information. As you can see, the tool knows of various rule sets and computes parameters depending on the rule set in use.

If you have a character sheet that you would like to use with the Halberds and Helmets tool, talk to me. Inkscape allows you to embed ordinary images into the SVG file and it can convert PDF files to SVG.


Add Comment

2013-02-21 Character Generator and Price Differences

Last year, I worked on an old school random character generator. With my new found interest in B/X D&D and the Moldvay equipment list in particular, I found it necessary to differentiate between Basic D&D prices and Labyrinth Lord prices. The most important price difference is the price of plate armor. No first level character can afford it when using Labyrinth Lord rules: starting gold is 240 at most and plate armor costs 450.

Here’s how to generate those characters (note that Moldvay is the default):

  1. a random character
  2. 50 compact characters
  3. statistics on the characters generated

And here’s the same thing using Labyrinth Lord prices:

  1. a random character
  2. 50 compact characters
  3. statistics on the characters generated

Don’t forget, the source code for the random character generator is available as well (Perl 5).

The names are picked from the list of given names from the city of Zürich, Switzerland, 2012. If you’re generating 50 compact characters they come with random age, random gender and two random traits (German alternative).


Comments on 2013-02-21 Character Generator and Price Differences

The generator now also computes the reaction bonus correctly.

AlexSchroeder 2013-02-22 17:44 UTC

Add Comment


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.