Create account / Log in

Force card rotation on draw to hand and discard

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Force card rotation on draw to hand and discard

Postby BriMan83 » September 13th, 2020, 8:48 am

So I'm hoping this question makes sense.

I'm creating a module for Firefly, and I'm running into an issue when dealing with some of the cards. Right now, the draw and discard piles are set up perfectly for the cards to be placed vertically. But as you can see from the attached cards, when it's in the player hand, it need to be rotate 90 degrees CCW for it to be easily read. I'm curious if there is a way to code it that when "draw to hand" is selected from the draw pile, it does the rotation at the same time it moves to the players hand so they don't need to rotate it themselves. Then, when they select discard, I would like it to rotate 90 degree CW as it moves to the discard pile so it is again lined up correctly. Anyone have experience with this and can tell me how to do that?

Thank you.
Attachments
Harken_001.jpg
Face up card front
Harken_001.jpg (30.81 KiB) Viewed 1125 times
Harken_000.jpg
Face down card back
Harken_000.jpg (26.75 KiB) Viewed 1125 times
BriMan83
 
Posts: 9
Joined: July 10th, 2019, 1:01 am

Re: Force card rotation on draw to hand and discard

Postby JoelCFC25 » September 13th, 2020, 2:59 pm

Could you live with just making your draw/discard piles be oriented "landscape" instead and saving all the hassle? Sometimes when doing a digital representation it can make some sense to depart slightly from certain aspects of the physical game.
JoelCFC25
 
Posts: 748
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Force card rotation on draw to hand and discard

Postby BriMan83 » September 13th, 2020, 5:21 pm

JoelCFC25 wrote:Could you live with just making your draw/discard piles be oriented "landscape" instead and saving all the hassle? Sometimes when doing a digital representation it can make some sense to depart slightly from certain aspects of the physical game.


It's looking like I'm going to probably be doing that exact thing. The initial board scan I was using had spots on the edges for all the draw and discard piles on it, and they are oriented vertically. I'm realizing that scan isn't large enough to play effectively on Vassal, so I may be going to a different scan that doesn't have those. I'll just throw the cards onto a side window if I have to.
BriMan83
 
Posts: 9
Joined: July 10th, 2019, 1:01 am

Re: Force card rotation on draw to hand and discard

Postby grouchysmurf » September 13th, 2020, 6:26 pm

Assuming that player hands windows are implemented as VASSAL's Player Hands (or separate maps) you may set a key that is applied to all units (also: cards) ending movement in this window. This key may be set to a trigger that sets off only when certain conditions is met. In your case that trigger should check whether card is in vertical position and only then rotate it CW (?). The trigger and condition are to ensure it sets off only when the card is oriented vertically.
User avatar
grouchysmurf
 
Posts: 178
Joined: August 9th, 2011, 7:48 pm

Re: Force card rotation on draw to hand and discard

Postby BriMan83 » September 13th, 2020, 8:54 pm

grouchysmurf wrote:Assuming that player hands windows are implemented as VASSAL's Player Hands (or separate maps) you may set a key that is applied to all units (also: cards) ending movement in this window. This key may be set to a trigger that sets off only when certain conditions is met. In your case that trigger should check whether card is in vertical position and only then rotate it CW (?). The trigger and condition are to ensure it sets off only when the card is oriented vertically.


I wound up using an entirely different game board image as I realized the one I was using was way too low resolution and I zoomed in on it. But I'm definitely going to keep this in mind if I get a higher resolution scan of this mat.
BriMan83
 
Posts: 9
Joined: July 10th, 2019, 1:01 am


Return to Module Design

Who is online

Users browsing this forum: No registered users and 7 guests