VASL counter graphics

JG53_Jaguar

Member
Joined
Oct 6, 2005
Messages
1,782
Reaction score
24
Location
Canada
Country
llSlovakia
Is there a way to replace VASL counter graphics with my own? I would like to make my own counters and replace some of the existing ones.

thanks!
 

Tuomo

Keeper of the Funk
Joined
Feb 10, 2003
Messages
4,654
Reaction score
5,540
Location
Rock Bottom
Country
llUnited States
Sure. I've kinda wondered why nobody has really done such a thing in the past - most ASL'ers like the old-style counter artwork, but enough have asked about a more modern, colorful, style that I'm sure there'd be plenty of takers, should anyone ever generate such a set.

Regardless. If you want to know how to do your own artwork, Counterman is probably the guy who can answer best. I'll warn you that there's no substitute for real artistic talent :)

If you already have a handle on THAT but just want to know how to insert your own counter art into VASL, then I can give a quickie answer. Fingers crossed that it's correct - I'm sure Counterman will gently correct the errors.

Find the VASL.jar file in the lib directory of your VASL directory. Make a copy for safekeeping - we'll call it oldVASL.jar. Now change the extension of the original file from .jar to .zip (so you've got a file called VASL.zip). Unzip it (and wait - this will take some time since there's so many files inside that archive).

Open the directory that just got created and find the images directory at the top level inside. There you'll see separate directories for each nationality, plus a few add-ons. This is where VASL finds its counter images. They are (universally?) gifs.

To replace an existing counter with your own, simply delete the existing counter gif and copy your own into its place, giving it the name that the previous file had. Then navigate back to the top level of the VASL directory (that got created when you unzipped the VASL.jar file) and zip the whole thing up again. (I THOUGHT you had to save with the No Compression option, but the VASL.zip file I'm looking at right now does have compression for its counter images, so give compression a shot). Again, be patient, because it takes a while to zip up all this stuff.

Your zip utility will ask you to name the archive - VASL.zip is fine. Then quit your zip utility and rename this file VASL.jar. Fire up VASL as you normally do and hopefully your new counter artwork will be there for all to see.

A second way to do something like this is to create a VASL extension (.mdx file) that will simply add your new counters to VASL without replacing what currently exists. Counterman is the guy to give that piece of advice, but I'll take notes and use them for the next update to the Ye Old Booke.

Good luck.
 
Last edited:

JG53_Jaguar

Member
Joined
Oct 6, 2005
Messages
1,782
Reaction score
24
Location
Canada
Country
llSlovakia
Cool stuff, thanks Tuomo. I have scanned my ASL countersheets and I'm thinking replacing some counters with mine...just for fun :)
 

countermanCX

Mennonite Jihadi
Joined
Sep 4, 2004
Messages
2,432
Reaction score
51
Location
sadlyno.com
Country
llMalta
hi JG53, Tuomo's given you the important gist of the process, now it's time for me to chime in w/ some Important Counterman Arcana.

1st, in Winzip, menu to Options > Configuration > View tab > Columns section & check 'Path' ON. OK the dlog, then do an Options > Save Settings Now.

2nd, after opening your (renamed) VASL.zip in WinZip, click on the 'Paths' label at the top-right of the file-list, to sort the list by Path. All the ctr/mkr/dragover imagefiles are stored in a dir named 'images', most of the other dirs are full of stuff that you really don't want to mess about with. The 'images' dir contains ~5500 files, they're organized in further sub-dirs (a 2-letter code for National ID, or MS (1/2" marker), ML (5/8" marker), & DO (draggable overlay). Each National sub-dir contains its Sniper & all its 1/2" ctrs, & also has a 'gun' & 'veh' subdir (these subdirs are named 'guns' & 'vehicles' for the Brits, 'cos they're British), where the 5/8" ctrs live. There's also an 'sh' (shared) Nationality, where Planes & Doziers & Horsies & Landing Craft live. The 'images' root has some files for the Moved/Berserk/Fanatic/Heroic flags, as well as some of the VASL dlog buttons.

3rd, you can highlight & extract the whole shebang, or all the Yank Vehicle ctrs, or all the Snipers, and Extract them - but (*MOLTO IMPORTANTE*) you MUST use the WinZip 'Extract' feature and have its 'Use folder names' option checked ON. So's when WinZip is finished w/ the unzip, it'll re-create the <path>/<filename> feature - and your user-selected extract-to dir will contain an images subdir, and all your selected files will show up in their appropriate dir-tree structure. I can't rilly stress enough about how important it is to preserve this dir-tree in the unzip process - w/o this tree, your modified files won't make it back into VASL.zip in the right place, & you won't see any results from your work!

4th, let's say you've Extracted the Russian .50-cal HMG ctr - and he's living in the proper structure, that is, his path/name is <your modfiles dir>\images\ru\ruHMG50.gif. You can mod/replace this image all you want, replace the image w/ that kewl BFG9000 pic you d/l'd. Thing is, that original ruHMG50.gif imagefile is only 48x48 pixels (5/8" ctrs are 60x60 pixels), and VASSAL don't re-size images on-the-fly, your new modded file is gonna haveta be exactly 48x48 pixels, if you use a different size, your new ctr won't align nicely in its stack, & will ID itself to your oppo, even when ?'d. So you're constrained to imagefile sizes of 48x48 or 60x60 pixels for any ctr-artwork you do. & also, if you're doing a 'replacement' image for an existing ctr, you've got to keep the same-exact-case-sensitive filename. VASL/VASSAL is written in Java, which is case-sensitive. Ughfortunately, WinZip is not. If you mod ruHMG50.gif & rename it as RUhmg50.gif, WinZip will replace that file, but VASL/VASSAL won't be able to read it. If you're modding a imagefile, keep the same-exact image size and filename for your replacement file.

5th, OK, so you're finished modding the files in your \images\ dir - you've replaced all the xxSniper.gif images w/ a (60x60-pixel Nationality-appropriate) avatart. To install these new images to your local copy of VASL, you've got to drag your modded \images\ subdir from an Explorer window & drop it onto your copy of VASL.zip. When the WinZip Add/Replace dlog comes up, *DO NOT* enable the 'Use full path' option.

6th, when done, you'll prob'ly need to rename VASL.zip to VASL.jar - Try it 1st to see. Working w/ the Java-d/l VASL.jar file can be wonky, it has some kinda' CRC-check facility. If your modded VASL.zip file horks on start-up after you've renamed it to VASL.jar, what you need to do is go to www.vasl.org & d/l the 'hobbyist' version, post here again if you need help getting your mod to work properly.

And note, that any mods you make to your own 'local' copy of VASL will only show up for your own display - your oppo will see the unmodified ctrs, unless you send him your mod & instruct him as to how to use it. If you want to share your mods w/ others, it'll be easier by far to make an Extension. But in any case, if you come up w/ some nift' improved artwork, post some examples here! Who knows, you might find yourself dragooned into the ranks of the vaslmapcabal, heh, that's how we add recruits to our ranks.

ctrman

hth, working w/ WinZip can be a bit wonky, 'specially in its v12.0 version.
 
Last edited:
Top