VASL board creation-quick n dirty

Vinnie

See Dummies in the index
Joined
Feb 9, 2005
Messages
17,449
Reaction score
3,395
Location
Aberdeen , Scotland
Country
llUnited Kingdom
I have a PDF of a board to playtest. I've altered it to a gif file and contrained its proportions to 1800 by 645, the same size as the bd01.gif file in the bd01 file as downloaded into VASL.
Re-created the bdPS2d file and saved it as uncompressed zip file then removed the .zip
Added to the boards directory in VASL and I see it there when I try to start up but when selected it comes up with no such board.
What extra steps do I need to take to get this one useable. I don't need the conversion data as this is still under development but need to be able to play with it on VASL.
Mnay thnaks for any help.
 

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
I have a PDF of a board to playtest. I've altered it to a gif file and contrained its proportions to 1800 by 645, the same size as the bd01.gif file in the bd01 file as downloaded into VASL.
Re-created the bdPS2d file and saved it as uncompressed zip file then removed the .zip
Added to the boards directory in VASL and I see it there when I try to start up but when selected it comes up with no such board.
What extra steps do I need to take to get this one useable. I don't need the conversion data as this is still under development but need to be able to play with it on VASL.
Did you add a "data" file and a BoardMetadata.xml file? See http://www.gamesquad.com/forums/index.php?threads/jpg-map-to-vasl-map.156430/#post-2008123 for my quick summary.

If your board does not need to be used with other boards (e.g. HASL) you don't have to resize it.

JR
 

General Mayhem

Senior Member
Joined
Jun 21, 2007
Messages
1,719
Reaction score
310
Location
Taunton
Country
llUnited Kingdom
I believe all you need is a simple data file if you just want a rough and ready board. Resizing is only really necessary to resize to get the hexes the correct size. The data file only needs the minimum information of "Version 1.0". It can also contain the x and y coordinates for the setting of the hex centre dot for the A1 hex if you want the counters to line up in the hexes correctly and report their hex position in the chat.

To create a data file just create a txt document and then remove the .txt suffix. Then put it into your zipped board folder with your map image. Then don't forget to remove the .zip extension.
 
Last edited:

jrv

Forum Guru
Joined
May 25, 2005
Messages
21,998
Reaction score
6,207
Location
Teutoburger Wald
Country
llIceland
I believe all you need is a simple data file if you just want a rough and ready board. Resizing is only really necessary to resize to get the hexes the correct size. The data file only needs the minimum information of "Version 1.0". It can also contain the x and y coordinates for the setting of the hex centre dot for the A1 hex.

To create a data file just create a txt document and then remove the .txt suffix. Then put it into you zipped board folder with your map image. Then don't forget to remove the .zip extension.
At one time this was right but I don't believe this is correct anymore. I believe you need the BoardMetadata.xml file, or at least I couldn't get a playtest board I was using to work without it.

JR
 

General Mayhem

Senior Member
Joined
Jun 21, 2007
Messages
1,719
Reaction score
310
Location
Taunton
Country
llUnited Kingdom
Well its all I do for all my Vasl Hasl boards and they all work fine. I think the metadata file is more to do with LOS stuff, but cant be completely sure.
 

Vinnie

See Dummies in the index
Joined
Feb 9, 2005
Messages
17,449
Reaction score
3,395
Location
Aberdeen , Scotland
Country
llUnited Kingdom
8i stole the data ad metadata files form the board 1 file. I'll try with a simple one.
 

General Mayhem

Senior Member
Joined
Jun 21, 2007
Messages
1,719
Reaction score
310
Location
Taunton
Country
llUnited Kingdom
Sometimes I make an error and put the data file into the zipped board folder without removing the .txt extension and then Vasl can't find the board. I scratch my head for several minutes before realising what I have done. I really don't think you need the meta date file.
 

Sparafucil3

Forum Guru
Joined
Oct 7, 2004
Messages
11,359
Reaction score
5,112
Location
USA
First name
Jim
Country
llUnited States
The bdFileName "wrapper" has to be the EXacT same name (case sensitive, see what I did there) as the .gif file on the inside. I don't think the data file needs to be there. I was working on a board file yesterday and did not BoardMetadata.xml file and it worked fine. YMMV. -- jim
 

