At the request of my cousin, I recently added the ability to roll the narrative dice from Fantasy Flight’s Edge of the Empire system to my dice roller. After putting this off for quite a while, I sat down and powered through it over the course of a couple of evenings. As expected, the hard part was really getting the iconography together, organized, and displayed in a way that looked good, while the plugin system I developed for my dice roller really made the coding very easy.
If you remember a while ago (late 2015) when I last rewrote my dice roller, a lot of my goals after “do things in a sane way,” were different ways of rolling and aggregating dice. To that end, when I rewrote everything, I wrote it in such a way that adding a new way to roll dice consisted of three things:
- Create an input form.
- Create a template chunk to render the results.
- Create a perl library that grabs your input, rolls your dice, and returns any variables you want in the result.
All the storage and orchestration of results is taken care of by the main script.
This is why getting the Edge of the Empire dice system coded was quite easy – I just had to roll a regular D6, D8, or D12 and translate the result to a particular glyph that I wanted, then count up the various glyphs. I had this part done and printing correct results within a few hours on the first evening.
The hard part, then, was getting and massaging the glyphs. The trick here, as is typically the case, was finding versions of the glyphs at high enough resolution that I could shrink them down and still have them look good. For these glyphs, I got lucky that they were all available in a PDF in font form. So, I extracted the fonts from the PDF and rasterized the glyphs I wanted at a high enough resolution, then used photoshop to massage them into the dice sides for the site.
In the end, I am pretty happy with how everything turned out – the glyphs look good enough that I’m not ashamed of them, and the dice roller feels good to use. From here, I think I just want to redo the reroll link – right now it’s a post link to the dice roller, but I think search engines keep poking it. Instead, I think it needs to be a form with hidden fields and a submit button, so that may come later.