New program to help set up VASL scenarios

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
67
Location
EST
Country
llUnited States
vasl-templates.exe is a self-extracting EXE, and unpacks itself to somewhere like C:\Users\YOUR-NAME\AppData\Local\Temp\_MEI... and runs from there. You'll find the flag images inside there, but don't bother trying to put a new flag there, since the EXE will unpack itself to somewhere new the next time it runs.

Add a "flag" parameter to the nationalities.json file, pointing to a new flag image, and it should work.
Thank you for the information. I'm a Mechanical Engineer, not a Software Engineer, so I only know a little bit about all this.

After playing around some more though, I think adding a new nationality is beyond the scope of my limited expertise.

I started by just adding a new entry to the nationalities.json file, and the templet zip file with just the modified nationalities.json file loaded fine, but it somehow broke the ability to use the PF, ATMM and PSK note snippets (from the Player Nab, Notes section) for all the Axis countries (the fields for generating the PF, ATTM and PSK notes are still visible, but they are not selectable). Plus, I couldn't find a way to add the ability to generate a PF, ATTM and PSK note for the new nationality.

It's not a lot of work to just generate the html snippets for the Germans, copy those into an editor and change the border colors/add the text color, so I am just going to do that for the limited number of times I need to make a scenario with the SS.

Thanks for the help though Pacman Ghost.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
This is what you need to add a new nationalality:

17139

While you can change the text color in the labels, it turns out to be not that useful, since it doesn't affect the GUI, and the GUI doesn't really work with very dark background colors. So, you need to pick colors that will work with black text:
17140
You will need to copy the german.json file to waffen-ss.json in the data/vehicles/ and data/ordnance/ directories, if you want to be able to add vehicles/ordnance for the new nationality.

The final labels look OK-ish:
17141

The new nationality won't have PF or ATMM, that's handled in the code. If you find these buttons are greyed out, they're actually clickable, but they have the disabled look probably because they are not available for the given scenario date.
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
67
Location
EST
Country
llUnited States
I created a .zip file with only one file in it, a modified nationalities.json file, with the only change being that I added the Waffen SS entry at the beginning of the file as shown below:
17145
I loaded this .zip file using "Menu", "Load Template Pack" and got a message "The template pack was loaded". However, after this the buttons for PF, ATTM, PSK and BAZ that had previously worked in a saved scenario file no longer worked. They aren't just grayed out, they are completely un-selectable. Closing and restarting the program makes them selectable again. I tested the grayed out buttons with the program before I loaded a saved scenario or the template pack again and they were definitely selectable. After loading the template pack they were again completely un-selectable.

I was trying to get the program to make the labels like the ones shown in the screenshot below for the scenario Going to Church, but it seems like it isn't really possible within the limitations of the current program. But it's not a lot of work to just make German labels, copy them to a text editor and change the colors before pasting them into VASL for the few scenarios that use the SS, so I will continue to do that in the future.

Don't take that to mean I am knocking your program at all Pacman Ghost, the program is great as is. I was just trying to make it do something it wasn't designed to do. Typical of an engineer I guess ;).

17144
 
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
I created a .zip file with only one file in it, a modified nationalities.json file, with the only change being that I added the Waffen SS entry at the beginning of the file
Ah, that's your problem, right there :) The uploaded ZIP replaces the default template pack, which consists of all the files in the data/default-template-pack/ directory. Since your ZIP didn't have things like pf.j2 and atmm.j2, that's why the PF and ATMM buttons were disabled.

I was trying to get the program to make the labels like the ones shown in the screenshot below for the scenario Going to Church, but it seems like it isn't really possible within the limitations of the current program.
It's possible, it's just a bit inconvenient for dark backgrounds. I had a go last night at updating the GUI for dark backgrounds, which made me remember that I had already tried it, and why I didn't finish it - it's quite a lot of work, and more effort than it's worth (there are a lot of places where it's an issue, and increases the amount of code and configuration settings).

But I was mulling over how to integrate ASLInRealTime's new label generator thingie with vasl-templates, and it would be possible, but would require a bit of work on their end.

