RPG Feed Welcome! :-)

This is both a ‘’’wiki’’’ (a website editable by all) and a ‘’’blog’’’ (an online diary about the stuff Alex Schroeder reads and does). If you’re a friend or relative, you might be interested in reading Life instead of this page. If you’ve come here from an RPG blog, you might want to head over to RPG. There are other similar categories to be found on the SiteMap.

Für Rollenspieler gibt es ebenfalls eine eigene RSP Kategorie.

2015-10-09 Oddmuse and Mojolicious

I’m trying to run Oddmuse within a Perl web framework: Mojolicious using Mojolicious::Plugin::CGI. It won’t be as perfect as a true Mojolicious app, but it will still be much faster than a simple CGI script. When running as a CGI script, every request loads Perl and compiles all the modules – including the CGI module itself – and Oddmuse and the config files. When running under Mojolicious, we no longer load Perl and we compile Oddmuse just once. Oddmuse itself will keep loading the config file and all that, but it’s still much better than before. The Mojolicious app itself is then started by Toadfarm. And in order to force myself to test it, I’ve switched this wiki over to the new setup!

First, tell Apache to act as a reverse proxy and pass all /wiki requests to the new server. The two ProxyPass instructions at the bottom are the important bits:

<VirtualHost *:80>
    ServerName alexschroeder.ch
    ServerAlias www.alexschroeder.ch
    Redirect permanent / https://alexschroeder.ch/
<VirtualHost *:443>
    ServerAdmin alex@alexschroeder.ch
    <Directory />
        Options None
        AllowOverride None
        Order Deny,Allow
        Deny from all
    ServerName alexschroeder.ch
    ServerAlias www.alexschroeder.ch
    ServerAlias rpg.alexschroeder.ch
    DocumentRoot /home/alex/alexschroeder.ch
    <Directory /home/alex/alexschroeder.ch>
        Options ExecCGI Includes Indexes MultiViews SymLinksIfOwnerMatch
        AddHandler cgi-script .pl
        AllowOverride All
        Order Allow,Deny
        Allow from all

    SSLEngine on
    SSLCertificateFile      /home/alex/ssl/alexschroeder.crt
    SSLCertificateKeyFile   /home/alex/ssl/alexschroeder.key
    SSLCertificateChainFile /home/alex/ssl/GandiStandardSSLCA2.pem
    SSLVerifyClient None

    ProxyPass /wiki             http://alexschroeder.ch:8080/wiki
    ProxyPass /mojo             http://alexschroeder.ch:8080/mojo


Toadfarm setup in ~/farm/farm:

#!/usr/bin/env perl
use Toadfarm -init;

