Module update to 34
Updating a module from version 3.2 to version 3.3 and above
Usually, no changes are required to modules when the Vassal version is increased.
However, the change from 3.2 to 3.3/3.4 involved a major rehabilitation of the Vassal engine to resolve all outstanding bugs, introduce major performance improvements and to bring the code base into line with the much changed Java environment that supports Vassal.
While every attempt was made to keep the operation of modules compatible between 3.2 and 3.3/3.4, there are a small number of specific issues where compatibility could not be maintained. These issues involve broken behaviour in Vassal 3.2 that was inadvertently used by module designers and had to be changed to fix bugs and ensure consistent behaviour into the future.
There are a small number of specific issues that may need to be addressed:
1. Using unquoted $xxx$ variables inside Beanshell expressions.
In Vassal 3.2, you could use unquoted $xxx$ variables in Beanshell expressions and this worked, though it should not have. We were unable to maintain compatibility going forward with this behaviour.
If you used an expression like
{ propertyName == $OldLocationName$ }
This will fail in Vassal 3.3+ and must be replaced with
{ propertyName == "$OldLocationName$" }
NOTE: if the $xxx$ property returns a number, then you do not have to add quotes and the expression should still be working, but it does not hurt to add quotes; even if the $xxxx$ property does return a number, the comparison will still work correctly.
2. Using Alert() functions in Calculated Properties.
In Vassal 3.3+ and later, Calculated Properties may be evaluated more often than in Vassal 3.2 and at unexpected times. Normally, this is not a problem, but if you have included an Alert("text") function in a Calculated Property, you may get the Alert message appearing at unexpected times. The solution is to convert the Calculated Property to a Dynamic Property and include the Alert Function in one of the Dynamic Property Key Commands. e.g. Set the value of the property to {Alert("text"}}.