I was just trying to make it do something it wasn't designed to do. Typical of an engineer I guess ;).
It's the mark of a good engineer :) I've been hacking VASSAL to do things it was never designed to do, as well. I wasn't sure if it was going to work, but fortunately, it seems to have turned out OK...
 

Neal

Senior Member
Joined
Jan 29, 2020
Messages
446
Reaction score
921
Location
WA State, Land of Moss
Country
llUnited States
A problem I just noticed. For overall stats the 2 and 12 bars are not displaying for one or the other players. But if I move the cursor outsize the x-axis the tooltip will show up...like the bar is hidden, or outside the chart.

17246

If I turn off bar graphs the data points show up fine
17247
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
For overall stats the 2 and 12 bars are not displaying for one or the other players. But if I move the cursor outsize the x-axis the tooltip will show up...like the bar is hidden, or outside the chart.
This didn't used to happen before, so it's probably something introduced when I added the option to have line graphs. I'll take a look at it. Thanks.
 

svennwpg

Recruit
Joined
Jan 23, 2021
Messages
9
Reaction score
1
Country
llCanada
Good day! I have been using the templates with custom images from an online server. However, the .vsav files are taking 3 to 4 minutes for another people to load. My load only takes about 10 to 20 seconds to load. Is there an extension in VASL or something that speed up the load times?
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,358
Reaction score
10,207
Location
Kraut Corner
Country
llUkraine
Good day! I have been using the templates with custom images from an online server. However, the .vsav files are taking 3 to 4 minutes for another people to load. My load only takes about 10 to 20 seconds to load. Is there an extension in VASL or something that speed up the load times?
You can be pretty sure that it is the images. The more there are, the longer it takes. I have noticed that files created with the template program take quite long to load when I was observing games on the VASL server.

I do not believe that VASL extensions have an impact in this context. It is the number of images that have.

von Marwitz
 

svennwpg

Recruit
Joined
Jan 23, 2021
Messages
9
Reaction score
1
Country
llCanada
You can be pretty sure that it is the images. The more there are, the longer it takes. I have noticed that files created with the template program take quite long to load when I was observing games on the VASL server.

I do not believe that VASL extensions have an impact in this context. It is the number of images that have.

von Marwitz
There are 3 to 4 images only and some load times are very quick. The internet connection does seem to affect the load times either. Myself and a few others have 10 to 20 second load times and others are 3 to 4 minutes. The only common denominator so far has been VASL Overlay Extension, but I can't see how that should increase the load times.
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
67
Location
EST
Country
llUnited States
If the other player does not have the VASL Overlay program running when they load the VASL file, it will cause the load time to increase.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
However, the .vsav files are taking 3 to 4 minutes for another people to load. My load only takes about 10 to 20 seconds to load. Is there an extension in VASL or something that speed up the load times?
The HTML engine VASSAL uses is ancient, and when I looked at this before, it was downloading images one at a time (modern browsers will download mutiple images simultaneously). I travel a lot, and have seen the same thing your friends have - load times vary wildly, depending on the internet connection.

I can't imagine that VASL extensions would make a difference, but Rocket-Man raises a good point - if the scenario still has any images that are being loaded from the program (e.g. the player flags), and the program is not running, it will take a long time to load. What happens if you load the scenario with vasl-templates not running? Have you configured the program to "get images from the internet"?

Unfortunately, there's not much that can be done about this. You could try using http:// links for your custom images, instead of https://, so that VASSAL doesn't spend time setting up a secure connection (I do this for vasl-templates). Note that some web servers force http:// links to be https://, so try them in a browser and see if the URL changes, once the image has loaded.]
 

svennwpg

Recruit
Joined
Jan 23, 2021
Messages
9
Reaction score
1
Country
llCanada
The HTML engine VASSAL uses is ancient, and when I looked at this before, it was downloading images one at a time (modern browsers will download mutiple images simultaneously). I travel a lot, and have seen the same thing your friends have - load times vary wildly, depending on the internet connection.

