On Converting the Year Zero Engine SRD into HTML

Posted: 2020-03-16
Word Count: 1970
Tags: rpg srd year-zero-system

Table of Contents

Recently I converted the Year Zero Engine OGL SRD into Markdown, which my blog generator converts into “clean” HTML.1 The results are here.


On the Fria Ligan forums I floated the idea of using the document to recreate something like Tales from the Loop. However, I prefer writing in Markdown, or plain text formats generally.

  1. This blog runs on Markdown, and I planned to post whatever I came up with in my new Table Top RPG section.
  2. Whenever possible I try to avoid vendor lock-in, notably Microsoft Word … and Google Docs. Yes, I can export to Open Document Text, but …
  3. I also have a philosophical objection to using complex file formats when something simple like plain text will do. It’s easy to find the differences between text files using simple command line tools (another preference of mine), whereas the only way to find the changes in Word and similar formats is to turn on change tracking then depend on the application to do it however (and however well) it wants.
  4. I keep everything in a Version Control System which also prefers flat files in ASCII or Unicode over binary formats like ODT.

So I had to get the original into Markdown somehow.


First I exported the Google Docs original to HTML … back in January. This produces a mess of technically valid HTML, all on one line, with a profusion of style classes called c22, c34, and the like. (That’s not surprising. WYSIWIG editors are written to preserve the presentation of a document: fonts, highlighting, paragraphs, pages, titles, internal links, etc.)

After a little DuckDuckGoing2 and memory dredging I decided to use kramdown a Markdown kramdown interpreter that can also parse HTML back into Markdown kramdown. I figured it would peel away a lot of the extraneous style classes and other crud.

I was at least partially wrong.

Oh, it was easier to delete style information from almost-Markdown. But it was still all over the place. Also, in frustration I deleted the ids from links and headers, leaving only stubs I had to recreate myself, albeit with names better than h.okjkjsadkuhjk. In the end I wonder if I should have added Markdown to plain text (which I also exported back in January).

Most of this weekend, then, I’ve spent doing the following:

  1. Comparing the original exported HTML and my Markdown to HTML version, side by side, with my eyes, like a chump.
  2. Filling in links from one part of the document to the other.
  3. Adding <EM> and <STRONG> markdown where it should have been, since I auto-deleted all the <SPAN> tags that told me where it went.
  4. Customizing some header id names.
  5. Figuring out how to put text in a shaded box.
  6. Comparing the HTML translation of my Markdown to the original again.
  7. Fixing words and phrases that made no sense in context, as noted below.
  8. Comparing the HTML translation of my Markdown to the original once more, in part to compile the list of changes below and in part to make sure I didn’t miss anything. (I did, but only a couple of things.)

What are the differences between my text and the official text?

Just after the extensive table of contents, my text states that the changes were mostly cosmetic and editorial. Even now I’m loath to track down every punctuation corrected, every mispelling fixed, every missing word added. I contend they were all for the sake of clarity, legibility, and accuracy, and that none altered the meaning of any rules.

For the sake of transparency, though, I’m going to walk through every sentence added, removed, or rewritten from the original.

Whole Document

An autogenerated table of contents appears at the start of the document, after the standard title box for (nearly) every page on this site. This table of contents is extremely long and, as it’s generated from the Markdown source, guaranteed accurate. (It does omit the “sidebar” boxes, however. I had to create those using HTML <DIV> elements and some CSS. As a consequence the titles were embedded HTML H4 elements, not the Markdown equivalent.)

Because of the autogenerated table of contents, I deleted the original document’s table of contents just before the Introduction.

My outline isn’t numbered, and neither are the chapter headings, so I changed all references to “Chapter #” to the title of that chapter and a hyperlink.

Chapter 1: Introduction

I removed the word “Italicized” since, using my current CSS, they aren’t. They could be, but I thought entire paragraphs of italics might be hard to read, especially in my chosen (serif) font.
I removed the sentence “There is a blank sheet at the end of this doc,” because, well, there wasn’t. A comment on the original document even pointed this out.

Chapter 2: Player Characters

I added the phrase “(or a blank sheet of paper)” because of the aforementioned lack of a character sheet.
Tese were formatted as if they were sub-headings (sub-sub-headings?). Since the text under each was less than a sentence, I converted the entire section to an HTML Definition List (<DL>). Not many people use them, perhaps for reasons of which I’m unaware, but I like them (obvi).
I boxed this since BIG DREAM, between TALENTS and RELATIONSHIPS is also boxed.

Chapter 3: Skills

Added a parenthetical link to the WEAPON TABLE (see below). (In addition to converting “Chapter 5” to a hyperlink to “COMBAT & DAMAGE”.)

Chapter 4: Talents

No significant changes. (?)

Chapter 5: Combat & Damage

