New program to help set up VASL scenarios

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
Small bug report - in the German capabilities snippet, Massacre ability and Squad Assault Fire should really be intended beneath an "SS" heading, otherwise they look as if they're generic German abilities. The "Disrupt...vs Russians" bit should really be on a separate line and indented too.
Thanks. I'll include a fix for this in the next release.

If you want to fix it now, save this file on top of the existing one (in the data/default-template-pack/ directory):
 
Last edited:

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
68
Location
EST
Country
llUnited States
The snippets you posted work correctly for me. Did you create these labels manually? I'm thinking you maybe chose the bold labels from the palette (marked in red), which I think always bolds everything. I always use the non-bold version (marked in green).
View attachment 16926
I used the first label, that was the problem.

The bold tag doesn't work with either of the first two or the last two labels . The text is never bolded on the first two and it is always bolded on the last two, regardless of the bold tags.

It does work with the middle two labels.

Thanks for the help.
 
Last edited:

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
68
Location
EST
Country
llUnited States
For the Count Remaining of Panzerfausts and Tank Hunter Heroes snippets, there should be a way to generate a header stating what the numbers are. A button could be added on the Count Remaining tab to generate a snippet that says "Panzerfausts Remaining" and "Tank Hunter Heroes Remaining" that can be placed on a label above the numbers in VASL.

Below is the label I created for Panzerfausts Remaining.

<html>

<head>
<meta charset="utf-8">
<style>
body {


}

p { margin-top: 5px ; margin-bottom: 0 ; }

ul { margin: 0 ; padding: 0 0 0 10px ; }


td { margin: 0 ; padding: 0 ; }
td.c { text-align: center ; }
td.l { text-align: left ; }
td.r { text-align: right ; }

sup { font-size: 75% ; }
sub { vertical-align: sub ; font-size: 80% ; line-height: 0.5em ; }

