Dealing cards (sort of)

OK, I’m looking for suggestions for the following situation.

Lets say I have 1 deck. I need to create buttons to move a specific number of cards to a 2nd empty deck. So there will be several buttons like “Add 5 cards”, “Add 12 cards”, “Add 20 cards”.

Is there a way to do this WITHOUT requiring a player to first shuffle the source deck? I need to be sure that each time someone clicks “Add 5 cards” that 5 random cards get moved from the source deck to the destination deck.

Seems to me you would just set the deck to Shuffle → Always.

It’s my understanding that when a deck is set this way, any cards drawn from the deck are a random draw …which is essentially the same as being constantly shuffled.

Does drawing multiple cards behave differently? I’ve never used such a feature so I may not know what I’m talking about. Certainly wouldn’t be the first time. :confused:

That would work if I wanted to manually draw cards. I want to create a
simple interface which automates the process. This can be done,
creating a piece that when clicked causes a certain number of cards to
move to a specific deck. However, the order is always predictable.

Its a PITA to right click to pick “draw multiple”, remeber one of the
specific amounts of cards needed, drag manually to the other deck. I
want my players to have a set of “buttons” that describe the differnt
scenarios that call for specific amounts of cards, so its simple and
hard to screw up (as doing it manually is error prone)

On Dec 29, 2007, at 8:09 AM, “Dr_Nostromo” <messages@forums.vassalengine.org


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

Post generated using Mail2Forum (mail2forum.com)

Dr Nostromo is on the right track

Set it to auto shuffle
Your buttons should relay a (GKC(Trigger/GKC(Send To Location/Return To
Deck))) Loop - notice the nesting

The 1st GKC (A global one) activates a trigger on a constant piece that is
always present (think 1x1 pixel At start stack that sits on corner of map
and not visible or used)

The trigger relays how many times the 2nd GKC (located on the At start
stack) should fire

The 2nd GKC calls top card of deck to move to a Send to Location such as 0,0
on map

All the cards should have a Proto with unique unused keys that executes the
Return to Deck whenever the Send To Location is acted upon

The movement of the cards in the STL part is so fast you wont actually see
it - its just a method of making the loop work and move the cards 1 at a
time simulating the drawing of the top card

Tim

Post generated using Mail2Forum (mail2forum.com)

I won’t be in a position to test anything until tonight, but it sounds
like you’re saying that STL gets a random card, and RTD does not. So
you have an extra event in the chain to get around that. Is that
correct?

On Dec 29, 2007, at 9:41 AM, “Tim McCaron” <timothy.mccarron@sbcglobal.net

[quote]
Dr Nostromo is on the right track

Set it to auto shuffle
Your buttons should relay a (GKC(Trigger/GKC(Send To Location/Return
To
Deck))) Loop - notice the nesting

The 1st GKC (A global one) activates a trigger on a constant piece
that is
always present (think 1x1 pixel At start stack that sits on corner
of map
and not visible or used)

The trigger relays how many times the 2nd GKC (located on the At start
stack) should fire

The 2nd GKC calls top card of deck to move to a Send to Location
such as 0,0
on map

All the cards should have a Proto with unique unused keys that
executes the
Return to Deck whenever the Send To Location is acted upon

The movement of the cards in the STL part is so fast you wont
actually see
it - its just a method of making the loop work and move the cards 1
at a
time simulating the drawing of the top card

Tim

Post generated using Mail2Forum (mail2forum.com)

Actually, I got a chance to test earlier than I thought.

It works for STL or RTD (the randomization I mean). Is this something that got fixed since 2.9 ??? I’m certain I’ve tried this before with other modules, and ended up with instructions for players to shuffle the deck before do anything automated. I just switched the shuffle to “always” on an older module, and it works. I didn’t even try this time because all the times in the past it never worked this way.

I take a different approach to the automation though. I create a dynamic property, and increment it every time I move a card. Then I have a condition on the key for “property name < number to move”. So I can just fire the return to decks without any intermediate send-to-location. Tim, I’m sure you have a specific reason for the STL, can you explain why you do it a bit more? I’m always interested in learning other ways to accomplish these types of things.

Correct.
This acts just as if you were sitting at a table and needed to draw 5 cards
for poker but don’t know what the cards are till they are in your hand as
you draw them 1 at a time

Post generated using Mail2Forum (mail2forum.com)

There may have been bugs in early 2.9.x builds but I believe it did get
fixed somewhere in there

Nothing wrong with that method either Tim. Thinking about it, there are
probably a number of ways to do this :slight_smile:

Reason I was using STL was because in a version I use it for I was
transferring the cards between different private/public map windows. Because
the counter piece that triggers the loop can not be in all locations (or
trigger chaos ensues) I place it on the main map and use the main map as the
intermediary w/ STL. The RTD’s can then be other window specific depending
on card type/owner or other variables I might want to insert and use etc…

In a fashion this could actually simulate true ‘card dealing’ ala poker if
used with your DP to count :slight_smile:

Post generated using Mail2Forum (mail2forum.com)

Yes, an oversight had meant that decks where only being ‘shuffled’ when manually drawn from, not when cards where removed by any other means. This was fixed in Version 3.

Regards,
Brent,


Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au


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

Post generated using Mail2Forum (mail2forum.com)