Help working with multiple decks

Hey there, I’m hoping to get some help on a particular aspect of making a module for a card game which can utilize multiple decks to be used by potentially many players.

The problem itself is that I would like to have one of potentially many players be able to use one of many decks, however not have multiple players be able to use the same deck at the same time. The game I’m working on will have different windows to be used as a different hand for each player, as otherwise the main board that everyone would share could get very large, and if only a few players are actually playing, then a lot of that space would go to waste. I would rather have windows go to waste than window-space itself.

Using this approach, I’ve seen others solve the problem via making all decks available in each player’s window hand, however I’ve found that this makes the window for each player’s hand unnecessarily large. I’m unsure about this myself, but I also believe that this would lead to more RAM being used, because as I understand it the more decks that are loaded, the more RAM is being used, so having all decks loaded for each player could use much more RAM than is necessary. For these reasons, I do not want to use this approach and am seeking a different and more elegant approach to the problem.

I’ve seen some modules use a specific window that would host the decks to be used for a specific purpose, and I would like to use this approach as a solution to the problem, because in this approach, I would only need to load one instance of each deck instead of many for each deck. This solution also solves the problem of multiple players attempting to use the same deck, as it only allows one deck to be available for each type, rather than one deck of each type per player.

The problem I’m having with this approach is from the examples I’ve seen, using the right click menu to send the entire deck to a destination only allows for one specific destination. This destination as I’ve seen thus far does not allow variables such as the player who selected it, or multiple destinations, and always goes to one fixed location on the boards.

Just a warning, the following page is not quite necessary to the problem, it just details my attempted solutions to the problem. If you know of a solution that would work already at this point, you could probably skip over the following paragraph, as I am known to rant on for a while. >_>;;

After looking through a few pages on module design, and through a few related pages in the reference manual, I’ve been trying to achieve one of a few solutions to the problem, but cannot see how to implement any of them yet. For those curious, those attempted solutions are: (1) having a right click menu with many options available, one for each player, as in “Send to Player 1/2/3…” etc. the problem being with this solution is that I cannot find out how to add multiple options, as it seems only one option is available to be added, along with adding more players would make this right click menu larger and larger. This leads to the second attempt: (2) having a single right click option available that would send to the person who selected it’s deck. This would solve the problem of having too large a right click menu, and would also solve a potential problem of players sending decks to other players’ hands when they want another deck. The problems with this approach is that as far as I’ve seen, the destination of a Send Deck To option are always fixed/constant, and cannot be variable dependent on the person who selected that option, ergo always player number one, instead of player number whoever clicked the button. There is also a very minor issue of not being able to send a deck to another player’s hand if you wanted to set up a game for someone while they are AFK to get it ready in their absence, or being able to play a game solitaire, acting as multiple people. These as I said before are very minor issues, and I’m not terribly worried about them, so if in some way all of these options could be achieved, this would still probably be my first pick to use. The last attempted solution I found in some of the reference manual pages, but I am afraid it may not apply: (3) I saw in one of the pages something that mentioned being able to send a deck to the location of a token or game piece. I looked into this one a bit and saw about implementing it, considering the option that each player instead of selecting their deck would select their token, then have all the decks selected sent to their respective player’s hand. The problem I had with implementing this approach was that I couldn’t find anything that pertained to this when I tried editing the deck properties. If memory serves, I saw the aforementioned information in the reference manual’s Send Deck To page, and then never saw anything else about it when actually looking at the manual’s Deck page, so this one doesn’t seem to be possible.

So that’s the problem I’m currently facing and hoping to solve. I tried asking for help a few other places, but was told this would be the best place to ask for help. Please let me know of any insight you may have to the problem, as this is something I’d really quite like to fix, and feel that vassal should be able to achieve. Thank you for your time, and thank you to those who help in advance.

TL;DR: Need to figure out how to send multiple decks to any one of possibly many players. Trying to get specific deck selection window, but cannot get it to send to specific players’ hands to be used as their selected deck.

I’ve been told that after reading the whole post some people still don’t understand what I’m asking, so I’ll try to be very brief and direct with what I’m hoping to achieve, and provide a small update.

Actual tl;dr for previous post: I want a single window for 2-8 players to use to select their designated pre-built deck and be moved to their hand when selected from the selection window. The only methods I could find that have been implemented in modules I’ve looked through only worked for moving a deck to one specific area, not 2-8 areas.

After talking with someone about the problem, I was told using the “Send To” trait in the deck trait list 8 times should work, so I could have a new one for each player selecting the deck. The question I have now that I’m trying to implement this, is I can’t seem to figure out how I’m supposed to trigger this trait, having it send to this specific location. I will admit, I haven’t yet gotten to pour through all the information, and finish reading all the related articles yet, but I was hoping someone could shed some light on where I should read up more information on it, or provide an example of how to achieve this.

If anyone could help me out with this, I would be very appreciative. Thank you.

One possible solution is assigning the ‘send to’ trait (or ‘return to deck’ trait) to all the pieces in the deck, rather than the deck itself.

That way a global key command tailored to the pieces and a location can be made for each possible combination of piece and destination. An action button with tailored triggers could limit the piece/destination options to appropriate ones for a given deck and player.

Thanks for the feedback. I was able to get a brief word in with Joel Koepp on the official IRC channel, and he recommended the same thing. He recommended setting up a Toolbar Menu to use so I could have multiple options for things like “Send Deck A”, then click an option for where to send it to, Player 1-8. Then having another per Deck, each with options per Player.

I like the idea and want to implement it, but I’m running into a few problems that the documentation is simply confusing me more with. I cannot find an example of the Toolbar Menu being used almost at all. From what I understand, what I should be doing is creating these Send to Location traits for the decks (more specifically to all of each deck, so all of Deck A gets 8 STL traits for sending to each player) then I create the Action buttons to do activate those traits which will send them to their pre-designated locations. I then take the toolbar menu and sort those action buttons into their specific menu so they’re filed away nicely.

The first problem I’m having with this is it seems I cannot actually make an Action Button that would display in any Map Window other than the Main Map Window. I’m also struggling with some of the terminology used in describing what some of these things do. I see a lot of things referencing Hotkeys, Keystrokes, Actions, and Commands at times interchangeably. For these reasons, I’ve been struggling to figure out what I need to use to get things done, making all the problems I’ve been running into harder to research.

It’s not easy I know. I went through all the same confusion a couple of years ago. The information is out there, but it takes a while to sift through.

Some pointers:
Hotkeys seem to affect decks, while global key commands affect pieces (which is what you need).
The ‘Action Button’ could trigger a ‘Trigger Action’, which in turn triggers a ‘Global Key Command’.
You might not need toolbars. I tend to use Trigger Actions that are hidden depending on PlayerSide. If your module doesn’t have player sides, toolbar menus may be the way to go.