Create account / Log in

Looking for Guidance

Topics related to Vassal game modules.

Moderators: uckelman, Tim M

Looking for Guidance

Postby quiksilver3865 » March 29th, 2017, 8:22 pm

I am new to Vassal. I have programming experience and have messed around with the software enough to understand a fair amount. I have done a few tutorials and looked over a few existing modules to get an idea of how things work. I would like some input on how to structure my game idea. It is purely a card game, but there are a few special things that make it unique. I am more looking to be pointed in the right direction instead of a super detailed explanation of a specific idea. Here is how the game would play out:

Pre-game:
Player chooses side, each side has specific and different deck/set of cards (do not need input on this step)
Player chooses cards to use in their hand (e.g. there are 20 cards possible, all shown only to that player, they must select 10 cards to make up their hand)

Game round:
From their hand (the 10 cards selected) the player chooses two cards: a primary and a secondary
The primary cards from all player are revealed simultaneously on the board
The primary card number determines "turn order"
Primary and secondary cards directions are carried out in appropriate order (Player 3 has lowest primary card, the instructions on Player 3's primary and secondary cards are followed first and so on)
All cards played are discarded into respective players discard piles
Process is repeated
-Eventually discard pile is redrawn as hand
-Certain cards remain in "active" location on board for all players to see

I would like to make things as automated as possible, such as a right click selection to send card to a specific place (discard pile for example) instead of click and drag. Certain cards are eliminated after they are played, meaning the card should only have the "right click" option to be sent to a "deck" from which cards are never re-drawn. The card selection step seems the most critical to me right now. Maybe I am over thinking it and it should all be manual, but nothing is preventing the player from using more than the allotted number of cards (10). Should I make the selection (20 cards) a separate player board while hands (10 cards) are moved to main game board and visible only to specific players (Player 1 can see the backs of Player 2's hand but not the cards themselves)? Hopefully this all makes sense. Any help is much appreciated. Thanks!
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » March 31st, 2017, 1:30 pm

I think having and using separate player windows for each hand is fine. You can keep all 20 cards there, and players select 10 for play initially (noted in the message window and confirmed with an overlay or border on chosen cards), having a card not playable that round unless it was selected... or... have a discards window, perhaps even hidden, housing all the discard decks, letting players discard down to 10 cards, managed through a board count with each discard or perhaps with a 'set' button atop their window and again noted in the message window ("Player 1 is ready with $P1cardcount$ cards"). Those decks can of course be set to return the discards to the appropriate player when needed. I probably prefer something this latter example, but both are just ideas.

You could also have the players right-click select a primary and secondary card each round, from any initially selected cards, again noting those selections with specific overlays (while the message window will note only that both cards have been chosen). All the primary cards can then be automatically sent to an appropriate area on the board (they can have an additional layer added denoting player number/side for each card if need be).

The one-time only cards should just be deleted after being played imo - get rid of 'em.

Hope these ideas help a little. I can elaborate if need be. What you end up with will depend on different factors.
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 3rd, 2017, 8:12 pm

Thanks a lot for the response. I understand everything you said, but I am unsure how to execute a lot of it. I really liked this:

"You could also have the players right-click select a primary and secondary card each round, from any initially selected cards, again noting those selections with specific overlays (while the message window will note only that both cards have been chosen). All the primary cards can then be automatically sent to an appropriate area on the board (they can have an additional layer added denoting player number/side for each card if need be)."

Could you explain in general how you would set up the right click primary/secondary and the automatic movement? Thanks again!
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » April 4th, 2017, 2:03 pm

There's different ways to achieve that, including (primarily) a layer trait or a text label trait or both. Use a layer if have an image to lay over the card. I'll detail text label. I'd use a prototype trait to house these in, which in turn can go into your cards' default prototype (makes for cleaner coding, and much easier tweaking later), if not already.

Add a Dynamic Property (I'll name it: cardselectDP) that has an initial value of SECONDARY. Add three different appropriate menu commands, all 'set value directly', with the three values being PRIMARY, SECONDARY, and the last left completely blank (so this last one's menu command would be something like "Clear card selection").

Add a Text Label trait, with text: $cardselectDP$, and all four positions centered and rotate text set to -45. Click okay and look at a card and you'll see SECONDARY stamped over it. Go back to the text label and make any adjustments you want (text color, size, positioning, etc). When you got it as desired, go back to your dynamic property and change its initial value from SECONDARY to blank (so clearing the property value).

You can add a Report Action tied to any of the dynamic property's menu commands ("$PlayerSide$ has selected a $cardselectDP$ card" can cover both of the selections, and a separate report action can be used for a clearing of the selections if wanted).

You can add more detail later, like not having all menu commands available if unneeded, using Restrict Commands under various conditions.

So the dynamic property can now also be used by vassal to find that card and send it to an appropriate spot. So a main toolbar Global Key Command (for example) might look for matching properties of: cardselectDP=PRIMARY. It sends a gkc to those cards. Each card then can be sent to a slightly different location on the main board depending on which player board they're coming from, to space them out side by side on the main board for example. That gkc can also clear the dynamic property so they're no longer displaying PRIMARY when they arrive, as well as trigger another text label (smaller maybe) that can note the the player side, etc. I can detail the sending later, but it'd help to know how your main board is set grid-wise (can they be sent to separate added regions that are spaced out side by side, for example).... but you'd use a Send to Location trait and maybe a Trigger Action too (to differentiate between players).

Let me know if any of this is unclear or needs changing or whatever. Hope it works as is. The designer's guide is a great reference btw, if you don't have it yet, and the individual help buttons are excellent for a quick check on traits, etc.

http://www.vassalengine.org/mediawiki/i ... rguide.pdf
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 5th, 2017, 7:55 pm

This is extremely helpful. Thank you so much. I got the Primary/Secondary selection all set up and learned how to use prototypes, which make life significantly easier. The designer's guide is great too, but a little daunting if you do not know where to start looking. You mentioning specific terms has allowed me to look them up and learn about them.

Regarding the board layout:
You are exactly right that the end goal is to have the primary cards displayed spaced out on the board. My initial thought was to set the board up like four players at a table. I'm not sure if different views of the main board for each player are possible, but that would cause orientation issues for the cards placed in the center. I am thinking it might be better to have the primary cards displayed along the top of the board above separate "active" areas for each player to house cards that remain in play.

Is it best to design a board in paint or some other program so that specific pixel locations are known for placing cards?
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » April 6th, 2017, 3:31 pm

Yeah, you can design the board entirely in another program - just try to keep the size down (and by this I mean mb's). Also, though, you can let vassal map out a default board (width/height/color) and then add separate "board images" onto that (these would be like adding pieces/cards to the map window - with at-start stacks - but you can make them the lowest layer on the board (using Game Piece Layers - so they're always underneath all the actual pieces/cards moving above them) and have them be unselectable and not movable at all (using Does Not Stack trait). So those added "board pieces" look and act just like part of a board drawing... but vassal's doing most the work and the size is minimal.

The locations would be the same either way, although yeah it might be easier to initially deduce placements using another program. Here's a sort of trick though using a vassal default board. Add a test card onto the map using an at-start stack and then add a report action trait into it... reporting on this keystroke: mainmapGKC, and reporting: $CurrentX$ / $CurrentY$. Then go into your map's properties, and on the last property listed (Key Command to apply to units ending movement...) type: mainmapGKC. Now save and open the game and when you move the card about the board, it'll tell you exactly what the location of it is. You can add a clone trait to it, and then use a few of them to get some settings for side by side placements. Hope this makes sense.

The Send to Location offers a lot of flexibility in sending cards... regions added to an irregular grid or zones or hex locations or even other pieces (including for example those "board pieces" mentioned above). :)
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 10th, 2017, 7:43 pm

Those are very neat suggestions and tricks. I made the boards with a program that tracks pixels. Knowing the image sizes makes it easy to find coordinates, especially when things are evenly spaced in a line or grid format. I have been experimenting with Send to Location and it works great. Combine it with the prototype trait and cards are coming along nicely.

A few other questions:

Is it possible to make a show/hide button on the main board that would allow players to toggle back and forth between having their hand visible (a "Show Hand" button visible to all players, if player 2 clicks it it shows player 2's hand only)?

How would you create boards that are visible to all players and can be opened by Chart Window Menus (if that's the best way), but are not included in a chart selection or open by default?
-For example, I start the game as player 3. The game opens with the main board and my hand visible (in a separate window). There are no "select board" prompts, but I can click on any of the icons on the main board toolbar to access player 1's "side board", player 2's "side board", etc. and edit my own side board.

The second question is somewhat related to the first question and the answers might be similar or use the same methods. Thanks for all your help!
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » April 11th, 2017, 1:47 pm

1) I'm not really familiar with Player Hand windows, but I know they have a "visible to all players" button in pref, so I would assume that would need to be checked, the cards masked for each player, then a gkc button added to the main toolbar to toggle masking. If the matching properties for that main toolbar gkc button is: PlayerSide=$PlayerSide$&&CurrentBoard=~P1|P2|P3|P4 [or whatever your player board names are], then it should toggle between masking and unmasking on a player board only those cards that are owned by the player triggering the button. Alternately, you can name the boards the same name as the player sides and use: CurrentBoard=$PlayerSide$. Also alternately, you can keep the player hand windows not visible to others and have the gkc button send the entire hand to the main map, perhaps having a placard materialize underneath them to illustrate they're just being momentarily revealed, then have the same button return the cards to the player hand. I'd have to detail that one later, but it'd probably need the player boards to be named the same as the player sides, as cards may not be masked if the windows aren't visible to all, then it'd use send to location traits, with the main toolbar gkc being sent to the player board as well as to the particular area of the main board the cards would be sent to (perhaps a zone - so if the cards are on the board they move to main map, and then vice versa all with the one button).

Edit... just realized the masking again part of the first example above probably wouldn't work with the same button as the cards would no longer be owned by that player... not sure... anyway, best method is probably naming the player boards the same name as the player sides and using just: CurrentBoard=$PlayerSide$. Might be some more mistakes... but I can follow-up.

2) Visible to all: Id' use a basic map window. Maps (and Player Hand windows, etc) have their own toolbar buttons, but you have to first select "include toolbar button to show/hide", then save the module, then reload it in the editor, and then you'll see added info now allowing you to name the button text of that map/player hand, hotkey to open/close, etc.

Hope that sort of answered your questions.
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 12th, 2017, 7:43 pm

I did not realize you had to take all those steps to reveal a toolbar button. Your answers to number 2 actually works for both questions .....sort of. If I include a toolbar button for Player 1's hand and "visible to other players" is left unchecked, the button appears on every players main toolbar, but it is grayed out. This clutters the toolbar and does not look good in my opinion. It is by far the simplest solution though.

I have several other conundrums. As a solution to question two, I made a player hand with multiple boards visible to all players. I did this because all boards will all have the same deck and I wanted to only have to edit one copy of the deck. This does not make all the boards visible however. It asks a player to select a board in the beginning and the toolbar button enabled only opens and closes the board they selected; it does not give them access to the other boards.

The issue not related to player hands is that I cannot move any pieces of the deck I created that "belongs to any" of the boards. For every player side and every side board configuration, the deck appears but cannot be moved, right clicked on, or anything. It is as if it is part of the board itself.

Also, is there anywhere in the designer's guide that explains the syntax for commands or text prompts? (using the dollar signs, etc like some of your lines above)
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » April 13th, 2017, 12:58 pm

It sounds like maybe you have one single Player hand map window with all your individual boards added to that. You'll actually want a new Player Hand window, with its own board, for each player. Sorry if something I said earlier mistakenly caused you to think only one player hand window itself was needed (or if I'm mistaken now in that assumption). So each player needs a Player Hand window, and a single board added for that window, and then that player needs to be assigned to that window via its 'belongs to side' property.

The issue with the deck is probably due to your not being in control of that player hand window. The side you sign in as has to be listed in that window's 'belongs to side' property. I'd prefer seeing a generic map window used for a communal board, but if you make a Player Hand window that belongs to all players, then ensure that every possible player side is entered into its properties.

Lots of flexibility with toolbar buttons... you can hide buttons on the toolbar (but still have them open/close with a hotkey), and you can group several into a single 'menu' button, and you can activate a bunch with just one click (multi-action button)... so lots of options for both main and individual toolbars, which is great.

Check pg 13-16 - Using Properties - in the Designer's. The basic piece wiki has a good list, and individual wiki pages (via the help button in the editor), will give you properties associated with whatever you're working on.

http://www.vassalengine.org/wiki/BasicPiece
http://www.vassalengine.org/wiki/Properties
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 13th, 2017, 5:51 pm

You were spot on with the "belong to side" property. I can now move the deck about freely, just needed to assign specific sides to the deck.

Let me see if I can make it a little clearer: I have a main board (Map Window) and a Player Hand for each player. I created another Player Hand which contains "side boards" for each player (a Player Hand visible to all players with multiple Map Boards). I want any player to be able to view any other player's "side board" through a toolbar button with multiple selections or something similar.

Right now, the game prompts to select a "side board" on start-up, which is fine. The problem is the toolbar button for the Player Hand will only open/close the board I have chosen. As Player 1, I select Player 1 Side Board, but this prevents me from accessing the other Map Boards (Player 2 Side Board, etc.) I tried to make it this way because there will be one deck common to all side boards. If I need to change the deck I only have to change it in one place.

I found the Property syntax pages not long after I sent the message. I hadn't looked at anything towards the beginning of the guide in a while. Feel free to PM me, unless you think others are benefiting from our lengthy conversation. Thanks again for all your help, I am learning a ton.
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » April 14th, 2017, 1:21 pm

Someone may have some other options, especially for this, so I'll post it...

It was that side board one that tripped me up, yeah. I don't think that's possible as you'd like it... as I understand it the board(s) in play are chosen by one person at the start. Instead, could you have a single large board with clearly delineated zones in it for each player? Or how about a Chart Window Map, with a Tabbed Panel, and then individual Maps in it for each player (and perhaps even a last tab for the deck?). This would allow players to open those tabbed windows and click on the player's board they want to see. Or, just a regular smaller map window for each player, with those open/close buttons all contained in a menu toolbar button labeled "Side Boards". Re the deck: the only way I know of to make a single deck visible to each player's area would be that single large map... otherwise you're going to have just one deck to edit anyway, wherever it ends up being. It could even be hidden, if it's only a draw deck for example for those side boards... as you can have a button on each board/area drawing card(s) to it.

Thanks for acknowledgement btw - glad I can help!
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 14th, 2017, 5:31 pm

I had an idea and finally feel like I know what I am doing haha. I expanded off your idea. I made a Chart Window Menu with a Tabbed Panel. The tabs are separate Maps for each player. My solution for the deck was to create a Game Piece Palette with a Scrollable List. The list contains all of the "cards" to be used on the side boards. Users can access the Scrollable List and select the "cards" they need by simply dragging them into the respective Maps.

