Optional Hex Grid Numbering System Like Many 18xx Games

It would be nice to have additional ways to number hex grids. One style I would like to see is a common way grids are numbered in 18xx games. They usually use letters to designate the straight rows or columns and numbers. For the other direction numbers are used, and they generally apply to a half row or half column.

So if the hexes are flat on top, the letters would designate columns, and the numbers half rows. What I mean by half rows is that a row number only applies to ever other column. If the top left hex is A1, the next hex over, in column B would be B2. The next hex over, in column C would either be C1 or C3 depending on whether it was in the top half row, 1, or the third half row down, 3. Consequently, all the hexes in column A would be in odd numbered half rows, and all the hexes in column B would be in even numbered half rows.

If the hexes were rotated 90 degrees, flat on the sides, with points on the top, the rows would be lettered and the half columns would be numbered.

Here are a couple of board images to show what I mean:

I’m not sure the images are posting correctly. The preview doesn’t show the images. It’s the first time I tried to post images on these forums. Here are the URLs for the images:
https://boardgamegeek.com/image/5142766/18newengland
https://boardgamegeek.com/image/1897647/harzbahn-1873

Thanks for your consideration.

As noted above, I am unfamiliar with putting images in post in this forum. If someone would kindly clue me in on this, I would be most grateful.

In your Grid Numbering component, just change the Horizontal (or Vertical) Numbering from Numeric to Alphabetic. 0 will be reported as A.

Brent,

Thank you for your reply. I saw the part about using letters instead of numbers for either or both directions in the documentation. The point of my request is that in the scheme of numbering hexes currently in VASSAL, as in many wargames, is that in one direction the hexes of a row or column form a straight line and in the other direction they form a zig-zag line. In this 18xx standard the treatment of the straight column or row is the same, but the treatment of the zig-zag row or column is different. In the VASSAL/wargame standard all the hexes in the zig-zag row or column are treated as part of the same row or column. However, in this 18xx standard the zig-zag row or column is treated as two separate rows or columns.

If you look at the grid numbering example in the wiki: http://www.vassalengine.org/wiki/GridNumbering for the hexes, it shows letters for columns and numbers for rows. So what I’m asking for is a bit different than what is shown. Using that graphic let’s start with hex D-0. It and hex B-0 stay the same as they’re in the same row. In my scheme hex C-0 is in the half row above B-0 and D-0 and would be numbered C-1. Hexes B-1 and D-1 become B-2 and D-2 as they are a half row above what now would be C-1. Hex C-1 would become C-3.

I’m thinking I could apply some sort of formula to re-designate the zig-zag component of the hex number for reporting grid locations in the game log, but having that scheme built in would be much easier.

With a little help on Discord from slimy_asparagus, I made a work around for this to get the LocationName in the desired form even though the hex numbering displayed by Vassal is not what I would like.

I drew a sample map for letter sized paper with hexes oriented like they are are on the map for the game for which I am building a module. The sample hexes are a buff (light, dull yellow) color and the board background in Vassal is a light green. I indicated the grid numbering with row letters in the left margin and column numbers in the top margin. I added a hex grid with hex height and width the same as what I drew on the map with Inkscape. I adjusted the X and Y offsets to align the Vassal grid with the one I drew. Here are the grid properties:

image

I set the grid numbering with the Horizontal designator first, no separator, Horizontal numbering Alphabetic, starting at -1 to account for the top margin (I wanted the top row that I drew to be “A”), and left the Horizontal numbering descending box unchecked. The vertical numbering is numerical, with no leading zeros, starting at 0, and the vertical numbering descending box unchecked. I checked the draw numbering box to see how Vassal numbers the hexes using green for the color.

The workaround is in the Location format box: {column+((2*row)-((“ABCDEFGHIJKLMNOPQRSTUVWXYZ”).indexOf(column)%2))}
Because the grid is displayed sideways, the rows are referred to columns in Vassal, and the columns are referred to as rows.
Edit: Changed 1 leading zero in rows to no leading zeros, and revised screen shot of properties dialog box:

Here is a view of the main map with the Vassal grid in red and the Vassal hex designations in green:

![|559x933](file:///C:/Users/jimmy/AppData/Local/Temp/lu15100eunv5.tmp/lu15100eunw8_tmp_97f3e5394c7653ca.png)
Notice that the Vassal row letters match the row letters I added in the left margin, but the column numbers (except for what would be column 0 and column 1) are different.

I defined one piece, track tile number 8, to see the placement reports in the chat box.

I placed tiles in hexes C4 and F7, and you can see the matching reports in the chat box using my desired grid designations for the Locations:

The sample map module can be attained through this link:
Edit: This is now my latest version which works with Vassal 3.6.7:

Innovative solution.

Out of interest, can you try clearing your Vassal tile cache and re-loading the module? The grid numbers are incorporated into the map tiles when the tiling occurs, playing with the Location Format (which is used dynamically when reporting) will not cause the map to be re-tiled.

1 Like

Ah, tried your module, that doesn’t help. This issue is that the code that reports the LocationName is different from the code that prints the Location on the grid!

The code the prints grid numbers on the grid is incompatible with Beanshell, It assumes the expression is just a simple re-format, it does not allow for re-calculating the co-ordinates.

With the co-ords already printed in the map, it looks like you have a good solution though.

1 Like

I deliberately had both systems of grid coordinates displayed so that those who investigated could easily see the difference. When I apply this work around to the module I am building for the game, I will “turn off” the Vassal grid display and the Vassal hex designators.

Thanks for taking a look.

I am curious if SendToLocation can work with my calculated LocationNames, but that is a quest for another day. I’m not thinking of any times when a player might want something sent to the map automatically. So I am quite pleased with achieving the 18xx style LocationNames and will pursue other aspects of the game I wish to include in the module.

Almost 100% certainly not. StL uses a mechanism similar to (but different again from) the grid drawing. The Location Format is just used for reporting.

It’s a mess.

1 Like

I was thinking it would be a big stretch. I only supplied the conversion from a standard Vassal notation to what I want. StL would have to reverse engineer from my conversion expression, and I doubt that StL is set up for that. Although I guess it might be possible to convert the location back to a Vassal standard for StL, but as I said, I don’t see a need at this time. So I’m fighting other alligators.

Right now, reporting locations is all I need.