The Universe-As-Written is a terrible place to visit, and it probably doesn’t have catgirls.
A while back, as I was adding examples to PDF::Cairo, I made a
comment along the lines of “if I were
really going to revive
sec2pdf”. Well, I’m not quite doing that
yet, but I did extend the example I wrote to do something related:
display the distribution of interesting systems in a starmap.
What happened is that I started reading the Giant Tome Of Tables that is Traveller 5.10, found the section on generating systems and sectors, dug out the dusty old scripts I wrote around the T20 rules, managed to successfully reset my password on the CotI forums, looked up the various debates about the available and abandoned systems, and realized something:
The problem isn’t the generators for a single world/system (despite the fact that many of them create nonsensical things like tiny rocks with no water or atmosphere that support a population of millions of bronze-age peasants in a police state…), it’s the fact that the rules to populate a region of space are pretty much “roll up a world in X% of the hexes on the map”, with some vaguely-handwaved suggested percentages (“rift = 3%, standard = 50%, cluster = 83%”).
Like most RPG systems, it’s not in the books because it’s good, it’s there because it’s easy to describe in terms of pencil, paper, and dice.
First up: abandon the concept of creating a random sector with pencil, paper, and dice. No one does this. The history of Traveller can be summed up with the words “and then I wrote a program to…”.
The “X% chance of a star” rule would mean rolling 80 dice just to find the occupied hexes in a single subsector, followed by hundreds more to fill in the details. And with randomly random results, it’s going to be a deterministically disappointing distribution.
What I want is a starmap that suggests opportunities for adventure, to both the GM and the players: places to go, people to see, things to do, stuff to grab. To do that, I have to sprinkle the most interesting systems more or less evenly across the map, and place the less-interesting ones around them in a way that facilitates travel and exploration.
Step one is figuring out what systems are interesting. The “score” doesn’t have to be terribly precise or accurate, as long as it ranks the systems by something. Conveniently, T5 system generation includes a derived stat called Importance. Even if it’s not the best score, you’re getting it for free just by following the rules.
Step two is figuring out how to distribute systems across the map. No matter where you are, one of the nearby systems should be at least moderately interesting. I decided the way to accomplish that is to place systems on the map in best-to-worst order, in a way that guarantees that a system is (almost) never placed adjacent to the previous one. #3 might somehow end up next door to #1, but #2 will be some distance away from both, quite possibly on the far side of the map.
Before I can go further, I need some numbers and pictures. The most basic Traveller map scale is the subsector, a hex grid with 8 columns and 10 rows. Four subsectors make a quadrant, and four quadrants make a sector. A sector has 1,280 hexes, each of which may have an interesting system to visit, and the best jump drives can take a ship up to 6 hexes in any direction in a week.
[Side note: in 1977, the authors considered a subsector sufficient for years of adventures for a gaming group]
A well-connected and prosperous allegiance will have a lot of fairly interesting systems within easy range of each other, and an isolated first-class world that has to be approached via a series of long-distance jumps through iffy systems pretty much writes its own adventure.
The limited range of jump drives and the size of a single subsector suggested a number of approaches, but my first few attempts required fudge factors to scale them up to larger regions (a domain is four sectors, by the way, and I hereby define the ridiculously large region consisting of four domains as an expanse; at that scale you’re playing Lensmen, not Traveller).
What I settled on was simple to code and test: generate N systems based on what percentage of hexes you want occupied, and then from most to least interesting, place each system into a random hex in a random chunk, different from the chunk the previous system went into.
What’s a chunk? One-fourth of a subsector, 4 columns by 5 rows, with a diagonal distance that exactly matches the Jump-6 limit. Even if you’re just generating a single subsector, it will be rare for your #1 and #2 systems to be adjacent, but on average they’ll be reachable in a long jump, and there will likely be less-interesting systems in between. A typical map has around a third of its hexes occupied, so no matter what map scale you work with, you can expect 6-7 of the 20 hexes in a chunk to be occupied, and each chunk has an equal chance of having one of the most interesting systems in it.
The only additional rule required is handling collisions: if the target hex is already occupied, just pick another random chunk. I tried several more elaborate systems, but the results were either obviously worse or indistinguishable from random.
How well does this work? Running the script 500 times against random data at each scale, the average distance between sequentially-placed systems is 5.7 for a subsector, 10.3 for a quadrant, 19.9 for a sector, 39.4 for a domain, and just for the hell of it, 78.7 for an expanse. The standard deviation is 0.46 at all scales, and the resulting maps look pretty darn good to me:
Dark blue are the top 10% of the systems, the darkest gray are the next 10%, etc, down to the light-gray losers.
As a bonus, since system generation and map distribution are completely separate scripts, you can plot as many maps as you like until you find one that suits you, and then apply your system data to it. So I could take the data from The Spinward Marches and create an entirely new sector. And it turns out my Flash Gordon Name Generator produces quite plausible Traveller names.
Here’s a 900K PDF file showing the system distribution for a full expanse.
Markdown formatting and simple HTML accepted.
Sometimes you have to double-click to enter text in the form (interaction between Isso and Bootstrap?). Tab is more reliable.