VASSAL Automation

I think I already know the answer to this question, but I thought I would bring it up anyway, just so I know for sure. I have been playing the OCS (Operational Combat Series from Multiman Publishing) games on Vassal now for many years, and I have to say that the games are becoming more and more automated (on Vassal) as the years have gone by. Now, I would love to see this animation go even further. How difficult would it be to implement automated movement in these OCS (i.e. Case Blue, Guderian’s Blitzkrieg II etc.) games? What I mean by automated movement, is you click on the counter, and it gives you a shaded range of hexes that the unit can move to. Obviously based on the units movement points, and the number of movement points required to move into each hex in the area. I think given the amount of automation that we have already, that adding this in would not be impossible.
Now, the second thing that would be really good to have, would be the holy grail of war games, and that is automated combat. Where you click on the defending hex first, then click on all of the attacking hex, and then click to roll the dice and Vassal comes up with a result (based on the OCS combat results table). I know from just putting together an “automated” spreadsheet for OCS combat on Excel, that there is a lot of calculations that go on before a result is given. That being said, my guess is that this is also not impossible. So, given the current state of Vassal, is it possible that a person could implement these two things into the OCS modules?

VASSAL is capable of a lot of automation. From the little work I have done, VASSAL seems to be more limited by the module creator’s (or modifier’s) imagination and willingness to spend the time to build in such automation than anything else. I think what you described is possible, but will likely take a lot of work.

I did implement optional automatic CRT resolution for my MMP GTS Series modules. It is written in custom Java code and was many hundreds of hours work developed over several years to cater for all the options and exceptions and special cases, and then debugged for all the missed and incorrect cases. The GTS system is fairly complex, but gives you an idea of the magnitude of the work that would need to be expended on EACH game system.

We could possibly build a framework that could be used by a designer to provide the basic mechanisms (show and select from attacking units, show and select from defending units, display and select modifiers of different types) and allow a CRT implementation to be plugged in.

I have also done custom code to record terrain types (in-hex terrain (hills, clear), hex edge terrain (river, ridge), hex edge crossing terrain (road, rail) that I hope to implement in V4 and will allow movement range reporting,

In both cases, it will not be plug an play, I expect you will need a solid programming base in the scripting language (looking like Javascript) to implement these sort of features.

1 Like

Brent – Thanks for the great information. So, from what you said, it seems like what I would like to do, is indeed possible. That being said, I think where I would like to start is just simply making it so when you click on a unit to move the unit, that the hexes are highlighted where the unit can move to. So, where would I even begin to try to implement this? I have very little experience in designing Vassal games. The only experience I have is merging two of the GOSS series games into one mega game (Wacht Am Rhein and Hurtgen, Hells Forest). Needless to say, that took me a long time to merge those two into one mega vassal module. So, I do have some very limited experience with Vassal. As far as scripting, I have very little scripting knowledge, although that is certainly something I can learn. What would you suggest as a good starting point? I should also add, if this project is simply too much for a novice like myself to undertake, then maybe hiring it out to someone else is an option?

To incorporate the changes I am suggesting requires a solid knowledge of Java language programming, and the ability to read and interface to the existing Vassal java code.

I can supply a pre-built package that allows the recording of terrain information on a map through an extended GUI in the hex grid editor that allows you to (sort of) ‘paint’ terrain definitions on to the map. See Terrain Recording - Vassal

You can probably get to this stage with no Java knowledge, just follow the instructions on that page. This will allow you to start recording the terrain information.

However, there is almost nothing you can do with this terrain information without writing custom Java code. I do have some other code floating about that does a terrain-dependent Area of Effect for Command Range display, which is essentially the same problem as determining valid movement locations. I’m happy to supply that as well if you can find someone to put it all together.

Again, thank you for the information. I will follow the instructions on the Terrain Recording page. I do have another friend who might be of some help to me in regards to the Java programming, but we shall see. I will take it one baby step at a time. In the meantime, if you want to send me the other code for the terrain-dependent Area of Effect for Command Range display, that would be most helpful. I can then have whoever does my Java scripting for me try to piece it all together. Unfortunately I did not take computer science in college. I often kick myself for choosing the wrong major! Again, thanks for you help with all this. I truly appreciate it!

See how you go with that step first. The next stage is a bit trickier and will probably be easier if I help you out with it. I will need to set a few things up source wise for you to make it cleaner. Let me know when you get further along.

1 Like

10-4. I will read through the link that you sent me and familiarize myself with that first. It might be several days before I reach the point where I need additional help. I am also reaching out to others with Java programming experience who might be interested in helping me out. We shall see.

1 Like

I have in fact done something along those lines in the Combat Commander module. As an experiment I wrote a helper program last summer, that could analyze the map image and generate a dataset with information on LOS, cover and hindrance. I then put this dataset in a custom class, so that when you click a hex, all hexes with no LOS to/from that hex are tinted red. Also every hex has printed their cover and hindrance values as seen from the clicked hex. The code also takes smoke and burning vehicles into consideration.

So yes, what you suggest can probably be done - but be warned: It is a daunting task. But quite satisfying when it finally works :slight_smile:

1 Like

Thank you very much for the information. I downloaded one of the combat commander modules. I will have to check it out. I agree that what I am looking for should be doable, it is just a matter of doing it. I think the movement portion of it should be easier than the automated combat, but who knows, maybe it will be the other way around. Well, I am going to start working on this in the next couple of days. Right now I am working on trying to find someone who is proficient in Java Programming to help me out. If I actually accomplish this, it would certainly be rewarding, that is for sure. Not the least of which, if we nail it down for this one OCS game, it should be easier to apply it to the other OCS games.

Sorry, I should have emphasized that it was a proof of concept - so it’s not in the official modules. I am not the maintainer of that module. Only exists on my computer :slight_smile: My bad.

1 Like

Where are the Vassal Module file folders located generally? I need to edit the buildfile, and for the life of me, I cannot locate the module file folders.

Only you can know where you’ve chosen to store your modules. Once you determine that, every module is merely a ZIP archive with an altered file extension–the buildfile is in the root level of the archive.

It automatically chose the C: Drive. I can find Vassal located in my Programs folder, but I am assuming the buildfile is not in the programs folder?

The buildFile.xml is inside the module file, which is formatted as a ZIP archive. To get at the buildFile.xml, you need to determine where you’ve saved the module, and then open the module with a program that can read ZIP archives (Windows file manager can open them, so can 7Zip).

1 Like

I was doing some brainstorming this morning, and I remembered that the TSWW Vassal game has the air units with their various ranges shaded. I will check on that later. I will also check to see if the developer shaded the range of the ground units (off hand, I don’t recall). I happen to know the developer, so I can contact him.

Is there a particular reason you’re seeking the buildfile itself? Neither the custom automation goal nor the “see how another designer did X” goal will be meaningfully advanced by looking directly at the buildfile.

Yes, I was going to try to implement this Terrain Recording - Vassal (, and it calls out for altering the buildfile.

1 Like

Fair enough–things I learn! Wondrous things buried in the wiki.

1 Like

I might need to re-download the module, in order to determine where the computer is saving it. That method usually words if I cannot figure out where the files are being saved at.