Steve Jackson Games Forums

Steve Jackson Games Forums (https://forums.sjgames.com/index.php)
-   Traveller (https://forums.sjgames.com/forumdisplay.php?f=16)
-   -   Far Trader Trade Route Generation (https://forums.sjgames.com/showthread.php?t=80688)

forthekill 06-16-2011 01:47 PM

Far Trader Trade Route Generation
 
Is there any software out there that will help me generate trade routes for sectors/subsectors?

tjoneslo 06-16-2011 07:13 PM

Re: Far Trader Trade Route Generation
 
There is a piece of code on the Traveller Wiki http://traveller.wikia.com/wiki/Nroute.c which will do what you want. It's not very user friendly. The wiki has maps for most of the sectors in the traveller universe. If you do try and use this and run into problems, ping me and I'll do my best to help.

Anthony 06-16-2011 07:19 PM

Re: Far Trader Trade Route Generation
 
Quote:

Originally Posted by tjoneslo (Post 1195016)
There is a piece of code on the Traveller Wiki http://traveller.wikia.com/wiki/Nroute.c which will do what you want. It's not very user friendly.

Probably because I didn't write it to be user friendly, I wrote it to generate maps and then released the code in case anyone was curious.

forthekill 06-17-2011 08:08 AM

Re: Far Trader Trade Route Generation
 
Awesome. I'll check it out. Thanks.

The existing maps don't do me any good since I am using my own universe loosely based on stars within 200ly of Earth, flattened to a 2d map.

As far as user friendly goes, I don't need it to be. I have decent programming knowledge, and at quick glance it doesn't look super complicated :)

Anthony 06-17-2011 11:27 AM

Re: Far Trader Trade Route Generation
 
Quote:

Originally Posted by forthekill (Post 1195297)
Awesome. I'll check it out. Thanks.

The existing maps don't do me any good since I am using my own universe loosely based on stars within 200ly of Earth, flattened to a 2d map.

As far as user friendly goes, I don't need it to be. I have decent programming knowledge, and at quick glance it doesn't look super complicated :)

With some effort it could probably be adapted to a 3d map, though it would be a challenge making something human readable.

forthekill 06-17-2011 12:14 PM

Re: Far Trader Trade Route Generation
 
Quote:

Originally Posted by Anthony (Post 1195414)
With some effort it could probably be adapted to a 3d map, though it would be a challenge making something human readable.

3D is too much of a pain to use for gaming purposes, which is why I am using 2D. I'd much rather use a traditional Traveller style map anyway.

The software I used for the star data conveniently displayed in 2d, so I just took screenshots of each sector and overlayed a hex map in Photoshop. I then manually entered the positions in Traveller Universe for the systems in each sector, and exported the raw location data.

Then I used an old sector generator I found and rewrote in C++ to generate data for each system, and re-imported the results back to Universe.

So now I need to generate trade routes and hopefully your script will help me with the heavy lifting and I can make manual adjustments where needed.

forthekill 06-24-2011 10:18 AM

Re: Far Trader Trade Route Generation
 
Quote:

Originally Posted by tjoneslo (Post 1195016)
There is a piece of code on the Traveller Wiki http://traveller.wikia.com/wiki/Nroute.c which will do what you want. It's not very user friendly. The wiki has maps for most of the sectors in the traveller universe. If you do try and use this and run into problems, ping me and I'll do my best to help.

I compiled and ran but I get a segmentation fault every time. It seems to find my sec file because if I leave it out I get an Unable to open [Sol.sec] error.

The segmentation fault seems to come after the output "trade routes completed" message that only shows when I specify a sector file that doesn't exist. Otherwise I only get the Segmentation fault message.

On another note, does anyone have a sample sector input file? I want to make sure I am constructing them correctly.

It sounds like it should look like this:

Sol
0 1
Earth 0105 UWPgoeshere A Pb Cp Wa Ri R 413 Im
Alpha Centauri 0110 UWPgoeshere A Pb Cp Wa Ri R 413 Im
Kal's Landing 0203 UWPgoeshere A Pb Cp Wa Ri R 413 Im
...

forthekill 06-24-2011 10:27 AM

Re: Far Trader Trade Route Generation
 
Quote:

Originally Posted by forthekill (Post 1199760)
I compiled and ran but I get a segmentation fault every time. It seems to find my sec file because if I leave it out I get an Unable to open [Sol.sec] error.

The segmentation fault seems to come after the output "trade routes completed" message that only shows when I specify a sector file that doesn't exist. Otherwise I only get the Segmentation fault message.

I resolved this. It was a folder write permission issue.

I also noticed it was looking for basemap.ps. I changed blankmap.ps to basemap.ps and my error went away. Is that the correct thing to do?

It is generating all sorts of files now, but they are all blank, and I am guessing it is related to my input file not being quite right.

tjoneslo 06-25-2011 12:13 AM

Re: Far Trader Trade Route Generation
 
For examples of the sector data files, check on the Traveller wiki (where you got the source). Almost every sector has a data file and a trade map. Check, for example, Deneb Sector. The links are in the infobox on the right side of the page. Look for the sector data file and trade map links.

Otherwise, it looks like you are missing a line in the header to show where the columns are. There should be a line of what look to be randomly spaced numbers at the top of the file. Nroute uses these to identify where the columns are for important data.

Anthony 06-25-2011 01:36 AM

Re: Far Trader Trade Route Generation
 
Quote:

Originally Posted by tjoneslo (Post 1200527)
Otherwise, it looks like you are missing a line in the header to show where the columns are. There should be a line of what look to be randomly spaced numbers at the top of the file. Nroute uses these to identify where the columns are for important data.

Which would be idiotic for configuration files designed for the program, but it's designed to parse files in a couple different formats available from other sources.


All times are GMT -6. The time now is 12:53 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.