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.
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.
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: https://campaignwiki.org/halberdsnhelmets/en?name=Aurora;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:
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: https://campaignwiki.org/halberdsnhelmets/link/en?name=Aurora;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.
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:
<text sodipodi:linespacing="100%" id="name" y="-11.724363" x="178.12579" 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" xml:space="preserve" inkscape:label="#text3505"><tspan id="tspan3507" y="-11.724363" x="178.12579" sodipodi:role="line">_________</tspan></text>
This is a lot of bloat. This would be enough, I guess:
<text id="name" y="-11.724363" x="178.12579" style="font-size:24px;font-family:Purisa"/>
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:
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).
alex@Megabombus:~$ brew info inkscape homebrew/x11/inkscape: stable 0.91 (bottled), HEAD A professional vector graphics editor https://inkscape.org/ /usr/local/Cellar/inkscape/HEAD (983 files, 120M) * Built from source with: --with-poppler From: https://github.com/homebrew/homebrew-x11/blob/master/inkscape.rb ==> 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 --with-poppler Build with poppler support --HEAD 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:
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:
And here’s the same file with three parameters set:
If you want to edit it, use
/link in the URL to edit the parameters.
You can debug it using
/show in the URL:
Now all we need to do is add the remaining fields and do it for all the character sheets…
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.
I’ve been using the character tool for Halberds and Helmets to maintain character sheets on Campaign Wiki. Some examples?
How does it work?
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.
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):
And here’s the same thing using Labyrinth Lord prices:
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).