[messages] [Technical Support & Bugs] Editor - Usage of the "Add Multiple Pieces"
cmassaloux at free.fr
Thu Mar 19 18:52:57 CET 2015
Thank you for the answer,
I have read the code and despite I am not a Java expert, I have finally
arrived at the following conclusions:
When using the "Add Multiple Pieces" dialog, it is indeed possible to
automatically associate an image file in a Layer trait, for every "base"
image provided in the images list.
Here is a quick usage manual that could help other users:
1) use the "Edit Piece Template" button and add a "Layer" property to
2) In the Layer trait dialog, fill in correctly the "Image Name"
drop-down list and text input to specify the layer image identification
a) If you select "use Base Image", then, as expected, you cannot
specify a layer image name. It is the base image which will be added to
the layer. I don't really see the interest of doing so but it is the way
it works. Actually, it could have an interest when you want to not set
any base image, and use only layers to display your counters. You could
activate the checkbox "do not load images into Basic Piece Traits ?",
and configure the first layer with the "use Base Image" setting, and
complete with any other alternate image for the next layers. But
unfortunatelly, it doesn't work as expected, because as soon as you
check the box, no image will be taken into account anymore, even for the
Could this be a hidden bug maybe ?
b) if you select "same as" in the drop-down list, and specify the name
of an image file, then this image will be removed from the base image
list (no piece will be created with this image as "Base" image) and
additionally, it will be used as layer image for every Pieces created.
Which means that all Pieces will have the same layer image.
c) if you select "ends with" interesting thing begin to happen. The
value given in the text input field will be used as a suffix specifier
to identify "layer images" from the "base images" filenames. "Layer
images" will also be removed from the "base image" list. For example if
you specify the option "ends with" and "_d", and have the following
image files in your directory:
Inf01.png, Inf01_d.png, Cav02.png Cav02_d.png, Art03.png (note that
Art03.png is alone in my example)
then three Pieces "Inf01", "Cav02" and "Art03" will be created:
- Inf01_d.png will automatically be used as layer image for the Piece
"Inf01", with base image "Inf01.png"
- same thing with "Cav02_d.png" for Piece "Cav02" with base image
- and Piece "Art03" will still be created but with only "Art03.png" as
Base image and no Layer trait.
Notice that the ".png" suffix is not taken into account when matching
d) if you select "includes" things are much less of interest. The
automatic setting of the layer trait does not work anymore. This option
can only be used to filter the "Base image" list by removing every image
file whose filename contains the given text value. Notice also that the
layer trait will not be included in the created Pieces, confirming
thereby that this option is for filtering purposes only.
e) same thing with the "matches" selection which offers more freedom in
specifying the filtering pattern criteria, with some kind of regular
expression syntax. For example the pattern "F\d\d_.*" will match
"F01_Inf.png" and "F52_Art.png" (removing them from the base images
list), but not "FA55B_Cav.png".
I hope this will help, and finally I'd like to thank you again because
at least, this functionnality will save me a lot of boring work avoiding
the addition of pieces one by one and clicking hundreds times in the
Read this topic online here:
More information about the messages