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
and then copy and paste the sections from the electronic ASLRB, that have I open in my web browser, MS edge
PDF's are notorious for having hidden non-printable characters and encoding issues, so you might be ending up with non-ASCII characters in your files.

It might also be an encoding issue. vasl-templates uses UTF-8 for everything, and Notepad is as dumb as they come, so it won't be handling any encoding issues even close to properly, and you'll end up with garbage in your files. It shouldn't crash VASSAL, but it might...

If you're so inclined, you could try checking if any of your files have binary characters in them. If you can program a bit, it'd be easy to write a quick script that checked all your files to see if they're valid UTF-8.
 

Paul_RS

Elder Member
Joined
Feb 14, 2010
Messages
1,723
Reaction score
765
Location
Gammonopolis
Country
llUnited Kingdom
PDF's are notorious for having hidden non-printable characters and encoding issues, so you might be ending up with non-ASCII characters in your files.

It might also be an encoding issue. vasl-templates uses UTF-8 for everything, and Notepad is as dumb as they come, so it won't be handling any encoding issues even close to properly, and you'll end up with garbage in your files. It shouldn't crash VASSAL, but it might...

If you're so inclined, you could try checking if any of your files have binary characters in them. If you can program a bit, it'd be easy to write a quick script that checked all your files to see if they're valid UTF-8.
My only programming experience was using Turbo Pascal, many, many years ago. Absolutely no idea how to program nowadays, but for now VASL Templates seems to be working just fine.
Cheers

Paul
 

Doug Leslie

Elder Member
Joined
Dec 6, 2017
Messages
1,629
Reaction score
1,569
Location
Scotland
Country
llUnited Kingdom
The next beta in the v1.9 release cycle is now available. If you're on Windows, get it here. If you're running it in Docker, or from source, there is a new branch on Github.

If you are running from source, you will need to rebuild your virtualenv.

New features

  • Updated the flags for the Allied/Axis Minor nationalities.
  • Added a nationality for Partisans.
  • The UI controls are now completely hidden if a nationality has no vehicles and/or ordnance.
  • Analyzing a VASL scenario now reports the version of VASSAL and VASL it is using.
  • Minor tweaks to the templates.
  • Images in snippets and custom list bullets are now turned on by default.
  • Made a new VO_NOTE_IMAGE_URL_PATH parameter available to templates.
  • Updated the Chapter H placeholders ZIP file.
Other minor changes and bug fixes

  • Updated dependencies.
  • Got the embedded browser in the desktop app going again on Fedora 35 (and probably other distros).
  • VASL versions can now be aliased (to allow data files to be shared).
  • Fixed an error that could happen if the configured VASL .vmod didn't load properly.
  • Added more logging to the VASSAL shim.
  • Stop the DOS box from showing when we launch the webdriver (this is now be done in the code, instead of having to change the Python source code).
  • Artifacts that are downloaded as part of building the Docker image (Java, Firefox, and geckodriver) can now have their URL's overridden.
  • Updated dependencies.
  • Different backend webdrivers are now used when running the test suite.
  • Tightened up how the test suite skips certain versions of VASL.
  • Logging to a file is now possible when running the test suite.
  • Minor tweaks to the help.
When I click the link for this, I am getting a message (using Norton) that this is a "known dangerous webpage". What gives?
 

hongkongwargamer

Forum Guru
Joined
Apr 4, 2013
Messages
7,192
Reaction score
5,581
Location
Lantern Waste
Country
llUnited Kingdom
( … and then the unknown person on a public forum goes “It’s okay, just disable your Norton and come in anyway …”)
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
The first beta of the v1.10 release cycle is now available here.

If you are running from source, there is a new branch on Github, and since the targeted version of Python has been updated to 3.10.4, you should update that, and all the dependencies.

They say that good developers copy, but the best ones steal, and so I show my nerd chops by shamelessly nicking Neal's idea for a turn track label, and adding the same to vasl-templates. It's fairly flexible, and let's you create things like this:
22097

Not a huge deal in the grand scheme of things, but pretty nice, and since it's a single label, there's no danger of accidentally picking up and dragging reinforcement flags and the like.