logging {
  combined => 1,
  file     => "farm.log",
  level    => "info",

# other apps go here...

mount "$farm/alexschroeder.pl" => {
  "Host" => qr{^(www.)?alexschroeder\.ch$},
  mount_point => '/wiki',

plugin "Toadfarm::Plugin::AccessLog";

start; # needs to be at the last line

The above means that all requests to htpp://alexschroeder.ch:8080/wiki and htpp://www.alexschroeder.ch:8080/wiki will be handled by Oddmuse.

Mojolicious wrapper in ~/farm/alexschroeder.pl:

#! /usr/bin/env perl

use Mojolicious::Lite;

plugin CGI => {
  support_semicolon_in_query_string => 1,

plugin CGI => {
  route => '/',
  script => 'wiki.pl', # ~/farm/wiki.pl
  env => {WikiDataDir => '/home/alex/alexschroeder'},
  errlog => 'alexschroeder.log', # path to where STDERR from cgi script goes


In this case, wiki.pl is simply the original Oddmuse script, unchanged. :)


Comments on 2015-10-09 Oddmuse and Mojolicious

Cool! That’s interesting.

What about side effects? Like, if you forget to initialize some variable somewhere, what is going to happen? (Thinking about mod_perl and all stuff related to it)

Also, I miss one important thing from your report… What about page load time? How much faster is it right now, comparing to regular cgi script?

– AlexDaniel 2015-10-09 11:21 UTC

Alex Schroeder
I did not measure page load time. I also think that it keeps forking to run the script, so globals start empty every time? Not sure about the details. I haven’t seen any side effects, yet. Let me know if you see anything!

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

Could you be so kind to measure the load time?

– AlexDaniel 2015-10-09 11:50 UTC

Alex Schroeder
I think I was under the illusion that it was working. Now it is working. Hah! I had to rename my old wrapper script to realize that my ProxyPass instructions had been wrong.

Things to remember:

Check the config file for weird stuff.

# if ($ENV{SERVER_PORT} == 8080) {
#   $ScriptName  = 'http://alexschroeder.ch:8080/wiki';
#   $FullUrl     = 'http://alexschroeder.ch:8080/wiki';
# }

Make sure the user running toadfarm can write alle the files in your data directory. In my case, the data directory belongs to #www-data.alex but there were temp files that alex could not write.

– Alex Schroeder 2015-10-09 13:27 UTC

Alex Schroeder
Hm. Current setup, I get more or less the same time when I look at network analysis with my browser when I’m loading /wiki/About and when I’m loading /wiki2/About with wiki2.pl being my old wiki.pl wrapper script. I get numbers between 200ms and 700ms. I do note that /wiki/About keeps getting me a 200 OK response instead of a 304 NOT MODIFIED. I’m not quite sure what the problem is.

– Alex Schroeder 2015-10-09 13:40 UTC

Alex Schroeder
Oh, and the code shows that our script is being exec’d. I’m not sure about the headers. I think if our script prints HTTP headers, we should be fine.

– Alex Schroeder 2015-10-09 13:47 UTC

Well, at least it seems to work right now. I think I got confused about the various restarts required.

The missing 304 NOT MODIFIED remains a mistery, however. I’ve tried $q = new CGI; $q->nph(1) in the config file, $CGI::NPH = 1 in the config file, CGI::nph(1) in the config file, use CGI qw/-utf8 -nph/ in the core script, and print $q->header(-nph=>1, -status=>'304 NOT MODIFIED') and return if PageFresh(); in the core script, reloading my toadfarm between edits and found no change.

When I tried to export MOJO_PLUGIN_CGI_DEBUG=1 before starting the toadfarm, I got a 503 error when visiting the site.

This is very annoying.

– AlexSchroeder 2015-10-09 14:32 UTC

OK, so the question is: How often is 304 NOT MODIFIED actually used?

alex@kallobombus:~/farm$ sudo wc -l /var/log/apache2/access.log.1
259852 /var/log/apache2/access.log.1
alex@kallobombus:~/farm$ sudo grep ^oddmuse /var/log/apache2/access.log.1 | wc -l
alex@kallobombus:~/farm$ sudo grep "^oddmuse.*GET /wiki.* 304 " /var/log/apache2/access.log.1 | grep -v feed | wc -l

Filtering out feed request we’re down to 8‰.

For my own site:

alex@kallobombus:~/farm$ sudo grep ^alexschroeder /var/log/apache2/access.log.1 | wc -l
alex@kallobombus:~/farm$ sudo grep "^alexschroeder.*GET /wiki.* 304 " /var/log/apache2/access.log.1 | grep -v feed | wc -l

This reduces the percentage to 9‰.

So, if we redirect feed requests to files and use a cron job to produce some of them, the 304 NOT MODIFIED response seems to be something we can do without, even if I think it ought to work.

– AlexSchroeder 2015-10-09 14:54 UTC

In other words, no noticeable performance boost? Do I read it right? But then why bother?

– AlexDaniel 2015-10-09 21:26 UTC

Add Comment

2015-10-08 Dwarves

I’m super happy with my dwarven faces!

Here, have a random dwarf:


Add Comment

2015-10-06 Pink Bliss

Pink Bliss has improved somewhat. Mostly, I just added some magit faces.

You know you want it! Download from GitHub!

Emacs, in it’s maximized glory:


Tags: RSS

Add Comment

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

Alex Schroeder
Now drawing: dwarf beards.

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

Add Comment

2015-10-02 RPG Web Apps I Have Written

I’m trying to make a list of web apps I have written for role-playing games…

If you like what I’m doing, you can sponsor future web apps via Patreon or just send some money to kensanata@gmail.com using PayPal.

Tags: RSS

Comments on 2015-10-02 RPG Web Apps I Have Written

I think that you forgot to mention Gridmapper.

– AlexDaniel 2015-10-03 16:26 UTC

Alex Schroeder
Oops! Thanks, added.

– Alex Schroeder 2015-10-03 22:16 UTC

Alex Schroeder
And I have finished rewriting the Character Generator as a Mojolicious::Lite application and both the Face Generator are now running as two apps within a Toadfarm, and Toadfarm is beeing monitored by Monit. I think I’m happy now!

– Alex Schroeder 2015-10-05 07:35 UTC

Add Comment

2015-10-02 FIDO U2F

Ich habe mal vor einiger Zeit mit der Bestätigung in zwei Schritten von Google angefangen, für Google, Dropbox, Gandi. Das ist eine App auf dem Telefon und zeigt Nummern an. Will ich mich bei einem der drei Services neu anmelden, muss ich die Nummer abtippen. Das ist gut, weil mein Passwort klauen nicht mehr reicht: Man muss auch mein Telefon klauen. Das nicht super, weil ich die verdammten Zahlen immer wieder mal tippen muss. Wenn ich nun einen coolen USB Stick hätte, der an meinem Laptop steckt, der das gleiche erreicht, dann wäre das cool. Man müsste mein Passwort und meinen USB Stick klauen, um an meine Daten zu kommen.

Kristian Köhntopp erwähnte auf Google+ die Lösung von Yubico für €17, von Plug-up für €6 und die winzig Variante von Yubico für €54.

Mir scheint, der billigste FIDO U2F Security Key erfüllt den gleichen Zweck wie die Lösung mit der Mobilen App auf dem Telefon.

Tags: RSS

Add Comment

2015-09-28 Better

Everything is better! My Face Generator is progressing nicely. I think the galleries for men and women are already pretty good. The entire app is running on Hypnotoad behind Apache/mod_proxy. It’s fast! And I’m going to support multiple artists. Please help me if you can! I’m not great with faces. I have barely drawn any until this project started. I had to read How to Draw a Face on WikiHow, that’s how bad I was!

Here’s how I’m doing it right now. The basic instructions are on GitHub.

First, print a copy of my empty.pdf.

Download the PDF!

Make sure you don’t scale the image to fit the page. Try to use 100% of the image.

Then you draw 25 images of a particular element: hair, eyes, nose, ears, mouth, chin. 10% of all faces also get an extra element. Good for scars. My experience is that you need around 50 components for every element to provide enough variety – two sheets for each element is what I suggest.

Then you scan it. You should get something like the following:


There are more examples on Flickr.

If you have something like the above your work is done. Send the images to me and I will do the rest!

What does the rest involve? You crop it and resize it to 2250×3000 pixels. My scanner is notoriously bad about this.

I have scripts to extract whatever you draw from the helping lines of your scan. I have three variants ready to go:

  1. The standard reduces the image to a few shades of blue: convert -blur 0x1 +dither -remap tintenblau.png scan1.jpg source1.png
  2. This is good if you draw using a pencil and want to keep that pencil look: convert -blur 0x1 +dither -level 30%,80% scan1.jpg source1.png
  3. This is good if you draw using a pencil and want to have it look like it was inked without going through the trouble of inking it yourself: convert -blur 0x1 +dither -level 50%,80% -grayscale rec709luma scan1.jpg source1.png

I think you need to think about speed. Two sheet per element with six elements means 12 sheets. Save yourself the time of inking! Fiddle with the -level argument instead. The first percentage means that every pixels darker than this much is going to end up black. The second percentage means that every pixel lighter than this much is going to end up white. Raise the first number until you’re happy with the darkness of your image. Lower the second number until the helping lines disappear.

You should end up with something like the following:


Now’s the time to use my cutter script. It splits the image into 25 images of 450 x 600 pixels each. You must tell it the element (hair, eyes, nose, ears, mouth, chin, extra) and the type (man, woman, elf) you want to save it under. The result is a bunch of files.

And that’s it! I commit it to my repository on GitHub and deploy it on my server.

If you’re running the web application, there’s even the possibility to debug faces.

I’m going to link to the debug interface so that you can take a look – but in the end, you won’t be able to save any changes.

  1. Choose an element to debug
  2. List all the components for this element (in this case, eyes)
  3. Edit one component (in this case, eyes_all_59.png)
  4. When you click any of the zones, you should get an error… :)


Comments on 2015-09-28 Better

Alex Schroeder
Airi Ayame has been adding manga style face elements. Thank you!! :)

Not yet complete, but already recognizable: → Women's gallery by Airi!

– Alex Schroeder 2015-09-28 12:30 UTC

So, if I want to get digital, a single pic with 450*600 pixels, maybe even with a blue palette would be great. I just found a book on my harddrive with some art from early 19th century - So no scanning but copying and pasting… I was worried that it is a little different stylewise, but, hey Manga… :-)

