Minor Bug on Map Window Properites

This involves the option “Include command to send entire deck to another deck” on the Map Window Properties.

If you check this box, you can include whatever information you need and it works fine. However, even though these properties are operating, if you go back to the properties later, this box is unchecked. If you save the module and re-open it later and then go to the properties, the box is not only unchecked, but the property will not display its values until you check the box.

Thus spake DrNostromo:

This involves the option “Include command to send entire deck to another
deck” on the Map Window Properties.

If you check this box, you can include whatever information you need and
it works fine. However, even though these properties are operating, if
you go back to the properties later, this box is unchecked. If you save
the module and re-open it later and then go to the properties, the box
is not only unchecked, but the property will not display its values
until you check the box.

  1. Please post a minimal test module showing the problem.

  2. Please check whether there a version in which the problem doesn’t
    happen.


J.

Attached is a quick sample. Just change the .zip to .vmod. This module was created using 3.2.12 on a Windows XP system.

When you run the module, you have two decks - Deck A & Deck B. Both decks have two card. Drag the cards from Deck A away from the decks. The module is set so that when Deck A is emptied, Deck B is moved to deck A. You’ll note the module does exactly what’s intended.

In the editor, Deck A (Properties) shows the “Send Hotkey when empty” as checked and sends the hotkey GetDeckB

Deck B (Properties) does NOT show “Include command to send entire deck to another deck” as checked but if you check it, it will then display that the GetDeckB hotkey is in place and that it will send the deck to Deck A.

Simply put, if you don’t remember that you have a “send entire deck” command in place, you’d never know it unless you checked the check box.

As far as the last Vassal version is which this worked right …I have no idea. This is the first time I’ve noticed the problem. It may or may not occur in earlier versions …I just never noticed the problem till now but I haven’t done any serious module editing until just recently.

[attachment=0]SendEntireDeckBug.zip[/attachment]

Quick update.

I just ran the Vassal 3.2.8 engine and opened a module created by the 3.2.8 engine - which has this deck manipulation routine in it - and the bug exists in that module, as well. So, the bug goes back at least that far.

Thus spake DrNostromo:

As far as the last Vassal version is which this worked right …I have
no idea. This is the first time I’ve noticed the problem. It may or may
not occur in earlier versions …I just never noticed the problem till
now but I haven’t done any serious module editing until just recently.

You could determine the answer by trying some older 3.2 releases. The
release archive is here:

vassalengine.org/releases/


J.

Thus spake DrNostromo:

Attached is a quick sample. Just change the .zip to .vmod. This module
was created using 3.2.12 on a Windows XP system.

When you run the module, you have two decks - Deck A & Deck B. Both
decks have two card. Drag the cards from Deck A away from the decks. The
module is set so that when Deck A is emptied, Deck B is moved to deck A.
You’ll note the module does exactly what’s intended.

In the editor, Deck A (Properties) shows the “Send Hotkey when empty” as
checked and sends the hotkey GetDeckB

Deck B (Properties) does NOT show “Include command to send entire deck
to another deck” as checked but if you check it, it will then display
that the GetDeckB hotkey is in place and that it will send the deck to
Deck A.

Simply put, if you don’t remember that you have a “send entire deck”
command in place, you’d never know it unless you checked the check box.

Thank you for providing a minimal example demonstrating the problem.
This greatly simplifies the debugging task for us.

Here’s the opening tag for Deck B in the buildFile:

<VASSAL.build.module.map.DrawPile allowMultiple=“true” allowSelect=“true” canSave=“false” color=“0,0,0” countExpressions="" draw=“false” drawFaceUp=“true” emptyHotkey="" expressionCounting=“false” faceDown=“Never” faceDownFormat="" height=“100” hotkeyOnEmpty=“false” maxStack=“1” name=“Deck B” owningBoard=“Main_Board” reshufflable=“false” reshuffleCommand="" reshuffleHotkey=“63743,0,GetDeckB” reshuffleMessage="" reshuffleTarget=“Deck A” restrictExpression="" restrictOption=“false” reverseCommand=“Reverse” reverseFormat="" reverseHotkey="" reversible=“false” selectDisplayProperty="$BasicName$" selectSortProperty="" shuffle=“Always” shuffleCommand=“Shuffle” shuffleFormat="" shuffleHotkey="" width=“100” x=“150” y=“50”>

The problem is that

reshufflable=“false”

but

reshuffleHotkey=“63743,0,GetDeckB”

I’m now looking into how it could get that way.


J.

Noted as Bug 11112:

vassalengine.org/tracker/sho … i?id=11112

Try 3.2.13-svn9124:

vassalengine.sourceforge.net/builds/

I’m unsure whether I did the right thing there. The problem is that the stored value of reshufflable in any existing module is unreliable when false—I can’t tell whether it’s false because the module designer set it to false, or if it’s false because “Send Menu text” was left empty. I took the tack that if any of the fields are nonempty when reshufflable is false, then reshufflable is false spuriously.

I don’t know what modules use Draw Piles. It would be helpful if you’d test this build against an assortment of modules which have Draw Piles to see if it adversely changes their behavior.