Possibly the title of the table, but it seemed redundant, so I deleted it.
Renamed to SNEAK ATTACK MODIFIERS. Unlike other tables, this one was after several paragraphs, so it seemed like a title to link to would be useful. (But one that described the difference between it and the previous title.) Maybe I’m being inconsistent.
The hyperlink to Gear Bonus points to the GEAR section in SKILLS. The one in PLAYER CHARACTERS seemed less relevant.
WEAPONS (the first one)
The link to “bane” goes to ONES ARE ACTIVATED, not PUSHING YOUR ROLL. That section more directly addressed what effect banes have, but honestly one can argue for either choice.
WEAPONS (the second one)
I changed “three” to “two”, because there were only two bullet items. I also added a parenthetical comment linking to the less commin ways of taking damage
I deleted the sentence “See the list of typical armor below,” because, again, there wasn’t one. I was half-tempted to put one in, but in the end I’d either end up cribbing from Mutant: Year Zero, which is technically plagiarism, or putting in something useless like the following:
Type Armor Rating Weight
Light 1 1
Medium 2 2
Heavy 3 3
Helmet +1 1
COVER (the second one)
Removed since it didn’t seem to serve a purpose.
The sentence “Roll for a critical injury on the mental trauma table” actually linked to CRITICAL INJURY – MENTAL. I changed the sentence to read, “Roll for a mental critical injury.”

Where next?

Changes to my “Year Zero Engine OGL”?

There are three two things I’m not satisfied with:

  1. The H3 and H4 elements, by default, are almost indistinguishable. In my document that makes it hard to tell whether you’re reading a chapter sub-heading or a sub-sub heading. I can either try to fix this with CSS – which will affect my entire site – or I can try to do something to that page alone. What the latter would be, I don’t know, especially since I’m trying to separate presentation (fonts, etc.) from document structure (headings and text).

  2. The more recent version of the document has quite a number of edits. Leaving aside “jj d” and similar profound changes, some look like serious rules questions and ambiguities.3 Should my version of the document address them? Would that mean acknowledging they exist with footnotes? Or would that mean trying to fix them, e.g. with the lame Armor table above. What would the d20srd.org guy do?

Problem #1 might mean using completely different CSS for this thing, but that might prove difficult considering Hugo’s entire purpose is to enforce a consistent look and feel on the content in its system. I’d like to bring more things into this system, not carve out further exceptions and special cases.

Problem #2 could be solved with smaller articles to patch holes and solve problems. Would they be under the same OGL? Maybe. I dunno. They’d probably be too small to sell in the Free League Workshop. (An OGL “generic” armor table?) Or not, for a loose definition of “sell”.

Onward to “The Hidden World”?

“The Hidden World” is the working title for the RPG I wanted to derive from a retro-clone of Tales from the Loop. (Remember that?)

Originally I wanted to produce a “Year Zero Engine Light” document that would leave the actual setting up to a hypothetical future user. However, after I got done ripping out the distinctions between types of dice, banes, Talents, Initiative, nearly all the Close Combat and Ranged Combat rules, Critical Injuries, and the other detailed rules for environmental and non-standard damage … I wasn’t entirely sure how useful the remainder would be. Oh sure, OGL rules for Conditions, “light” physical conflicts, and maybe a few sample NPCs and Creatures (especially under a “player rolls all dice” regime) might be useful. But useful for what, exactly?

Then I remembered a dictum I cited in a previous post: “For something to be reusable it must first be usable.” So the best thing might be to pick a concrete setting, write the rules for it, then see what (if anything) I can generalize afterward.

Of the three ideas in that forum post (oh so long ago) the most straightforward seemed to be the one similar to but legally distinct from Hilda the Netflix series (and maybe the first book Hildafolk). Except I wasn’t keen on doing just kids, so I was thinking of opening it up to “childlike” adult characters also in search of mythic creatures beyond the fields we know. Then I started brainstorming archetypes and … kinda got stuck. Which is where I am now.

Unlike Tales from the Loop, which had a single and clear aethetic and literary inspiration, I have all sorts of possible inspirations bouncing around my head: the aforementioned Hilda (which I can’t use directly), Lord Dunsany, the comic series Fables, Neil Gaiman’s Neverwhere and The Ocean at the End of the Lane (and Sandman and quite a number of other things), Terry Pratchett’s Tiffany Aching series4, Vaesen (which I definitely don’t want to use directly), British myths and fairy tales, … and I’m sure I’ll think up more.

So “The Hidden World” might go on the back burner for a little bit. Or a long while.

  1. By which I mean HTML that uses elements to indicate document structure, with a minimum of style-related classes, attributes, and tags. ↩︎

  2. Ever the contrarian, my search engine of choice is DuckDuckGo. As a browser plugin, not this thing↩︎

  3. Others look like several somebodies wanting to put their fingerprints on a shared document by making pointless or counterproductive edits. Plus references to somebody-or-other’s video, which might be about the dice probability discrepancy and then again might not. ↩︎

  4. One of the Archetypes was a Witch, which despite several attempts at Nerfing it ended up being too complicated and powerful. I kinda wanted the mystical equivalent of Mutant: Year Zero’s Stalker – a native guide to the lands of faerie – but putting magic in the players’ hands opens up a whole can of eldritch worms I didn’t want to deal with. ↩︎