.exc { font-style: italic ; color: #404040 ; }

</style>
</head>

<table>

<tr>
<td style="
background: #d3edfc ;
border-bottom: 1px solid #91cdf5 ;
padding: 2px 5px ;
font-weight: bold ;

">

Panzerfausts Remaining<br>
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Ctrl-L to modify

</table>

</html>
 
Last edited:

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
For the Count Remaining of Panzerfausts and Tank Hunter Heroes snippets, there should be a way to generate a header stating what the numbers are.
These labels are this way because I like to put them on top of a counter:
16931
The templates have been written in such a way that it's easy to change the value:
  • select the counter
  • press Ctrl-L
  • press right arrow
and the cursor will be where it needs to be.

But if you prefer it another way, that's OK, vasl-templates was designed to be extensible. Look in the data/default-template-pack/extras/ directory for examples, add your own file there, and it will appear in the Extras tab the next time you restart the program. There are some special comments you can add that will show up in the UI, but it's not essential.
 

RickF

Recruit
Joined
Jul 4, 2016
Messages
7
Reaction score
5
Location
Bainbridge Island
Country
llUnited States
I'm having some trouble getting the .exe file to run regardless of VASL mod or VASSAL version. Either the program fails to respond or, if I run it from a desktop shortcut, I get this error message:

16996

When I look at the config file, I see this:

16998

Anyone else having this issue? Any solutions?

Thanks!
 
Last edited:

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
Either the program fails to respond
What exactly is happening? Does the main window open but nothing shows, or do you not even get that? Note that the program can be quite slow to start.

Have you got something else running on port 5010? The program should show a proper error message in this case, but you could try changing this.

Also, look in C:\Users\YOUR-NAME\, and there should be a file called vasl-templates.log that should have more information.
 

RickF

Recruit
Joined
Jul 4, 2016
Messages
7
Reaction score
5
Location
Bainbridge Island
Country
llUnited States
From .log file:

Traceback (most recent call last):
File "vasl_templates\main.py", line 72, in main
File "vasl_templates\main.py", line 146, in _do_main
KeyError: 'FLASK_PORT_NO'

And when we say "quite slow to start" that's not like 15 minutes, right? I do get the program window, but nothing showing.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
And when we say "quite slow to start" that's not like 15 minutes, right?
No, maybe 10 seconds.

The error log suggests that it's not finding the config file. You just unpacked the ZIP and ran the EXE, right? You didn't do anything with the files, move them around or rename or edit them?

What version of Windows and vasl-templates?
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
I'm baffled as to what this could be.
  • try unpacking and running it from a different directory
  • try 1.5.beta1
  • try temporarily disabling your virus checker
  • try it on another machine
If you know how, md5sum the ZIP file you downloaded.

One more thing to try. Create a file somewhere that looks like this:
Code:
[Debug]
FLASK_PORT_NO = 5010
Then run the program like this:
Code:
vasl-templates.exe --debug ...
where ... is the full path to the file you created.
 
Last edited:

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
68
Location
EST
Country
llUnited States
The notes for the Poles have the Commonwealth color, but still have the bottom border in the allied minor color.
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
68
Location
EST
Country
llUnited States
I can't remember how I decided on the colors, but they are defined in nationalities.json, so you can have a play with them there if you want. What do you think they should be?
I figured the Polish colors should be the same as every other allied minor. The Polish colors are:

"polish": {​
"display_name": "Polish",​
"ob_colors": [ "#ecd8b0","#e8cfa4", "#84e8c2" ],​
"type": "allied-minor"​
},​

And all the other Allied Minor colors are (using the Belgians as an example):

"belgian": {​
"display_name": "Belgian",​
"ob_colors": [ "#a3ecd1","#82e3bd", "#61d8a6" ],​
"type": "allied-minor"​
},​

These colors are shown below:

17073

I fixed my nationalities.json to have the Polish colors match the rest of the Allied Minors.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
I figured the Polish colors should be the same as every other allied minor.
Aha! I remembered why I picked these colors: Poland In Flames has two-tone counters for the Polish:
17076

But that file is part of the template pack so that it can be customized (you can even add new nationalities to the program), so if you prefer it the standard Allied Minor colors, you can leave it the way it is (or create a new template pack).
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
68
Location
EST
Country
llUnited States
But that file is part of the template pack so that it can be customized (you can even add new nationalities to the program), so if you prefer it the standard Allied Minor colors, you can leave it the way it is (or create a new template pack).
I played around with making a custom template for the Waffen SS, with black backgrounds and white text to match the VASL Waffen SS counters, but couldn't figure out how to change the text color for the html snippets. It seems like the text color is pulled from common.css and that color (#404040) is used for all the text in the html snippets, so it isn't possible to have a separate font color for a nationality.

I also couldn't figure out where the program grabs the images for the symbols of each nationality in the Player boxes.

Any advice on how to make that work? (short of what I have been doing which is just editing the background and border-bottom colors plus adding a color parameter to the German html snippets)
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
It seems like the text color is pulled from common.css and that color (#404040) is used for all the text in the html snippets, so it isn't possible to have a separate font color for a nationality.
The colors in nationalities.json control only the borders and backgrounds, but snippets get passed the player nationality, so you could do something like this:
Code:
 color: {%if PLAYER_NAME == "Waffen SS" %} #000 {%else%} #404040 {%endif%} ;
BTW, the #404040 you referred to, I think you're looking at the .exc rule, which is for "[EXC: ...]" content. I don't think I explicitly set a text color anywhere, so it'll just default to black.

I also couldn't figure out where the program grabs the images for the symbols of each nationality in the Player boxes.
It gets a file based on the nationalitiy's ID (as defined in nationalities.json) from the flags/ directory (e.g. german.png). However, this only applies if you're running from source (or Docker), it's not available if you're running the Windows EXE. But, you can add a "flag" parameter to the nationality's entry in nationalities.json, that can be a file path or URL, and the program will use that instead.
 

Rocket-Man

Space is only 100Km up
Joined
Dec 6, 2006
Messages
473
Reaction score
68
Location
EST
Country
llUnited States
Thanks for the help Pacman Ghost.

The text color code worked and it generates the proper html snippet, but the Windows EXE still displays the text color as dark grey (#404040 I think) which makes it hard to read in the program. Not a deal breaker though.

There is no "flags/" directory that I can find, but the Windows EXE is still getting the images from somewhere to display in the player boxes and the player tabs. Are those images embedded in the exe?
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
594
Reaction score
300
Location
A maze of twisty little passages, all alike
Country
llAustralia
There is no "flags/" directory that I can find, but the Windows EXE is still getting the images from somewhere to display in the player boxes and the player tabs. Are those images embedded in the exe?
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.
 
Top