Cepheus, Python & Me

UPDATE: I just found an error in my code that was responsible for the ridiculously high populations on many worlds. Line 108 is pp = roll()-2+sz but instead it should be pp = roll()-2.

A friend asked me if I had an open spot in one of my roleplaying game groups, because she really would love to play more often. She is already playing in my RIFTS game, and the only other games I am more or less regularly playing in at the moment are a Star Trek and a Star Wars one. Unfortunately she’s not really into either setting.

So I offered to run a new game for her and my wife. We looked at a couple of games I could run, and to my surprise the choice fell on Traveller. Initially I thought it would be best just to use Mongoose Traveller 1st Edition and set the campaign into the Third Imperium. I own a couple of sourcebooks mostly focused on the Spinward Marches, so this should be quite easy. But easy is not necessarily the most fun way to do things.

So in the end, we settled on using the Cepheus Engine (which is basically CT with a healthy dose of MgT thrown in) and using a homebrew setting instead of the OTU. I will probably still use a lot of OTU material, but this approach allows me to throw out canon out of the window and create my own subsector to play in.

The easiest solution would have been using one of the countless Traveller subsector generators on the web, but I wanted to try the world generation from the Cepheus Engine. Since I always loved to write my own code, I decided to use this opportunity to learn some Python (which I have planned for quite some time).

I guess just using dice and writing down the results would have been faster, but trying to get the Python program to work was way more fun. After a couple of hours of work – which mostly consisted of trial and error – the program was randomly generating subsectors which then were then diplayed in a format (at least somewhat) compatible with the poster maker of travellermap.com, and in a more human readable form.

The code is terribly messy and will probably cause any real  programmer to lose their temper (and their sanity) almost instantly, BUT it works, and I actually feel a little bit proud, especially since it has been the first Python project I finished so far. If I have the time and motivation I’ll try to clear up the code some more and perhaps add a few additional features. It would be cool to not only generate the stats, but also create proper maps.

If you’re interested in having a look at the code, I embedded it below. The output format I used emulates the one from the Zhodani Base, and my name generation uses the same word parts that were used in creating random names for the Elite 2: Frontier computer game. By the way, if you are a Python programmer, please don’t be too harsh, it’s my first attempt. But I am always interested in advice. Feel free to post you thoughts in the comments area below!


Michael Wolf is a German games designer and enthusiast best known for his English language role-playing games blog, Stargazer's World, and for creating the free rules-light medieval fantasy adventure game Warrior, Rogue & Mage. He has also worked as an English translator on the German-language Dungeonslayers role-playing game and was part of its editorial team. In addition to his work on Warrior, Rogue & Mage and Dungeonslayers, he has created several self-published games and also performed layout services and published other independent role-playing games such as A Wanderer's Romance, Badass, and the Wyrm System derivative Resolute, Adventurer & Genius, all released through his imprint Stargazer Games. Professionally, he works as a video technician and information technologies specialist. Stargazer's World was started by Michael in August 2008.

2 thoughts on “Cepheus, Python & Me”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.