I am working on a block game module and units are created in decks so I can apply a mask in the prototype that shows only the back of the block to the opponent, unless a player “flip” their block or blocks.
Masks cannot be removed from units except by the specified Side:
Japan units can be unmasked by Japan and Referee
Allied units can be unmasked by Allied and Referee
This is all fine, but I have difficulty with one aspect, and that is the Battle map. When a battle is to be resolved, players send the units from the main map to the battle map. At this point I would like to have both Japan and Allied units unmasked, but I cannot find a mechanism to do this. Any ideas or example modules that I could dissect would be appreciated.
I am going to stick an oar in here because I’ve done a lot of block games.
You don’t need a deck to mask pieces. In the modules I’ve done, I have a button on the toolbar that masks all the pieces that should belong to me. That’s easy to implement.
If you want to let others unmask your masked pieces, in the editor, look at the element “Global Options.” It has an option that you can set this to never (the default I think), always, and configurable. Try that. You could even set it up so one could unmask opposing pieces only on the battleboard. You should look at some other block modules, or ask more questions.
A couple of months back I picked up an old module and learned the basics to update it as I went, so I didn’t try to change that basic aspect of what was done before. I am too far into this revision to reinvent that particular wheel, so units are staying as decks and I’ll make do.
The maps for this module do have buttons on the maps to unmask units, but it only works if you are listed as allowed. I don’t see a way to change a unit or playerSide’s eligibility on the fly when it hits the battle board, other than shoving it into a deck. Of course I could leave everyone on their honor and not tie unmasking to playerSide, but I don’t know if that would be too tempting
I have looked at a few other block games and found most of them were using decks for their units, also at the start someone suggested I stick with that method so this is where I am for better or likely worse. I appreciate the suggestions though! Definitely will take a different angle if I do this again.
edit: can you point me to a good example of a block game not using decks?
Well I tried shoving the units into decks to clear the mask, but that doesn’t work as I had though it would. If I am logged in as Japan I can’t force Allied pieces into the deck, and vice versa. It does work if I’m logged in as Solo/Referee, but then I noticed it clears the original location information for the main map, and I don’t have a way to send the pieces back to the main board at the proper location.
I think I will just abandon the idea of clearing the mask automatically when pieces are sent to the battle map. It’s annoying, but the players will just have to do it themselves. Thanks for the replies but this seems to be either beyond vassal’s abilities, or more likely beyond mine.
The Mask trait could really use more flexibility. As it stands you can restrict unmasking by player sides only. There is no other mechanism built into the trait. It would be nice if that trait had a more free form field where you could specify something along the lines of:
can unmask if “playerSide=Allied || playerSide=Solo || mapName=Battle”
Vassal is designed that way to prevent you from using Decks as a work-around to un-mask pieces that are not owned by you. If you know your opponent, that’s probably not an issue, but in a competitive pbem game against someone you don’t know, you don’t want other players un-masking your pieces simply by dropping them in to the nearest deck.
Masking a unit hides it from your opponent and Vassal tries to uphold this. If you want your opponent to be able to un-mask your pieces, you have two options:
Don’t use a mask, just use a layer trait.
Keep using a mask, but go into preferences and click the ‘Opponents can unmask my pieces’ checkbox. If you are playing a friendly game, or where you don’t want masking security enforced by Vassal, then both sides will need to check this box before masking any units.