New program to help set up VASL scenarios

svennwpg

Recruit
Joined
Jan 23, 2021
Messages
9
Reaction score
1
Country
llCanada
If you want to get these custom images from online, then you don't have to worry about any of this (it's only an issue if you want to show images stored on your PC).

Just include:
Code:
<img src="http://www.website.ca/asl/imagefiles/...etc...">
in your label (i.e. a normal HTML image), and VASSAL will get the image from there.
Works perfectly! Awesome!
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
433
Reaction score
25
Location
EST
Country
llUnited States
The chapter-h-placeholders.zip file is missing a placeholder note D in the Allied Minors ordnance folder. I added it manually and the program found the note when creating the snippet, so it just needs to be added to the zip file.

16654
 

R.Beef

Member
Joined
Sep 21, 2007
Messages
82
Reaction score
13
Location
In a Grass 10Hut
Country
llUnited States
Aloha - this is some sick stuff - thanks!

Question (v1.4) to share the image snippets w/ other online players (settings = get images from internet)

Do they need to have my chap h file struture/images too and be also running the vasl-temmplate program? If yes, do they need to configure file settings?

Thanks again!
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
471
Reaction score
254
Location
A maze of twisty little passages, all alike
Country
llAustralia
Question (v1.4) to share the image snippets w/ other online players (settings = get images from internet)
Actually, no. "Get images from the internet" refers to the images used by vasl-templates itself e.g. the player flags, the vehicle/ordnance counter images.

Do they need to have my chap h file struture/images too and be also running the vasl-temmplate program? If yes, do they need to configure file settings?
These user-defined images have to be managed by the user, so "yes" to both.
 
Last edited:

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
471
Reaction score
254
Location
A maze of twisty little passages, all alike
Country
llAustralia
I struggled with why it wasn't working until I realized that the late-90's vintage HTML engine probably couldn't handle spaces in file names.
Wow, that really sucks :oops: Percent-encoding the space doesn't help, and it's not a HTTP/HTTPS thing, I simply couldn't get an image to load if it had a space in the path. Oddly, it works for a local file:// URL.

Kids today laugh at me when I don't use spaces in filenames. This is why :cautious:
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
433
Reaction score
25
Location
EST
Country
llUnited States
Thanks for reporting this. The ZIP file is generated programatically, so if this file is not there, that means that the note is not used by anything :) But I'll add it in manually...
The program does actually use it as can been seen from the screenshot below.
16657
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
433
Reaction score
25
Location
EST
Country
llUnited States
I finally got everything to work and created a scenario for DN01 Prelude: Chabrehez as a simple test. Making the Chapter H notes and pictures is a breeze with the new eASLRB. Thanks for making and maintaining this.

Final results are shown below.

16662
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
433
Reaction score
25
Location
EST
Country
llUnited States
Any chance of posting that in the Resources area?
There are a couple of challenges to posting the VASL scenario online.
  1. All the information from the scenario card is in the file, bringing up possible copyright issues with posting it "as is".
  2. The Turn Track and Scenario Picture are from scans of the scenario card and are stored locally on my computer. I would need to find a place to post the pictures on the net to get them to work or leave them off the file.
  3. The Chapter H pictures are also stored locally on my computer. If somebody has them stored on their own computer it would work, but the sizing would almost certainly be different.
  4. The Chapter H notes are also stored locally on my computer. They would only populate if someone also had those notes on their computer as well.
I would like to share the file with the community, but I just don't see how it would work.
 
Last edited:

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
471
Reaction score
254
Location
A maze of twisty little passages, all alike
Country
llAustralia
The ASL Scenario Archive is the place to upload these, and vasl-templates has a feature that does it all for you (check the help). It uploads the VASSAL .vsav file, the vasl-templates configuation, and also automatically generates a screenshot of the VASL setup.

For example: Grabbing Gavutu (look in the User Files tab near the bottom).

All the information from the scenario card is in the file, bringing up possible copyright issues with posting it "as is".
vasl-templates will remove the VC and SSR before uploading.

The Turn Track and Scenario Picture are from scans of the scenario card and are stored locally on my computer. I would need to find a place to post the pictures on the net to get them to work or leave them off the file.
The ASL Scenario Archive lets you upload arbitrary image files associated with a scenario, so you could put them there.

The Chapter H pictures are also stored locally on my computer. If somebody has them stored on their own computer it would work, but the sizing would almost certainly be different.

The Chapter H notes are also stored locally on my computer. They would only populate if someone also had those notes on their computer as well.
There are also automatically removed.

