Output from Vassal into CSV or Other Formats for Real World Command Information Systems (CIS)

OK, this may get a bit wordy/convoluted, so please bear with me. I am curious as to the possibility of exporting unit (piece) locations, as well as current strength (based on a numbered graphic), into a format usable by a current command information system. Our goal is being able to export a CSV file or another type of file (I can give examples of what is “importable”) from the current state of a game and import it into the command system and project a real-world simulated Common Operating Picture (COP)

I envision this would entail a real-world location as a “0,0” starting point and using a “distance per pixel” calculation to present the real-world location, and this currently does NOT exist.

To get the current combat power, I believe it would require trait info to get the current power represented by the trait’s current state. There may be an easier way to do this by changing the way combat power is represented on the piece itself, I just don’t know

Lastly, I would assume that a trait of some kind be used to associate the piece with the appropriate Military Standard Symbol for size and type of unit to be displayed.

I’m sure I’m using the wrong language here, but I think going forward this may be something value-added to Vassal, enabling, possibly, the export of game information that is based on real-world locations to be presented using things like Google Earth. We do have a few people where I work here at Army University who like using the Vassal modules I’ve built for controlling certain exercises, and the umpire(s) being able to display all of this in a real-world system with just an import versus manually manipulating the icons and their information would be a serious leap forward for them.

I know it’s a LOT, but what do you think it would take to make something like this happen?

There are several Java libraries for reading and writing CSV—the two I see come up frequently are Apache Commons CSV and OpenCSV.

I recommend using the module template as the basis for any module, as it gives you a useful structure for keeping all your files under version control in Git and building the module from them.

For building a module that uses external libraries, you’ll additionally want to use the maven-shade-plugin as shown in VASL’s pom.xml. The maven-shade-plugin will package any dependent JARs (such as the ones you’re using for reading and writing CSV) into your module.

You could write a class that puts a button on the toolbar or an item in the menu for reading/writing CSV, and then have that call a your class that does the import/export. It sounds like what you’d do for import is iterate the CSV a line at at time, find the piece for each line, and set some properties on it; and for export, you’d iterate all the pieces, reading some properties and writing a line of CSV for each piece.

Didn’t someone (Flint?) already do this as a project?