rorschachhamster 2015-09-28 15:56 UTC

I’ve drawn face elements for elves and dwarves and noticed that having a different head shape was essential for me. That’s why the repository now contains elf.pdf and dwarf.pdf.

Another thing I noticed was that having opaque elements is tricky. This is most relevant if you plan on having white or blond hair cover parts of the face. As you’ll be using a lot of white filling, and since white is considered to be transparent, the face will will shine through your hair.

In order to handle this, I have seen two solutions. Perhaps there are more?

  1. Don’t do it – anything that hangs “in front” of the face needs to be inked. This is what I do.
  2. Use some other color to fill areas that should be opaque and white. Use #FFFFFF for the transparent background and use #FEFEFF for the white-looking opaque foreground. This usually involves flood-filling those areas in Gimp or Photoashop and therefore requires well defined, enclosed areas. This is not always easy to achieve and takes a lot of time.
  3. Use colors. I haven’t seen this in actual use but it should work. If you need something light and opaque, use a light color as you draw. A very light blue, or beige, or grey. Just make sure it’s different from the white background and make sure it’s not interspersed whith white pixels. Using a light pencil might leave too many white pixels, for example.

– AlexSchroeder 2015-10-07 21:15 UTC

Add Comment

2015-09-21 Looking for an Artist to help with my RPG Face Generator