Once uploaded, these files will be presented to users when they search for the scenario in vasl-templates e.g. try searching for Grabbing Gavutu.

Just make sure that vasl-templates is configured to get images from the internet (otherwise if people download the .vsav file, the labels will try to connect to a locally-running copy of vasl-templates). I kept forgetting to do this, which is why I added the "Confirm settings before updating scenarios" setting, which forces you to check the settings before updating a VASSAL scenario file.
 
Last edited:

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
433
Reaction score
25
Location
EST
Country
llUnited States
The ASL Scenario Archive is the place to upload these, and vasl-templates has a feature that does it all for you (check the help). It uploads the VASSAL .vsav file, the vasl-templates configuation, and also automatically generates a screenshot of the VASL setup.

For example: Grabbing Gavutu (look in the User Files tab near the bottom).


vasl-templates will remove the VC and SSR before uploading.


The ASL Scenario Archive lets you upload arbitrary image files associated with a scenario, so you could put them there.


There are also automatically removed.

Once uploaded, these files will be presented to users when they search for the scenario in vasl-templates e.g. try searching for Grabbing Gavutu.

Just make sure that vasl-templates is configured to get images from the internet (otherwise if people download the .vsav file, the labels will try to connect to a locally-running copy of vasl-templates). I kept forgetting to do this, which is why I added the "Confirm settings before updating scenarios" setting, which forces you to check the settings before updating a VASSAL scenario file.
Thanks for the information Pacman Ghost. I will try setting that when I have the time.
 

BigAl737

Elder Member
Joined
Apr 5, 2011
Messages
1,369
Reaction score
1,075
Location
AK
Country
llUnited States
I’ve always wondered if you could zip the scenario graphics into the scenario.vsav file. Then players can download the scenario, unzip out the graphics, save them on their local system, then tweak the scenario code to point to the new location of the graphics.

I haven’t used this program yet so I’ve no idea how hard it would be to tweak the vsav file to call up the locally stored graphics.

No idea if that’s feasible but you’d always have the graphics readily available.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
471
Reaction score
254
Location
A maze of twisty little passages, all alike
Country
llAustralia
I’ve always wondered if you could zip the scenario graphics into the scenario.vsav file.
I did think about this in the early days, but it's tricky. The vsav is just a ZIP file, so it'd be easy to embed other stuff in there - you wouldn't even need to extract it, just read the ZIP'ed data directly into memory - but there would need to be changes made to VASSAL to support this e.g. it has to open up a server socket to handle requests, and it would need to know to preserve stuff it doesn't understand when it saves a scenario.

I’ve no idea how hard it would be to tweak the vsav file to call up the locally stored graphics.
The program just generates a bunch of HTML labels. Images are of the form <img src="http://localhost:5010/...">, and vasl-templates is listening on this port for such requests, or they reference a Github URL if vasl-templates is configured to get images from the internet. So, we just need to modify those URL's to point to, say, http://localhost:9999, and then have VASSAL listen on that port.

Edit: Ah, I think you're saying unpack the ZIP files to a temp directory, then change the <img> tags to use a file:// URL pointing at them? That's messy as well, just in a different way :)
 
Last edited:

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
12,311
Reaction score
6,502
Location
Kraut Corner
Country
llGibraltar
I’ve always wondered if you could zip the scenario graphics into the scenario.vsav file. Then players can download the scenario, unzip out the graphics, save them on their local system, then tweak the scenario code to point to the new location of the graphics.

I haven’t used this program yet so I’ve no idea how hard it would be to tweak the vsav file to call up the locally stored graphics.

No idea if that’s feasible but you’d always have the graphics readily available.
I love the idea and wondered the same.

von Marwitz
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
471
Reaction score
254
Location
A maze of twisty little passages, all alike
Country
llAustralia
I love the idea and wondered the same.
This is all VASSAL stuff, so you'd need to convince those guys to do the work e.g. have a pseudo-protocol vassal:// which lets you write things like <img src="vassal://flags/german.png">, which means show the image file flags/german.png in the .vsav ZIP file, which would be kinda nice.
 

BigAl737

Elder Member
Joined
Apr 5, 2011
Messages
1,369
Reaction score
1,075
Location
AK
Country
llUnited States
Since folks are really enjoying your program to create these beautifully crafted scenario set ups, maybe bundling the graphics with the vsav file would be a stop gap to preserve them. It’s messy as you say but maybe someday the coding will be expanded and everything will already be in one place.

I really need to give your program a go...just too much other VASL stuff on my plate. Someday I will and maybe even someday, I’ll actually play again 😀
 
Top