Sparafucil3

Forum Guru
Joined
Oct 7, 2004
Messages
11,359
Reaction score
5,112
Location
USA
First name
Jim
Country
llUnited States
While I am on the subject, anyone know how to make the top left corner (Normally A1/A0 depending on "alternate true") actually be A34? I tried using A34 instead of A0. I also got the map working with A1 reported and then tried an offset to a "fake" A0 and could not make it work. Any ideas? -- jim
 

General Mayhem

Senior Member
Joined
Jun 21, 2007
Messages
1,719
Reaction score
310
Location
Taunton
Country
llUnited Kingdom
While I am on the subject, anyone know how to make the top left corner (Normally A1/A0 depending on "alternate true") actually be A34? I tried using A34 instead of A0. I also got the map working with A1 reported and then tried an offset to a "fake" A0 and could not make it work. Any ideas? -- jim
OK I think what you have to do is in the data file (not meta data file) set the x and y coordinates:

x0 ??
y0 ??

where ?? is the value in pixels where the centre dot of Hex A1 would be, so to get the top left hand hex as A 34 you would need to project the hex A1 off the grid so to speak and use minus values for X and Y.
 

Vinnie

See Dummies in the index
Joined
Feb 9, 2005
Messages
17,449
Reaction score
3,395
Location
Aberdeen , Scotland
Country
llUnited Kingdom
Ok I'm an idiot (as if they were any doubt about that).
When you've stuck the board PS2d in the folder, you need to change the name to bdPS2d!
 

General Mayhem

Senior Member
Joined
Jun 21, 2007
Messages
1,719
Reaction score
310
Location
Taunton
Country
llUnited Kingdom
Correct the name of the gif file has to be bdPS2d.gif the zipped folder needs to be bdPS2d.zip then remove the .zip ext
 

Sparafucil3

Forum Guru
Joined
Oct 7, 2004
Messages
11,359
Reaction score
5,112
Location
USA
First name
Jim
Country
llUnited States
OK I think what you have to do is in the data file (not meta data file) set the x and y coordinates:

x0 ??
y0 ??

where ?? is the value in pixels where the centre dot of Hex A1 would be, so to get the top left hand hex as A 34 you would need to project the hex A1 off the grid so to speak and use minus values for X and Y.
Tried that. Didn't work, or at least I couldn't make it work. It always reported the top left as A0. -- jim
 

Sparafucil3

Forum Guru
Joined
Oct 7, 2004
Messages
11,359
Reaction score
5,112
Location
USA
First name
Jim
Country
llUnited States
Ok I'm an idiot (as if they were any doubt about that).
When you've stuck the board PS2d in the folder, you need to change the name to bdPS2d!
Wonder how I knew that was the likely culprit. Maybe because EVERY STUPID MAP I DO, I make this mistake the first time I try to open it. ;) -- jim
 

General Mayhem

Senior Member
Joined
Jun 21, 2007
Messages
1,719
Reaction score
310
Location
Taunton
Country
llUnited Kingdom
Tried that. Didn't work, or at least I couldn't make it work. It always reported the top left as A0. -- jim
I think it does work I just tried a test, nothing scientific or exact, but made x -70 and y -70 in an existing Hasl map of mine and the hex A1 was reporting as something like C4. So if you work it out by number of pixels per hex you should get it close and could then fine tune. Attach your map and I will have a look at it if you like.
 

Michael R

Minor Hero
Staff member
Moderator
Joined
Feb 4, 2003
Messages
4,654
Reaction score
4,203
Location
La Belle Province
First name
Michael
Country
llCanada
This was encouraging to read. You guys made it sound easy. I have photographs of sections of the Ortona play test map for individual scenarios. I took one of them and made a gif and tried to follow the above instructions, as well as the linked stuff from jrv.

I took the files from board 79. I edited only the BoardMetadata.xml file.
The board graphic is bdOLS1.gif .
The compressed folder of the three files is bdOLS1.zip.
I put the file in my boards folder and removed the zip extension.
I started VASL, chose the board and received a VASL error.

