Create account / Log in

Help with oblique grid numbering, please

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Help with oblique grid numbering, please

Postby grouchysmurf » September 11th, 2020, 5:45 am

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.
User avatar
grouchysmurf
 
Posts: 178
Joined: August 9th, 2011, 7:48 pm

Re: Help with oblique grid numbering, please

Postby m3tan » September 13th, 2020, 1:36 am

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...
User avatar
m3tan
 
Posts: 209
Joined: August 12th, 2018, 11:49 pm

Re: Help with oblique grid numbering, please

Postby grouchysmurf » September 13th, 2020, 8:42 am

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 :-)

Take a look:

Image

Green arrow marks hexes labelled after "R", red one -- after "S". Sideways numbering is "normal" i.e. each row has its distinct number.
User avatar
grouchysmurf
 
Posts: 178
Joined: August 9th, 2011, 7:48 pm

Re: Help with oblique grid numbering, please

Postby Brent Easton » September 13th, 2020, 11:12 am

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.
User avatar
Brent Easton
 
Posts: 3226
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Help with oblique grid numbering, please

Postby grouchysmurf » September 13th, 2020, 6:33 pm

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

https://pastebin.com/raw/eAnSwbMP
User avatar
grouchysmurf
 
Posts: 178
Joined: August 9th, 2011, 7:48 pm

Re: Help with oblique grid numbering, please

Postby Brent Easton » September 13th, 2020, 9:58 pm

I will poke around, I should still have the source for it somewhere. I'll see if I can get it going for you.
User avatar
Brent Easton
 
Posts: 3226
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Help with oblique grid numbering, please

Postby grouchysmurf » September 14th, 2020, 5:07 am

Brent Easton wrote: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.
User avatar
grouchysmurf
 
Posts: 178
Joined: August 9th, 2011, 7:48 pm

Re: Help with oblique grid numbering, please

Postby Brent Easton » September 14th, 2020, 10:31 am

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.
User avatar
Brent Easton
 
Posts: 3226
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Help with oblique grid numbering, please

Postby grouchysmurf » September 14th, 2020, 12:49 pm

Yikes! It worked. Thanks so much.
User avatar
grouchysmurf
 
Posts: 178
Joined: August 9th, 2011, 7:48 pm

Re: Help with oblique grid numbering, please

Postby Cattlesquat » September 17th, 2020, 2:47 am

grouchysmurf wrote:Yikes! It worked. Thanks so much.


That is more or less the standard reaction with one's first successful custom class import :)
User avatar
Cattlesquat
 
Posts: 942
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA


Return to Module Design

Who is online

Users browsing this forum: No registered users and 5 guests