I’d like to generate random faces, quickly. I’d draw them myself if I had any talent and a wider range of faces I knew how to draw. Sadly, I’m not that good. So here’s the idea: draw a bunch of eyes, noses, mouths, hairs (or hats?), ears, whatever it takes. Assemble at random. If we want to get fancy, we can tag those elements (male, female, elf, dwarf, halfling) to get better faces but perhaps we can do without.

In order for this to look good, I fear that we’d want a single artist to do all of these elements. That’s how we’d get a cohesive style, I think. I’d propose to work using a regular grid, like this:


But then again, if you’re going to volunteer, then you set the rules. I’ll do the cleaning up, extracting, coding, hosting, whatever it takes to makes this real. I’d want to use an open license so that other people can build on it in case we drop off the Internet one day.

I have a prototype up and running:

Random Face

The elements I already have are also online, of course. Source code is also available. All I’m missing is the artwork.

Once we have the artwork, I’ll add more features to the web app. Most importantly, we’d want to redirect random faces to an URL that encodes the elements used such that each face gets its unique URL. Then we can use them elsewhere on the Internet. We can also generate a gallery of many faces. It’ll be easy.

If we really want to, we could also move the entire library of elements to SVG and have SVG output. This would allow us to print the faces without pixelating it all. We’ll work it out.

We’ll work it all out. Dimensions, number of colors, number of elements, and so on. All you need to do is get in touch.

Here’s what it would look like if we integrated it into the Character Sheet Generator.


Comments on 2015-09-21 Looking for an Artist to help with my RPG Face Generator

Alex Schroeder
The discussion that prompted it all is on Google+. My own efforts have to be seen in the context of Character Generator with Random Pictures, the MOAM Avatar Generator, going back to my efforts using Flashface in 2012. The app is available online if you have Flash enabled or as an app for both Android and iOS.

– Alex Schroeder 2015-09-21 15:21 UTC

Ok, hm, perl. As I understood the code, the parts are put on top of another after specifying white as transparent, as you said. I think you could get a lot more out of it if you would randomize the height of the parts just a bit. As I don’t know perl… maybe it would be possible to put the parts into a special container (Huh, Javaism…) or just a specified part of the image and just move this up and down (and sideways for half-orcs? ;) ) or even scale them up and down. This would make a lot more use out of fewer graphics. Just my 2 Cents.

Rorschachhamster 2015-09-21 19:15 UTC

Alex Schroeder
Good points.

For the moment I added a new empty.pdf which people can print and draw upon using blue ink. Be sure not to scale the file when printing! Examples by myself and Claudia:

https://farm6.staticflickr.com/5829/21419974480_f9727a12b9_n.jpg https://farm1.staticflickr.com/608/21419975330_47d424d034_n.jpg

How to get the image: scan it, crop it, resize it to 2250×3000. Use ImageMagick to reduce the number of colors and get rid of the guide lines:

