[messages] [Module Design] Problems with "Draw Card" button

palanolho palanolho at gmail.com
Fri Jun 5 09:56:11 CEST 2015

Hi everyone,

I'm creating a module where at the start of the game each player
randomly pick up a token and add it to his player area.

The easiest way to do it would be to have a simple DECK with the tokens
and every player go there, draw a tokens and drag it to his player area.
This is easy, but .. I wanted to go a little bit further and also learn
more in the process so ... I went the "hard" path, which is .. create a
Draw Token button.

__This is what I have:__

  * I have the main map
  * I have a support map where the tokens deck are (they have a blank
mask so you won't see it but its there  :D  )
  * I have 3 private maps one for each player
  * each player map has a "draw token" button

It seems to work but ... not has I expected. This is what's happening:
if you click on the buttons in this order : Player 1 -> Play 2 -> Player
it works just fine. the tokens are drawn from the deck and moved to the
button location on that player area

HOWEVER... if you click on the buttons on any other order... the tokens
are moved to a random player area and I'm not being able to figure out
what is the problem :( it doesn't make much sense to me at least.

So, If anyone would be able to have a look at this example module and
figure out what is the issue... I would be deeply grateful.
Here is the module file : https://www.dropbox.com/s/ru6jvnbfl1fm7 ...

As reference, I followed this tutorial on how to do it:
http://www.vassalengine.org/mediawiki/i ... button.pdf[2]

Many thanks in advance,
- Miguel

[1] https://www.dropbox.com/s/ru6jvnbfl1fm7do/test_draw_token.rar?dl=0
[2] http://www.vassalengine.org/mediawiki/images/5/52/Vassal_How_To-The_DRAW_CARD_button.pdf

Read this topic online here:

More information about the messages mailing list