Number of tiles

Hi !

As you know I’m working on a module for MCR Mahjong and I have a problem about showing the number of the tiles. All the players should know how many masked tiles each players have. I tried two ways and I failed :

  • First I created a property (numeric) with trigger actions to increase the property each time a tile stop in the hand, and a trigger action to decrease each time a tile is set from the hand to somewhere else. Sounds logical but it doesn’t work.

-Second I tried with a “game piece inventory window” : success, I can see the number of the tiles in the hand of each players, but I can also see all the tiles in the hand, and that’s not good at all. I tried Tagging “show only folder” : ok I don’t see the tiles, but the sum is not done either.

I must say tha the second option sounds better for the moment, but I don’t know how to solve it.

If you have an idea, or maybe a “simple” module as exemple wich could help me to understand how to do this, it would be great.

I’ve searched with the dungeoneer’s module (game I know well) but the system is to complicated for me (many triggers, dynamic prop and many things I don’t undestand for the moment).

I hope the fisrt solution is not the only way :confused:

Thanks for helping !

Forlax

I am new to Vassal, but a lot of people have helped me with my questions. I have never done a card game… Sorry if I didn’t understand your question.

Do you need a number (eg. 3) or just to see a set of tiles remaining for each opponent?

If I were doing Mahjong, I’d consider each player’s set of tiles like a hand of cards. If I can see just the back of the cards, then I know how many tiles my opponents have.

It’s much the same problem as in Hearts, Bridge, Uno, Gin Rummy, etc., isn’t it?

Yes exactly ! So I’d like to have the number of the tiles or the back of the tiles for the other players. I don’t want to have too many boards opened at the same time, so if somethig is possible directly on the main board or with a inventory window.

Forlax

OK. Again, I’m not an expert in Vassal, but I know Mahjong.

I understand that Vassal Hands open in another window, and that’s not what you want.

How about defining N (or N+1, one for the drawn tile) locations for the N/S/E/W “hands” on the map board? When a tile is one one of these locations, it is only visible to the “owner” of the tile.

Again, I’m not sure if (or how) a tile can become “owned” when it’s taken from a deck. I assume you’re using a deck for the wall in Mahjong.

The played tiles (face up) would be displayed in another location. Because of Kongs, it can be more than N tiles played, so I’m not sure how you’d handle that.

Here’s an image of what it looks like in a PC game:

I made zones for the walls : easier to build the auto-deal (done), and I put anothers zones, 1 for each player, above each other wich where you put your “exposed figures”.

By the way, having owned tiles would be great, it would allow me to delete the player hands but I have really no idea of how to do that :smiley:

Forlax

Here’s what http://www.vassalengine.org/docs/ReferenceManual/Mask.htm says:

Try to see if you can work out an action for each tile on the top of the wall to* mask itself

  • move to the zone of the player’s “hand” on the board.
    Again… this is guessing on my part. I am providing moral support more than expertise. :slight_smile:

Also, use Google with the “site:vassalengine.org” option to search for the keywords of your problem. For example: http://www.google.ca/search?q=mask+site%3Avassalengine.org

Hmmm … the must would be that the pieces stay masked for everyone exept the owner who would see them revealed all the time … not as with “peek” wich is insuffisant : the owner wouldn’t have to clik to have the tiles revealed …

Forlax

An action to play them would involve moving them to the played zone and unmasking them, right?

Masking isn’t like being invisible, so I think the “back” of the tile would still be visible in the unplayed zone.

yes, but they will be visible by all the other players this way …
When the keyboard command is executed (unmasked) all the players will see the tiles, even if i’m the owner …

In the mask, define 2 “backs”, 1 which allows owner to “see through” the
back of the card at all times and the other which other users will see that
totally obscures the info like the real back of card. Now the owner never
need to flip the card unless required to

Post generated using Mail2Forum (mail2forum.com)

:smiley: It sounds great, thanks for your answer !!!

It seems to fit exactly what I want

errrr … how can you do this ???
I can only put one back in mask

:open_mouth:

Forlax

Hi !

i tried many ways, but i didn’t find how to put two backs for each card … it’s confusing :open_mouth:

I didn’t find any answers on the forum either, so if you could tell how you can do that it would be great.

Forlax

I think he meant two Mask traits.

The first Mask works like a normal mask for a playing card (e.g. Poker). You just define a “back” and a command so that anyone can flip it over. You can see how this works in the Playing Cards module.

The second Mask works like a mask for the “owner” – you have to define a mask with a “Can be masked by” “any side” – try it with the “Display Style” set to “Background”

Using the same Playing Cards module above, I did exactly the second mask as above. I join a game as Black. When I drag a card from the deck to the Table, it starts off with both Masks, the second one belonging to the owner (Black), so Black can see what the card is.

When I then retire, and change sides to Red, the cards on the table appear as having only one mask (the first one), but I cannot (as Red) peek or flip.

Maybe this should be a how-to? [edit] This kind of behavior would also be useful to games “like” Scrabble, Uno, etc. where a set of tiles is placed facing the owner on the table, but without being in a “hand” window.

I meant 1 mask - you need 2 images:

1 for view when masked - this image is the back of the card/tile/piece that all non owners of the piece will see

1 for the display style (use image), this image should be similar to the regular back except it has transparency to allow you to see through to the ‘front side’ of the card/tile/piece. This is what the owner of the piece will see, in essence allowing the owner to see what the part acutally is without having to reveal/peek at it

From: fuhrmanator messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Tuesday, August 25, 2009 11:31:10 AM
Subject: [Module Design]Re: Number of tiles

Forlax wrote:

I think he meant two Mask traits.

The first Mask works like a normal mask for a playing card (e.g. Poker). You just define a “back” and a command so that anyone can flip it over. You can see how this works in the Playing Cards module (vassalengine.org/community/i … page=Files).

The second Mask works like a mask for the “owner” – you have to define a mask with a “Can be masked by” “any side” – try it with the “Display Style” set to “Background”

Using the same Playing Cards module above, I did exactly the second mask as above. I join a game as Black. When I drag a card from the deck to the Table, it starts off with both Masks, the second one belonging to the owner (Black), so Black can see what the card is.

When I then retire, and change sides to Red, the cards on the table appear as having only one mask (the first one), but I cannot (as Red) peek or flip.

Maybe this should be a how-to?


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Ok, I understood what you say and it’s really interesting but … in the way i did the module, it doesn’t seem possible :

  • the tiles are in a deck, dealt by a player in walls and then dealt in the player’s hand. The problem is that when you deal your tiles in the wall, they already have the “transparancy back” so it’s not cool.

I found a way to put counters for the tiles, but I’ll keep on working on the way you exposed : thanks Tim M and fuhrmanator !!

So I’ll be here from times to times don’t worry : I won’t stop bothering you like this !!! :laughing:

Forlax