Create account / Log in

Oblique Hex Grid

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Oblique Hex Grid

Postby dolbee123 » January 24th, 2011, 2:32 pm

I'm working on Third Reich and the map has the numbering that is "Oblique" is there a code to fix the numbering on the map?
Attachments
3Rmaptn.PNG
3Rmaptn.PNG (54.39 KiB) Viewed 5904 times
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am

Re: [messages] [Module Design] Oblique Hex Grid

Postby pgeerkens » January 24th, 2011, 2:42 pm

What do you mean by 'fix?

Isn't this game one of the old AH classics that uses oblique numbering for
PBM? If so, I believe it should continue to use oblique numbering to allow
PBM players to interact with PBEM players.

Pieter

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of dolbee123
Sent: Monday, January 24, 2011 9:33 AM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Oblique Hex Grid

I'm working on Third Reich and the map has the numbering that is
"Oblique" is there a code to fix the numbering on the map?
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: Oblique Hex Grid

Postby Tim M » January 24th, 2011, 2:50 pm

A dev (Pieter above) is working on this with his grid rework.


In the meantime if you know how to use zip utilities you can grab and use the original created oblique class mentioned here:

http://www.vassalengine.org/wiki/Develo ... nthusiasts

out of the Afrika Korps module (the 222 version)

http://www.vassalengine.org/wiki/Module:Afrika_Korps
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Oblique Hex Grid

Postby dolbee123 » January 24th, 2011, 5:16 pm

Thanks guys I can use all the help I can get!
Yes it is an old Avalon hill game I have put playersides in the game so Variants can be drawn.The map is Advanced third Reich so I changed that to 3Rth.I have tried to put the "Oblique Hex Grid" from Advanced third Reich WAW mod coudn't get it to work so I'll try the Africa Corp thanks again.
One last thing the game has a Layer "Used"that places over the units. I would like to place a Layer"Exploit" problem is I'm using "paint" and I can't get just the words"Exploit" it also copys the white backround so it end up covering the whole counter if the Backround was clear then it would work. Any sugestions?
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am

Re: [messages] [Module Design] Re: Oblique Hex Grid

Postby pgeerkens » January 24th, 2011, 5:32 pm

My updated HexGridNumbering class fully supports oblique numbering in all
(8) possible configurations, so if you have difficulties integrating the AK
customization let me know. I am looking at how plugins work, with the
thought of publishing some of my recent enhancements in 3.1.5-compatible
plugins for the use of other developers:
- Integrated Oblique HexGridNumbering support, and
- Named Grid Location extension to SendToLocation
In particular.

Pieter
-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of dolbee123
Sent: Monday, January 24, 2011 12:17 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Oblique Hex Grid

Thanks guys I can use all the help I can get!
Yes it is an old Avalon hill game I have put playersides in the game so
Variants can be drawn.The map is Advanced third Reich so I changed that
to 3Rth.I have tried to put the "Oblique Hex Grid" from Advanced third
Reich WAW mod coudn't get it to work so I'll try the Africa Corp thanks
again.
One last thing the game has a Layer "Used"that places over the units. I
would like to place a Layer"Exploit" problem is I'm using "paint" and I
can't get just the words"Exploit" it also copys the white backround so
it end up covering the whole counter if the Backround was clear then it
would work. Any sugestions?

_______________________________________________
Read this topic online here:
viewtopic.php?p=21505#p21505
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: Oblique Hex Grid

Postby dolbee123 » January 24th, 2011, 7:42 pm

The first link I didn't see anything there.I downloaded the AK mod and I copied and pasted what I thought to be the correct code for the Grid didn't work.
I don't know what to copy and past the file for AK is quiet large.
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am

Re: Oblique Hex Grid

Postby Tim M » January 24th, 2011, 7:51 pm

You dont copy and paste code.

In the AFK module after you have unzipped it, you will find a folder called "afk" inside. Put this folder into your module (again you will have to unziup your module first then rezip after adding the new folder).

Once that is done now go back and normally edit your module. Goto where your board is defined, right click and select "import class"
In the dialogue box type "afk.ObliqueHexGridNumbering", press enter.

You now have the oblique hex grid numbering scheme added to your module and you just have to define its values like a regular grid
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Oblique Hex Grid

Postby dolbee123 » January 24th, 2011, 8:03 pm

I unziped the folder with Jzip.all I see is Images,buildfile,moduledats, if i open images there are ither files no folders.
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am

Re: Oblique Hex Grid

Postby Tim M » January 24th, 2011, 8:09 pm

Here. You must unzip (extract it from the zip first) so that it builds the directory then add the directory to your module
Attachments
afk.zip
oblique class
(11.41 KiB) Downloaded 154 times
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Oblique Hex Grid

