2012-09-01 SVG Character Sheet

For a while now I’ve been using this German SVG character sheet for my Labyrinth Lord game (it uses the Purisa font):

Labyrinth Lord

Purisa

/pics/Charakterblatt.svg

I’ve now written a little Perl script that allows you to fill in some of these variables using parameters. (Source)

Source

Here’s an example URL:

http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5c%5ctwo;abilities=elvish%5c%5corcish

Result:

http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one\two;abilities=elvish\orcish

http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5C%5Ctwo;abilities=elvish%5C%5Corcish

It needs more polishing and possibly the option of selecting different character sheets.

I’ve written a text formatting rule for my Campaign Wiki that makes it easy to put your character’s stats on a web page and have it render as a SVG character sheet.

Campaign Wiki

a character page with the generated character sheet

raw text as you would write it

click on the sheet in order to print it, maybe

the same thing using the English template

the German character sheet explaining itself

the English character sheet explaining itself

the script listing the computed parameters

​#RPG ​#Old School ​#SVG ​#Character Sheet

Comments

(Please contact me if you want to remove your comment.)

Do they attributes have different bonus tables? If not, why is the bonus for „Geschick“ only +1 and the bonus for „Weisheit“ +2?

– Stefan 2012-09-03 06:11 UTC

Stefan

---

A bug that I had introduced while reshuffeling the code. Any value of 15+ resulted in a bonus of +1. 😄

– Alex Schroeder 2012-09-03 08:16 UTC

Alex Schroeder

---

The default character sheet now supports a parameter named “portrait” with the value being the URL of an image to use. [Example](http://campaignwiki.org/halberdsnhelmets/de?name=Stefan;class=Kleriker;level=3;xp=3291;thac0=19;ac=6/5;hp=13;str=8;dex=11;con=13;int=7;wis=14;cha=14;petrify=11;wands=15;paralysis=16;breath=17;spells=17;property=11%20Gold,%206%20Silber%5C%5Cgoldener,%20verfluchter%20%20Anh%C3%A4nger%5C%5CSchuppenpanzer%20(AC%206)%20und%20Schild%5C%5CFlegel,%20Schleuder,%20heiliges%20Symbol%5C%5C%3Cb%3EVampire%3C/b%3E:%20Knoblauch%20(3),%5C%5CHammer,%20Pfl%C3%B6cke%20(3)%5C%5C%3Cb%3ESonstiges%3C/b%3E:%20Hanfseil%5C%5CRucksack,%20Feuerstein%20und%20Zunder%5C%5CFackeln%20(2),%20%C3%96lflaschen%20(5)%5C%5CWasserschlauch%5C%5C%E2%86%92%20Bewegung%2030'/Runde%5C%5C%3Cb%3ESchriftrollen%3C/b%3E:%20Lich,%20Schutz%20vor%5C%5CB%C3%B6sem ;abilities=%3Cb%3EUntote%20vertreiben%3C/b%3E%20(2W6):%20Skelett%20(3+),%5C%5CZombies%20(5+),%20Ghule%20(7+),%20Wraith%20(9+),%5C%5C5HD%20(11+)%5C%5C%3Cb%3ESprache%3C/b%3E:%20Taladarisch%5C%5C%3Cb%3ESpr%C3%BCche%3C/b%3E:%20B%C3%B6ses%20entdecken,%20leichte%20Heilung%5C%5CStille).

http://campaignwiki.org/halberdsnhelmets/de?name=Stefan;class=Kleriker;level=3;xp=3291;thac0=19;ac=6/5;hp=13;str=8;dex=11;con=13;int=7;wis=14;cha=14;petrify=11;wands=15;paralysis=16;breath=17;spells=17;property=11%20Gold,%206%20Silber%5C%5Cgoldener,%20verfluchter%20%20Anh%C3%A4nger%5C%5CSchuppenpanzer%20(AC%206)%20und%20Schild%5C%5CFlegel,%20Schleuder,%20heiliges%20Symbol%5C%5C%3Cb%3EVampire%3C/b%3E:%20Knoblauch%20(3),%5C%5CHammer,%20Pfl%C3%B6cke%20(3)%5C%5C%3Cb%3ESonstiges%3C/b%3E:%20Hanfseil%5C%5CRucksack,%20Feuerstein%20und%20Zunder%5C%5CFackeln%20(2),%20%C3%96lflaschen%20(5)%5C%5CWasserschlauch%5C%5C%E2%86%92%20Bewegung%2030'/Runde%5C%5C%3Cb%3ESchriftrollen%3C/b%3E:%20Lich,%20Schutz%20vor%5C%5CB%C3%B6sem

Too bad this doesn’t work when displaying SVG files using an image tag as part of an XHTML document. Example.

Example

The reason is that the img tag will only load the URL provided. It will not follow further URLs (such as the font or the embedded image). I could use data URLs and waste a lot of bandwidth, or I could use a different tag (frame or object). When I tried using other tags, however, there’s a different kind of problem: clicking on the link resulted in the script being run in special frame, still inside the original page. That’s very confusing for users.

Embedding the entire SVG document “works” – the validators choke on it, however. The declaration that all style elements will be using CSS is missing, the namespace declarations on the svg tag are not allowed, and so on. It looks ok in my browser, however. 😄

– Alex Schroeder 2012-12-11

Alex Schroeder