: Warranty / License :

 Warcraft 3 Image Renamer - Fast icon images name processing
  Copyright (C) 2006  BlackDoom
  This tool took 5 days out of my lifespan. 2 days for the
 renaming algorithm and 3 days for figuring out how ti make
 the packing algorithm to work... :D :)
  o9/o7/2oo6 - o9/11/2oo6

    This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

    This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

  Contact: w3ir@yahoo.com

    Please make sure that you specify in the subject box the following text:

    - for Technical Support / Bugs purpose:
      "TechSupport: Warcraft 3 Image Renamer - <Your name enclosed here>"
    - for Feedback purpose:                     
         "Feedback: Warcraft 3 Image Renamer - <Your name enclosed here>"
    - for Suggestions purpose:               
      "Suggestions: Warcraft 3 Image Renamer - <Your name enclosed here>"



: Viewing note :

 Best viewed using Curier New font



: usage information :

 This tool is written in order to automatically rename files obtained using
the Adobe Photoshop CS2 actions and PSD files also included in the download,
combined with MicroSoft Windows XP's renaming algorithm, after processing
them in IrfanView.

 If you have Adobe Photoshop installed, you might want to use the 4 actions
included in the download, in order to reduce the time required to create the
BTN, DISBTN, PASBTN and DISPASBTN images for your icons.
 In order to use them, please copy the 4 PSD files to "C:\W3Actions\PSDLayers\".
The actions have been defined in Adobe Photoshop CS 2, yet I didn't get the chance
to test if they can be used by other versions of Photoshop (as 6, 7, CS).

 If you'd use IrfanView's "Swap Color" feature, you would obtain Blizzard-like
looking icons, while having diverse colors. This can be done by changing the
RGB numeric values for each color. Thus, we can obtain from RGB the following
color codes: RBG, BGR, BRG, GRB and GBR. 
 You are free to experience with these versions of color codes, yet from my
experience you'll get these results: 1 image for RBG, 1 image for BGR, 2 images
for BRG and 1 image for GRB. GBR will produce 2 images, yet they would have
already been produce by the ones above.
 You get 2 images if you use 2 times the BRG/GBR feature.
 Using RBG, BGR or GRB 2 times will result in the original image, first input
to the given color swap. Using BRG or GBR 3 times will have the same result
as the other color swaps, resulting the original input image.

 Using IrfanView on a given image - let's say, "BTNAmbush.bmp" - we can obtain
5 distinct images. You can name them anyway while producing them. When done,
select them all, including the original file - "BTNAmbush.bmp". Let's say you
now have selected "BTNAmbush.bmp", "aa.bmp", "as.bmp", "sa.bmp", "ss.bmp" and
"sss.bmp". Now, rightclick on the original image - "BTNAmbush.bmp" - and select
"Rename". Type "BTNAmbush (0)" and hit Enter. This way, the other files will
automatically be renamed as "BTNAmbush (1).bmp", ..., "BTNAmbush (5).bmp". Now,
select only the original file (now having a "(0)" in its name) and rename it
back to its original name (without the "(0)").

 I suppose you will use the actions in this order: "Make BTN icon", "Make DISBTN
icon", "Make PASBTN icon" and "Make DISPASBTN icon". This way, you will obtain
"BTNAmbush (1).psd", "BTNAmbush (1)_1.psd", "BTNAmbush (1)_2.psd" and
"BTNAmbush (1)_3.psd". The first image corresponds to the BTN icon, the "_1" to
the DISBTN icon, the "_2" to the PASBTN icon and the "_3" to the DISPASBTN icon.
You are now free either to rename them using this tool, or to convert them to BMP
(of course, you can do whatever you like with them :) ). Use IrfanView for the
conversion to BMP.

 Place your BMP files ("BTNAmbush (1).bmp", "BTNAmbush (1)_1.bmp", "BTNAmbush (1)_2.bmp"
and "BTNAmbush (1)_3.bmp") in a folder. Remember the path to that folder. Open this tool,
choose that particular folder in the "Please select the input folder:" tree, then choose
where you want the renamed files to be saved. If you want to rename the original files
(those found in the folder selected in the Input folder tree), please make sure that the
"Rename original files?" checkbox is checked.

 The default Naming convention is the one assumed in this tutorial. If you have named
your files otherwise, please specify the naming format in the Naming Convention text box.
Do no forget to also specify the suffixes corresponding to each of the icon versions. If,
for example, you only have the image for a PASBTN icon, you don't have to also have the
images for BTN and DISBTN images in the input folder. The tool treats every file found by
the suffix located in the name of the file, according to the specified naming convention.

 The string in the Naming Convention text box is a mask in interpreting the filenames.
Each character has a unique meanining, as follow:
   "#" - discardable character; if your files are distinct by characters occupying the
         same position as a "#" character in the Naming Convention text box string,
         then only the first files encountered having this feature will be renamed;
         this way no files will be overwrote, thus protecting your work from being lost
   "$" - Icon Name character; the characters on these positions define the name on the icon
   "%" - suffix character; the characters on these positions define a suffix, based on which
         the naming process is performed

 Let's take an example, shall we?
 We have three files, "BTNAmbush (1).bmp", "BTNAmbush (1)_1.bmp" and "BTNAmbush (1)_2.bmp".
 Suppose we have the following suffixes for each icon image: "" for BTN, "_1" for DISBTN,
"_2" for PASBTN and "_3" for DISPASBTN.
 All these files have the next Naming Convention string (or naming mask): "###$$$$$$$$$$%%".
 Prior to actual process, the tool verifies the Icon name, based on the name mask. Characters
