LOSData usage for other programs

I’m working on an AI program for Advanced Squad Leader Starter Kit. I have LOS working, but it is treating the entire hex as the terrain in that hex, so not so great.

I noticed that vassal has correct LOS for all the ASL boards, and in the zip files there is an LOSData file. Is there some tool I could use (if not I could hopefully create it myself), to extract this data for use in my program?

Is this support for only a particular game (ASL, etc), or is it generic enough to use for any game?

It’s VASL that has the LOS data, not Vassal. You’ll want to ask about it in their forum. (However, I can tell you that it’s all in a format they developed.)

The LOS data in VASL is basically a color-coded image the same size as the map where each pixel represents a pixel on the map and the color represents the type of terrain at that pixel. The VASL specific LOS component uses that to determine correct LOS.

The VASL source is available which should help you decode the LOS data format.