Card deck - 'event deck' and 'battle deck'...Help please

Gents,

I am trying to create a couple of card decks.

One is a simple ‘event card’ pile that I want to make. I have the artwork prepared. I would like to set the cards in their own toolbar button switch so they can be switched on/off without being placed on the game map. née the card is drawn I’d like to put it in a discard pile for the rest of the game.

The second deck is a ’selection‘ deck where both players (in this case USA and CSA) select a card for there respective side and then ‘declare’ the card they play to each other to resolve the outcome p int his case it like a battle card. Once the card is played I’d like to have it returned to the same deck for future draws.

I have wrestled with trying to get this work but hope that some one can HELP me set this up as it forms the basis for future modules as well. It would appear to be a fairly straightforward operation for Vassal but it is beyond my knowledge thus far.

If someone who knows how to set this up can ‘walk me through with some set up options that would be greatly appreciated.

Kind regards

Sam

  1. Not sure I’m understanding, sorry. Do you want a toolbar button to auto-discard a specific card from the event deck? I’ve never used it, but that can probably best be done from the toolbar using a Game Piece Inventory Window. Make sure to use “show only pieces matching these properties” with a matching property of: DeckName=NAMEOFYOUREVENTDECK (substituting NAMEOF… with the name of your event deck). Then I’d probably check the ‘show right-click menu of piece’ (you can have the card actually right-click discarded from this window with that I believe - just add a discard trait to the cards’ prototype traits), and maybe check ‘draw piece image’ too. I can elaborate in more detail… or if I’m misunderstanding what you wanted, or you already have an alternate way of selecting which card is to be discarded (and only need the toolbar button to trigger it), I can try again as well.

  2. Is the initial selection made randomly, and are these selections added to a hand of cards the players have that they can then choose from when playing a card, or are they drawing a card and declaring that same card only? For a random draw, having a deck set to ‘reshuffle always’ is easiest (especially as you want played cards reshuffled back into the deck). For the players’ hands there’s options. I use regular map windows, while many use Players Hand windows (which adds restrictions). Finally, for the playing of cards… is it to a particular area? I’d add a Send to Location trait to the cards’ prototype, and I’d add a Report Action to that Send to Location trigger (or to the map itself, if you think some of the cards being played will be done so manually). Then you add a Return to Deck trait to the prototype too (selecting the deck the card was initially drawn from). Again, I can elaborate.

Hi rrvs,

Thanks for your suggestions. I got the first deck sorted. I used the same deck as that in Crusader Rex which worked as desired.

The ‘battle cards’ deck however I need to do. It involves both players choosing from each of their own ‘battle decks’ and then placing a card on the map. When both cards are placed then they are flipped to reveal their player’s choice. I then need the cards to be returned back to their parent deck once again for future use…how would I make such a deck?

Thanks for your help thus far.

Regards

RGG

That’s a good question, as you have some options, one of the great things re vassal. I’ll try scribbling something up, best I can, and others are obviously welcome to throw something out, but can I ask a couple questions about these battle decks first?

How many cards are in each sides’ deck? And the players should be able to cleanly sort through and select from the entire deck for each battle, correct?

If there’s only like 20 or so cards or less in each deck, and the players are choosing between all of those cards (and should be able to see them all cleanly in order to properly select one), then I might suggest trying out a Players Hand window for each side and not having actual decks at all.

I’ll try mapping out the basics on that.

Hi rrvs

“How many cards are in each sides’ deck?”

The deck consists of two sides - CSA and USA. Each deck has the following three cards in it - PITCHED BATTLE, SKIRMISH and RETREAT.

And the players should be able to cleanly sort through and select from the entire deck for each battle, correct?

Yes. Basically they choose one of the three.

If there’s only like 20 or so cards or less in each deck, and the players are choosing between all of those cards (and should be able to see them all cleanly in order to properly select one), then I might suggest trying out a Players Hand window for each side and not having actual decks at all.

I was thinking that a hand window each would do it.

To make things simpler, the game I’m wishing to convert to Vassal is a miniatures map based campaign system. The game is called Gibraltar of the West. You can download it here. You can now easily see how it works…pretty straightforward.

6mmacw.com/uploads/2/3/7/7/2 … e_west.pdf

The cards are here

6mmacw.com/uploads/2/3/7/7/2 … color_.pdf

I’ve made a pretty good fist of it so far but am trying to iron out some bugs and make it as ‘slick’ as I can…at the same time teaching /learning vassal.

Thanks very much for your efforts on this.

Regards

Sam

I’ll try mapping out the basics on that.

Great.

This is just a rough idea on working with Player Hand windows for each sides’ battle cards. I haven’t really used these types of windows before, so… Anyway, if there’s too many cards for this type of layout, and decks are definitely more appropriate, then you might try a Private Window instead for each side, with the decks in the upper left, and a Game Piece Inventory Window set to each deck in each Private Windows toolbar (I kinda mentioned how to do that in a previous post). But here’s a rough idea for Player Hand windows…

So each side would have their own window… then you’d add the cards in separate At-Start Stacks of like 8 cards or so in each stack (depending), before adding a new stack underneath that one. With Players Hands windows those stacks of 8 cards or so should auto-space out from left to right on their own when the window is initially opened, which is why the stacks would be spaced in a column on the left side at whatever distance between the cards top to bottom is appropriate. Hope this makes sense. (BTW, use the help button when editing… lots of great helpful facts and reminders re whatever you’re working with.)

Each card would have a prototype added to it for its traits, and you’d probably would want each side to have its own prototype for these cards. So maybe like a “battlecards_u” and “battlecards_c” prototype for each side.

Now in those ‘battlecards…’ prototypes add your cards’ mask.

Add a Send to Location for playing the cards to the main board… you might want these played to slightly different areas on the board, so that they end up side by side… so this would require placing slightly different versions into the separate prototypes. For example, the USA might play their card to Location on selected map with an X position of 400 and a Y position of 800, while the CSA’s card might end up going to X: 700 and Y: 800… so they end up side by side (those are obviously just guesses re the locations).

You can add a Send Back Command to those Send to Locations traits mentioned above, and that would return them to the appropriate boards (where they’ll be slotted back in to whatever row they came from, I believe)… but I don’t think the Send Back Commands will work when playing PBEM games - or at least not if the cards have been placed over more than one turn. I might be totally wrong on this, but you might want to add a completely separate Send to Location for the return of the cards back to the individual Players Hands anyway.

Feel free to let me know if any of this so far is working or not working for what you wanted. Just hope it’s not too confusing.

I can’t seem to damn well reply on this forum after sending in posts…can the moderator change my settings so I can post and converse please in real time…

Frustrated! :unamused: :unamused: :unamused:

Thank you.

RGG

Sorry for the crossed posts. I think it took like 4 or so posts before I cleared the spam moderation, so you should be good to go soon hopefully.

So, yeah, a separate window for each side would be great. Another option, just to throw it out there (might not work for any number of reasons), would be to try adding 'em to their own Game Piece Palette (configured so all three cards are fully visible in their own column side by side to each other… I think it’s a panel style with 3 columns and fixed a cell size maybe, but not sure off-hand… but configure it so that all three are shown clearly and easily selectable). Call the Palette itself Battle Cards, and have it only for the three cards (I’m almost certain a module can have multiple game piece palettes if you already have one).

Then I’d add a mask to the three cards, and a trigger action trait (which triggers the mask)… the trigger action trait itself would be triggered by the board’s own ‘Key Command to apply to all units ending movement on this map’. So say the board’s key command will be “mainmapkc”… then when a card is moved from the palette to the board, the board’s mainmapkc fires the trigger action trait, which itself fires the mask’s ‘ctrl m’ trigger (or whatever that is), masking the card automatically for whichever side has selected it. Use a matching property of “OldLocationName=” in the trigger action trait (w/o the quotes and with nothing after the equals sign… this should prevent it from constantly refiring if moved about the board at all).

Name each card ‘Battle Card’ only, if the move to the board reports the name of the card before it masks.

Once both cards have been selected, they only need to be unmasked. Add a discard trait to them for removal (no need to return them as the palette stays refreshed).

This is just a thought as something else you could try for these cards. Good luck!

Hi rrvs,

No luck I’m afraid. I just can’t seem to get it to work.

Do you know of another module like how you describe that perhaps I could use as a template? Otherwise, I’d be happy to send you the module I’ve done thus far and you could input it in yourself…it’d probably take you 5 mins what I can’t seem to do in a couple of frustrating hours!

Either option works for me. I’ve almost got the module done!

Thanks agin.

Sam.

Hey, sorry it’s not working. I don’t know of an example off-hand. I’ll detail the palette use in 2 posts. Try it out after this one though and see if it works for you (not just the masking, but that it’ll work for the game in general).

Just to be clear on the various inputs that follow:

*don’t use any quotes I encase 'em with
*type “mainmapkc” in where needed
*for CTRL M, use the ctrl button and m


Okay, so add the new Game Piece Palette (w/a Button text of ‘Battle Cards’), add Panel to that and select ‘fixed cell size’ and 3 columns. Now add your three cards to the panel (each card should be named ‘Battle Card’ and have a prototype trait named ‘battlecards’ as their only added trait.

Save and try that out now… hopefully the cards are clearly visible when the palette is opened and you can easily draw a card from the pallet to the main map. You can add a Does Not Stack trait later to the prototype btw (so the card won’t stick to anything on the board), as well as a right-click sub menu (for drawing the cards) to the actual pieces on the board that instigate the battle (if you want other options for drawing the cards).

Anyway, once the pallet’s working, add the new ‘battlecards’ prototype to the module’s Game Piece Prototype Definitions, then open up that prototype for the cards and we’ll add the most relevant info to it…

  1. Add a Mask trait. Use the default ‘CTRL M’ trigger for now. Don’t worry about fine tuning the various options now… just plug in a card back and choose an easily noted display style, just so you can check that it works.

  2. Add a Trigger Action trait. Type “OldLocationName=” (nothing at all after equals sign) into the ‘Trigger when properties match’ section. Clear both the default menu and keyboard commands - nothing in those at all. Type in “mainmapkc” into Watch for these Keystrokes. Add CTRL M into Perform these Keystrokes.

So that’s all for now for the battlecards prototype traits… just those two traits to test it again.

Finally, double-click your main map window to open its properties. In the bottom line (‘key command to apply to all units ending movement on this map’) type “mainmapkc” in.

Okay… try that and see if it’s working for you… especially make sure the cards mask when drawing them to the board. I can help add the rest later…

Okay… to finish the palette set-up… open the ‘battlecards’ prototype in Game Piece Prototype Definitions and (1) add a Delete trait (use the default inputs if those work for you). (2) Add a Does Not Stack trait (select and move: normally), check: ‘Ignore map grid.’

I think that’s all that’s absolutely needed. So you should have four traits total I think. Oh, re the mask, if you need help with that, let me know (I just glossed over it previously), although check the help button for it too. The card’s back should be used for ‘view when masked’, and then the display style below that (for the owning player to view when masked) is up to you.

Hm… not sure what else is needed re the Battle Cards… thought there’d be more. Oh… a Report Action for the unmasking of each card maybe (using the card’s actual type/name). This isn’t a necessity of course, but if you want to add it then follow the next few steps, otherwise skip to the last paragraph.


Add a new Trigger Action trait to the battlecards prototype (so it’ll be your second trigger action trait). Type ‘ObscuredToOthers!=true’ into the ‘Trigger when properties match’ section. Clear both the default menu and keyboard commands. Add CTRL M into Watch for these Keystrokes. Type in “reportreveal” into the Perform these Keystrokes.

Now save the prototype (w/ its 5 traits), and open the top battle card under the palette/panel menu. Underneath its single ‘prototype’ trait add a Report Action trait (we’ll add these individually to each card, instead of in the prototype, so they can report the actual name of the card). For Report on these Keystrokes type in “reportreveal”. For Report Format, clear whatever’s there and type in something like:

$PlayerName$ has revealed a Skirmish battle card. *
or
$PlayerSide$ has revealed a Skirmish battle card. *

The choice above depending on if you’re using defined sides or not. Change the “Skirmish” portion to whatever the actual name/type for that appropriate card is, then add the appropriate report action to each card.


That might be it. Hope it helps. There’s always a chance a trait needs reordering or something, so feel free to let me know if there’s a problem. Oh, and if you want a right-click submenu trait added to the game’s pieces (for right-click drawing a battle card, rather than manually drawing from the palette), let me know. That will take a few added traits total to the relevant game piece’s prototype.