Create account / Log in

Text wrapping for cards

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Text wrapping for cards

Postby MyNameIsMike » October 18th, 2019, 7:43 am

I'm new to Vassal and I'm looking to use it for testing games I'm working on. It seems to have pretty much everything I'm looking for and more. I've started with a simple one I'm making (basic text cards, simple turns, etc.) but I've run into an issue. When I make a text box on a card, it just writes the text with no boarder definitions. For this game it isn't too bad since the only positions are player hands (simulated with areas, nothing programed), the deck and a play/discard pile (also simulated) but some games I'm making need cards to be places in specific positions which will cause a number of issue.

While I can work around this for this game, I'd like to try and fix it now for these future games but I'm not sure how. Currently I have each card added as a [card] to the deck for the game with the properties [Basic Piece], [Text Label] and [Mask] in that order. The mask makes the back of the deck and when drawn, the text label appears as both should but I don't know where to go from here to define the card boarders (if that's possible).

I found another thread asking about this viewtopic.php?f=6&t=3793 where they said:
"I just needed to put the layer that contained the text image above the prototype definition that contained the mask and other images"
I'm not sure if by "layer" they mean the current traits or the Layer trait (maybe I need to make the text label into an always active Layer, though that seems to require an image be made). I'm also not sure how prototypes come into play as I tried making one but only succeeded in making a deck with two different mask images which changes by hitting reverse.

Thanks for any help
MyNameIsMike
 
Posts: 2
Joined: October 18th, 2019, 7:14 am

Re: Text wrapping for cards

Postby kerkael » November 8th, 2019, 1:25 pm

Hi, for the boarders I'm not able to help so far.
For the position of the trait,[Text] [Mask] [Layer] the point is to be certain the Label does not show up while the card is masked.
I had some issues where the deck would show a big number for the top card while it was supposed to be hidden until the card was turned.
kerkael
 
Posts: 117
Joined: December 1st, 2017, 3:03 pm

Re: Text wrapping for cards

Postby MyNameIsMike » November 28th, 2019, 5:49 am

kerkael wrote:Hi, for the boarders I'm not able to help so far.
For the position of the trait,[Text] [Mask] [Layer] the point is to be certain the Label does not show up while the card is masked.
I had some issues where the deck would show a big number for the top card while it was supposed to be hidden until the card was turned.


Hello, thank you for the reply. Because I was defining the pieces as cards within the program, the issue of masking the text wasn't really a problem as it was done automatically.
That said, I think I figured out a bit of a different solution to my issue which I will be trying. I use another program called nanDECK for building cards and it has a "Save images" feature allowing me to turn the cards into individual images which I can then add as a layer that displays when flipped.
MyNameIsMike
 
Posts: 2
Joined: October 18th, 2019, 7:14 am

Re: Text wrapping for cards

Postby kerkael » December 3rd, 2019, 2:44 pm

Well, depending on the number of cards, this can increase the size of your module ...
You can still have a few options for masked cards : show the back side for all the users but for the owner, who has access to a small embedded version of the card, or to another image.
I use a transparent grid for masked cards as seen by the owner. That's 1 single image used on top of all of the cards.
kerkael
 
Posts: 117
Joined: December 1st, 2017, 3:03 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests

cron