Is it possible to insert an image on VASL?

Dave68124

Elder Member
Joined
May 9, 2005
Messages
905
Reaction score
181
Location
United States
Country
llUnited States
I was in the process of setting up a map and thought it would be helpful to copy the Special Rules from the pdf of the scenario card and put it in with the map rather than have to type it all again in the notes.

Thus, the question. Is there a way to insert an image on the map set up?

Thanks,
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,184
Location
Teutoburger Wald
Country
llIceland
Open the Overlays window and add a label. For an image from the internet, edit it to be:
<html> <img src="...URL..."> </html>​
or for an image on your PC:
<html> <img src="file:///...FILE-PATH..."> </html>​
If you use "file:" the image file has to be in exactly the same place on every machine that uses the game file. The format for a file on a PC is very different from the format on linux/mac, so using a local image in this way is highly non-portable.

JR
 

Dave68124

Elder Member
Joined
May 9, 2005
Messages
905
Reaction score
181
Location
United States
Country
llUnited States
Thanks. It worked out great. Saved the cut and paste from the Scenario card into a jpeg file, but it on the desktop and referenced as above. Handy to have the VC and Special rules on the map to keep from having to dig it out each time.

A future suggested add would be able to attach a pdf file or image file to VASL to make adding it a bit easier for the user.

Thanks again.
 

Attachments

clubby

Elder Member
Joined
Dec 27, 2015
Messages
2,241
Reaction score
534
Location
CA
Country
llUnited States
For sure. Just open scenario as a PDF and alt-tab to it if you need some info. Makes the entire card easily accessible, not just a portion.
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
12,980
Reaction score
7,694
Location
Kraut Corner
Country
llGibraltar
Thanks. It worked out great. Saved the cut and paste from the Scenario card into a jpeg file, but it on the desktop and referenced as above. Handy to have the VC and Special rules on the map to keep from having to dig it out each time.

A future suggested add would be able to attach a pdf file or image file to VASL to make adding it a bit easier for the user.

Thanks again.
Had you asked...

Illustration.jpg
Note that I have blotted out the VC/SSR beneath a small Editor window in this screenshot only for copyright purposes.

You can include VC/SSR to VASL files by using Labels in which you copy/paste simple HTML code adding VC/SSR infomation. The following is a template for the VC/SSR label without contents:

<html> <div style="width:300px;height:40px;overflow:auto;">
Victory Conditions<br/> <hr/>
Enter VC here.<br/>
<br/>

Special Scenario Rules<br/> <hr/>
<font size=3> &#10102; </font> Enter SSR1 here.<br/>
<br />

<font size=3> &#10103; </font> Enter SSR2 here..<br/>
<br />

<font size=3> &#10104; </font> Enter SSR3 here.<br/>
<br />

<font size=3> &#10105; </font> Enter SSR4 here.<br/>
<br />

<font size=3> &#10106; </font> Enter SSR5 here.<br/>
<br />
House Rules<br/> <hr/>
<font size=3> &#10102; </font> The IIFT with CTC is in effect. <br/>
<br />
<font size=3> &#10103; </font> An honor system is used instead of temporarily revealing concealed units for verification purposes.<br/>
<br/>
</div> </html>


To add pictures to VASL files, here is a template (using an external link to the picture used for the VASL file):

<HTML>
<TABLE WIDTH=400 BORDER=0 CELLPADDING=2 CELLSPACING=0>
<COL WIDTH=400>
<TR VALIGN=TOP>
<TD WIDTH=400>
<P>
<IMG SRC="https://www.ibiblio.org/hyperwar/USA/USA-CBI-Command/img/USA-CBI-Command-p246b.jpg" ALIGN=BOTTOM WIDTH=400 HEIGHT=300 BORDER=0>
</P>
</TD>
</TR>
</TABLE>
</HTML>


I use these templates storing them in text files. All you need to do to adapt the templates for VC/SSR/pictures is to change the content at the appropriate spaces.

von Marwitz
 

JAGgamer

Member
Joined
Aug 10, 2017
Messages
103
Reaction score
93
Location
Indiana
Country
llUnited States
When I set up scenarios, I like to put the VC and SSR alongside the map. Is there a faster way of adding text to the screen via labels? Presently I place a label, type a line, the create another label w/ the next line of text.
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,184
Location
Teutoburger Wald
Country
llIceland
When I set up scenarios, I like to put the VC and SSR alongside the map. Is there a faster way of adding text to the screen via labels? Presently I place a label, type a line, the create another label w/ the next line of text.
You can use html instead of straight text. Put just one label then fill one line with html:

Code:
<html><body><p>This is first para, this is first para, this is first para.</p><p>This is second para, this is second para, <br> this is second para.</p></body></html>
I show a couple paragraph tags (<p>) & a line break tag (<br>) for demo purposes. You have to manually control the line lengths with paragraphs and/or line breaks. Is this a huge amount faster? Probably not. But it does give you some flexibility as everything is in one piece of text, and if you need to change something, you only have to fiddle with that one piece of text. It may be easier to edit that single piece of code in a text editor and copy/paste it into a label. Note that html ignores line break characters, so if you want to put in a visible line break, you have to use an appropriate html tag .

JR
 

JAGgamer

Member
Joined
Aug 10, 2017
Messages
103
Reaction score
93
Location
Indiana
Country
llUnited States
Thank you for the help. I guess its time I learned a little coding!
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,184
Location
Teutoburger Wald
Country
llIceland
Thank you for the help. I guess its time I learned a little coding!
Html is more markup than code. With markup you use special character sequences (for example "<br>" for line break) to indicate that certain formatting things should happen at certain places. Another example is the "<i>italic in here</i>" combination for italics. One thing to watch is that the html version that the vasl/java labels understands seems to be fairly old. If you find some random great idea on the web and it does not work, it may be something that just isn't implemented. Ask here if you have trouble.

This thread here covers a fair amount of working with html in vasl: http://www.gamesquad.com/forums/index.php?threads/custom-vasl-play-aids.117049/

JR
 

Stewart

Senior Member
Joined
Jun 20, 2006
Messages
2,326
Reaction score
322
Location
California
Country
llUnited States
OK, Follow up Query.
How you place the image BEHIND the boards?
All other facets of the game can be on top of the image...but the boards can't be moved.
 
Joined
Mar 21, 2015
Messages
743
Reaction score
31
Location
Oz
Country
llAustralia
To add pictures to VASL files, here is a template (using an external link to the picture used for the VASL file):

<HTML>
<TABLE WIDTH=400 BORDER=0 CELLPADDING=2 CELLSPACING=0>
<COL WIDTH=400>
<TR VALIGN=TOP>
<TD WIDTH=400>
<P>
<IMG SRC="https://www.ibiblio.org/hyperwar/USA/USA-CBI-Command/img/USA-CBI-Command-p246b.jpg" ALIGN=BOTTOM WIDTH=400 HEIGHT=300 BORDER=0>
</P>
</TD>
</TR>
</TABLE>
</HTML>

This is more complicated with hotlinking from dropbox ( can hardly get Google Drive to work at all) if one has their own FTP area then its all guns n roses..

I have tried to get an image to resize via dropbox (img src) but that seems to have no effect.

hotlink= frustration = broken glass/fridge etc :p
 

thosmos

Recruit
Joined
Jan 30, 2005
Messages
24
Reaction score
8
Location
Santa Fe, NM
First name
Thomas
Country
llUnited States
To add pictures to VASL files, here is a template (using an external link to the picture used for the VASL file):

<HTML>
<TABLE WIDTH=400 BORDER=0 CELLPADDING=2 CELLSPACING=0>
<COL WIDTH=400>
<TR VALIGN=TOP>
<TD WIDTH=400>
<P>
<IMG SRC="https://www.ibiblio.org/hyperwar/USA/USA-CBI-Command/img/USA-CBI-Command-p246b.jpg" ALIGN=BOTTOM WIDTH=400 HEIGHT=300 BORDER=0>
</P>
</TD>
</TR>
</TABLE>
</HTML>

This is more complicated with hotlinking from dropbox ( can hardly get Google Drive to work at all) if one has their own FTP area then its all guns n roses..

I have tried to get an image to resize via dropbox (img src) but that seems to have no effect.

hotlink= frustration = broken glass/fridge etc :p
yeah. I have had some luck with images on google images, imbedding the link into the Vasl Templates. But it’s hit and miss. I did try using image links that I put in my Google Drive, but that hasn’t worked at all. I was able use one image from Google images and imbed the URL in the .vsav file that my opponent was able to load and have the image work. (As long as he had an internet connection of course.) I am thinking that the size of the image also makes a difference as to wether it will work or not.
 

Paul_RS

Elder Member
Joined
Feb 14, 2010
Messages
1,585
Reaction score
647
Location
Gammonopolis
Country
llUnited Kingdom
Open the Overlays window and add a label. For an image from the internet, edit it to be:
<html> <img src="...URL..."> </html>​
or for an image on your PC:
<html> <img src="file:///...FILE-PATH..."> </html>​
That's sorted it 🆒
 
Top