• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.

Sector Generator.Net

jfetters

SOC-14 1K
(This message is a cross post of the entry in the Files section)

As described in my blog, Sector Generator.Net is a program originally conceived to create sectors in Uncharted Space, but it has grown to include standard Imperial sectors as well.

Its primary use is for creating new sectors and importing the data into a mapping program such as Universe.

I am still working on some of the features (like the datagrid display for the subsector names, but what would be incredibly valuable to me is if folks can try it out and make sure the data being generated makes sense. There is a bit more tweaking to do, mainly on the stellar generation side of things, but this should do most of the job for a sector.

The sector creates the data in an XML format by default, but also will transform the XML into a SEC or HES file. I intend to add more transformation types in the future.

Also, there is apparently something strange regarding the SEC files generated when importing into Universe. Even though they look visually correct when inspected, an attempt to import them into Universe fails with an error.

It's obviously still in beta, so please let me know of any questions or bugs.

System requirements are Win XP/Vista with the .Net Framework 2.0.

I have not tested on Windows 2000 or earlier.
 
Last edited:
Also, there is apparently something strange regarding the SEC files generated when importing into Universe. Even though they look visually correct when inspected, an attempt to import them into Universe fails with an error.

I tried running SectorGenerator.NET (WinXP Professional) and importing the results into Universe. SectorGenerator errored with a missing ")" somewhere in the code. Continuing, I ended up with a large XML file and a small SEC file ... only 2 systems in the SEC file but enough to test the next stage.

In Universe I used the Standard.IEL filter but found I had to make a number of corrections to get it to work. (The whole IEL thing has always suffered from being too picky.)

1) In the header the Zone line should be doubled up. It was in the import files I based it on years ago.

2) After the ruler line there should be NO blank lines.

3) There should be only one blank line at the end.

After that it seemed to work, albeit on a very small dataset.

Regards PLST
 
I have no problems generating the XML, but I get two problems when generating a SEC file.
1. The Save As box comes up and I tell it where to put the file. I fed it a temp directory and it threw an error about a missing xslt file.
2. I used a bigger hammer and copied the xslt files into the temp directory. It then started generating the SEC file and gave the already mentioned ')' missing message. It generated the 0101 entry and stopped, so it looks like the error is in processing the system entries. In fact, this is what I got:

Code:
Test
 1-13: Name
15-18: HexNbr
20-28: UWP
   31: Bases
33-47: Codes & Comments
   49: Zone
52-54: PBG
56-57: Allegiance
59-74: Stellar Data

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8

A 0101        0101 C300545-8  S Ni Va              404 Na

Hope this helps.
 
Last edited:
Thanks, guys. I was able to repro and fix all the issues.

Somehow, extra end parens snuck into the XSLT, but I also got rid of the blank line in the SEC file.

The temp file directory is also solved - when the file save dialog is set, it sets that value for the rest of the programs lifecycle, so I was able to get around that.

Testing also revealed a couple other quirks regarding the pop multiplier in uncharted space worlds and star generation, which should be fixed now.

As far as posting, does anyone know if I can edit the original, or do I have to start a new thread?
 
Okay, I've updated the download link. The code now has the main zip, which contains the setup, but also another ZIP folder with just the updated files (XSLT and EXE). If you have already installed the app, you can just copy those files down in place.

I've imported sectors of both HES and SEC in Universe from this build, and the HES imports have been working fine in H&E as well.

(Here is the link, again)
 
And as yet another (minor) update, I have made a slight modification to make the subsector grid easier to look at, as well as changing the tab indices of the form controls.
 
0.8 version in Files section

Latest update here.

First of all, thanks to those of you who have tested and commented, it has been incredibly helpful in pulling this together.

I have made a pretty significant update to the code in that you can actually *EDIT* the sector data before you save it. All fields are editable except for the Hex location. Also, some fields are restricted in what you can enter(for example, the travel Zone only allows A or R, PBG values can only be numbers, UWP has to conform to the UWP format) but all can be modified. The grid also allows you access to the "notes" field for each world.

Additionally, the functionality has been moved around a bit. On the initial screen, you can actually LOAD a previously generated sector as well as generate one at that point. Once the sector has been generated (or loaded), you can then modify the values before saving (which you do from the sector editing screen).

The next big rev (which I think will be a nice addition) will be the ability to load sectors from various formats (like HES & SEC) into the XML data format, which then allows direct translation of formats. I am also entertaining expanding the sector schema to include trade routes.

Who knows, at some point I may even entertain actually drawing this stuff, but I am no GDI expert. :)

Anyway, have fun, and as always, let me know if you have any questions/comments/concerns...
 
So, have you re-used any of Joshua's code from his travellermap.com? It's .NET, isn't it?

Seems that there ought to be a few shared classes between the two proggies.
 
Anyway, have fun, and as always, let me know if you have any questions/comments/concerns...

is there a place that has info on the HES file format used by Heaven & Earth ?

I'm not necessarily interested in all the bells & whistles provided, but the ability to turn H&E loose and create a new sector/subsector and then have a script go in and pull out the "Traveller Basics" + maybe the solar system details might be a nice touch.

I could export it to XML and then use it for my own nefarious RPG purposes :devil:
 
So, have you re-used any of Joshua's code from his travellermap.com? It's .NET, isn't it?

Seems that there ought to be a few shared classes between the two proggies.

Thanks for the reminder, Rob, I have been meaning to ping Josh about which flavor of SEC he was using for his maps.

But yes, his site is ASP.Net with a C# code-behind (as well as some other stuff). I haven't actually seen his code, but I imagine that there would be more cross-usability between the XML Data than the classes I generate.

The only classes in the code (aside from the forms themselves) are a DieRoller class, a World class (which performs the generation based on some parameters passed from the starting form) and a Star class, which is used during the worldgen.

(Note that the World class also has an empty constructor to allow access to some of the public methods of the class. For example, if a UWP is edited in the grid, a World object is instantiated so that the GetTradeCodes method can be accessed should the UWP change.)

What did you have in mind wrt shared classes?
 
is there a place that has info on the HES file format used by Heaven & Earth ?

I'm not necessarily interested in all the bells & whistles provided, but the ability to turn H&E loose and create a new sector/subsector and then have a script go in and pull out the "Traveller Basics" + maybe the solar system details might be a nice touch.

I could export it to XML and then use it for my own nefarious RPG purposes :devil:

The format is pretty self explanatory, but if you install the program, it comes with a description of the format. I think the only thing different is the "satellite code" that designates if the mainworld is a satellite of a gas giant. Not too useful in my opinion, so I don't even include it.

THe earlier WBS formats are pretty close to HES and DON'T include satellite code, so I may come up with a stylsheet for those, too.

I'm kind of on the fence about H&E - I like the concept of it, but when you get too far into the system gen, it gets very buggy. And anyway, once you get to needing to detail a system to that level, you probably want to have a bit more control over the process (which is why I did not do the full advanced sysgen).

I prefer using Universe as a sector mapping tool, as it is easier on the eyes. :)
 
The format is pretty self explanatory, but if you install the program, it comes with a description of the format.

I prefer using Universe as a sector mapping tool, as it is easier on the eyes. :)

I think it's (H&E) installed on the other PC we have. I'll check out the folders for file format info.

Never used Universe or seen it. But I assume it does "traveller-style" generation/formatting ?
 
I think it's (H&E) installed on the other PC we have. I'll check out the folders for file format info.

Never used Universe or seen it. But I assume it does "traveller-style" generation/formatting ?

Yep, it's here.

Buy a copy and make Hemdian happy. :)

(seriously, I think it is definitely worth the money)
 
Last edited:
Back
Top