convert -blur 0x1 +dither -remap tintenblau.png ~/Desktop/Scan0001.JPG source1.png

tintenblau.png is a tiny image with a pixel for each color allowed. All of them are shades of blue. This makes it really easy to get rid of shadows and smudges.

Then, use cutter.pl to cut it into smaller images. We draw in rows, so cutter takes labels per row:

~/src/face $ ./cutter.pl ~/Desktop/source1.png eyes nose mouth hair beard
~/src/face $ ./cutter.pl ~/Desktop/source2.png eyes nose mouth hair ears

The new files are created in the “elements” subdirectory and numbered automatically.

The code is still missing some sort of clean-up, but it’s a start.

Valuable lessons from looking at our code:

  1. we need to attach gender information (obvious male and female attributes don’t mix well) – I’m a bit sad that this will reinforce gender polarity, though
  2. some elements such as beards must be optional or rare

– Alex Schroeder 2015-09-21 21:31 UTC

New release allows filtering such that you can have various types for each element – the obvious elements for me is beards vs chins for men and women, same thing for fancy hair vs bald heads. Also, pointy ears for elves.

– AlexSchroeder 2015-09-22 21:16 UTC

Alex Schroeder
Added hairdos for women, added eyes, added beards for men… Now I’m noticing that there is very little leeway for mouth positioning. I should have added more reference lines to my empty.svg file.

https://farm6.staticflickr.com/5655/21026752613_7f4d8ae139_n.jpg https://farm6.staticflickr.com/5722/21485434568_65614c2387_n.jpg https://farm1.staticflickr.com/570/21052263263_11324cf8dd_n.jpg

The result is available from the elements folder.

– Alex Schroeder 2015-09-24 08:44 UTC

Add Comment

2015-09-18 Emacs and TTY

I’m connecting to Kallobombus via SSH. It runs Debian 7.9 aka Wheezy. Recently a new problem appeared. I can no longer use Emacs unless I’m root.

alex@kallobombus:~$ emacs
emacs: Could not open file: /dev/tty
alex@kallobombus:~$ sudo emacs
alex@kallobombus:~$ ls -l /dev/tty
crw------- 1 root root 5, 0 Sep 18 08:28 /dev/tty
alex@kallobombus:~$ cat /etc/debian_version 
alex@kallobombus:~$ which emacs

What’s the problem?

On a different server, running Ubuntu 14.04.1 LTS:

kensanata@po6:~$ cat /etc/debian_version 
kensanata@po6:~$ ls -l /dev/tty
crw-rw-rw- 1 root tty 5, 0 Sep 15 11:42 /dev/tty
kensanata@po6:~$ emacs

So, is the solution to chmod o+rw /dev/tty?

Oh well, I ran sudo chmod go+rw /dev/tty and that seemed to fix the problem. I just hope it didn’t create any security issues.

Tags: RSS

Add Comment

2015-09-17 Thieves

Gavin Norman has been writing about rogues on his blog. In the comments, a commenter says: “It’s a great take on the class and it avoids those hard percentages people whine about.” I am one of those whiners!

Here’s the Skills chapter from my Halberds and Helmets house rules.


In most cases, no dice need to be rolled. If there is a secret lever behind the statue and the player said their character was looking behind the statue, then said lever will be found. We usuall roll dice when there’s some risk involved. When rolling to force doors, the referee will usually roll for a random encounter at the same time.

Thieves improve over time. They’ll be faster at opening locks, disarming traps, finding secret doors, moving silently, hiding, hearing, and so on.

The big table of d6:

Skill 1d6
Default 1
Kick in doors, add your strength bonus 1–2
Trigger, evade or disarm traps 1–2
Dwarfs are better at finding secret constructions 1–2
Dwarves are better at finding traps 1–2
Elves can hear better 1–2
Elves are better at finding secret and concealed doors 1–2
Halflings are better at hiding and sneaking 1–2
Halflings are even better at hiding and sneaking outdoors 1–5
Thieves are better at everything 1–2
Thieves from 3rd level onwards 1–3
Thieves from 6th level onwards 1–4
Thieves from 9th level onwards 1–5

Add Comment



Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit this page if you need to fix typos. You can subscribe to updates by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.

Referrers: Яндекс Adventures in Gaming v2 The City of Iron: Labyrinth Lord house rules Planet Emacsen Gothridge Manor