• 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.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Jump Distance Spreadsheet

ovka

SOC-12
Does anyone have a spreadsheet which will allow me to determine what sector hexes are within J1, J2, J3, J4, J5, and J6 of a given sector hex? For example, when jumping from hex 0940, what hexes are within each of those jump distances?

Cheers,

Baron Ovka
 
I thought about that, but it doesn' t quite fit the bill. I am not looking for all systems within jump-n of system X. I am looking for a list of all hexes within J1 of hex X (and J2, J3, J4, J5, & J6). I could get that information from TravellerMap, but (I think) I would have to run the program hex-by-hex, six times each, and that doesn't really appeal to me.

Baron Ovka
 
Does anyone have a spreadsheet which will allow me to determine what sector hexes are within J1, J2, J3, J4, J5, and J6 of a given sector hex? For example, when jumping from hex 0940, what hexes are within each of those jump distances?

Cheers,

Baron Ovka

Are you looking for something that will list ALL hexes within a given range of the hex itself, or are you looking to be able to list all world hexes within a given Jump distance from the hex itself?

I have a spreadsheet somewhere containing the methodology for calculating the distance between two hex ID values. I also wrote a bit of VB.NET code that will go through all worlds, determine their World Trade Values (for use with GURPS TRAVELLER) and then determine the distances from each other (as that's part of how you determine the final Bi-world Trade Value for trade flows.

Let me know what you're looking for and whether or not you are using a windows environment or not. I can even show you how to create your own macros (as VBA is very much like VB.NET) using Excel if you'd like. It isn't all too challenging to create your own macros. :)
 
Are you looking for something that will list ALL hexes within a given range of the hex itself, or are you looking to be able to list all world hexes within a given Jump distance from the hex itself?

I have a spreadsheet somewhere containing the methodology for calculating the distance between two hex ID values. I also wrote a bit of VB.NET code that will go through all worlds, determine their World Trade Values (for use with GURPS TRAVELLER) and then determine the distances from each other (as that's part of how you determine the final Bi-world Trade Value for trade flows.

Let me know what you're looking for and whether or not you are using a windows environment or not. I can even show you how to create your own macros (as VBA is very much like VB.NET) using Excel if you'd like. It isn't all too challenging to create your own macros. :)

I'd be real interested in that code for the trade info. I have a spreadsheet that I have created for looking up info on worlds. It starts with the data from TravellerMap and allows the GM to enter his own stuff as well. I am looking at adding some functionality for trading and it sounds like your code would be a great starting point for me to figure it out!

If you are interested in seeing what I did you can find it here. I've made some changes since then, but the new version isn't ready to share yet. :)
 
Can't figure out how to attach a file, so here's my solution. This is an extract from a "trade map" utility I'm puzzling on, which will (someday) have the expected profit/loss for a jump in each cell instead of the distance. Someday.

Table of worlds in the subsector as such, where "Jump" is a defined name and is your ship's Jn, with the hex of each world in row B and Column A.

A B C D
1 Jump 0107 0108 0109
2 0107
3 0108
4 0109

In the body of the table:

=IF(MAX( ABS(VALUE(LEFT(B$1,2))-VALUE(LEFT($A2,2))),ABS(VALUE(RIGHT(B$1,2))-VALUE(RIGHT($A2,2))),ABS((VALUE(RIGHT(B$1,2))-VALUE(LEFT($A2,2)))*-1-(VALUE(RIGHT($A2,2))-VALUE(LEFT($A2,2)))*-1))>Jump,"",MAX( ABS(VALUE(LEFT(B$1,2))-VALUE(LEFT($A2,2))),ABS(VALUE(RIGHT(B$1,2))-VALUE(RIGHT($A2,2))),ABS((VALUE(RIGHT(B$1,2))-VALUE(LEFT($A2,2)))*-1-(VALUE(RIGHT($A2,2))-VALUE(LEFT($A2,2)))*-1)))
 
That explains it! Thought, again, that I was missing something obvious.

How does one become not-green? Post count?

A mix of time since your first post, posts and reputation (and off course, no infractions in the test time).
 
I have an algorithm, developed by Jon Buller and I, that will calculate the distance in hexes between any two contiguously numbered hexes.

I'll go find it. I know it's around here, somewhere. Ah, here:

http://www.travellerrpg.com/CotI/Discuss/showpost.php?p=389843&postcount=5

in the thread:

http://www.travellerrpg.com/CotI/Discuss/showthread.php?t=26108&highlight=hex+distance


Here it is in pseudo-Perl6:

Code:
[SIZE=2]my $parsecs = distance from: $thisWorld to: $thatWorld; 
[/SIZE]
Where

Code:
int distance( $from, $to )
{
   my $a1 = $from.row + int( $from.col / 2 );
   my $a2 = $to.row + int( $to.col / 2 );

   my $d1 = abs( $a1 - $a2 );
   my $d2 = abs( $col1 - $col2 );
   my $d3 = abs( ($a1 - $col1) - ( $a2 - $col2 ) );

   # return the largest value from the three options
   return $d1 if $d1 > $d2 > $d3; 
   return $d2 if $d2 > $d1 > $d3;
   return $d3; # last man standing
}
 
I have a spreadsheet somewhere containing the methodology for calculating the distance between two hex ID values. I also wrote a bit of VB.NET code that will go through all worlds, determine their World Trade Values (for use with GURPS TRAVELLER) and then determine the distances from each other (as that's part of how you determine the final Bi-world Trade Value for trade flows.

Let me know what you're looking for and whether or not you are using a windows environment or not. I can even show you how to create your own macros (as VBA is very much like VB.NET) using Excel if you'd like. It isn't all too challenging to create your own macros. :)

That's exactly what I'm looking for. I'm working on BTN calculations. And yes, I'm on a Windows machine. I used to write Excel macros back in the day, but haven't done much since VBA. Shows you how long it's been. :)

Cheers,

Baron Ovka
 
Back
Top