Cepheus, Python & Me

2
0

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!

 

2 thoughts on “Cepheus, Python & Me”

Leave a Reply