Create account / Log in

Making a Re-Shuffle Button?

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Making a Re-Shuffle Button?

Postby orionsbell » July 13th, 2014, 3:42 am

At this point I'm have become very confused by the Vassal documentation.

So, I have two graphical buttons I'd like to add to my play area that will reshuffle one of two designated decks when each is clicked.

So here's an example of what I have so far for each of the 2 decks:

A) Deck with Deck Property "Re-Shuffle":Always (should it be Via right-click menu?) I don't always want a random selection if a set of cards have been returned in a particular order. I want the deck to be randomized at the beginning of the game.

B) At-Start Stack belonging to board "Play Area"
1) Single Piece in the At-Start Stack
a) Basic Piece Trait assigned a PNG graphic of the button
b) Does not stack Trait - Select Piece: normally; Move piece: never
c) Action Button Trait - Offsets:0; Width & Height: That of PNG file; Invoke Key Command: ?

I've read a lot in the guide and saws recent answer her in this forum, but I'm confused on how to proceed. I really need step-by step instructions to continue from this point.

Please?
User avatar
orionsbell
 
Posts: 26
Joined: May 18th, 2014, 10:05 pm
Location: Soul: Disneyland / Body: Carson City, NV

Re: Making a Re-Shuffle Button?

Postby orionsbell » July 14th, 2014, 11:15 pm

Never mind.

No one was will ing to help, so I'm trying another route.
User avatar
orionsbell
 
Posts: 26
Joined: May 18th, 2014, 10:05 pm
Location: Soul: Disneyland / Body: Carson City, NV

Re: Making a Re-Shuffle Button?

Postby uckelman » July 15th, 2014, 8:29 am

Thus spake orionsbell:
>
> At this point I'm have become very confused by the Vassal documentation.
>
> So, I have two graphical buttons I'd like to add to my play area that
> will reshuffle one of two designated decks when each is clicked.
>
> So here's an example of what I have so far for each of the 2 decks:
>
> A) Deck with Deck Property "Re-Shuffle":Always (should it be Via
> right-click menu?) I don't always want a random selection if a set of
> cards have been returned in a particular order. I want the deck to be
> randomized at the beginning of the game.
>
> B) At-Start Stack belonging to board "Play Area"
> 1) Single Piece in the At-Start Stack
> a) Basic Piece Trait assigned a PNG graphic of the button
> b) Does not stack Trait - Select Piece: normally; Move piece:
> never
> c) Action Button Trait - Offsets:0; Width & Height: That of PNG
> file; Invoke Key Command: ?
>
> I've read a lot in the guide and saws recent answer her in this forum,
> but I'm confused on how to proceed. I really need step-by step
> instructions to continue from this point.

In what way is what you have now failing? Posting the module is a good
way to get someone to take a look.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8848
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Making a Re-Shuffle Button?

Postby JoelCFC25 » July 15th, 2014, 2:37 pm

orionsbell wrote:A) Deck with Deck Property "Re-Shuffle":Always (should it be Via right-click menu?) I don't always want a random selection if a set of cards have been returned in a particular order. I want the deck to be randomized at the beginning of the game.

Yes, if it's important that card order be maintained within the deck, you should choose Reshuffle via right-click. Reshuffle Always means there is no order maintained--every time something is taken from the deck, it is a random pick from the contents at that moment.

B) At-Start Stack belonging to board "Play Area"
1) Single Piece in the At-Start Stack
a) Basic Piece Trait assigned a PNG graphic of the button
b) Does not stack Trait - Select Piece: normally; Move piece: never
c) Action Button Trait - Offsets:0; Width & Height: That of PNG file; Invoke Key Command: ?


This is not as intuitive as it should be, but you want your Action Button offsets to be negative numbers that are precisely half of the width and height values. Example: A button graphic that is 200 pixels in width and 100 pixels in height would have:

Button X-offset: -100
Button Y-offset: -50

This gives you the outcome of having a clickable area that matches the size of the graphic. Invoke Key Command should be set to whatever you select as the Reshuffle Hot Key of your deck.
JoelCFC25
 
Posts: 730
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN


Return to Module Design

Who is online

Users browsing this forum: No registered users and 2 guests