I have made an experiment by editing the build file and altering state information that normally is not accessible and managed to get pieces with Mask trait to become masked at the moment of creation.
Simply, if the Ed (Editor) for Obscurable would let configure what it returns in it’s getState method (line 693) instead of always returning “null”, then a piece could be created masked at start.
It’s a very simple change.
The downside is that pieces are drawn masked in Game Piece Palette but I don’t think it’s a problem.
Alternatively please add Map Window option that all pieces created in this map are created masked by the creating player, this should also be simple although I don’t know where to implement that change.
Your alternative idea might clash if the map option is on but a piece has a
trigger to reveal when drawn/moved to the map - something wont work as
intended thus making your first idea the better option imo unless your going
to make exceptions for specific cases
After a little playing around, it can be done already although it is not an
obvious how to do it - have pieces mask upon creation and keep unmasked in
piece palette. Just tested and works perfect.
If your doing a lot of pieces it is probably best to proto this method.
Add the mask to the piece, piece is not masked at this time in palette
which reveals on KEY A (whatever)
Add a restrict command trait that restricts (hide option) the mask key
(KEY A) and add filters CurrentMap != WhateverMapItCanMaskOn
In WhateverMapItCanMaskOn map dialog window add Key command to apply all
units ending movement on map KEY B
Add an executor and controller:
Add passive trigger to piece KEY B executes KEY C then KEY A with filter
InitialPlacement = true
Add a DP to piece named InitialPlacement with initial value set to true
and give it KEY C to set value to false
This is a onetime use routine for placement of pieces that are unmasked in
Palette and are automatically masked upon placement on map. We insure this
by using the on/off type DP switch combined with the trigger PME failing the
check on any subsequent movement by the piece but still have access to the
mask should you need it on the map from then on
This feature would be great in a module where players need to secretly select a battle type by placing a chit on the map to be later revealed and deleted when the battle is over. I thought it would be easier for them to create it each time from palette and delete afterwards instead of having two chits in private window and dragging it back and forth and looking for it each time. Also there may be cases where there is more than one battle to be decided in the same time and more chits would be needed. The way using palette is great except that without masked at start the players would have more steps to do. first drawing the chit from palette to private window, then masking it and then dragging to the map. I thought this could be shortened by 2/3.