PDA

View Full Version : Add numbers to tokens automatically



valeros
August 27th, 2009, 06:38
I like my tokens numbered when there are a lot of enemies (e.g., 9 kobolds). This automatically makes new tokens with half-transparent red numbers. For example, pick kobold.png and 9 and you get 9 new tokens with the numbers 1-9.

Requires ImageMagick be installed (free from www.imagemagick.org (https://www.imagemagick.org))

Put .bat and .vbs file in directory with tokens

Double-click on add_numbers.vbs

You can change placement of numbers by changing gravity in .bat file. You can set to north, center, west, etc. instead of southwest.

You can change color, font, font-size, font-style, etc. Just look at .bat file (or imagemagick help on web)

zabulus
August 27th, 2009, 08:33
I think you are well underway of becoming my new hero, Valeros :)

(although you still have a ways to go to topple Unerwunscht (and Leozelig) with the 2nd edition ruleset)
*grin*

valeros
August 30th, 2009, 02:14
Forgot to mention this does not work if the filename contains spaces.

Screenmonkey2099
September 7th, 2009, 00:56
Everytime I try to use it it says it cannot find the file.

valeros
September 7th, 2009, 02:21
1) Make sure there are no spaces in the filename or anywhere in the directory to where the scripts are located.
2) Make sure you have ImageMagick installed. The resizing uses ImageMagick. Also, when you install ImageMagick, you need to say that it is added to your path.
3) Put a line at the top of convert_images.bat like:PATH=%PATH%;c:\program files\imagemagick-6.5.5-q16
4) From a command tool (type "cmd" in the Start->Run box or "Start->All Programs->Accessories->Command Prompt"). Change to the directory with the scripts (which should be one directory above JPGImages). Run the convert script by hand "convert_images.bat 50" and watch the output for errors. You can stop it anytime with <ctrl>C.