New program to help set up VASL scenarios

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia

Magpie

Member
Joined
Feb 20, 2019
Messages
252
Reaction score
74
Country
llAustralia
01111000111111001110010110011001101011100
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
01111000111111001110010110011001101011100
Huh? That doesn't mean anything.

And yes, I checked. I once got sent on a course for analyzing memory dumps after a mainframe crash, and sent a postcard to the boys back in the office, encoded as a binary memory dump, with a real message embedded in there ?
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Version v0.9 has been released here.

No big-ticket feature in this release, instead, a bunch of smaller improvements:
  • Chapter H vehicle/ordnance notes can now be inserted as HTML, not just as a scanned image. If you thought cropping all your Chapter H notes sounded like a lot of work, converting them to HTML is absolutely insane, but the results are significantly better, and since it wasn't that much effort to update the code to handle it, I added it in. If you've already set things up using scanned images, they will continue to work as is.
  • Vehicle/ordnance snippets now adapt their layout to their content, so e.g. things with really long names, or lots of capabilities will, hopefully, not produce odd-looking snippets. The template is now quite complicated, so if you see something that hasn't been laid out nicely, let me know and I'll take a look.
  • You can now choose to exclude unavailable vehicle/ordnance multi-applicable notes. Things like "De = Denmark" are not particularly useful, but even if you didn't set up HTML files for these, they would still appear in the snippets as "De: unavailable". Turning this new option on will exclude such missing multi-applicable notes completely.
  • There is a new template containing information about Tank-Hunter Heroes (yep, I'm finally getting stuck into PTO).
  • Custom list bullets can now be used, which are somewhat less butt-ugly than the default one VASSAL uses.
  • Added the Free French nationality (Lend-Lease vehicles), and also updated the Lend-Lease vehicles for the Russians.
  • Also added the Canadians and Kiwis (both use the British vehicles/ordnance).
Check out the release notes for the full list of changes.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Looking for some guinea pigs beta testers to give the latest new feature a spin. You need to:
  • be running v0.9 (the latest version, released a few days ago)
  • be using this program to create VASL scenarios, that you would like to use to play with someone who doesn't have the program.
The new feature lets you create scenarios that don't require the vasl-templates program to be running when you open the scenario in VASSAL (all the images are downloaded from the internet, instead of this program).

Send me a PM if you're interested.
 
Last edited:

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Thanks for these. There's something not quite right here. There are 3 types of images:
  • vehicle/ordnance counter images (missing in your screenshots)
  • player flags (also missing)
  • custom list bullets e.g. in the SSR's (present in your screenshots).
For example, this is what you should be seeing:
8457

It's weird because if the images were 404'ing or timing out, you should get a "broken image" icon, but you've got nothing at all. Could you try loading these URL's in a browser:
Or try copying the HTML out of, say, the ELR/SAN label, into an HTML file on your computer, then opening that file in a browser.

Also, try restarting VASSAL and loading the scenarios again. VASSAL seems to cache things quite aggressively, and if something fails to load, it won't retry later and it stays unavailable until you restart.

TBH, looking closely at your screenshots, it looks like the scenarios you opened were generated with the "include player flags" and "include vehicle/ordnance counter images" options turned off, but "use custom list bullets" turned on. But I only sent you .vsav files, I've just checked those files, and they were generated with the correct options, so I can't see how that could've happened.
 
Last edited:

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,410
Reaction score
424
Location
Adrift on the Pequod
Country
llUnited States
Running laptop with Win10 and Java 1.8u211, VASL 6.4.4 and the latest VASSAL. My additionall comments are marked -->

It's weird because if the images were 404'ing or timing out, you should get a "broken image" icon, but you've got nothing at all. Could you try loading these URL's in a browser:
--> This works fine.
8480
-->This is fine also.
8481

Or try copying the HTML out of, say, the ELR/SAN label, into an HTML file on your computer, then opening that file in a browser.

-->Copied this section to a file. (this image is from today, 2 May)

8482

--> loading the file in my browser was fine. (Vivaldi)

8483
Also, try restarting VASSAL and loading the scenarios again. VASSAL seems to cache things quite aggressively, and if something fails to load, it won't retry later and it stays unavailable until you restart.

TBH, looking closely at your screenshots, it looks like the scenarios you opened were generated with the "include player flags" and "include vehicle/ordnance counter images" options turned off, but "use custom list bullets" turned on. But I only sent you .vsav files, I've just checked those files, and they were generated with the correct options, so I can't see how that could've happened.

--> I just loaded them right after downloading.
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,410
Reaction score
424
Location
Adrift on the Pequod
Country
llUnited States
Here are my settings and version (0.9). I don't think it matters and I have tried loading the .vsav file (FRF51) with both vasl-templates running and also without it running. Same results visually.

84848485
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Here are my settings and version (0.9). I don't think it matters and I have tried loading the .vsav file (FRF51) with both vasl-templates running and also without it running. Same results visually.
Yes, that's right, it shouldn't make a difference. Those settings only apply when creating scenarios, not opening them in VASSAL.

I'm baffled as to what this could be. Perhaps your VASSAL is having trouble with SSL (although that doesn't explain why you're not seeing the player flags; those and the custom list bullets are served over HTTP). Try creating a label in VASSAL with this content (nb: the image is served over HTTPS):
Code:
<html> <img src="https://raw.githubusercontent.com/vasl-developers/vasl/develop/dist/images/ge/veh/pzviel.gif">
And this (nb: the image is served over HTTP):
Code:
<html> <img src="http://vasl-templates.org/services/counter/adf/ja/veh/M3a.gif">
Another possibility is that VASSAL is still trying to download the images, and is being incredibly slow about it, which would explain why you're not getting any "broken image" icons. My experience is that VASSAL hangs until everything's ready, and then the window renders everything, but I'm on W8, so it's possible that the behaviour is different on W10.

Or there's some funky firewall/proxy/anti-virus stuff going on that's allowing access from your browser (i.e. a white-listed application) but not VASSAL, although this is getting deep into clutching-at-straws territory :-/

TBH, I think the best thing to do would be for you to have a play with the beta build yourself, and try creating some labels of your own, and see how they go. You can examine the snippet HTML, see where the images are being loaded from, and we'll take it from there.
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,410
Reaction score
424
Location
Adrift on the Pequod
Country
llUnited States
Not sure why, but it appears my version needs both a width="xxx" and a height="yyy" value. height="yyy" did not work alone, nor does style="height: 100px;". I get a tiny black dot otherwise.

I played around with some combinations and using style="width: xxx; height: yyy;" "style" settings did not appear to work, but I am guessing whatever VASSAL uses to render html was long before "style" (or css)?

Seems this is the magic for me:

<html> <img width="100" height="100" src="https://raw.githubusercontent.com/vasl-developers/vasl/develop/dist/images/ge/veh/pzviel.gif">

8491



Here is what I get from both without the width/height settings. I have a dirty screen, but those are tiny black dots, which I assume are the images rendered 1px x 1px or something like that.

8492
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
I am guessing whatever VASSAL uses to render html was long before "style" (or css)?
It recognizes some CSS but yes, the HTML engine is archaic. It's been incredibly frustrating writing the templates, since not only do I have to write them using 90's-style HTML, they also have to work in a modern browser, for when the generated HTML gets sent to a webdriver.

But that explains why you're seeing the custom list bullets (these are done via CSS) but not the player flags nor counter images (<img> tag).

Seems this is the magic for me:

<html> <img width="100" height="100" src="https://raw.githubusercontent.com/vasl-developers/vasl/develop/dist/images/ge/veh/pzviel.gif">
But the following works (with vasl-templates running)?
Code:
<html> <img src="http://localhost:5010/counter/2600/front">
I have a dirty screen, but those are tiny black dots
That's nothing compared to my screen :)

OK, final test to prove everything:
  • run the beta build, add a couple of vehicles to the German OB, generate an OB snippet and put it in a label in VASSAL. You should see the table of capabilities, but no images.
  • in the $/data/default-template-pack/ob_vo.image.include file, add the height/width attributes e.g.
    Code:
    {%if vo.image%} <img src="{{vo.image}}" height=60 width=60> {%endif%}
                                            ==================
  • restart vasl-templates, create another OB snippet, you should now see images...?
 
Last edited:

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,410
Reaction score
424
Location
Adrift on the Pequod
Country
llUnited States
I think this confirms it. Looking at the VASL "labels" left to right, it is local server (5010) without the height/width properties, then local server with the properties entered.

3rd image is running the 0.10 without the config (.include) file settings, the 4th one is with the edit you specified.

Final image is my .include file after editing (addition only applies to the 4th/Russian 'label').

8496

8497
 

Will Fleming

Senior Member
Joined
Apr 22, 2003
Messages
4,410
Reaction score
424
Location
Adrift on the Pequod
Country
llUnited States
Note: I am running both VASSAL/VASL and the templates file from a shared Dropbox folder. I don't see how that would affect things, but it keeps both my laptop and desktop updated when I make changes.

Both Windows 10 boxes, both with Java1.8u211 from Oracle, VASSAL 3.2.17, VASL 6.4.4.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Thanks for doing all this :)

