I think I got something doing these steps:
- edit a new module
- add a board
- add a pieces panel
- add a single piece (one image, not much else)
- add a prototype (Army) with the following traits:
- DynamicProperty Veterans (numeric, default 0, values 0-4)
- Layer image following DynamicProperty (add 5 images for the layers)
Save the module, quit Vassal.
Edit the module. Add prototype Army to your single piece. Instantaneously, you should get a bad_data_error (I use SVN 4133). That is because the dynamic property (or other traits in the stack) are not called with getProperty. If a global property of the same name exists, it is used instead of the DynamicProperty of the counter. I do not know why, as Embellishment.java uses (this is the place where the dialog is raised):
final String val = (String) Decorator.getOutermost(this)
.getProperty(propertyName);
try {
int v = Integer.parseInt(val) - firstLevelValue + 1;[SNIP]
}
catch (NumberFormatException e) {
ErrorDialog.dataError(new BadDataReport("Not a number",val,e));
}