I am having an unexpected result using refresh counters. While it appears to work, many of the refreshed counters are not displaying after the fact.
Here are a pair of before and after images.
As you can see, there are gaps where the counters should be.
I have run vassal from my dev environment and as far as I can see, it steps through the GpIdChecker class without a problem. All of the missing counters have a matching GPID.
For the images above I was using VASSAL3.6.6 and VASL6.6.4 but I have tried it with other combinations with the same results.
Refresh Counters reports no notfound counters.
Any ideas what might be happening here? All of the counters (and their image files) are in the core VASL module.
Are the counter images defined using a layer trait? If so, try selecting the layer related refresh option before running the refresh.
Thanks for your response.
Yes, all of the missing counters, along with most of the visible ones, use layers.
I have been selecting the option “Use names to match modified Layer traits?”
The only instances I can find in GpIdChecker where this comes into play are in the method findState(). I cannot trap a usage of those references.
Not that then, I guess… the potential issue being that without this option, Refresh Counters resets the Layer trait (unless the “follow expression” option is being used to set the layer). Similar thing with Text Label traits. Sorry, this hasn’t helped.
Maybe this is something specific about VASL. Sorry, I can’t think of anything else at the moment, perhaps @Brent_Easton can find time to give a view.
One thing… those matching GPIDs do match to the same counter in the buildfile, yes?
Good question. Took me a while to puzzle it out but it appears that the answer is yes.
However, it led me to understand that the “Use names to match modified Layer traits” option may be the cause of my problem.
When I ran the refresh without that option selected, all of my counters were visible and correct from what I can see so far.
This is excellent progress and thanks very much for helping me see that this might be playing into the problem. I need to do more work to understand why the Layer trait option would cause the problem that it did and to test more widely that avoiding the option avoids the problem.
Might be worth setting up a Game Piece Inventory Window just to check that those missing pieces are really not there as opposed to hidden somewhere. I’d inventory them against CurrentMap and display their X/Y or LocationName along with PieceId and BasicName.