I can't imagine that VASL extensions would make a difference, but Rocket-Man raises a good point - if the scenario still has any images that are being loaded from the program (e.g. the player flags), and the program is not running, it will take a long time to load. What happens if you load the scenario with vasl-templates not running? Have you configured the program to "get images from the internet"?

Unfortunately, there's not much that can be done about this. You could try using http:// links for your custom images, instead of https://, so that VASSAL doesn't spend time setting up a secure connection (I do this for vasl-templates). Note that some web servers force http:// links to be https://, so try them in a browser and see if the URL changes, once the image has loaded.]
Yeah you are correct! The files load much slower when I am not running the vasl-templates program. Thanks for the reply!
 

Pip Smith

Member
Joined
Mar 26, 2021
Messages
67
Reaction score
157
Location
Sydney
Country
llAustralia
Hey Pacman Ghost,

Firstly fantastic work. Looks like a real labour of love. Very appreciated by me.

Got an error coming up with when I try to analyze a log file.

Code:
Traceback (most recent call last):
  File "vasl_templates\webapp\lfa.py", line 70, in analyze_vlogs
  File "vasl_templates\webapp\lfa.py", line 96, in parse_analysis_report
  File "xml\etree\ElementTree.py", line 1196, in parse
  File "xml\etree\ElementTree.py", line 597, in parse
  File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Would that be something related to my setup. Log file recorded with the latest version of VAASL, VASL.

Thanks
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Code:
Traceback (most recent call last):
  File "vasl_templates\webapp\lfa.py", line 70, in analyze_vlogs
  File "vasl_templates\webapp\lfa.py", line 96, in parse_analysis_report
  File "xml\etree\ElementTree.py", line 1196, in parse
  File "xml\etree\ElementTree.py", line 597, in parse
  File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
vasl-templates runs VASSAL to do the analysis, and this error suggests that it didn't get anything back. How long did it take to run? Are you running a virus-checker? I've seen this kind of thing before - a helper program generates a file for another program to read, but the virus checker blocks access to it :-/

Log file recorded with the latest version of VAASL, VASL.
What are the exact versions of VASSAL and VASL are you using? nb: these are what's configured into vasl-templates, not what you're using to play games.
 

seblick

Member
Joined
Sep 18, 2016
Messages
31
Reaction score
16
Country
llUnited States
I seem to be unable to configure the proper VASSAL module in the program. I constantly get this: 17425 What am I doing wrong?
 

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 v1.5 of vasl-templates has been released here.

Changes since the last beta:
  • Fixed the SS-only stuff in the German National Capabilities template.
  • Changed how we auto-adjust the default moving average window size in the log file analysis report.
  • Added an optional caption to the "Count remaining" extras template.
  • A generic PLAYER_NAT parameter is now passed through to the templates.
  • Fixed a problem that was stopping custom flags from being shown from a local file.
  • Worked around a problem when switching between LFA graph types.
IMPORTANT: If you're running from source, you will need to rebuild your virtual environment. The officially-targeted version of Python is 3.8.7, but unofficially, 3.9.1 (the current version on Fedora) also appears to work. If you're running in Docker, the image will be rebuilt automatically.
 
Last edited:

seblick

Member
Joined
Sep 18, 2016
Messages
31
Reaction score
16
Country
llUnited States
What version of VASSAL and vasl-templates are you using? Have you ever had it working before?

Most likely explanation is that VASSAL doesn't work with the version of Java you have configured.
Thanks for the reply. Everything is good after I restarted my PC. Go figure...
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
67
Location
EST
Country
llUnited States
Running Version v1.5, I added an image for the Commonwealth OML 2-in. Mortar (british/ordnance/1.png), but when I use the OB Snippet button, it leaves off the html code for locating the image as shown below:

<tr>​
<td style="padding-top:2px;"> british/ordnance/1.png
</table>​
</html>​

I got it to work by changing it to:

<tr>​
<td style="padding-top:2px;"> <img src="http://localhost:5010/ordnance/british/note/1">
</table>​
</html>​
 
Top