Create account / Log in

Other players cannot unmask cards

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Other players cannot unmask cards

Postby b0n3r » June 16th, 2016, 4:32 pm

Greetings

I have created a custom mod for a custom game. The "board" consists of many face-down cards. When a player moves, they are to flip the card to reveal the location as they explore.

However, despite having "any player" selected in the Mask trait, only the person who deals the board-cards from the starting deck is allowed to flip it. This is very janky, and basically whoever sets up the game has to flip the cards for each player on their turn.

What setting have I neglected to turn this behaviour off?

v3.2.16
b0n3r
 
Posts: 36
Joined: February 3rd, 2012, 2:35 pm

Re: Other players cannot unmask cards

Postby Brent Easton » June 17th, 2016, 12:49 am

Hi,
You have misunderstood the meaning of the 'Any Player' option in the Mask trait. That is who can mask the piece, not who can unmask it. The difference between Any Player and Any Side is with 'Any Player', only the player who masked (i.e. dealt) the piece can ever unmask it. With the 'Any Side' option, then if the player who dealt the piece leaves the game and a new player comes in and takes the same side as the masker, then they can unmask the piece.

You do not want to be using a Mask trait at all. The only function of a Mask trait is stop other players from viewing a masked card, whereas you want everyone to access the cards. You want to be using a Layer trait instead that allows all players access to the card.

Regards.
The 'Any Player' option means that
User avatar
Brent Easton
 
Posts: 3073
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Other players cannot unmask cards

Postby Tim M » June 17th, 2016, 1:25 am

Brent,



Wouldn't it be easy enough to make a copy of the Obscurable class, or extend
it to modify the behavior ( might need a unique trait name to distinguish
its behavior of course)?



From: messages [mailto:messages-bounces@vassalengine.org] On Behalf Of Brent
Easton
Sent: Thursday, June 16, 2016 7:49 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Other players cannot unmask cards



Hi,
You have misunderstood the meaning of the 'Any Player' option in the
Mask trait. That is who can mask the piece, not who can unmask it. The
difference between Any Player and Any Side is with 'Any Player', only
the player who masked (i.e. dealt) the piece can ever unmask it. With
the 'Any Side' option, then if the player who dealt the piece leaves the
game and a new player comes in and takes the same side as the masker,
then they can unmask the piece.

You do not want to be using a Mask trait at all. The only function of a
Mask trait is stop other players from viewing a masked card, whereas you
want everyone to access the cards. You want to be using a Layer trait
instead that allows all players access to the card.

Regards.
The 'Any Player' option means that

_______________________________________________
Read this topic online here:
viewtopic.php?p=51511#p51511
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1812
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Other players cannot unmask cards

Postby Nelud » June 17th, 2016, 6:42 am

There is another workaround: select "Any of the specified sides" in Mask properties and add all player sides to the list.
Nelud
 
Posts: 26
Joined: September 28th, 2008, 5:20 am
Location: Saratov, Russia

Re: Other players cannot unmask cards

Postby b0n3r » June 19th, 2016, 6:39 pm

Ahhh. Good to know indeed.

@Nelud: many thanks for the workaround, that is a quick fix compared to replacing all my masks with layers. Going to try it right now.
b0n3r
 
Posts: 36
Joined: February 3rd, 2012, 2:35 pm


Return to Module Design

Who is online

Users browsing this forum: Google [Bot] and 6 guests