Enchance Obscurable to allow masked at start

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

Post generated using Mail2Forum (mail2forum.com)

I would assume the map option in the second case would be off by default and not conflicting with existing modules, while new module designer would choose either method and it would work.

I’m for the first option too, except it would be good to see the piece unmasked in game piece palette - actually it’s name in the palette list is not masked, only the image is :slight_smile:

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.

  1. Add the mask to the piece, piece is not masked at this time in palette
    which reveals on KEY A (whatever)

  2. Add a restrict command trait that restricts (hide option) the mask key
    (KEY A) and add filters CurrentMap != WhateverMapItCanMaskOn

  3. In WhateverMapItCanMaskOn map dialog window add Key command to apply all
    units ending movement on map KEY B

Add an executor and controller:

  1. Add passive trigger to piece KEY B executes KEY C then KEY A with filter
    InitialPlacement = true

  2. Add a DP to piece named InitialPlacement with initial value set to true
    and give it KEY C to set value to false

All done.

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

Post generated using Mail2Forum (mail2forum.com)

Great combo, will test it soon. Thanks!

On the other hand I prefer methods that are easier to understand and don’t require many traits to construct, so you may consider enchancing the Obscurable trait.


Could you please explain to me the utility of having pieces drawn from the Game Palette automatically become masked?

In my modules, I try and avoid having players draw pieces from the Game Palette at all once a game is in progress. I am interested in what you are doing that requires this behavior.


*********** REPLY SEPARATOR ***********

On 9/01/2010 at 9:14 AM morvael wrote:

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

Post generated using Mail2Forum (mail2forum.com)

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.