Create account / Log in

Help! Create Simple 52-card Deck

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Help! Create Simple 52-card Deck

Postby Doggo » March 10th, 2011, 10:49 am

I have checked through the forums about creating a card deck and found nothing of help.

I found the tutorial about card games to be very confusing at best. The cards are drawn to determine combat results in a game I am planning.

All I want to be able to do is the following;

1. Create a card deck of 52 standard playing cards - I have png images for the cards and the back of the cards
2. Be able to draw upto 4-cards at a time.
3. Return those cards to the deck
4. Reshuffle the deck

I'm sure it is not rocket-science but I am struggling.

I know how to make unit counters and I know about traits so I can create 52-cards (although I would rathe not have to create them all individually). It's manipulating those cards which is proving to be the problem.

Any help would be appreciated.

Thanks.
Doggo
 
Posts: 44
Joined: March 9th, 2011, 1:07 pm

Re: Help! Create Simple 52-card Deck

Postby Tim M » March 10th, 2011, 1:20 pm

Try looking at this module in edit mode. A deck of 52 playing cards

http://www.vassalengine.org/wiki/Module:Playing_Cards
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: Help! Create Simple 52-card Deck

Postby Doggo » March 10th, 2011, 2:57 pm

Hi Tim.

Thanks for the suggestion.

I have created the table and some of the cards.

The problem is that when I start a new game, the table appears but no stack of cards. If I right-click on the board and select flip or shuffle, the cards appear.

How do I get the face-down deck to appear on the table at start?

Thanks.
Doggo
 
Posts: 44
Joined: March 9th, 2011, 1:07 pm

Re: Help! Create Simple 52-card Deck

Postby Tim M » March 10th, 2011, 3:36 pm

Sounds like a GPL Problem.

See http://www.vassalengine.org/wiki/GamePieceLayers

Or it could be a deck position problem. Can not tell with out seeing the module
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: Help! Create Simple 52-card Deck

Postby Doggo » March 10th, 2011, 8:07 pm

I sorted it.

Turned out to be that I had not set the png image for the reverse face of the cards.

Now it's working.

I have used a 'Return to Deck' trait on all the cards but this means that each individual card has to be right-clicked to return it to the deck. Is there a way of doing this globally so that all drawn cards are returned to the deck simultaneously?

Thanks.
Doggo
 
Posts: 44
Joined: March 9th, 2011, 1:07 pm

Re: Help! Create Simple 52-card Deck

Postby Tim M » March 10th, 2011, 8:18 pm

Doggo wrote:I sorted it.

Turned out to be that I had not set the png image for the reverse face of the cards.

Now it's working.

I have used a 'Return to Deck' trait on all the cards but this means that each individual card has to be right-clicked to return it to the deck. Is there a way of doing this globally so that all drawn cards are returned to the deck simultaneously?

Thanks.


http://www.vassalengine.org/wiki/Map#GlobalKeyCommand
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


Return to Module Design

Who is online

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