Originally posted by Flynn:
I've noticed that the borders calculated do not extend off the map, and assume that the polity is self-contained within the sector itself.
That's an upcoming option, similar to -s and -n, allowing you to specify alliances that are allowed to extend outside the sector. Maybe -e for "empire". There are two ways to do it: post-process @R (the list of hexes in a border), or simply extend the loops by one on each end, and ignore allegiances not specified in -e. Not sure which way I'll go with it right now.
Why did I leave it out? Mostly because I needed to restrict the output to something that I could
see in sec2pdf while I was debugging.
Also, in the Pocket Empire generation option, I noticed that there's no empty space left over for Non-Aligned worlds.
Yup. You have to run allygen twice right now: once with -i to generate the pocket empires, which you examine for regions that you'd like to make non-aligned, and then a second time using the generated SEC file and the -n option, to actually exclude them.
I didn't want the program to decide for you which areas of your map should be non-aligned. Creating a SEC file containing the new allegiance codes gives you more options.
Would you mind reviewing your thought processes on how these borders are generated with us here, as I'm curious as to how your script selected these borders?
The basic idea was simple: the quality of a world's starport represents its influence over nearby hexes. Ties are broken in favor of the world with the highest TL, and if those are tied, the highest population. I simply sort the list of worlds and loop across them in order.
I arbitrarily decided that a class A starport will claim every currently-unclaimed hex within Jump-3, class B within Jump-2, and class C within Jump-1 (side note: the -f option adjusts this range; "-f 1" increases A to 4 and D to 1, "-f -1" decreases A to 2 and C to 0". E and X never influence any hex but their own).
Every world (occupied hex) will claim its own hex, unless someone else already has. By default, all worlds are pre-claimed; the "-i" option ignores that data and allows them to be claimed by nearby worlds with better starports. Essentially, a pocket empire is built when a class A starport claims a bunch of nearby class B and C starports (and possibly lower-tech/pop class A's), which then extend their parent's influence.
After every world has had its say, I make a pass across the empty hexes, and each one that is adjacent to one or more worlds joins the largest neighboring allegiance (based on number of hexes). This has the effect of filling in gaps along the edges.
Worlds defined as non-aligned then get a chance to clean out adjacent empty hexes, but not if it would obviously split an allegiance and create a bunch of orphan worlds.
Finally, there are a number of cleanup passes that get rid of some absurd claims on empty hexes. Hard to describe, easy to see if you tinker with the code and use the -D option.
Todo: the "empire" option, and a fix for the "enclosed non-aligned worlds" problem (most visible in Alpha Crucis; the data is actually computed correctly, but I'm not detecting completely-surrounded non-aligned regions that need a border to show that they're not members. Again, -D demonstrates the problem).
-j