More about Global Key Commands

My previous post concerned using a global key command to change the layer of counters that had ‘Fired’.

Is it possible to use the Global Key Command to change a Text Label on counters?

The counters contain a Text Label called ‘Endurance’. The actual text is a numeric value that starts at 30. I would like to be able to click a button in the toolbar that changes the text value by decrementing the numeric value by 1.

E.g. The text starts with a numeric value of 30 and when the global key command is activated (at the end of a turn) the text value changes to 29?

It may well be that the solution is the same as in my previous thread and that the answer is to use layers but 30 layers per counter is impractical.

Thanks.

Use a numeric dynamic property trait. call it EnduranceValue. Set max value to
30 and min value to 0. Set start value at 30
In the DP add a key command Ctrl E that decreases the value by -1

In the text label put $EnduranceValue$

Adda a marker trait : name it Endurance and set value to true

Again add the Toolbar GKC.

This time you want the Key command Ctrl E and the Property match expression
Endurance = true


From: Doggo mike@eleven-bravo.co.uk
To: messages@vassalengine.org
Sent: Fri, April 15, 2011 1:25:03 AM
Subject: [messages] [Module Design] More about Global Key Commands

My previous post concerned using a global key command to change the
layer of counters that had ‘Fired’.

Is it possible to use the Global Key Command to change a Text Label on
counters?

The counters contain a Text Label called ‘Endurance’. The actual text is
a numeric value that starts at 30. I would like to be able to click a
button in the toolbar that changes the text value by decrementing the
numeric value by 1.

E.g. The text starts with a numeric value of 30 and when the global key
command is activated (at the end of a turn) the text value changes to
29?

It may well be that the solution is the same as in my previous thread
and that the answer is to use layers but 30 layers per counter is
impractical.

Thanks.


Read this topic online here:
https://forum.vassalengine.org/t/more-about-global-key-commands/3839/1

No joy I’m afraid.

I have tried various combinations but cannot get the GKC to change the text-label although the option to change the text-label is still available if I right-click the counter and manually change the text-label value.

I have listed below all the settings of the various components concerned. If a setting isn’t listed then it as at the default setting or is just formatting.

It has been necessary to increment by -1 since there is no option to decrement a value. However, I have tried increment as 1 with no effect.

Dynamic Property:

Name: EnduranceValue
Value: 30
Is Numeric: Checked
Minimum Value: 0
Maximum Value: 30
Menu Command: Change Value
Key Command: CTRL E
Type: increment numeric value
Incremented by: -1

Global Key Command:

Description: Endurance
Key Command: CTRL E
Matching Properties: Endurance = true
Within a Deck, apply to: no pieces
Button Text: Endurance
Suppress Individual Reports: Checked

Marker:

Property Name: Endurance
Property Value: true

Text Label Propertiers:

Text: $EnduranceValue$
Name Format: default
Menu Command: Change Endurance
Keyboard Command: CTRL E
Property Name: Endurance

Send me your module - its quicker for me to fix

The system will not let me send you a file with the .vmod extension ?

Can you PM me an alternative email address?

timothy dot mccarron at sbcglobal dot net

Thanks Tim. Module sent.

fixed - sent back

Fixed - on way back


From: Doggo mike@eleven-bravo.co.uk
To: messages@vassalengine.org
Sent: Fri, April 15, 2011 3:01:16 PM
Subject: [messages] [Module Design] Re: More about Global Key Commands

Thanks Tim. Module sent.


Read this topic online here:
https://forum.vassalengine.org/t/more-about-global-key-commands/3839/7

Excellent - thank you. These Global Key Commands are VERY useful!

Argh! I was hoping to find out what was fixed as I am trying a similar action! Could someone post a quick update explaining how this was done?

Thanks!

Flaney

Hi Flaney.

Look at the property listing above that I provided to Tim.

From what he sent me back I have identified the following changes (marked in BOLD);

Dynamic Property: appears in the Prototype for the counter

Name: EnduranceValue
Value: 30
Is Numeric: Checked
Minimum Value: 0
Maximum Value: 30
Menu Command: Reduce Endurance
Key Command: CTRL E
Type: increment numeric value
Incremented by: -1

Global Key Command: Unchanged

Marker: Unchanged - appears in the Prototype for the counter

Text Label Propertier: this text label trait appears following the Basic Piece trait on the counter.

Text: $EnduranceValue$
Name Format: default
Menu Command: Leave Blank
Keyboard Command: Leave Blank
Property Name: Leave Blank

I hope that this helps.