other than "A" to "Z", "a" to "z" and "0" to "9" are replaced with an underscore ("_"). In our
case, the final names would be the following:

 "BTNAmbush__1_.bmp" for the initial "BTNAmbush (1).bmp"; "BTN" is added in front of the icon name as the suffix is ""
 "DISBTNAmbush__1_.bmp" for the initial "BTNAmbush (1)_1.bmp"; "DISBTN" is added in front as the suffix is "_1"
 "PASBTNAmbush__1_.bmp" for the initial "BTNAmbush (1)_2.bmp"; "PASBTN" is added in front as the suffix is "_2"

 If "BTNAmbush__1_.bmp" is not the layout you were after, don't go and rename the files!
If you have more than 1-4 files, it will be plain boring. And useless too. You can fix
this using the naming mask. If you'd be wanting, let's say, "BTNAmbush1.bmp" instead of
"BTNAmbush__1_.bmp", check the naming mask: "###$$$$$$$$$$%%" was the old one. Modifying
some "$" characters in to "#" will fix the problem. In this case, using "###$$$$$$##$#%%"
instead of "###$$$$$$$$$$%%" will turn "BTNAmbush__1_.bmp" into "BTNAmbush1.bmp".
 Not that you are not required nor reccomended to provide the extension of files in the
name mask. It shall be discarded, anyway.


: Combinations of settings and their effects :

 You have within the main window 3 checkboxes. Each one leads to a given effect, checked
as well as unchecked. The effects vary according to the input and output folders. In some
cases, you will be allowed to select both of them, in other cases you will only be allowed
to select the input folder, depending on what options you choose (which checkboxes you check).

 MF = "Move files to output folder?" checkbox status: "X" for "Checked", " " for "Unchecked"
 RO =   "Rename original files?"     checkbox status: "X" for "Checked", " " for "Unchecked"
 ZP =    "ZipPack after rename?"     checkbox status: "X" for "Checked", " " for "Unchecked"
 P  =      "Paths";     reffering to the Input/Output folders;                "Same" or "Diff" (for "Different")
 DP = "Drive/Partiton"; reffering to the Input/Output drive/partition letter; "Same" or "Diff" (for "Different")
 Op = "Operation" - what exactly will happen to your original files; "Copy". "Move" or "Ren" (for "Rename")


+--------------------------------------+  These are the operations while ZP is unchecked.
|  MF |  RO |  ZP |   P  |  DP  |  Op  |
+--------------------------------------+
|     |  X  |     | Same | Same | Ren  |
+--------------------------------------+
|  X  |     |     | Same | Same | Ren  |
+--------------------------------------+
|  X  |     |     | Diff | Same | Move |
+--------------------------------------+
|  X  |     |     | Diff | Diff | Move |
+--------------------------------------+
|     |     |     | Diff | Diff | Copy |
+--------------------------------------+

 When ZP is unchecked, the destination will be files of the type selected in the
"Please select the target image type/extension" listbox.



+--------------------------------------+  These are the operations while ZP is checked.
|  MF |  RO |  ZP |   P  |  DP  |  Op  |
+--------------------------------------+
|     |  X  |  X  | Same | Same | Move |
+--------------------------------------+
|  X  |     |  X  | Same | Same | Move |
+--------------------------------------+
|  X  |     |  X  | Diff | Same | Move |
+--------------------------------------+
|  X  |     |  X  | Diff | Diff | Move |
+--------------------------------------+
|     |     |  X  | Diff | Diff | Copy |
+--------------------------------------+

 ZipPack only applies to BLP files. When ZP is checked, the destination will be ZIP
archives containing the input files.



: About this version :

 This version of the tool does not feature a recursive searching algorithm. The input
files are only searched throughout the Input Folder.
 This version of the tool does not feature a complex renaming algorithm, such as
wildcards in Windows' searching engine. Therefore, renaming icon sets with variable
icon name length will prove troublesome, if not distructive regarding data loss.
 This version of the tool does not allow using void names for icon images. Cases
such as "BTN.tga", "DISBTN.bmp", "PASBTN.psd" or "DISPASBTN.blp" are not allowed,
regardless of the type of image. An error will be delivered instead of the desired result.
 This version of the file uses the tsqInfoZipPkg component for Delphi. The ZIP
compression is similar up to equal to that used by WinRAR v3.51. There is no connection
between the author of both this tool and of the tsqInfoZipPkg component for Delphi. The
mention of the WinRAR product name is only for refference only, so that you could create
an idea on the zip pack final size.

 You can find links if you want learn more about them here:

  http://www.delphi32.com

 Search the site for InfoZip and/or tsq.




: Next versions features will include :

 - Support for variable icon name length renaming algorithm (rather hybrid, fixed/variable)
 - Support for various languages (not only English, French will come for sure, Romanian also)
 - Support for user-defined interface and error-message strings (and a tool for those)
 - Support for reccursive file search


: Note :

 When processing BLP files, you have the possibility to pack the files on destination.
  Example:
    You have "blabla_ZipPackExample.blp", "blabla_ZipPackExample_1.blp",
   "blabla_ZipPackExample_2.blp" and "blabla_ZipPackExample_3.blp".
    Use this name mask: #######$$$####$$#####%%. 
    Checking the "ZipPack after rename?" box will produce a zip archive
   called "ZipEx.zip". Inside it, a folder called "ZipEx" will be created.
   Within this folder your BLP files will be found. I chose this Zip file
   layout after observing the same layout in most of the files downloaded
   from http://www.WC3Sear.ch .


: Tips :

 How to make quickly a naming mask

   Just copy the file name into the Naming Convention text box, then replace the characters appropriate to the desired final name.


 Renaming sets of variable icon name length

   As this versions has no support for this operation, it's reccomended that you rename the icons by categories of icon name length.