Postby dolbee123 » January 24th, 2011, 8:44 pm

I don't know why I'm having a hard time with this one I unzipped both folders and tried adding the AFK.folder but it wont let me add it says the mod does not support. I can open the folder AFK and add the files just not the folder.
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am

Re: [messages] [Module Design] Re: Oblique Hex Grid

Postby Tim M » January 24th, 2011, 9:16 pm

upload your module somewhere and I'll try to add it in. Only way to see whats
going on


 

________________________________
From: dolbee123
To: messages@vassalengine.org
Sent: Mon, January 24, 2011 2:44:12 PM
Subject: [messages] [Module Design] Re: Oblique Hex Grid

I don't know why I'm having a hard time with this one I unzipped both
folders and tried adding the AFK.folder but it wont let me add it says
the mod does not support. I can open the folder AFK and add the files
just not the folder.

_______________________________________________
Read this topic online here:
viewtopic.php?p=21520#p21520
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1777
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Oblique Hex Grid

Postby dolbee123 » January 24th, 2011, 10:58 pm

I can't seam to upload the mod at this time I'll keep trying.
here are some screen shots. I was able to get the file together but it gave errors when trying to save and the numbers are still off I don't se any command buttons to correct.
Attachments
bug2.PNG
bug2.PNG (35.48 KiB) Viewed 5874 times
bug.PNG
bug.PNG (62.5 KiB) Viewed 5874 times
3Rmaptn.PNG
3Rmaptn.PNG (56.37 KiB) Viewed 5874 times
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am

Re: Oblique Hex Grid

Postby pgeerkens » January 30th, 2011, 5:18 pm

Attached is a bare-bones module with the most recent version of the HexGrid, ZonedGrid, and HexGridNumbering classes, which support oblique hexgrid numbering and use a proper hexagonal pick area instead of a rectangle. They should also be more efficient at encoding/decoding between screen points and location names. These classes will be part of the next release of VASSAL, but are available here in advance.

To use these classes, follow these steps:
    Save a copy of your module, just in case;
    Using your favourite ZIP utility, copy the VASSAL directory from the attached zip-file into your module;
    Optional if needed: Instead of adding a MultiZonedGrid to your board, import this class:
    VASSAL.build.module.map.boardPicker.board.ZonedGridX;
    Instead of adding a HexGrid to your Board/Zone, import this class:
    VASSAL.build.module.map.boardPicker.board.HexGridX;
    Instead of adding a HexGridNumbering, import:
    VASSAL.build.module.map.boardPicker.board.mapgrid.HexGridNumberingX
    Save your module and and close the Editor; and finally
    Re-enter the Editor and set your parameters as desired.

Note the trailing 'X' characters on the class names. This is necessary to force VASSAL to pick up the new classes, otherwise it will simply reload the existing classes.

These new classes are completely backwards compatible with the current instances, so an alternative integration is to edit the buidlfile and replace all instances of ZonedGrid by ZonedGridX; HexGrid by HexGridX; and HexGridNumbering by HexGridNumberingX.

Contact me directly, either here or by pm, if you encounter problems with these classes prior to therir official release in VASSAL. At that time their functionality will be available under the existing class names.

Pieter
Attachments
HexGridNumbering.zip
Bare-bones module with oblique HexGridNumbering classes:
VASSAL.build.module.map.boardPicker.board.ZonedGridX (optional)
VASSAL.build.module.map.boardPicker.board.HexGridX
VASSAL.build.module.map.boardPicker.board.mapgrid.HexGridNumberingX
(141.7 KiB) Downloaded 154 times
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: Oblique Hex Grid

Postby pgeerkens » January 30th, 2011, 5:28 pm

Note:
1) HexGridX is required by HexGridNumberingX, but ZonedGridX is only required if you are using zones on a map requiring the new functionality.

2) If you import HexGridX and then attempt to EditGrid before closing and re-entering the Editor, you will get a Null Pointer Exception. This error can be safely ignored; is a known bug; and is due to a sequencing error inside the Import Custom Class function. The Grid Editor attempts to step up the class hierarchy to determine the dimensions of the board on which the grid resides, before the grid has been assigned the board as a parent. The only effect of the Exception is to abort the Edit Grid request. This sequencing error does not occur when the class is loaded from the buidlfile.
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: Oblique Hex Grid

Postby dolbee123 » January 31st, 2011, 5:44 am

Thank you. I will try this in ly Mod although I think Tim may have done it already ( I uploaded the file on Mediafire and he fixed it works Great) I'm going to try myself. Thanks again.

Sean.
sean dolbee
dolbee123
 
Posts: 58
Joined: May 19th, 2008, 5:53 am


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron