New program to help set up VASL scenarios

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
if I start an online game with a file with ordinance and afv counters from your program, would someone who doesn't have your program be able to join it?
If they don't have my program, not really. If you want to play a game with them, you need to turn off Include VASL images in snippets and Include flags in snippets in the User Settings (and update the labels in the VASL scenario).

When VASSAL froze, what's actually happening is that it's trying to connect to my program to get the vehicle/ordnance counters and flags, and because its HTML engine is so old, it's doing them one at a time, instead of simultaneously. If the program is not running, VASSAL waits a long time for each image before giving up and trying the next one - if you leave it long enough, VASSAL will eventually come back, with lots of broken images :)
 

peterd1973

Member
Joined
Oct 14, 2017
Messages
54
Reaction score
8
Country
llUnited States
So, if you ever host it online, then no one needs a program, because the HTML would connect to your website?
 

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
So, if you ever host it online, then no one needs a program, because the HTML would connect to your website?
Yes and no :)

If I do put the program online, features such as automatically updating VASL scenarios won't be there - it would be pointlessly expensive to have a server big enough to run (possibly multiple instances of) VASSAL. There are also other features coming that can't be put on a public online server, and so you will need to run the program locally on your PC to use them.

Even if I don't put the entire program online, I'm considering possibly just putting the VASL counter images and flags online (which would fix the immediate problem your friend just had), but even then you will need an internet connection. I usually play solitaire, and I often don't have an internet connection - I spend a lot of time in developing and third-world countries, and I'm always mindful that not everyone has Western-style connectivity, if they have it at all.
 
Last edited:

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Love this tool. Hopefully the BFP vehicles will be in the next release. (I just started a project playing ALL the Blood and Jungle scenarios. The first one has a bunch of FT-17 variants not in the program)
OK, so I've started adding support for extensions, and KGS is in, but I've hit a bit of a snag with the BFP one. I don't have B+J, so I don't have the information I need to add it to the program. Send me a PM if you, or anyone else who has it, is interested in doing a bit of work to help out with this new feature.
 
Last edited:

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Another year, another release :), version 0.7 has been released here.

The main new feature is pretty cool (but you're going to hate me for it): the ability to include Chapter H notes in your scenarios. Based on the vehicles/ordnance you enter as each players' OB, the program will figure out what multi-applicable notes are relevant and create a snippet for them, and also one snippet for each vehicle/ordnance's Chapter H note.

hill621.png

Also, if you Shift-click on the "Snippet" button, an image of the snippet will be added to the clipboard (if you're running the desktop app), instead of the raw HTML. These can be pasted into a word processor, to produce a single-page cheat sheet with all the Chapter H notes relevant to that scenario. Very handy, even if you're playing a FtF game.

Now for the bad news. Because the Chapter H content is copyrighted material, it's not included in releases, and you will have to set it up yourself. The process is described here; there is a ZIP file that contains all the necessary files, in the correct directory structure, but the files are all empty. For the multi-applicable notes, you add in HTML for the each note, for the vehicle/ordnance notes themselves, you replace the placeholder files with a cropped scan of the appropriate Chapter H page.

So, yes, it's a bit of a job, but you don't have to do them all at once, you can add content as needed for each scenario. And it didn't take that long to do; as a guide, it took me about 3 hours to do all the British and American vehicles and ordnance, which are, by far, the biggest sections in Chapter H. Compare that to how much time people spend clipping counters, and it doesn't seem so bad... :)

I should also point out that this feature works the same as the VASL counter images, and national flags - VASSAL gets them from the program when it loads the scenario, so the program needs to be running when you open VASSAL, and if you share the scenario with someone, they will also need to have the program running, with the data also set up (IOW, the images are not embedded in the .vsav file).

Another new feature (that will work out of the box) is the ability to include your own images in scenarios. You can add the graphic from the scenario card, a scan of a CG reinforcement chart, the wife and kids, anything goes.

user-file.png

Finally, support for VASL extensions has been added. Currently, only KGS is recognized, but more will be coming.
 
Last edited:

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Somebody's asked me for some help setting up the Chapter H data files, so here's a more detailed guide on how to do it on Windows 8.

download.png Download the ZIP file that contains the placeholder files from here.

extract1.png Right-click on the file and choose "Extract all".

extract2.png Tell Windows where to put the extracted files.

server-settings.png Tell vasl-templates where you unpacked the files (the Server Settings dialog can be opened from the File menu, in the top-left corner).

open-with.png Go to where you unpacked the ZIP file, find a.html, right-click on it and choose "Open with... Notepad"

notepad.png Enter the Multi-Applicable note. This is HTML, so you can enter things like <p> to start a new paragraph. If you have scanned and OCR'ed your ASLRB, you can copy the text from there. Save the file, and close Notepad.

A ready-to-go file for German Vehicle Note #74 is provided in the help page, that you can just download and save on top of the placeholder file, but to do the rest, you will need to take your scanned ASLRB pages and crop them.

cropping1.png To crop images, open a scanned page in MS Paint, and make sure Rectangular selection is enabled.

cropping2.png Hold down the left mouse button and drag around the area you want to crop. You will see a dotted rectangle highlighting this area. Click on the Crop button, and save the cropped image. Be careful you don't accidentally overwrite the original file! I usually make a copy of the file first and work with that, just in case.
 
Last edited:

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Any fonts to install on Windows 10 (or linux)? I get some garbled characters using the 0.5 vehicle notes. Like the daggers being question marks or strange diamond shaped chars.
 

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Any fonts to install on Windows 10 (or linux)? I get some garbled characters using the 0.5 vehicle notes. Like the daggers being question marks or strange diamond shaped chars.
You mean when you're trying to set up the Chapter H data? I don't quite get what you mean by "0.5 vehicle notes" - this feature was introduced in 0.7.

I'm guessing you've copied the multi-applicable notes over from an OCR'ed scan, or HTML version...? The files need to be saved as UTF-8 - if you're using Notepad, do a File, Save as, then in the Encoding droplist, choose UTF-8. For Notepad++, go to the Encoding menu and choose Encode in UTF-8 without BOM. Other editors should have some similar option.

If that doesn't work, post the file here, or PM it to me, and I'll take a look.
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Ahh, I can change the encoding via vim or bash. Thanks. Pretty sure this applies in the old style 0.5 vehicular snippets, but I will double check and post again if so.
 

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Pretty sure this applies in the old style 0.5 vehicular snippets
You mean you're creating an HTML snippet, transferring it to VASSAL, and it's not displaying correctly there? This has nothing to do with setting up the Chapter H data?

This should only happen if you've created your own templates (since the default ones are all UTF-8 - see $/data/default-template-pack/), or you've edited the HTML snippet after it's been generated, and your editor has changed the encoding (the default templates don't have a BOM). But if you're using vim, I imagine you know what encodings are, and how to deal with them :)