Note: I am running both VASSAL/VASL and the templates file from a shared Dropbox folder.
The fact that even localhost images are not working as well makes me very suspicious. In the 6 or so months this feature has been available, it's unlikely that no-one has reported that the "Include VASL counter images in snippets" setting doesn't work. Come to think of it, flags wouldn't work either, and I know this has been working for at least one person.

So, I think there's something weird happening on your machine, and the fact that you're seeing the problem with manually-created labels suggests that, if it is Dropbox-related, it's because of VASSAL/VASL, not vasl-templates.

I'm a bit reluctant to add a fix for this, since it complicates things horribly - the front-end would have to download every single image it includes in a snippet, so that it knows how big each one is - so I'd like to see someone else having the same problem first.

For anyone else reading this thread, this issue is not only confined to the beta release - if you are running any version of this program, are you having trouble getting player flags or vehicle/ordnance counters to appear in your scenarios?
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
BTW, what was the exact HTML you used for the 2nd image?

If I do this:
Code:
<html> <img width="100" height="100" src="https://raw.githubusercontent.com/vasl-developers/vasl/develop/dist/images/ge/veh/pzviel.gif"> AAA BBB CCC
I get this:
8499
And if I do this:
Code:
<html> AAA BBB CCC <img width="100" height="100" src="https://raw.githubusercontent.com/vasl-developers/vasl/develop/dist/images/ge/veh/pzviel.gif">
I get this:
8500
So, the fact that you've got the image floating over the top of the text indicates that you're running a quite different layout engine to me (so maybe it isn't Dropbox, after all :-/).

I'm using OpenJDK 1.8.0.191 on Fedora, but I get the same layout on Windows, using jPortable 8u111.
 
Last edited:

Yarlis

Member
Joined
Dec 19, 2003
Messages
124
Reaction score
18
Location
Spain
Country
llSpain
Same problem here with counter images and flags. Running W10, Java1.8.211, VASSAL 3.2.17 and VASL 6.4.4.
 
Top