Create account / Log in

Editor - Usage of the "Add Multiple Pieces"

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Editor - Usage of the "Add Multiple Pieces"

Postby Chatmourai » February 17th, 2015, 7:24 pm

Hello,

I'm using Vassal 3.2.13 under Ubuntu Linux,and it works fine.
I'm posting here because I need some help, or documentation about the "Load Multiple Pieces" dialog window, brought by the "Add Multiple Pieces" menu command in the Vassal Module Editor.
This dialog window is not described in the PDF "module designer's guide", and some options are not so easy to understand.

First, when the image directory is given, all the images are listed in the window, but completely unsorted.
Is there a way to enforce a simple alphabetic sorting of the images filenames ?

Second, I try to set the Piece Template, and specifically I want to add a Layer trait because all my counters have two faces.
The Layer trait is easily added to the template and there is this unusual drop down list and text field dedicated to automatically compute the filename of the layer images.
And I can't find out how it works.
Needless to say that I tried many things, but without success.

Could you please give some more documentation on this feature ?

Just to give an example of my personal case, my front face images (recto) are named:
F01R_Napoleon.png
F02R_Davout.png
And the corresponding backface (verso) are:
F01V_Napoleon.png
F02V_Davout.png
The "R" is replaced by a "V"

Best regards,
Christophe
Chatmourai
 
Posts: 11
Joined: September 1st, 2014, 12:44 pm

Re: Editor - Usage of the "Add Multiple Pieces"

Postby uckelman » March 1st, 2015, 10:30 pm

Thus spake Chatmourai:
>
> Could you please give some more documentation on this feature ?

At the moment, the only documentation which exists for this is the code
itself:

https://sourceforge.net/p/vassalengine/ ... oader.java

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8382
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Editor - Usage of the "Add Multiple Pieces"

Postby Chatmourai » March 19th, 2015, 5:52 pm

Hello,

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 the template.

2) In the Layer trait dialog, fill in correctly the "Image Name" drop-down list and text input to specify the layer image identification as follows:
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 layers.
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 "Cav02.png".
- 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 filenames.

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 dialog boxes.

Best regards,

Christophe
Chatmourai
 
Posts: 11
Joined: September 1st, 2014, 12:44 pm

Re: Editor - Usage of the "Add Multiple Pieces"

Postby VPJArponen » March 13th, 2020, 9:24 am

Hi Christophe,

Just out of curiosity, did you ever figure out an answer to this part of your inquiry above:

>First, when the image directory is given, all the images are listed in the window, but completely unsorted. Is there a way to enforce a simple alphabetic sorting of the images filenames ?

I'm also a Ubuntu user and been dealing with that same phenomenon for years.

Thanks,

-Vez
VPJArponen
 
Posts: 1
Joined: September 18th, 2019, 10:31 am


Return to Technical Support & Bugs

Who is online

Users browsing this forum: Bing [Bot] and 1 guest