EDIT: The templates are actually just ASCII, but the placeholder content is inserted as UTF-8, and the templates have a <meta> tag that declare themselves as UTF-8 (although IIRC, it's not really necessary, VASSAL seemed to interpret these things as UTF-8 by default).

At the end of the day, the snippets are just HTML, so if you can't fix the encoding, you could use &dagger; for a dagger, etc. and transfer them as plain old ASCII :)
 
Last edited:

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Thanks for the guidance. Looks to be working now for some reason. Perhaps I need new glasses. :)
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Ahh, here is where I get it. Not from going into VASL per say, but when copying the image of the (old) style vehicle notes into an image (png) snippet and pasting that into something like LibreOffice Writer. The diamonds with ? inside them for example on the Russian T-34/85

russian.vehicles.png
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Making images of Chapter H seems like too much heavy lifting for me, but the multi-applicable vehicle notes seems worthwhile. Did most of the major nationalities now.
 

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Not from going into VASL per say, but when copying the image of the (old) style vehicle notes into an image (png) snippet and pasting that into something like LibreOffice Writer.
Sigh... This shouldn't be happening. You're pasting an image, so there's obviously no encoding issues there. These images are created by spinning up an instance of Firefox or Chrome (depending on which webdriver you've configured), loading the HTML snippet into it, then taking a screenshot of the rendered HTML. So, it looks like the Firefox/Chrome instance I'm launching is interpreting the HTML using the wrong encoding, which shouldn't be happening, since every template has a <meta> tag, declaring UTF-8.

Could you please try this: generate an HTML snippet for the example you're seeing the problem with, save it in a temp file, then open that temp file in Firefox (if you're using geckodriver) or Chrome (if you're using chromedriver). Do you still see the same problem? Check what encoding the browser is using; if it's not UTF-8, does changing it to UTF-8 fix the problem (although IIRC, Firefox calls it "Unicode" :-/). Does the problem go away if you use the other webdriver?
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Chrome styled webdriver for what it is worth and using Windows 10. Will follow your directions and re-post.

.html file copied below (as .txt to allow uploading here) and what the text file looks like in my broswers left to right (vivaldi, chrome, ie, edge). Edge seems to have trouble with the image, but they all show the text just fine.


Browsers.png
 

Attachments

Last edited:

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,203
Reaction score
347
Location
Singapore
Country
llUnited States
Looks great now. Thanks much! For others, you can paste directly into the text here once you have the image copied to your clipboard.

1546595775174.png
 

Pacman Ghost

Member
Joined
Feb 25, 2017
Messages
115
Reaction score
71
Location
A maze of twisty little passages, all alike
Country
llAustralia
Version v0.7a has been released here.

This contains a fix for the issue Will Fleming reported above, where snippet images could sometimes contain garbled characters. If you don't use this feature, there's no need to upgrade from v0.7.

Thanks to Will for his help figuring this one out.
 
Top