Deck is loading to a different location

So my module works for a two-player card game, and in order to put the deck onto the field, the player would first have to load the deck file in a separate location called the “deck box”, before right-clicking the deck to send to the field. However, I’ve encountered problems where when I try to load up the deck file in the deck box, the deck is sent to the deck editor instead, with the cards facing up. Additionally, when I right-clicked the supposedly loaded deck in the editor, it gives me the commands for when right-clicking a single card instead of when right-clicking a deck.

The module was made long ago, probably last update was during Vassal 3.6 or even older. I’m not the original creator, just a successor in keeping the module up, so I don’t know the details behind the module (if the issue comes from there), and I can’t guess what the problems would be.

Some other users told me that they have no problem loading up deck files made pre-3.7. I’ve also tried returning to use Vassal 3.6.19 and made a new deck to try loading it up, and there was no problem, so I believe there may be a clash between the functions behind the module and Vassal 3.7.5.

I don’t know programming, nor have I ever learnt making or editing modules on Vassal, so it’d help if you can kindly explain everything in details if you know what’s going on. Thank you in advance.

In order for anyone to offer suggestions, we’d need to see the module and a deck file that’s not working.

Aight, I’ve put the module (BSOB.vmod) and a deck file (Test_Super) in this link: Vassal Test – Google Drive

In order to see the cards, an extension which contains the library, is also needed, which is the “01 - Booster Set Saga” in the link.

I’ve encountered exactly the same issue myself; people who play modules that I’ve created are having the same problem. The Deck feature seems to now have a bug; everything was functioning just fine before the 3.7.5 switch.

Are you saying you had no problem with 3.7.4? With which module(s)? What are the steps to reproduce the problem?

Hey, I’m an affected user from one of thereisnotry’s modules. In the Imperial Assault mod for skirmish (v12.8.3), we notice this issue when we switched to 3.7.5. Reverting to 3.7.0 with the same version of the mod does not have this issue.

I haven’t tried .4, maybe thereisnotry has done more testing in that light, but I wanted to add that the issue seems to be in the save files (for the deck) themselves. A deck that is created in 3.7.0 doesn’t have this issue, even when loaded in 3.7.5. However, a deck created in v3.7.5 DOES have this issue when loaded in 3.7.0 (and to clarify, this isn’t just version incompatibility, we first noticed the issue with people just using 3.7.5 to create and load decks).

To recreate the issue:

  • Open the Imperial Assault Skirmish mod in Vassal 3.7.5

  • Start an Offline (or Online) game and load a presaved mission (we used Tarkin Initiative Labs A).

  • Join as Player 4, create a deck of Deployment cards in the Player 4 window, and save the deck.

  • Click “Retire” to change your Player number to Player 1 (you can also leave the game and join a new game as Player 1).

  • Click in the Player 1 window, load the deck you saved.

  • Expected behavior: A copy of the cards in the saved deck file load into the Player 1 hand and are controllable by you (since you are currently Player 1).

  • Actual Behavior: A copy of the cards in the saved deck is loaded into the Player 4 Hand-Window, and you as Player 1 cannot manipulate them.

1 Like

Thanks for the detailed repro instructions, that is very helpful. It would also help a lot if you can pin down the exact version the it broke.

TheSecondFlock’s summary and description, above, is accurate.

In answer to the earlier question, I had not downloaded a new version of the Vassal Engine, so the bug could’ve conceivably shown up in any of the versions after 3.7.0. I’m currently going through all of the releases since 3.7.0…

3.7.1: no problems, everything with the Deck features works as expected
3.7.2: no problems…
3.7.3: no problems…
3.7.4: THIS is where the bug shows up.

I hope this helps.

1 Like

I bisected using the instructions above for reproducing the problem. The first bad commit is ff34339b.

Thank you for describing how to reproduce the problem and for finding the last working version. That dramatically reduced the amount of work I had to do to find the bad commit.

1 Like

Thank you for all the replies

I guess I should also recreate my situation as well:

  • Open the BSOB mod in Vassal 3.7.5

  • Start an offline (or online) game and load up any of the setup

  • Join the game as either player 1 or player 2

  • Open the deck box window of the player side you chose

  • Right click the deck space of load up a deck file

Expected result: The deck is loaded into the deck space facedown, with number of cards in the deck displayed below the deck

Actual result: The file is loaded into the save slot of the deck editor, with the deck face-up, and right-clicking it gives the function of a card rather than a deck

Oh, that is interesting. No good deed ever goes unpunished.The actual change was to ensure that the individual pieces in a Stack or Deck have the same Map set as the owning Stack/Deck. This fixes an earlier bug where pieces in Stacks/Decks had no Map set and this caused other problems.

I suspect the Load Deck code now needs some extra code to handle this,

See also There's a bug in the new module 3.7.6

Reverting that change does not solve the problem, that does not appear to be the bad commit. I’ll re-bisect tomorrow.

Ahhhh… The problem is in the saved Deck, not in the module. The issue reproduces depending on what version you saved the Deck in, not what version of the module you are trying to load the deck into…

I have put up a new build that I believe solves the problem, Can you please give it a try?

VASSAL-3.7.7-SNAPSHOT-85ec1ee-13003-SavedDeckWrongMap at Builds of vassalengine/vassal

Note that the problem is in the Deck save files created with 3.7.4-3.7.6 and I can’t fix it so these will load. This fix ensures any new Deck save files will load properly.

The workaround is to load a problem Deck save file into Vassal 3.7.3, then re-save it. That will load into any version of Vassal.