Help with oblique grid numbering, please

Cheers.

In Tonkin by Kim Kanger, published by Legion Wargames, hex numbering is oblique and it uses letters.

I like this game a lot and invested many hours into enhancing its VASSAL module. It’s not perfect and I am still improving on it but what buggers me most is that there is no way I could possibly add appropriate hex numbering within VASSAL current scope.

I know of at least one module that has oblique letter based number (A3R) but I can’t on Earth figure out how to transfer its java code to my module.

I’ve been wondering if anybody could help me (as in: write the code and tutor me with regard incorporating it into my module) with it. I would be most grateful.

I’m confused as to what exactly isn’t supported by the existing Hex Grid feature in the Module Editor. It allows for vertical and horizontal (oblique) hex rows. It also allows for either numerical and alphabetic numbering of each row. Maybe I don’t understand what you mean by oblique…

Oblique as in… oblique :slight_smile:

Take a look:

Green arrow marks hexes labelled after “R”, red one – after “S”. Sideways numbering is “normal” i.e. each row has its distinct number.

In the A3R module, you will find a folder called ThirdReich that contains a number of files including one called HexGridNumbering.class. Copy this folder into your module using 7-zip or similar. Open your module using the Vassal Editor and open the Hex Grid component you have created. Delete any existing Grid Numbering and use the option ‘Import class’ and import a class named ThirdReich.ObliqueHexGridNumbering

That should add a component that you can configure to create the oblique grid.

Regards.

Cheers, Brent. Yes, I tried that before. Sorry to report that it ends with an error:

pastebin.com/raw/eAnSwbMP

I will poke around, I should still have the source for it somewhere. I’ll see if I can get it going for you.

Oh, that would be absolutely and very much extra-appreciated.

It’s looking like it is actually a Vassal bug preventing custom classes from being imported from the Editor.

You can get around it like this:

  1. Start with a fresh copy of the module.
  2. Copy the ThirdReich folder into the module.
  3. Edit the buildfile, find the text ‘VASSAL.build.module.map.boardPicker.board.mapgrid.HexGridNumbering’ and replace it with ‘ThirdReich.ObliqueHexGridNumbering’.

You should be able to edit the module and adjust the numbering.

Regards,
Brent.

Yikes! It worked. Thanks so much.

That is more or less the standard reaction with one’s first successful custom class import :slight_smile: