Looking for Guidance

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?

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). :slight_smile:

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!

  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.

  1. 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.

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)

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.

vassalengine.org/wiki/BasicPiece
vassalengine.org/wiki/Properties

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.

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!

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

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.

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.

Yeah, it can be. It should be somewhat fun though too hopefully. Don’t worry about having a lot of this just done manually, btw, especially for a first version. Manually moving masked cards to the board to be revealed from there once all the cards have been placed works well too.

Do you mean the total # playing, or which specific sides/colors aren’t being used? Can I ask where the cards are being placed? As I recall they’re side by side, but is there specific spots for red’s cards, for example? So there might be a gap in the layout if say Green is not being used? Or are they just placed side by side in an area, side/color notwithstanding.

It is definitely fun, slightly frustrating sometimes, but fun. Yeah, that’s a good point, it can be manual at first.

To answer your question, I meant which sides are being used. Card placement is not associated with a side. I currently have a Marker trait called Value for each card. The Primary cards will have their Values compared and be placed in sequential order on the board, regardless of player side. For example, if Red, Blue, and Black are playing, they choose Primary cards of Values 10, 12, and 5 respectively. The lowest card (Black) would be placed in location 1, Red’s 10 would be placed in location 2, and Blue’s 12 in location 3.

Basically, the lowest card will be sent to a specific location with the other cards evenly spaced horizontally after it.

I might be over thinking this. Could I make a function that looks for any card labelled Primary (IF?), then send the lowest Value (Compare?) to a location and then iterates, with position incrementing, until no cards remain? This would eliminate the need to worry about which sides are playing and extra variables of PlayerSide_Primary.

I actually found a good example of this on page 78 of the designer guide. Now I am thinking that I could send all the Primary cards to a hidden Primary deck and then deal them out as I mentioned above using a created Grid. Compared to the example I would need to make sure the hidden deck has Re-shuffle Never, and ensure the cards end up in numerical order.

I have also done a lot more reading of the designers guide. Things are making a little more sense. Correct me if I’m wrong, but it appears that this program operates mostly on keyboard inputs. If I need a button to do multiple things, I need to create separate “actions” for those multiple things (with different keyboard inputs), and the button simply executes those inputs.

How about this… a gkc is sent to any card marked primary that has a value of 0 (or whatever’s lowest). That card is sent to “location 1” + x (x is a numerical global that’s currently 0 – you’d use adv options in Send to Location trait: additional x offset = 100 (or whatever) times $yournumericalXglobal$). Then a gkc is sent to any card marked primary that has a value of 1… same thing: to location 1 + x. Then a gkc is sent to any card marked primary that has a value of 2… same thing: to location 1 +x. Now in the cards’ prototype, if a card is sent via this command then it first incrementally adds 1 to your x global… so the third card sent would go to “location 1” + 100 pixels to the right times 2. The twelve or so gkc’s can be housed (in the appropriate order) in a single multi-action button to be pressed when everyone’s ready. The cards’ set global trait (increments 1) and send to location trait (location 1 + x) can both have the same gkc that is sent to them (I think this might answer your last question). Try it first with the send to location trait below in trait order (your original “location 1” location might need to be -100 pixels to the left, depending on how the extras added).

The sent gkc can be written key command too. Not sure if that’s worded correctly by me, as it’s all still new to me really, but what I mean is instead of “CTRL C” being to sent to the cards, it can be “RunPrimaryCards” instead… and the RunPrimaryCards can trigger both the set global trait to raise the x value by 1, and the send to location trait too. Hope I understood your question okay.

This may have problems I’m not seeing at the moment… it’s just off the top of my head… and might need work if two players can have the same value card. There’s a chance though if 2 cards were the same value it’d add the additional x value to the second of 'em anyway, but depends on how it’s run. I can’t imagine it working perfectly if 3 or 4 players all had the same card value, but maybe. Anyway, try it if you think it might work for you.

There’s newer more advance property expressions now, not detailed in the designer’s guide. Not sure if they’re in the online wiki, but under the Calculated Property trait, click Help then Expression Builder.

Right now I’m wading in from the stairs rather than jumping into the deep end haha. I have successfully adapted the example from the guide to draw a hand from the discard pile. As in the example, I have an irregular grid with a property that is incremented for each card drawn. The cards are drawn into their respective locations every time. I also added a trigger action that resets the property when the discard pile is empty. It works beautifully and I’m rather proud of myself :smiley:

