# Change Maximum Value for Dynamic Properties via a hotkey

**URL:** <https://forum.vassalengine.org/t/change-maximum-value-for-dynamic-properties-via-a-hotkey/10427>\
**Category:** Module Design\
**Created:** [April 19, 2020, 2:04am UTC](https://forum.vassalengine.org/t/change-maximum-value-for-dynamic-properties-via-a-hotkey/10427 "2020-04-19T02:04:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KEslinger](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/keslinger/32/4122_2.png) [@KEslinger](https://forum.vassalengine.org/u/KEslinger)\
**Post date:** [April 19, 2020, 2:04am UTC](https://forum.vassalengine.org/t/change-maximum-value-for-dynamic-properties-via-a-hotkey/10427/1 "2020-04-19T02:04:43Z")

</div>

What is the variable name to change the Maximum value for Dynamic Properties?

EXAMPLE  
Dynamic Property  
Value: 5  
Minimum Value : 0  
Maximum Value : 15

Key Commands  
Menu Command : Change Maximum Value  
Key Command : ALT M  
Type : Set value directly  
New Value : ??? How do I use this field to change the Maximum value ?

{Maximum value==20} … This does not work hehe

Thanks!

---

<div class="post-metadata">

**Author:** ![kerkael](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/8c91f0/32.png) [@kerkael](https://forum.vassalengine.org/u/kerkael)\
**Post date:** [April 19, 2020, 9:18am UTC](https://forum.vassalengine.org/t/change-maximum-value-for-dynamic-properties-via-a-hotkey/10427/2 "2020-04-19T09:18:08Z")

</div>

Hi  
First the doubled == is a notation for testing, returning a boolean true/false, not for assigning.  
Then, I’m not sure you can edit this one. I tried myself. Instead I use formulas with modulo operator when I need to evaluate a potential limit. I’d like someone to give a different answer, though.

So, for an unknown number of player, from 2 to 5, I define a GP named nbplayers. And some seat1 to seat5 mapped to the colors, and blue\_number to yellow\_number mapped to 1 to 5.  
When I want to send something to next player, the destination seat will be : seat{myseat%nbplayers+1}, with myseat defined as $PlayerSide$number.  
Now if the max value you want to apply can only take a few N values, you can define N times the same dynamic property, calling it with different keystrokes.

Does that help ?

---

<div class="post-metadata">

**Author:** ![Cattlesquat](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cattlesquat/32/241_2.png) [@Cattlesquat](https://forum.vassalengine.org/u/Cattlesquat)\
**Post date:** [April 19, 2020, 1:54pm UTC](https://forum.vassalengine.org/t/change-maximum-value-for-dynamic-properties-via-a-hotkey/10427/3 "2020-04-19T13:54:02Z")

</div>

You can’t change the Maximum/Minimum values “on the fly” while the module is running.

You’d have to simulate that functionality yourself, with another dynamic (or global) property, that you then checked whenever you updated your original property, to see if you’d gone past the “current max limit”, and force it back within bounds yourself.
