• 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.

Web-based Automatic Sector Data / Map pdf Generator

Hi Mickazoid,

I am definitely learning (and some re-learning) a ton about Linux and scripting in general. I haven't used UNIX since college and I never much liked it ;)

Anyway, I figured that was the issue with the binaries, except where do I get the .c files for the binaries (gensec3, full-upp, mapsub3, subsec2) you included in the .zip so that I can compile them for Ubuntu? Did I miss something in this thread where you link to them?
 
Yes, i believe they're in the zip file, as ch was able to compile them - take a peek. I wrote this as a means of learning more about shell scripting so i'm glad it's still having that effect ;) Enjoy.
 
Last edited:
I found them, but they're not in the .zip file. I did a search in the thread (duh!) and there was a link in an early post to external sites with the .c files.

I am trying to compile them now, but I have one question.

I see that you have gesec3 where I can only find gensec. Are there changes you made to the original scripts or did you just change the name?
 
Ok, I'm past the binary compiles, but now I am getting two errors.

In the function scorer(), in the section on Planet names, the following line throws the following error:
Code:
sed '/[A-z]/ s/[A-z]/ /g' /tmp/$1subsecdataScore23$x > /tmp/$1subsecdataScoreFinal$x

sed: -e expression #1, char 8: Invalid range end

I put a fix in that line that is the following:
Code:
sed '/[A-Z][A-z]/ s/[A-Z][a-z]/ /g' /tmp/$1subsecdataScore23$x > /tmp/$1subsecdataScoreFinal$x

I did that because the [] throw the error with the upper and lowercase in the same bracket. I posted on a Ubuntu forum and that is what they suggested I try. But I want to make sure that is the correct fix.

What is the sed line supposed to do? For example, here are a few lines from ZebulonsubsecdataScore23A:
Code:
0 9  16  5 In
1 5  14  -1
5 2  18  -2 -1 -2
2 3  22  -2 -1 Va
10 5  22  Ag -1

With my above fix to that sed line, I get the following in ZebulonsubsecdataScoreFinal1A:
Code:
0 9  16  5
1 5  14  -1
5 2  18  -2 -1 -2
2 3  22  -2 -1
10 5  22    -1

Is that what I should see?
 
Last edited:
UPDATED

For anyone who cares... :)

I have the script working in Ubuntu 8.10, on the command line as well as the CGI script.

1. I updated the instructions to get it running on Ubuntu, I packaged up the changes to the script I had to make, and the binaries I compiled for it.

2. I am in the process of finalizing the VMWare Workstation image so that any Windows users can use the free VMWare Player to run the script.


The only issue I have is that if a sector has too many worlds to fit on one page, it runs onto a second page but it overlaps with the page header for that next page.
 
Last edited:
UPDATED

For anyone who cares... :)

I have a newly minted Ubuntu install, just waiting for this program...

I have been waiting since the first posts to get my hands on it.

What do I have to do to get a copy?

BTW - I know there has been a lot of talk about how the print the whole thing once you have your secor.

Since no group that I have ever seencan be on more than 1 or two planets at a time in ANY detail, why you need more than a couple printed at a time?

The WHOLE point of a large PDF like this is so you don't HAVE to cart around a forest of dead trees.

Just my ,02 credits
 
Hey Mr Tek,

I hope to have a zip of the Ubuntu files by the end of the week :)

I am also messing with gensec (the part that generates the sector data) to add an option to use a file with hexes and system names to have it put systems with those names in those hexes, and generate the data for them.

So basically you could then generate totally from scratch, generate using a fully fleshed out .sec file, or and inbetween that does mostly from scratch with certain system locations/names added in.

I hope to have two options, one that uses only the systems that are in the file, and the other that uses the systems in the file but also randomly generates as normal for the rest of the hexes in the sector.
 
Ok, so I modified gensec3 so that when you do the following:

Code:
./SectorMaker.sh Zebulon sparse mature

it will look for a file '/sectors/autogen/Zebulon_names.txt'

for a list of hexes and names like so:

Code:
0120 Terra
1220 Zebulon
1430 Volturnus

and, if present, use those during sector generation. These worlds will be in addition to whatever randomly generates based on the density value.

You can also use the density value zero if you do not want any other systems to be created other than what is in your names file.

