Create account / Log in

Labeling Locations within a Region

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Labeling Locations within a Region

Postby cgmclellan » January 8th, 2014, 1:27 am

I checked but couldn't find a similar request.

A while back I asked on ConsimWorld's VASSAL forum if VASSAL could develop a system similar to that in ADC2 to label hexes or squares within a region. This was rather hard to explain, and I am not sure that anyone actual understood what I was driving at. So, here is an example to show what I was asking for.

Here is a segment of a VASSAL module of SPI's American Revolution. The map uses area movement with each area identified by a three-digit code. For example, the code for the southern section of Hudson Highlands is HH2.

Image 1

Underneath the map image is a 20x20 pixel square grid, normally not visible.

Image 2

In ADC2, I can label each of the squares around the periphery of an area with the three-digit code. Once the outline of the area is complete, as shown by the blue squares instead of code in this example, I can fill in the unlabeled squares with a single fill-in command. Now all the squares within the outline area carry the same three-digit location code.

Image 3

Whenever the computer mouse is over any square within an area on the ADC2 map, that location code will show. A mouse over any square in the current VASSAL map reads "off-map." I can achieve the ADC2 map result on the VASSAL map by labeling each square, individually, as part of an irregular grid. I did do this for Italia/Anzio and Afrika Korps hexes, but for the American Revolution module, there are 12,852 squares, far too many for me to do the whole job one at a time. A computer could conceivably do the fill for me in seconds. Many tools with different paint and picture programs fill color instead of codes so the programming job should not be unique.

This still would not work for hexes in maps like Italia/Anzio because of the grid is actually irregular, but it could work for all area type maps. Perhaps VASSAL can already do this and I am just not aware of VASSAL's capability. If so, please explain to me in detail how to do this in VASSAL.
Attachments
ARmap4.png
ARmap4.png (180.1 KiB) Viewed 5478 times
cgmclellan
 
Posts: 55
Joined: July 20th, 2010, 10:26 pm

Re: Labeling Locations within a Region

Postby tar » January 8th, 2014, 2:06 am

I wouls think that instead of having a method of labeling collections of regular grid points, it would be better to have a new type of grid, say an irregular area grid or something like it. You would then define the areas by drawing polygons and have just a single area object for each of the areas on the map grid. That just seems more straight-forward of an approach to me.

Perhaps as an option, you could also specify one or more snap-to points inside the areas.
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Re: Labeling Locations within a Region

Postby cgmclellan » January 8th, 2014, 5:47 pm

I appreciate the quick response. However, I am not computer language savvy or VASSAL savvy either for that matter. I do not know how to make an irregular grid of polygons or what a "single area object for each area" means. Further, I am not sure that I understand how to specify a snap-to point inside the area.

Say I learn to make a "snap-to" point inside and area. How is the border between areas defined? Would it be the same way as "outlining" an area as I described in the initial posting? If so, that might work.

Could you please point me to some references on how to accomplish either suggestion?
cgmclellan
 
Posts: 55
Joined: July 20th, 2010, 10:26 pm

Re: Labeling Locations within a Region

Postby JoelCFC25 » January 8th, 2014, 7:04 pm

One option for doing a map like this is to create a Multi-zoned Grid on your map board. You draw polygons as you need them, then give them a name (I presume these would be the alphanumeric codes).

Feel free to download this example module and take a look at it. Here's a screenshot of where in the Editor you'd look to see what I mocked up:

Image

The NY 2 region has an Irregular Grid nested inside its Zone, and snapping is enabled. I created 2 Regions and turned snapping on so you can see how that would work. Move the single piece around and watch how the reporting works. You can place it freely anywhere in HH 1, HH 2, or NE 2, but placing it in NY 2 should cause it to snap to whichever of the 2 Region points is closest.

If you absolutely cannot live without an underlying 20x20 pixel regular grid and need each of those cells defined with an attribute corresponding to the polygonal area in which they (mostly?) sit, I think it's going to be a massive headache.

When I see a map like you have, it makes no sense to me to build the irregularly-shaped polygonal areas out of 20x20 cells, but maybe that's the only way it works in ADC2, I have no idea. In VASSAL, you can create polygonal areas comprised of as many vertices as you want.
JoelCFC25
 
Posts: 748
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Labeling Locations within a Region

Postby cgmclellan » January 9th, 2014, 2:23 am

Thanks! I will try to do what have shown.

Yes, this is from an ADC2 import. ADC2 can use any scan or picture overlaying but movement of counters is regulated by rectangles or hexagons seen or unseen. That is the only way it works in ADC2. I only know how to make an ADC2 module. I have read some of the VASSAL literature, but I rather need a translator to covert it to my ancient English.

Thanks again for the help
cgmclellan
 
Posts: 55
Joined: July 20th, 2010, 10:26 pm

Re: Labeling Locations within a Region

Postby JoelCFC25 » January 9th, 2014, 2:55 pm

One thing to note about creating Zones in a Multi-zoned Grid--the tool you use to actually draw zones is cumbersome and slightly broken. The only shape you can initially draw is a rectangle (the size of which is up to you). However, once you've drawn it, you can start moving the vertices where you want them to go and adding new vertices. The instructions for use are right on the screen while you're working.

The "broken" part of the Zone editing tool is the creation of new vertices. The instructions tell you to right-click to add a new vertex, but when you do this, it adds two vertices instead of one. Any vertex you have selected (it will be shown in red) can be deleted by hitting the Delete key on your keyboard. Another "broken" part of this tool is that the zoom level of the map while you edit Zones is fixed--you can't zoom in or out, only pan.

Essentially, with a lot of fussy right-clicking to add vertices and manually moving them around, you can create a Zone of any shape you want.
JoelCFC25
 
Posts: 748
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Labeling Locations within a Region

Postby JoelCFC25 » January 9th, 2014, 2:58 pm

If you find the VASSAL documentation difficult, you might consider watching Joel Toppen's series of VASSAL Design videos on Youtube. I'm sure he covers creation of Zones (among many other core concepts).
JoelCFC25
 
Posts: 748
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Labeling Locations within a Region

Postby tar » January 10th, 2014, 12:24 am

What I suggested does not exist yet.
Since this is in the [Feature Requests] forum, I was making a modified
suggestion for a new feature.

Sorry for any confusion.


On Wed, Jan 8, 2014 at 9:47 AM, cgmclellan wrote:

> I appreciate the quick response. However, I am not computer language
> savvy or VASSAL savvy either for that matter. I do not know how to make
> an irregular grid of polygons or what a "single area object for each
> area" means. Further, I am not sure that I understand how to specify a
> snap-to point inside the area.
>
> Say I learn to make a "snap-to" point inside and area. How is the border
> between areas defined? Would it be the same way as "outlining" an area
> as I described in the initial posting? Id so, that might work.
>
> Could you please point me to some references on how to accomplish either
> suggestion?
>
> _______________________________________________
> Read this topic online here:
> viewtopic.php?p=43439#p43439
> _______________________________________________
> messages mailing list
> messages@vassalengine.org
> http://www.vassalengine.org/mailman/listinfo/messages
>
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests