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.