I have most of the boards and structure components set up now, on to the more advanced mechanics. One of the key portions of the game is the "reveal", where players cards are sent to the main board simultaneously and arranged in order. I was thinking each player would have a button they click to verify they are "ready". Once all players are "ready", a command would send the cards to the appropriate places. I am not sure how to do this. I have constructed a button that reports "Player X is ready" when clicked, but that is all it does. Is there a way to set some sort of player "status" that can be checked as part of an action? The status could be changed/reset in the card send action. The reset could be tied to a Turn Counter in some way maybe.

Here's the idea:
Player selects Primary and Secondary cards
Player then clicks "Ready" button (Player Hand toolbar)
Once all players are "Ready" action occurs
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Re: Looking for Guidance

Postby rrvs » April 15th, 2017, 2:14 pm

Note that the game piece palette is constantly refreshed... so it'd work as long as players can repeatedly select the same card over and over.

I can't be too detailed at the moment, but re card selection, I'd probably start by adding global properties for each (P1primary, P1secondary, P2primary...) with two choices for each (0/1). Maybe make a separate prototype for this (to go into the cards' prototype), with layer traits (on/off) for each selection, and trigger actions (they'd be a few - probably two for each player) watching for those layer selections and the player side triggering it, setting the appropriate globals on. You could even have an indicator on the main board showing selection (using layer traits tied to those globals - so: always active, levels follow expression value, P1primary - with level 1 [value=o] being clear or a greyed light maybe, level 2 [value=1] being a green light or something).

I'd need to think about it... but try a few things and see where it goes. Feel free to follow up with questions.
rrvs
 
Posts: 175
Joined: May 20th, 2016, 1:17 pm

Re: Looking for Guidance

Postby quiksilver3865 » April 17th, 2017, 7:24 pm

This issue that I run into with the global properties suggestion is that the number of player sides is greater than the number of players. The maximum number of players is 4, but not all four have to play. For example, I might have Red, Green, Blue, Black, Orange and Purple sides, but in a two player game only Red and Purple might be playing, or Red Green Blue and Black are playing, which means Orange and Purple sides are not in use.

Currently my card selection prototype has a dynamic property called cardselect, which changes among Primary, Secondary, and blank based on player input. This is shown to the player as a text label on the card. My line of thinking is to have a variable called cardstatus that will be $PlayerSide$_$cardselect$, then each card would have (for example) Red_Primary, Red_Secondary, or blank as the "card status".

Is there a way to check the current players sides in the game? These cardstatus values would be used to move the cards, but they depend on the player side.

The real reason for the question is for my "ready" button idea (trying to think ahead). If only Red and Purple are playing, Red selects his primary and secondary cards, and clicks his "ready" button, something in the button would need to scan the player sides. The Send to Location actions (the reveal) would only happen once Red AND Purple are "ready".

I am trying to build from the ground up but you have to be somewhat forward-thinking with the variable creation. Getting sort of bogged down by not knowing how to structure things, like a need a property within a prototype that relates to a global property, etc. It's getting a little confusing.
quiksilver3865
 
Posts: 32
Joined: March 29th, 2017, 7:28 pm

Next

Return to Module General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests