How to send a piece in a specific grid position of a specific zone?

I have this Main Map layout:

P1 and P2 Tokens Area grid is a 1 row, 7 columns grid.

I need to send a piece either on the P1 Tokens Area or P2 Tokens Area.
The piece has two Dynamic properties, Owner and GridPosition, which are set before the Send to Location trait.

I’m able to send it to the right zone

but how can i place it on the right grid column? *

*(using the Grid numberin, and not using the offsets as pixels, ‘cause it requires to know exactly how much pixels is the zone width)

If you make sure your Zones’ Location Format is set to “$gridLocation$”, then you can use the Region on selected Map option of Send to Location. It will also be necessary to modify the Grid Numbering component of each Zone, so that their Location format fields yield unique identifiers (for example, make the Location format for the P1 Draw Zone “P1$gridLocation$“, and then set the destination Region of your Send to Location to “P$Owner$$GridPosition$”).

1 Like

OH! THAT’s the way to use it! I didn’t understood the whole concept of the “Location format” at all.

Thank you a lot!

Oops, that should have been “P1 Tokens Area", not “P1 Draw", but hopefully you figured that out.

I was hoping to have this part solved, but i have a problem i can’t understand.

Here’s my settings:

Why, on the map, i have this numbers?

Seems like it is counting the cells from the very top of the board, and I don’t understand why, given that the “Use board’s grid” is unchecked.

What am i doing wrong?

Failing to read the Reference Manual page for Grid Numbering: it explicitly states:

Note If you are creating a grid inside a Zone the first cell refers to the first cell if the grid was applied to the whole board. You will have to allow for how many cells are between the board edge and the zone edge.

You need to set the first cells to “-23” and “-2”, based on that image.

Sorry :expressionless_face:

Ok, after a night of struggles, turns out that the right options to use is Grid Location on Selected Map; the Region on selected Map never works and fires errors like

2025-09-28 09:35:52,384 [27316-AWT-EventQueue-0] WARN VASSAL.tools.ErrorDialog - Piece: Morale Order Trait: Send To Location - Send this to the player Token zone grid - MoveOrderTokenToPlayerArea Source: Region[{“P”+Owner+“Orders_1-”+(GridPosition)}]=P1Orders_1-3 Error: Region not found.

even if moving the piece on grid reports the same exact string (P1Orders_1-3).

Thanks.

Yep–Region on selected Map is for when you have an Irregular Grid, which is made up of a set of named points (regions).

In the trait Send to Location, the options

  • Location on Selected Map
    uses only the configurations Map, Board, X-position, and Y-position which are pixel coordinates in the chosen board (Map Window and Map Boards). Note that Map, Board, X-position, and Y-position can be Expressions
  • Zone on Selected Map
    Uses only the configurations Map and Zone (Map Window and Zone). Note that Map and Zone can be an Expressions
  • Region on Selected Map
    Uses only the configurations Map and Region (Map Window and Irregular Grid). Note that Map and Region can be Expressions
  • Any counter, selected by properties
    uses only the configuration Property match, which can be a Property Match Expression.
  • Cycle through counters, selected by properties
    uses only the configuration Property match, which can be a Property Match Expression.
  • Nearest counter, selected by properties
    uses only the configuration Property match, which can be a Property Match Expression.
  • Grid Location on Selected Map
    uses only the configurations Map, Board, and Grid location (Map Window and Map Boards). Note that Map, and Board can be Expressions, but Grid Location cannot be an expression (must be constant).

Because the choice Grid Location on Selected Map does not allow for expressions for Grid Location (sigh!), it is not the right choice if you need to calculate the destination. However, Region on Selected Map should work even if the destination is a Hex Grid, or Rectangular Grid coordinate. Note, however, that the grid needs to be inside a Zone and that Zone’s Location format configuration must contain $gridLocation$. However, it could be that it doesn’t quite work as described.

Yours,
Christian

On my module, it works differently.

This never works (tried also with { } style expression)

This works as intended.

If you want to take a look, this is a dropbox link to a tiny module that just tests this functioning (open a new game as Observer, then right-click on the token pile and click on “Roll for Order Tokens”)

Yep, according to the docs, Region on selected map should work, but apparently it doesn’t (I haven’t tried it myself, so I’m not that surprised). I suppose I should file a bug report.

I also notice that the Grid location on selected Map option input fields don’t match those in the documentation, either.

1 Like

Testing the above it turns out that you cannot use a Hex Grid, or Rectangular Grid coordinate as the destination “region” of a Region on Selected Map of a Send to Location trait. In other words, if you need a calculated destination, then that destination must be a region in an Irregular Grid.

Annoying and unfortunate, but that’s how it is.

1 Like