Control-click function (flair) in VASL

I use VASL (the ASL module) extensively, and one of my fav feature is I can control click on any point on the board and it generate a “flair” that opponent can see.
I notice that is seldom used in other VASSAL modules. How easy is it to port that? (would like to add that to a module I am working on)…

It’s not super hard to port once you have a copy of the custom class. I’m going to have you pull down the Paths of Glory module (which also has it) because I’m familiar with the layout of that one.
(1) Pull down Paths of Glory vmod (either 9.4 or 9.5). If you need to rename it from .vmod to .zip to get at its contents, go ahead and do that.
(2) Inside the zip/vmod you will find a directory “PBU”. You need to copy that directory AND its contents (two .class files), to an IDENTICAL directory situation in your own module (so now inside your module the top level directory will include a PBU directory which then has the class file).
(3) Now open the editor on your module (first renaming it from zip to vmod if you need to do that). Go to the entry for your main map and select it. Right click and pick “Add Imported Class” (the very bottom option). In the dialog which comes up, put in “PBU.LookAt” and hit okay.
(4) Now save your module.
(5) Exit out of the editor, and then relaunch and open your module (or edit it again).
(6) Once you have a game going, try a Ctrl+RightClick on the map – this should produce the “flare”.
(7) As the very last entry under your Map you will now find a “LookAt” entry which gives you a limited ability to reconfigure the color and I think size of the flare.

And that should be it! Obviously if you want to make the custom class do something “even more customized” then you’d have to get a java environment up and running to compile things with, etc, which is… a substantial step up in difficulty/hassle (but if you’re an engineer already then, well, it’s just like another day at the office…)


Oh and I just realized it lets you Ctrl+Leftclick OR Ctrl+Rightclick to produce the same effect, never noticed that before. So anyway if that was throwing you, now you know.

I see references in the code to red and blue colors, how do you change from green? Also can I use this code? Thx

I think you can change the colors in the [LookAt] entry that ends up getting created at the bottom of the hierarchy for your Main Map (you can find it as the VERY bottom item under Paths of Glory map, for instance).

I didn’t write it, Bill Thomson passed it along to me, but I think everything Vassal is open-source-land, so go for it.