Reporting of movements using the mouse

Hello,
Still building my first module. When I move pieces on my boards using actions (“Move a fixed distance”), it gets reported in the chat window. Not when I move the same piece using the mouse. What did I miss there ?

Hmmm. Both these should be controlled by the “Auto-report format” properties of the Map Window. Although you could report keyboard-command-initiated movement with a Report Action trait. I couldn’t reproduce this with a simple example, so you’ll have to post the module for us to investigate.

rk

Post generated using Mail2Forum (mail2forum.com)

Are you saying that if i drag a counter using the mouse its possible for the Distance to be reported in the Chat interface?
I already have the Report Action trait for keyboard commands but reporting of distance that counters are dragged by mouse would be good.
Thanks.

No, not the distance, just the starting and ending location names.

rk

Post generated using Mail2Forum (mail2forum.com)

I finally found that. However, it is mostly reported “offboard” (since I do not have a grid numbering). I wonder, how efficient is the multi-zoned grid approach ? Can it cope with ~1000 zones on a map efficiently ?

Or, alternatively, is there a way to show/hide a rectangular/hex grid ? This would be much better, since I could make a 120x80 grid (that’s a 60x60 px, my two maps are large) and people wanting to check moves from the log could see the grid (or not).

Thus spake “jcdubacq”:

What are you doing that you’d need 1k irregular zones?

Presently there’s not a way to toggle the display of grids. That (and the
ability to toggle map overlays in general) would be a useful thing for
use to add.


J.


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

Post generated using Mail2Forum (mail2forum.com)

You can’t dynamically turn grid snapping or numbering on/off, but if you just want to show the grid visually, you could use a Map Shading component with an image of a hex grid.

rk

Post generated using Mail2Forum (mail2forum.com)

I am using these maps. There are (in the first one) 343 land provinces and a few seas. There are about as many in the other map. The map is digitized at 200dpi:
/data/vassal/otherpng/europa8.png PNG 6935x4874
/data/vassal/otherpng/rotw.png PNG 6734x2960

Add in about 3650 images for the counters, and you are done. :smiley:

Because of the strange shape of some provinces, I cannot simply use a RegionGrid (I would need to devise something so that the induced Voronoï graph matches approximatively the map, and this looks hard).

I have been thinking of devising a variation on the rectangular grid that could associate bunches of grid coordinates to a specific name. It would be very efficient to associate coordinates (pixels) to name (much faster than testing whether a given coordinate lies in one of a thousand zones; the coordinates → grid coordinates step is trivial, and the grid → name would require an associative array of some sort), but could be quite slow to define and to do reverse mapping (is it used?). It would also require to be written by me (I usually don’t program in Java).

343 isnt that bad. Successors III is close to that

I would use a multizone/irregular grid w/ 1 region for each province.
The zones don’t have to be perfect but close and would eliminate the
“offboard” reporting. Units snap to the region within each zone.

It’s just tedious to setup and requires patience unless some one can point
out a batch utility or a method of streamlining how to do it quickly

Post generated using Mail2Forum (mail2forum.com)

Somewhat related to this topic, is there a way to have mouse movement affect the layer of a piece? Specifically, if I have a layer defined to flip a piece when it is moved, I have figured out how that can be triggered when using keyboard movement, but there does not seem to be an analoguous trigger when using the mouse.

Edit: Ah possibly replace the “mark when moved” default image with my own appropriate graphic?

In the Map component you can specify a Key Command that is sent to any unit that ends its drag and drop movement on that map.

B.


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

Post generated using Mail2Forum (mail2forum.com)

I tried this, but there seems to be some sort of conflict:

I have enabled keyboard movement for certain pieces. In addition, a trigger action is set to detect when keyboard movement commands are used which sends CTRL M to the piece changing it to its “Moved” layer.

If I also enable CTRL M as the “key command to apply to units ending movement on the map” then the piece will change states when dragged, but the keyboard command triggers no longer will do so.

I can not see a logical reason why the one should break the other. Or is the problem that the triggers are now redundant?

EDIT: A ha, the triggers are redundant. However, with the MainMap command enabled, CTRL M is being sent with each keystroke, whereas my trigger command had a property check in it so that the command is only sent once even if a particular move involves multiple keystrokes.

Brent, can you show a simple example of how this works? I’m trying to do something similar and can’t wrap my head around how this works. I see how to add the global key command to the map, but I can’t see how it triggers from just dragging a game piece. It appears to only fire from a key command.

Chuck


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

Post generated using Mail2Forum (mail2forum.com)
[/quote]

Chuck,

I was not talking about a Global Key Command. Inside the Map component, right at the bottom, is a field called ‘Key Command to apply to all units ending movement on this map:’. If you put, say, ‘Ctrl M’ in here, then every time you drag a piece and drop it on this map, then it will be automatically sent Ctrl-M.

Regards,
Brent.

Thanks Brent,

I actually dug through the forum and found an old post of Tim M’s that does exactly what I want. Once I found that in the map component properties, it all made sense.

Chuck