Evaluating properties possible?

Here is the scenario: I want to keep a running total of the “Honor value” of the cards in a player’s personal deck.

I’ve given all the cards a Maker of “Honor = 0”, “Honor = 1”… “Honor = 8”, etc…

I have then enabled the deck to count pieces, with the following expressions “ZeroHonor: Honor = 0”, “OneHonor: Honor = 1”… “EightHonor: Honor = 8”, etc…

I then added an At-Start Stack to the player’s personal hand window, and then added a single piece to the to the At-Start Stack.

The At-Start Stack has a text label, with the following expression:

$Player1_Deck_OneHonor$ + $Player1_Deck_TwoHonor$ + $Player1_Deck_ThreeHonor$

Adding up all of the counts. I was hoping to be able to do something like this…

$Player1_Deck_OneHonor$ + ($Player1_Deck_TwoHonor$ * 2) + ($Player1_Deck_ThreeHonor$ * 3)

So that it would add up all the different values and multiply them and show the right Honor value.

SO!!! My question is… Is there a way to get all of these properties to “eval”/“evaluate” on the fly? :slight_smile:

On Oct 11, 2010, at 11:56 PM, eekamouse wrote:

Here is the scenario: I want to keep a running total of the “Honor
value” of the cards in a player’s personal deck.

Adding up all of the counts. I was hoping to be able to do something
like this…

$Player1_Deck_OneHonor$ + ($Player1_Deck_TwoHonor$ * 2) +
($Player1_Deck_ThreeHonor$ * 3)

So that it would add up all the different values and multiply them and
show the right Honor value.
SO!!! My question is… Is there a way to get all of these
properties to
“eval”/“evaluate” on the fly? :slight_smile:

Not at present.

This is an enhancement that is planned for the next version of Vassal
3.2, when new technology (beanshell) will be added that is able to
process arithmetic expressions.

sorry to bump, but does that mean beanshell will allow dice math? :smiley:

Thus spake jungleboie:

sorry to bump, but does that mean beanshell will allow dice math? :smiley:

I believe so, yes.


J.