Refresh Counters and Decks 3.7.9

Hi all;
I am having issues with using the Refresh Counters option in the game window. Regardless what settings I use, all decks disappear and are unusable. There are 3 Decks with 3 Discard Decks. This does not seem to be happening with other modules. Any ideas where I should start looking? I was trying this out to see if I could add Module changes to a previous Save Game, it was not a good idea.

Regards;
Darren

Ok.

  1. After some experimenting I noticed that cards in the Discard Decks remained and were still usable.
  2. The Decks appeared again after being reshuffled…however…
  3. I can no longer click on each deck to draw/place a card.

To explain, I have an invisible piece which is actually under (I think) each deck so that when I tap on the Deck with a left Mouse click a new card is drawn and placed on the board while the other cards in play move one space from the issuing Deck. So it seems that using refresh is doing something to these 3 invisible pieces (one for each Deck) so that it no longer works. Not a big deal? Yes it is! A lot of time has been spent to get this working and my concern is that if this problem occurs with Save Games there will also be issues with refreshing Pre-defined setups which means a lot more work for me when performing maintenance when this is available for download. Imagine my reluctance upload this module.

Darren

I can confirm this is the case, the Pieces used as push buttons for the Decks are disabled by the using the Pre-defined refresh in the Editor. I have 3 options now…

  1. Don’t use Pre-defined Setups and have all options available in-game (more complicated - more time)

  2. Remove the push button feature entirely which is weeks of work down the drain.

  3. A Vassal Guru has an idea? I can make this module available for download if need be if someone wants to have a look.

NOT A HAPPY CHAPPY!!

Maybe 4. The problem might be with the invisible button being under the Deck. There is a Layer defined for the button but not for the Deck, no idea what level the Deck is but it must be higher than all other Pieces in the module. So I will try moving the buttons somewhere next to the Decks which will mean I now have to make a bigger board. Hopefully it will not alter the Location of the At-Start-stacks. Grrrrrrr!!

Darren

Right…so it looks like I have answered my own question and problem solved. Moving the Draw Buttons out from under the Deck and making them visible works. Refresh Counters does it’s thing and all remains functional. The moral of the story is don’t have a piece under a Deck but what I don’t know is if this could be classed as a bug or not.

Darren

I put buttons beneath decks all the time, but my purpose is different from yours. In my usage, when the deck is out of cards, one can now see a “reshuffle” button. I press it, and the deck is rebuilt from the discards. If cards are atop the button, then the button is inactive. I have never seen behavior as you describe. In fact, I don’t know how you ever got your behavior to happen.

A few points on my use:

  • The button is on my bottom-most map layer, and the cards are in a layer above it. I don’t know if this is relevant.
  • I never refresh pieces because I don’t trust it. If it comes to it, I’d rather just rebuild a scenario from scratch.
  • My use works only if I set up the button in an at-start stack. If I try to otherwise move it to beneath the deck, the deck gobbles it up instead.

Now if the button is invisible (mine aren’t), and the deck allows anything to enter it, and the deck does not auto-shuffle so anything put on the deck occupies the top slot, then the deck will use the top piece to render itself. If the top piece has no image, then the deck will appear to be gone. The top invisible piece hides it. It’s still there, but it’s become invisible.

My guess is that when you refresh pieces, your below deck buttons are losing a part of their at-start status, so they are joining the deck. Bug? Since the way I use it as a re-shuffle button is undocumented, I can’t see it as a bug.

Hi and thanks for your reply;

Maybe that would explain why you have never seen this behaviour.

Do you know what Layer the Deck is? I don’t believe it is possible to have a Piece above the Deck, the Deck must be the “highest” Piece in the Vassal Module.

I am pretty sure you could still unintentionally press that button and reshuffle the Deck even if there is a full Deck above the button.

Darren

I don’t know where a deck sits with regard to map layers. Maybe it sits at the top, but then your application would never have worked. I think it’s possible that Vassal renders it where its pieces are. In my case, the cards are at a “cards” level, which is well above where I put the button. I have never tried swapping their positions because I have no application for it. What I’m more curious about is where do pieces go if they aren’t assigned a map layer? Someone who digs through the code would have to answer these questions.

I am quite confident though that my under-deck buttons will work unconditionally. I’ve used the technique countless times without fail. To suggest it might fail occasionally would suggest a race condition, and this is not a situation for that kind of problem.

I don’t know the answer about how a deck is drawn relative to defined Game Piece Layers, but at least with regard to pieces that are not in decks, we know from the GPL documentation that pieces not assigned to any GPL draw above all pieces that belong to GPLs.