2020-03-29 11:28:08,885 [7-AWT-EventQueue-0] INFO VASL.build.module.map.boardArchive.BoardArchive - Unable to read the board metadata in board archive bdOLS1
2020-03-29 11:28:08,892 [7-AWT-EventQueue-0] ERROR VASSAL.tools.ErrorDialog -
java.lang.NullPointerException: null
at VASL.build.module.map.boardArchive.BoardArchive.getVersion(BoardArchive.java:786) ~[na:na]
at VASL.build.module.map.boardPicker.ASLBoard.initializeFromArchive(ASLBoard.java:139) ~[na:na]
at VASL.build.module.map.ASLBoardPicker.updateBoard(ASLBoardPicker.java:508) ~[na:na]
at VASL.build.module.map.ASLBoardPicker.getBoard(ASLBoardPicker.java:601) ~[na:na]
at VASSAL.build.module.map.BoardPicker.getLocalizedBoard(BoardPicker.java:439) ~[Vengine.jar:na]
at VASSAL.build.module.map.boardPicker.BoardSlot.actionPerformed(BoardSlot.java:106) ~[Vengine.jar:na]
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258) ~[na:1.8.0_241]


Followed by lots more "at java..." error messages.

Here is my BoardMetadata.xml file:

<?xml version="1.0"?>
<!--
This file contains the board metadata specific to a VASL board archive.
Create one file per VASL board and place it in the archive.
-->

<!--
Board-level metadata
name - the name of the board (as it will appear in board selector drop-down - not yet supported)
version - the board version
versionDate - the date the last version was created
author - the caring soul who created the board
boardImage - the name of the VASL image file in the board archive; the name is case sensitive
hasHills - TRUE/FALSE if the board contains base elevations above ground level
if not we can assume the ground level under the terrain is zero, which
makes the VASL LOS image translation faster and more accurate
height - height of the board in hexes. Standard geomorphic boards are 10 by 33 hexes
width - width of the board in hexes.
others - TBD e.g. alternate hex grain, etc.

6.1 - Fixed wooden factories

-->
<boardMetadata name="bdOLS1" version="1.0" versionDate="Mar 2020" author="MTR" boardImageFileName="bdOLS1.gif" hasHills="TRUE" width="14" height="14">

<!--
The type of buildings on the map. Because the building colors are shared by all building types, VASL can't easily
determine the proper building type when creating the LOS information and assumes buildings are single-hex stone or
wooden buildings. Use these elements to override the building type.

See the terrainType elements for a complete list of building names
-->
<buildingTypes>

</buildingTypes>

<overlaySSRules>
<!--
Scenario-specific overlay rules.
name - the VASL SSR name
image - the image name
x - x coordinate of overly upper left
y - y coordinate of overlay upper left
-->

</overlaySSRules>

<colors>
<!--
The VASL board colors. Used for color-specific SSR transformations. Use this element to override the shared color pallet.
name - the VASL color name
red, green, blue - the RBG value of the color in the image
terrain - the LOS terrain type
elevation - the base elevation of the terrain

-->


</colors>

<colorSSRules>
<!--
The board color scenario-specific rules. Use this element to override the shared SSRs.
-->
</colorSSRules>

</boardMetadata>


Your help is appreciated.
 

BigAl737

Elder Member
Joined
Apr 5, 2011
Messages
1,514
Reaction score
1,278
Location
AK
Country
llUnited States
You look to be really close. We can troubleshoot here or if you want to send me the bdOLS1 file, I’ll take a look and let you know what I find so you can make your other maps.

If you don't want to send me the file, what is the third file in the bdOLS1 file?
 

Michael R

Minor Hero
Staff member
Moderator
Joined
Feb 4, 2003
Messages
4,654
Reaction score
4,203
Location
La Belle Province
First name
Michael
Country
llCanada
The third file is the "data" file. JRV recommended leaving it un-edited, so mine has the following data:

version 6.0
Al Cannamore
Nov 2017

How could I send the bdOLS1 file to you?
 

BigAl737

Elder Member
Joined
Apr 5, 2011
Messages
1,514
Reaction score
1,278
Location
AK
Country
llUnited States
Couple of ways...

Give me a Dropbox link if you use Dropbox
Zip the file and post it in this thread as an attachment
Zip the file and email it to me. I’ll send you my email in a PM
 
Top