In the same spirit, there is also a new Extras template that generates a label contains a compass image indicating the direction of north (also in the screenshot), since that usually doesn't change during the course of a scenario...

Other minor changes:
  • Removed the option to create National Capabilities labels.
  • Fixed a resizing problem in the "Connect scenario to ROAR" dialog.
  • Tweaked the presentation of the "VASSAL shim error" dialog.
  • Return a spacer image as a flag for nationalities that don't have one (this fixes broken images for Partisans in scenario cards).
  • Added more padding to dialogs.
 
Reactions: MTL

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
If anyone has had success getting this up and running via Docker on a Mac, I'd love an assist.

So far I've been able to open the web-app, but I can't for the life of me get any vehicle / ordnance images to show up.
 

Paul_RS

Elder Member
Joined
Feb 14, 2010
Messages
1,723
Reaction score
765
Location
Gammonopolis
Country
llUnited Kingdom
If anyone has had success getting this up and running via Docker on a Mac, I'd love an assist.

So far I've been able to open the web-app, but I can't for the life of me get any vehicle / ordnance images to show up.
I'm not a Mac person, but assuming the interfaces are the same, drop-down menus etc..

When you open the templates program. Go to the menu icon on the top right corner of the victory conditions window. from the drop down menu go to settings. Go to the 'Get images from box' and select internet.
 

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
Thanks for the suggestion.

I have tried that, and I end up with the following:

22236

I've seen in this thread mention of a menu at the top left that can be used to set directories for use, but I do not have those options:

22237

If I try running the container with the directory as a flag:

./run-container.sh -- port 5010 -- vasl-vmod (path to vmod)

I get the same results

I've tried adjusting the site.cfg file, and it is clearly reading my entires, but whatever form of path I use, I get an iteration of the following errors:

22238

(note those paths are really just my most recent random attempts to find the files).

I'm sure it's something simple, but I've got just enough computer knowledge to get myself into trouble and not quite be able to fix it, lol!
 

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've seen in this thread mention of a menu at the top left that can be used to set directories for use, but I do not have those options:
This menu is only present in the desktop version of the program.

Go to the 'Get images from box' and select internet.
This controls how VASSAL gets images to show in the scenario when you are playing a game. Within the vasl-templates UI, images are always loaded from the .vmod file. As the error messages indicate, the program is not finding the file.

Docker containers don't have access to files and directories on your computer, so you have to explicitly allow access to them. Specify the location of everything via parameters to the run-container.sh script (the same way you are already doing with --vasl-vmod) and it will take care of everything. Run it with --help to get a list of available parameters.

site.cfg is used when running the program directly from the source code, where the code does have access to files on your computer. So, right now the program is reading your settings from site.cfg, but since it's running inside a container, it doesn't have access to the configured files/directories, and so it shows the error messages.
 

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
... Within the vasl-templates UI, images are always loaded from the .vmod file. As the error messages indicate, the program is not finding the file.

Docker containers don't have access to files and directories on your computer, so you have to explicitly allow access to them. Specify the location of everything via parameters to the run-container.sh script (the same way you are already doing with --vasl-vmod) and it will take care of everything...
Perhaps it's a path issue? I've tired ~/vasl/vasl-6.6.4.vmod, /Users/graystonulery/vasl/vasl-6.6.4.vmod, /System/Volumes/Data/Users/graystonulery/VASL/vasl-6.6.4.vmod, vasl-6.6.4.vmod, /vasl-6.6.4.vmod, and ./vasl-6.6.4.vmod as the parameter for --vasl-vmod and none have found the images.
 

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've tired ~/vasl/vasl-6.6.4.vmod, /Users/graystonulery/vasl/vasl-6.6.4.vmod, /System/Volumes/Data/Users/graystonulery/VASL/vasl-6.6.4.vmod, vasl-6.6.4.vmod, /vasl-6.6.4.vmod, and ./vasl-6.6.4.vmod as the parameter for --vasl-vmod and none have found the images.
The parameter is actually --vasl. The reason why the script is "working" when you use --vasl-vmod is that you've inadvertently put a space after the "--", and "--" means something else when running scripts.
 
Last edited:

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
I appreciate you troubleshooting with me!

This was my most recent command with the same results:

