Posts Tagged ‘Notepad++’

Generation Gap

A while back, I started messing around with a script called SectorMaker I found in a thread on the Citizens of the Imperium forum. The script generates a whole sector at random based on user parameters (and creates a .sec file), or it uses an exisiting .sec file and produces a PDF. It’s a pretty fantastic script to say the least. It was written in Perl and had instructions to install and run on a Mac. Since I didn’t have one, I modified the script and the instructions to run on Ubuntu.

One of the software components the script uses when generating a random sector is called GenSec, which it uses to do what the name implies, and outputs a full .sec file, minus names (the names are “Unnamed”) and stellar data. It has been around for ages

At the time, I knew GenSec could use an additional mode where you could feed it the locations and names of systems, and it would generate the UWP, Base, Codes, Zone, and PBG information for them. So I rewrote the tool in C++, and added options to do just that, and versioned it GenSec4.

GenSec4 was exactly what I needed to generate the missing data for my new sector. I took the original .sec file I exported from Universe with the hex locations and hex number system names that looks like this:

0118                      0118                                             Na
0119                      0119                                             Na
0133                      0133                                             Na
...

and removed all other info from the file and saved it to a file called Sol_names.txt:

0118                      0118
0119                      0119
0133                      0133
...

Then I ran GenSec4 on my Ubuntu VM and it gave me a file called Sol.sec:

0118                      0118 B9B6631-9   Fl Ni                       803 Rg
0119                      0119 B371567-9   Ni                          212 Rg
0133                      0133 C560785-7 S De Ri                       512 Rg
...

All I had to do then was paste in the names and stellar data using the vertical pasting ability of Notepad++ :

Tau1 Eridani              0118 B9B6631-9   Fl Ni                       803 Rg F6 V
Alpha Fornacis            0119 B371567-9   Ni                          212 Rg F8 IV
HR 3018                   0133 C560785-7 S De Ri                       512 Rg G0 V DA 1
...

With that done, all that was left to do was import the .sec file into Universe.

Categories
Archives