Now that I have gotten that set up, I’m going to attempt to combine those ideas with your suggestions, to get the “reveal” portion set up. I may keep my “ready” button idea, but only use it for the report. Once all players are ready, anyone can click the main toolbar button to reveal the cards on the main board.

It is entirely possible that two (or more) players could have the same value, though somewhat unlikely. That thought had not crossed my mind until now.

Progress!

Cool! I couldn’t find that example (pg 78?), but whatever works, definitely.

I found the deep end quickly haha. I will try to explain my idea in words and then I’ll provide the properties, key commands, etc. and hopefully you can point me in the right direction. I’m still struggling with how this program structures things. I am not sure if certain properties need to be at a module level, board level, or hand level, or if it matters. Watching for keystrokes is also very foreign.

At the bottom of pg 78 there is a section titled “Dealing Random Cards to a Board”. I successfully modified it to get the hand draw squared away. Property related to irregular grid is incremented, combined with Send to Location. I’m now trying to use a similar idea to execute the “reveal”, trying to add on the Value component. Here’s the idea: A button on the main map toolbar triggers all cards with “Primary” values (from all Player Hand windows) to be sent to 1 of 4 locations on the main board, in order. The order is determined by a Marker value property on each card called Value. I have a separate property called ValueCheck that loops from 0 - 99. When Value == ValueCheck, the card is sent to location 1 and the location value increments by 1. This way the next card will go to location 2 once Value == ValueCheck again. When the loop completes, all 4 (or less) cards should be on the main board in order from least to greatest. That’s my idea, but the execution was wrong some how, because literally nothing happens when the button is pressed. There is a couple second pause as if it’s executing the loop or something, but nothing else.

Here is the setup from the bottom up:

Irregular grid on main board with Regions 1 - 4, Global Properties on main board: PrimaryLocation (1-4) and ValueCheck (0-99)

All of these traits are housed in a Prototype called “Reveal” that is applied to all cards (traits in order from bottom to top):
-Trigger Action called Value Loop: Watches for CTRL P, Performs SHIFT I, Repeat keystrokes true, fixed number 99, perform ALT CTRL R when loop completes, create loop index property named ValueCheck start 0 increment 1

-GKC called Value Check: global key command SHIFT I, matching properties {Value == $ValueCheck$}

-Send to Location: keyboard command SHIFT I, region on selected map - main board, region name: $PrimaryLocation$

-Set Global Property: Property Name PrimaryLocation, named map - main board, 0-4, SHIFT I increment numeric value by 1

-Trigger Action called Reset Primary: watch for ALT CTRL R, perform CTRL V

-Set Global Property: CTRL V sets PrimaryLocation to 0

All ties to module level GKC with key command CTRL P, matching properties {$cardselect$ == Primary}

I feel like my idea/plan is solid, but I might have things in the wrong place or maybe missing something. I suppose I need to include something to reset the ValueCheck value, but that is minor. I have tried to include Report Actions to monitor where things go wrong, but nothing is reported, moved, or changed when I press the GKC. Any help is much appreciated!

Ah, found the example on a different page - I might have an old copy.

There’s a couple things that stand out immediately, so I’ll hit those and then take a closer look. One is you’ve got a global property called ValueCheck, as well as a loop (non-global) property of the same name. I’ll have to look at what you’re doing with those, but if you’re using the loop property as a global counter then that will need redoing.

Secondly, clear the “named map” space and then re-set the “Locate property starting in” section of your Set Global Property for PrimaryLocation as: Current Zone/CurrentMap/Module. Your limiting it to the main map might be correct, but I’ve never changed the default and never had a problem with it.

Lastly, you’re mixing the old expressions with the new ones. The $$ are not used in the newer expressions.
{Value==ValueCheck}
{cardselect == “Primary”}

I’ll need to pause there for a moment and then take another look at it. Coding is tough to follow sometimes (actually more than sometimes, at least for me). :smiley:

Just a quick add to the previous… if the trigger action with the (non-global) looping ValueCheck property is in the same prototype or trait window as where it is used (and it’s not used anywhere else), then try deleting the global property of it, make the other changes I listed above, and then try it.

I’ll have a closer look again at all of it as soon as I can anyway…