22240
 

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
Unfortunately, the refresh didn't help. I tried opening in Safari and Chrome, just to see if going to a different browser would make a difference, and Chrome showed the same broken image links.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Unfortunately, the refresh didn't help.
From another terminal, enter the following command:
Code:
docker exec -it vasl-templates /bin/bash
This will take you into the Docker container, and take a look at the log files in /tmp/ (in particular, vasl-templates.log), for clues as to what's going on. Note that a container like a separate computer, and gets its own file system, so /tmp/ inside the container is not the same as /tmp/ on the actual computer.
 
Last edited:

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
Running the run-container, opening a localhost page, attempting to add a vehicle (no image):

the vasl-templates.log is empty

22246

Nothing like a puzzle on a Saturday morning, lol!
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
On the real computer, edit the file vasl_templates/webapp/config/logging.yaml.example. Find the line that says vasl_mod:, and in the line after it, changed the logging level from WARNING to DEBUG.

Restart the container, refresh the page, go into the container and check /tmp/vasl-templates.log again. Check for any messages that indicate an error has occurred.

Try opening this URL in a browser:
Try using a different version of VASL.

Try configuring the VASL boards directory and VASSAL when you run the container.

If you have VASL extensions, or a folder containing them, in the same place as the .vmod file, try moving them somewhere else (they may be causing problems when vasl-templates is trying to load the VASL module).

While you're in the container, enter the following command:
Code:
ls -l /data/
You should see a vasl.vmod file. If it's there, enter this command:
Code:
od -cx /data/vasl.vmod | head
The first line should look something like this (the "P" and "K" are what's important):
Code:
0000000   P   K 003 004 024  \0  \b  \b  \b  \0   d   A 203   T  \0  \0
Enter the following command:
Code:
grep 2524 /tmp/vasl-templates.log
You should see a line of output that contains the phrase "Loaded piece".

Enter the following command:
Code:
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:5010/counter/2524/front
It should print out 200 (not 404 or 500).
 
Last edited:

Graystonw

Member
Joined
Aug 23, 2005
Messages
51
Reaction score
0
Location
Dawsonville, GA
First name
Gray
Country
llUnited States
I appreciate you taking the time to work with me on getting this figured out. I play mostly solitaire, so the idea of getting all the information onto the playing surface and not having to switch between so many resources is amazing! I can use all the functionality except for the counter images and it has been great.

After your last message I:
changed the debug flag in run-container.sh
moved extensions into a subfolder so it wasn't paired with the vmod
included the boards, extensions, and vassal flags
tried with both 6.6.4 and 6.6.3.1
tried all of the above in Safari, Firefox, and Chrome
Results have been the same. The vasl-templates.log continues to have 0 size. ls -l /data/ doesn't find a data folder at all. Trying to open the specific counter image in the browser yields the same broken image.

I currently have the vasl-templates files in the same directory as my vmod (so run-container.sh is in the same VASL folder as vasl-6.6.4.vmod). Should they be collected into a sub folder in my VASL folder instead? Or in a folder at the same level as my VASL folder?
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
changed the debug flag in run-container.sh
The change needs to be made to logging.yaml.example.

ls -l /data/ doesn't find a data folder at all.
This command (and the others following it) need to be run inside the container i.e. run the docker exec command I gave earlier.

If you are inside the container and there is no /data/ directory, that means that the VASL .vmod file is not being mapped into the container, which would explain why images are not working. There might be a Docker configuration setting or Mac security policy stopping it, or maybe a virus checker interfering with the process - I can't really help you with this. It might also be a bug in the run-container.sh script, so you'll have to investigate the docker run command it's generating.

So, it's important to know if there is a /data/ directory inside the container, and what's in it.

Should they be collected into a sub folder in my VASL folder instead? Or in a folder at the same level as my VASL folder?
It doesn't make any difference where you put the vasl-templates files, but it'd be best to keep them somewhere completely separate.

In the worst case, you can still use the program. Everything will still work [*], including counter images in your scenarios, they just won't be in the web interface when you're setting the scenarios up. Just make sure you have "Get images from the internet" configured in the Settings.

[*] Although if you can't map your VASSAL directory into the container either, then anything that needs that will also not work (e.g. automatically creating/updating labels in a scenario).
 
Last edited:
Top