Reporting movement, mix of snap-to-grid and non-snap-to-grid

I have a board with counters and cards. The counters snap to an irregular grid on the board, and the report format states their destination as a grid location.

The cards do not snap because they don’t really belong to grid locations, but they can be placed on the board during the course of play, because, well, someone could just draw it and drop it there. I didn’t want them to stack because I don’t want them to interfere with the counters.

When I drop the cards on the board, though, the report to the chat window is incomplete because they don’t end up on an irregular grid location. It just says *Card moves to *.

So, I’d like to make a report that reports a piece moving to an irregular grid location, BUT if a piece that is designed not to snap to a grid location ends up on the board, I’d like the report to read * Card moves to [boardname] *

The way I can think of to do this is to turn off Map reporting for all pieces, and then do a Report Action for each prototype of a piece that watches for a keystroke for all pieces ending movement on the board and then reports that action in the format I want, such as *[BasicName] moves from [OldLocation] to [CurrentLocation] * for counter prototypes and [BasicName] moves from [Deck] to [CurrentBoard] for card prototypes if OldLocation is the deck and *[BasicName] moves from [OldBoard] to [CurrentBoard] * for card prototypes if OldLocation is not a deck.

Can anyone think of an easier way to do this? I’m not sure this will work but it’s where I’d start.

What you describe will work, and should be easy to implement if you have prototyped your components properly.

Bigtex01 messages@forums.vassalengine.org wrote:

Post generated using Mail2Forum (mail2forum.com)

Ok, I’m having a fair amount of trouble with this.

I have a board in the main map window with zones, each zone with an irregular grid inside.

I’ve got several mixed behavior items (as described above), none of which report to the chat window uniformly:

  1. A deck on a board in a second map window. These cards snap to grid (because I want them to behave like counters out of a draw bag).

  2. A deck on a board in a third map window. These cards do not snap to grid.

  3. Piece palette with pieces that snap to grid.

With auto map reporting on, #1 reports fine. It reports movement from the deck to the board (snap to grid) as “moves from deckname to grid location”, and it reports movement within the board as “moves from grid location to grid location.” Great–that’s what I want for these pieces.

#2 does not. It reports movement from the deck to the board as "moves from deckname to " because it doesn’t snap to grid, so it doesn’t end up with a currentLocation, so it leaves it blank. Likewise, movement on the board is reported as "moves from to " Now, it DOES end up with a currentBoard, and putting just the old and current board names here (with the report to the chat window being “moves from oldBoard to currentBoard”) would work for me.

So, knowing this, I made a report message that, for this type of card, reports after getting the end of movement keystroke from the main map. It’s done with a Report Action that says “moves from $oldBoard$ to $currentBoard$.” Great. This statement reports fine, like I want it to. The problem is, I can’t suppress the auto reporting for the main map for this type of card, so it’s accompanied right afterwards by the "moves from to " that I didn’t want. In addition, the map auto reporting and the piece ReportAction use properties that apparently are exclusive to each and can’t be accessed by the other. The map auto reporting doesn’t know or can’t access $oldBoard$ or $currentBoard$ apparently, as they come out as the actual string “moves from oldBoard to currentBoard” in the chat window if I put “moves from $oldBoard$ to $currentBoard$” in the map auto reporting box. Likewise, the ReportAction doesn’t know the “previousLocation” that’s used in the map auto-reporting.

#3, like #1, works ok with the map auto reporting. But again, I can’t seem to create a Report Action exclusive to these pieces that reports like the map auto reports, primarily because I can’t figure out a way for a piece to know when it comes time to Report Action whether it was “created” or moved within the main map window. As it is, when I move a piece from the supply to the main board, it reports $OldLocation$ and $location$ as the same thing, which is $location$. Using ReportAction, $oldLocation$ and $location$ are always equal in this case–$oldLocation$ doesn’t seem to report the actual previous location but rather the current location, just like $location$ does.

So, in summary, the auto map report works well for 1&3. But not for 2. Report Action works well for #2 but not for #1 and #3. If I could suppress map auto reporting as a trait of a prototype for a given set of pieces (or in this case, cards from a deck), I’d be golden. But I gather there’s not a way to do this. That leaves turning off map auto reporting and generating reports for prototypes of all the pieces separately. I can do this effectively for #2 above, but not 1&3 because 1) Report Action seems to use different terms than the map auto reporting (for example, oldLocation instead of previousLocation) and 2) while map reporting knows and reports correctly previousLocation, Report Action doesn’t know previousLocation, and oldLocation doesn’t seem to store the actual “old location.”

Any suggestions around this? I’m guessing I just need to continue map auto reporting and end up with the erroneous “moves from to” that the #2 case generates with map auto reporting. But if there’s a better workaround, I’d be incredibly appreciative.

If the above doesn’t make sense, I’d be willing to post clarifications for each of these cases if people have questions.

Auto Movement reporting for units moving on a non-snapping irregular grid should work. I have just created a little dummy module and it worked fine.

Make sure you change the ‘Location Format’ in the Zone from $name$ to $gridLocation$.

Let me know if this doesn’t help and send a link to your module.

Regards,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Brent,
Thanks for taking the time to reply.

Following your lead, I made a test module that exhibits the behavior I’m talking about.

I have one main map that has two zones, and each zone has an irregular grid.

I also have two decks, each situated on a board in its own map window.

One deck has cards which snap to grid, while the other deck has cards which do not snap to grid. (I labeled the cards and the decks to try to make it a little more clear.) Essentially the only difference is that both decks have cards with the Do Not Stack trait, but in one (the non-snap-to-grid), the cards have the “Ignore grid when moving” box in the Do Not Stack trait dialog checked. In the other (the snap-to-grid), the cards have the “Ignore grid when moving” box in the Do Not Stack trait dialog UNchecked.

They both exhibit the behavior on the main board that I want for their respective decks. The problem I have is in the chat window reporting. The snap-to-grid cards work fine, reporting grid locations. But the non-snap-to-grid cards don’t report anything because they don’t end up on discrete grid locations. I’d be happy if they reported the Zone they moved from and to or the Board they moved from and to, or even the gridLocation they ended up CLOSEST to. And I can add a trait for those cards that checks for an end-of-movement-in-the-main-map-window keystroke and then reports “$BasicName$ moves from $OldBoard$ to $CurrentBoard$ *” via a Report Action for that card prototype. But I can’t suppress the original map window reporting at the same time for those cards, so I get two reports, one (Report Action) reporting board to board (which I would like) and one (map window reporting) reporting to (which I don’t want, at least not for non-snap-to-grid cards).

I have enclosed two test mods. The first shows my board and deck setup. The non-snap cards exhibit the reporting problem when they are drawn from their deck to the main board.

The second is exactly the same as the first with the addition of an extra Report Action for the non-snap cards that reports board-to-board movement. But you’ll see that it’s also accompanied by the map window reporting which I cannot suppress for these cards.

I could turn off map reporting altogether. In this case, the non-snap cards would report fine through their Report Action because they would no longer be accompanied by the to map window report. But then I can’t get the snap-to-grid cards to report in that “map window style” reporting through a Report Action because I don’t know how to format it.

Thanks for the test modules. It appears to be a bug in the movement reporting when ‘Ignore grid, non stacking’ pieces are moved on a non-snapping irregular grid. I am looking into it now and should have a fix ready soon.

Regards,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Joel,

Fixed in swampwallaby-work@3957.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged to trunk@3968.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)