AbstractFolder - scratching my head


I am quite new to module design - and I would like to extend an existing module (Combat Commander Europe) with my own code.
To that end I have cloned Vassal 3.5.5 sources from github and put them in a IntelliJ project. I also added Vengine.jar from my Vassal installation as a dependency.

I would like my class to draw something on the hexmap, so for a start I copied the code from LOS_Thread.java into my class. Then I can tinker with it and learn how things work. However neither my class nor the original LOS_Thread.java will compile:
VASSAL.build.AbstractFolder cannot be found.

AbstractFolder.java is in the repository I cloned from Github, but the classfile is not in Vengine.jar !

Now I am confused - how does LOS-Thread even work, when the referenced Abstractfolder.class is not in Vengine.jar??

Please enlighten me :slight_smile:


Never mind. Must have suffered a major brain fart. Had not fetched the version of the source, I believed I had :frowning:

It sounds like you actually have Vassal 3.6 in your IntelliJ project, because AbstractFolder is a new class we’re added in 3.6.

The “master” branch of github contains the current development branch, which is presently the development work for 3.6.0.

To get to the version you want, you’ll want to do something like:
$ git fetch upstream
$ git checkout tags/3.5.5

That would get you the 3.5.5 source into your tree.

Note that for myself I don’t use a vassal JAR file as a dependency – instead I link to the vassal source code I have pulled down (see screenshot)

ALSO, if this is your first trip into “custom code territory” we have a “template” for making custom classes here: github.com/vassalengine/vassal-module-template (you can also pull THAT down from github). It includes a maven file to keep your dependencies up to date and the source code contains a bunch of useful comments.


I realized I could barely remember to set up custom classes myself, so I kind of re-taught myself today and wrote a wiki guide:


If you get stuck along the way, let me know and I will do my best to answer questions! (Ironically it is less tricky to directly modify VASSAL than it is to make a custom class!)


Thanks for your kind help. I will look into your suggestions - a template for class creation sounds like a great idea.

I ended up pulling the 3.5.5 sources from the download page. I have no need to compile vassal as such - only my own classes. That’s why I have vengine.jar as a dependancy.

Currently my project is just a proof of concept. The idea is to click a hex and have all hexes not in LOS marked with a red overlay.
The current Combat Commander module (not made by me) already has a component able to draw a line between the centers of two hexes, so I took that class and renamed it. Then I had a working starting point to figure out how things work and change it to fit my needs.

At this point I have a prototype running - working as intended. Its based on a manually created dataset, which is quite a daunting task - even for a small board of 10x15 hexes. I am trying to figure out an easier way to create the necessary dataset. Maybe by raytracing. But for now, the manually created dataset will do :slight_smile:


One nice thing, if you get a version up and running using the template, is that it is “maven based”, meaning it will understand Vassal source code dependencies automatically even when in the future you want to use a future/updated version of the VASSAL code base for whatever reason.

But it sounds like you got stuff building correctly with 3.5.5 so that’s great news!