Cannot Set a Global Property value

I’m no doubt doing something wrong but for the life of me I cannot seem to SET a GLOBAL PROPERTY value. I’ve tried a simple test (see below) on 2 different game modules with same result.The value stays at zero no matter what i change it to or where i put the REPORT trigger in trait ordering. Here is what I have configured →



Any ideas as to why would be appreciated ?


It looks like you have numeric values for the property. Should you check the is numeric boxes?

Another thought, maybe use a Trigger Action to trigger the Set Global Property with one Named Command and then trigger the Report Action with another, different Named Command.

Where is the Global Property defined? Gp’s can be defined at the Zone, Map or Module level. Depending on where the piece that is setting the GP currently resides, it may or may not be able to ‘see’ the GP you are trying to set.

Good suggestion- changed it to numeric but still no value is being updated. I’ll look at the Trigger report action idea.

1 Like

It is defined at the Module level. Game only has one map which the piece is on when making the SET GP call.

The order of execution looks to be a real puzzler. Per the trait order discussion on the game piece page VASSAL Reference Manual, it looks like the set global property should execute before the report action regardless of relative order.

I use the Trigger Action to be sure actions execute in the order I want.

1 Like

Yes I thought it could be trait ordering related however even if the REPORT trait is out of order shouldn’t any subsequent time the report executes show the current value of the GP ? If I reset TESTGP away from ‘0’ multiple times it only ever displays as ‘0’ in the report, implying the value isn’t changing.

I haven’t had the problem you describe, and I’m working on a module for an economic game where I’m using global properties to abstract the money. Essentially, I’m using a global property to store the current balance (of money) of every game entity that can be part of a transaction. This would include the game bank, up to seven players and 50 companies (58 entities; not all in play at the same time, but each having its own global property for its current cash on hand).

Here is sample module with the core of how I’m accomplishing transactions in the module: BankAndPlayerPortfoliov015.vmod - Google Drive

1 Like

Just asking for clarity, since it wasn’t stated–did any of the process of adding this pre-date the creation of predefined setups? When testing, are you loading predefined setups–thus potentially testing things you added that post-date the predefined setups?

Cheers pawnpusher i’ll take a look at your setup.

Good point ! I was using Pre-defined setups so started a brand new setup and still had the issue.

Ok sorry I can’t seem to find your “Payor” and “Payee” maps you reference in your “Set Global Property” calls ?

Payor and Payee are property names that store the names of the target maps as their values (notice the names are in braces indicating a Beanshell expression. If the the names were in quotes in the braces then you would look for maps with those names, but since there are no quotes in the braces, these are names of properties that store the names of the maps). So if the Bank is paying PlayerA some money for something, the value of Payor will be “Bank”, and the value of Payee will be “PlayerA”. Then the Named Command MakeDebit in the Set Global Property trait described as PayFrom will subtract the value of the property Amount from the Global Property Cash in the map named “Bank” (current value of Payor). Also the Named Command MakeCredit in the Set Global Property trait described as PayTo will add the value of the property Amount to the Global Property Cash in the map named “PlayerA” (current value of Payee).

Note:This discussion is about Set Global Property traits in the PayWidgetPrototype of the BankAndPlayerPortfoliov015 module in the link in my post above.

1 Like

Great thanks pawnpusher I understand now.

1 Like