Save buildfile

Sorry if I have missed this, but there currently seems to be no way to save the build file, short of:

  • saving the module
  • renaming vmod to zip
  • unzipping/extracting
  • move new buildfile to my custom code folder

A simple menu option that just saved the build file would make it much easier to switch back and forth between coding and mod designing.

Thus spake Arcuate via messages:

Sorry if I have missed this, but there currently seems to be no way to
save the build file, short of:

  • saving the module
  • renaming vmod to zip
  • unzipping/extracting
  • move new buildfile to my custom code folder

A simple menu option that just saved the build file would make it much
easier to switch back and forth between coding and mod designing.

What’s the use case for saving the buildFile separately?


J.

As I understand it, to build a mod I need to put the class files and the buildfile together. If I have modified the mod using the standard interface, and save it as a vmod, I need to get the buildfile out of it if I want to do any more programming on the custom classes. Given that I am working on both the custom code and the mod together, I often need to combine the latest buidlfile with the latest Java classes.

It would be okay if I knew exactly what changes I needed to make to the mod in the standard mod editor, finished that entirely, and then worked on the code, but the two processes are concurrent. I am writing code and then testing it in the mod, and that testing makes it apparent that changes are needed in the mod. I change the mod, and that makes it apparent I need code changes. Going in either direction, I have to move a lot of files and do a lot of zipping or extracting.

I can probably configure Eclipse to write the class files into the correct building location, which should help, but there is no way that I know of to get Vassal to write the buildfile into the correct location.

In this situation, I run build the module by running the Editor directly under the debugger in Eclipse. Use

VASSAL.launch.Editor

as the main class and a command line of

–edit “” --standalone

This will allow you to develop the module using the Vassal editor, while developing you custom classes in Java. When running under the debugger, Eclipse will use the classes you are editing in Eclipse before the classes in the vmod file.

Once you finish, just copy you final classes from the Eclipse binary location into your vmod file, the buildfile will already be there.

Regards.

Okay, thanks… That should help. If this is not in the tutorial (I could have missed it), it should be added.

On that note, I think the tutorial could be improved… But it hardly seems worth it if you are changing to Javascript anyway. I have a few questions about how I can access more of the mod programatically, but will post those questions after I have poked around a bit more. I’ve managed to do all of the important bits of Custom coding.