Skip to main content

kalifi.org

A blog by Kari Silvennoinen

Classic Traveller RPG Character and World Generation

In addition to translating DURF to Finnish, I found myself working on another RPG-related project. And again, it involved a lot of interesting side quests to get it done.

Traveller is an older science-fiction role-playing game, the first edition was published in 1977. It’s been since revised in multiple different editions. A facsimile version of the 1981 edition of the first three books[1] are available for free on DriveThruRPG. The game has been said to have inspired both the TV shows Firefly and The Expanse.

As an older game, it has a lot of simulationist stuff and the core rulebooks even involve square roots![2] Its character generation (chargen) procedure is a mini-game in its own right, and quite lethal at that.

So, I decided to implement both the character generation from Book 1[3] and the world generation from Book 3… in TypeScript. I’ve never really used TypeScript before, but I’ve come to appreciate type hinting and as my target was the web browser, something that compiles down to Javascript felt like a good choice[4].

You can find the character and world generators here. The source code for the site is on GitHub. My unique angle to these generators was to try to match the style of the forms in the rulebooks. However, there are some neat details going on beyond the surface as well.

The rulebooks have burecrautic and official looking forms for many things, and I aimed to replicate those on the web. Fortunately modern CSS has Grids, which made this way easier than it would have been in the olden days with tables. For some font geekery, I tracked down the fonts that were used in the original books (Optima and Univers[5]) but these were a bit too expensive[6] for a hobby project to use. Fortunately, these fonts were part of PostScript Core fonts and so for the open source GhostScript project, there were free(-ish) metric-compatible fonts available (respectively, URW Classico and URW Classic Sans). The two original fonts are so popular that there would have been many passable alternatives to choose from[7].

When you generate things, you usually need names for those things. For the character names, I took the obvious route and took datasets of the most common first and last names in English. Both US and Royal Navy have a lot of ships whose names probably work for spaceships as well[8], so I scraped Wikipedia for those. For planet names just picking names from a list sounded a bit too lazy, so for added randomness and a nice side quest, I used Markov chains[9] to generate new names. The dataset for those are the “canonical” star system names in Classic Traveller universe, which fortunately were available on the Traveller RPG wiki[10].

For the world generation, I also took the opportunity to familiarize myself with SVG[11]. The game uses a hexagonal grid for its subsectors and there’s an excellent resource for all things hexagonal at Red Blob Games. Otherwise, Traveller uses simple shapes for its maps, which were quite easy to draw with the SVG basic shapes.

The generators are not fully there yet, there are some bugs and some missing details. For example, the world generation is missing communication routes between systems. According to the rulebook these are left for the GM to figure out, so there’s no clear procedure for them. So, first, some heuristic would need to be defined.

This was a fun project, and it touched many fun technical topics I’ve wanted to explore, like Markov chains. It was also great to make something for the web again.


  1. or, Little Black Books (LBBs). ↩︎

  2. Many of the rulebooks I’ve read seem to abhor math beyond simple addition. ↩︎

  3. And because the player character might earn a ship during generation, a little bit of ship stuff from Book 2. ↩︎

  4. As I progressed with my project, I realized that another potential option could have been Haxe. Or maybe Dart. ↩︎

  5. In detail, the cover font is Optima Medium (faux) Italic[12]. The body text uses Univers 55 and the headings Univers 75[13]. ↩︎

  6. Optima is a provided system font on MacOS, but this is of little help for a web-based project. ↩︎

  7. For example, Helvetica is pretty okay replacement for Univers. The Wikipedia pages for these fonts list other options, some of which are available on Google Fonts. ↩︎

  8. Notable example ↩︎

  9. markov-namegen-lib gave me a good starting point. So I ported it to TypeScript. ↩︎

  10. And like Wikipedia, available for use with a permissive Creative Commons license. ↩︎

  11. There are other nice subsector generators, like Zhodani Base’s 1001 SubSectors, but it only generates PNGs. Although it has the option to use TravellerMap.com’s API to draw it in PDF. ↩︎

  12. Sources for this here and here ↩︎

  13. Sources for this here ↩︎