Syntax for the modified gensec3 is as follows:

Code:
gensec3 rift mature -Z Zebulon

I am toying with the idea of making the -Z pass the path (/sectors/autogen/Zebulon) instead of just the sector name, so that it isn't hardcoded into the binary, and it can just get changed in the script instead.


Here is the link (removed) to the modified source of gensec, and the modifed SectorMaker.sh script. Be warned, the sh script is the one I am using for Ubuntu, so many of the paths are different. I commented the lines that are used for the modified gensec, so if you search for 'gensec' you'll see what I changed for that.

I would love some feedback (and code review as well, since I'm doing these with my mostly forgotten programming skills and some newly learned ones) if anyone gets a chance. Thanks.
 
Last edited:
Also - please bear in mind the capability of loading in an existing sector file is already in the script, by providing the last two key values - "sectorname.sec" and "1,2 or 3", for either observing or re-generating routes and borders.

I like the 'test if' feature you added - but please bear in mind you may have missed the existing functionality.

Rock on!
 
Hey Mickazoid,

As I understand it, if you provide an exisiting .sec file, it needs to have the proper information, including UPPs and such.

My goal with this modification was to allow you to create a file with just hex locations and names, and let the program generate the rest of the info to make the complete .sec file.

Also, I wanted to give the option to use that same file to define some of the locations and names, but still allow the rest of the hexes to populate randomly.

For example, in my soon to run campaign, I am using a semi-realistic sector with close to real star locations and star names based around Earth. I don't want to manually come up with codes and all that other info for those worlds, so I just listed hexes and names that I wanted it to use, specified 'zero' for density, and let it go. Then I get systems where I want them, but everything else is randomly created.

Does that make sense?


I did realize, however, that the format for my sectorname_names.txt file should be identical to a .sec files first two columns of data. It would make it more consistent it think.
 
Last edited:
Cool.

I am currently revamping the code I added so that the names file isn't:

Code:
1223 Sol
1401 Truane's_Star
1910 Starmist

and is instead like a .sec without the rest of the data:

Code:
Sol                1223
Truane's_Star      1401
Starmist           1910

I am also changing it so you can pass to gensec the sector name and path to the names file separately.
 
I have packaged up the Ubuntu 8.10 version of SectorMaker.

It includes my gensec3 modifications (gensec3c) by default, which include the changes I mentioned in my last post. There are instructions in the file /install/guide to using gensec3c on how to use it. If you don't want to use my mods, you can use SectorMaker as normal and you won't even notice.

I would love for someone to try it and give me feedback.

The install instructions are in both SectorMaker.sh and SectorMaker.cgi. Let me know if they are accurate or need any modifications. There are more steps than the Mac version, but there is a lot more involved. I have not tried these steps from a clean install of Ubuntu yet, so be aware that there is a chance something is missing, but I hope not! :)
 
Last edited:
Errors in ubuntu script

I am getting errors throughout the sectormaker script.

They all seem to surround enscript

I get line after line of

enscript: do not know anything about media "Traveller"

I am guessing there is supposed to be a media definition for enscript to use that defines the lbb page format. It appears that definition was not included in the download.

I will admit I am a linux newb, but obviously if escript is being passed a media name that media name must be defined SOMEWHERE.
 
You need to check your install of enscript which should be in usr/share/enscript, and make sure you copied the enscript.cfg file included in the .zip to that directory.

If you look in that file you should see a section:

#Media definitions:

with a number of media types, the last of which should be Traveller.
 
OK the enscript.cfg file is in /usr/share/enscript.

I still get errors on every line that trys to output a page .

Each error says
enscript: do not know anything about media "Traveller"

I also get errors from each line that tries to open one of those pages because the file does not exist.

I made a copy of the script and removed the --media= line from each enscript call. The script runs without error, it just leaves the pages a little screwy.

Enscript must be installed correctly to run without the --media= command, I am just not sure why it is missing reading the config file.

Could I have permissions wrong? It was a direct copy from the zip, so I don't know where else to look.
 
I found the error.

In your install instructions in SectorMaker.sh you copy enscritp to /usr/share/enscript

per the enscript manual escript reads its global configuration from /etc/enscript.cfg

Moving the enscript.cfg to the correct location resolved the errors.
 
Back
Top