Ai ref counters
AutoImage Reference Manual
Adding AutoImages to a counter
AutoImages can be used in counters in two ways, either as a stand-alone image layer, or as a level image in a Layer trait.
Using the AutoImage trait
An AutoImage trait is a trait that just draws the name image definition. AutoImage follows all the normal rules of VASSAL property traits. It is affected by other traits below it on the list and is drawn over the top of anything drawn by traits above it on the list.
This is the simplest and most straight-forward way of using AutoImages. It is ideal for counters that either do not have a flip side, or have a flip side that is not another AutoImage. (Add the flip side using a Layer trait).
To add an AutoImage trait to a counter:
- Create a gamepiece and open up the Piece Definition Window.
- Click on the Import button in the lower left-hand corner.
- At the Enter fully qualified name of Java class to import prompt type in AutoImage.AutoImage and click OK. You will normally only need to do this once for a module.
- Scroll to the bottom of the Available traits and you should se something like this:
- Click on Auto Image and click Add.
- Open the Auto Image property trait to see:
- Enter the name of an Image Definition (not an Image Layout) and save.
Using an AutoImage as a Level Image in a Layer trait
If you wish to have a counter that has multiple layers, more than one of which is an AutoImage, you will need to use the folowing method to use AutoImage's in layers. While being easy to do, it is not intuitively obvious and you cannot see what the image looks like inside the layer trait.
- Open up the Layer trait you wish to add an AutoImage to.
- For the level you wish to use an AutoImage:
- Do not select an Image (the AutoImage will overwrite it anyway).
- Enter the Image Definition name enclosed in % signs into the Level Name field.
- Youshould have somehing that looks like this: