Page 1 of 1

Source code locations?

PostPosted: August 29th, 2020, 9:44 am
by sagcats
Where does one find the source code for any given vmod file? I'm most interested atm in the AH Blitzkrieg modules.

Re: Source code locations?

PostPosted: August 29th, 2020, 10:04 am
by jrwatts
Module files are simply zip files with a different extension. The "source code" for the module is the file called "buildFile" within the zip.

Edit: If you're trying to understand how the module is doing certain things, you're better off loading the module in the editor rather than trying to read the buildFile directly. Accessing the buildFile directly is mainly useful for things like a global search-and-replace; while the overall file is in XML format, the actual game details are in a very hard to read format within the XML entries.

Re: Source code locations?

PostPosted: August 29th, 2020, 10:26 pm
by Flint1b
Some modules contain custom Java code. Some module designers are polite and add the Java source to the modules, otherwise you can decompile the .class bytecode.

Re: Source code locations?

PostPosted: September 1st, 2020, 2:59 am
by sagcats
When you say load the module in the editor, what exactly do you mean? Are you talking about the 'Edit module' command in VASSAL itself?

Re: Source code locations?

PostPosted: September 1st, 2020, 5:46 am
by jrwatts
Yes, that's what I meant. As Flint said, some modules do include actual Java code, but it's up to the module developer whether or not that source code is shared (and where to find it).