Extensions

I am having a terrible time trying to figure out how to make an extension. I have read and re-read pages 106-108 of the Module Makers manual, but simply cannot figure out what to do.

In the Creating Module Extensions introduction, it says, “You should be familiar with creating and editing modules before attempting to create or edit an extension.” Well, I have never really created a module; I have only imported modules. I can only create a module in ADC2 but have no idea how to go about actually making a VASSAL module. I have extensively “edited” VASSAL modules, but cannot “create” one.

I started by importing the module that I am going to make the extension (say module B) because it has extra pieces and an larger map that contains the original. I then extensively modified the module B to the configuration that I wanted. In the VASSAL module manager, I right clicked on module B and click New Extension. All elements of module B were grayed out. I “Saved As…” the module with a “.vmdx” suffix (module BX).

I next imported what I wanted as the base module (say Module A). Rather than extensively modifying the module A (opened in module editor), I attempted to “Copy” elements from module B (opened in module editor), but I could not Paste (it was grayed out) to module A.

So, problem 1. How can one copy and paste from one module to another. It took several weeks to extensively modify module B. I didn’t think that I would have to extensively modify module A. I thought that I could just copy and paste elements, but apparently that is not the case. Why?

Question 1: What am I doing wrong? Is it not possible to copy and past from one module to another?

In the VASSAL module manager, I did right click on module A and clicked Add Extension… I then clicked on Module BX. Under Module A in the Module Manger, an extension was added with little gear or something followed my the module name. Right clicking the “extension,” an “Edit Extension” option was shown. I clicked it, but the after a time, a Java “Module Load Failed” window opened.

End of issue.

So, how exactly does one make (create) an extension?

How does one get to the “Extension Editor”?

I need the step by step details that are not in the manual.

The short answer to question 1 is no. You cannot cut & paste between modules.

Ok, that said, if a module is in order, you can manually edit the build file. I use Notepad++ when I do that. It is very important to make a backup of the build file first. One out-of-order entry will cause a manually modified module or extension to crash.

Building an extension is just like building a module, apart from the obvious relativity. You should work through the tutorial in back of the Design Guide. That will answer a lot of the basic questions.

Scary! I guess that I can try that.

What is “Notepad++”? I have a “Notepad” that came with Windows 7, but what does the “++” mean?

I assume that you are referring to the Module Designer’s Guide (VASSAL 3.1 Designer’s Guide). I read through the tutorial but that didn’t even show how to finish making a VASSAL module. It showed how to begin a module and the components of a module, but not how to end making a module. I mean shouldn’t the instruction end with something as a “vmod”? Perhaps that is supposed to be “understood.”

Then I want to make an “extension”, not a “module.” So, how do I begin?

I am afraid that the relativity is not obvious to me. Can you explain better how to start making (and ending) an extension?

I have imported a number of ADC2 modules to VASSAL (VASSAL module manager / File / Import Module…), and then after saving the Imported ADC2 “.ops” file as a “vmod,” modified (Edit Module) the module. So, I am familiar with editing a module and the components of a module. I have never made a VASSAL module from scratch and have no idea how to make an Extension from scratch.

Please help.

Notepad++ is a text editor, like Notepad. It just works much better.

It is sort of a you are when you’re done thing. A module “works” (presuming it doesn’t crash) regardless of its "completeness’. The engine doesn’t care about the extension. .vmod is more of a human reference thing, Vassal modules are zip files, and Java doesn’t care about extensions. I make the modules I am working on .zip, so I can break into them with Windows Exporer (actually I use Free Commander more often).

The relativity should become obvious once you start, so let’s start. First you need a module in the main window. If you don’t have one yet, just get something that looks interesting. Now that you have a module, right click on the entry and choose New Extension. The module will unpack and the editor window will open. Everything in the original module will be grayed out. You can add whatever you want, where ever you want. You just can’t take anything out of the original module. Such as you cannot remove a deck from a game, but you could add more cards.

If you dig into the build file the biggest difference you will see is that the section headers are going to be </VASSAL.build.module.ExtensionElement>, not </VASSAL.build.module.whatever>.

Good luck, remember to work from a copy.

You’ve indicated before that I cannot cut and paste from one module to another.

In the Designer’s Manual on page 108, there is an example of cut and paste. Is this being done between the base module and the extension? How can you open the base module in the extension editor? I am confused!

Make a copy of the originating module and try it. Don’t be afraid to break a copy.

Attempts to “open” the extension editor have failed.

I get a window that says, “Module Load Failed.” There is a Java icon on the window. Then there is a whole bunch of “at VASSAL” and “at java” lines in the details.

Any idea what I am doing wrong?

Even if I could open the extension editor, I still have no idea how to “open” the module from the extension editor. If it is anything like the module editor, there is no way I can “open” a module from the editor. Perhaps I do not understand what is meant by “open.” Can you better indicate what “Open” means?

I really need details from someone who has done this before. Where do I start? Some step by step instructions. There is no help for me in the Design Manual. The manual seems to believe that I understand a lot of things that I don’t.

Thus spake Charles McLellan:

Attempts to “open” the extension editor have failed.

I get a window that says, “Module Load Failed.” There is a Java icon on
the window. Then there is a whole bunch of “at VASSAL” and “at java”
lines in the details.

Any idea what I am doing wrong?

You’re asking for help without posting the full stack trace, which is
what the error message you saw was. Post that here.


J.

File:Module Load Failed.png

Forgot how to post an image here. I posted an image of the failure on the module upload page. Don’t know how to show it here anymore.

vassalengine.org/File:Module … Failed.png

Sorry, I can’t figure out how I used to post images here!

Maybe I can type the whole thing, but it will take some time.

X Module Load Failed

VASSAL was unable to load the module
Extension ‘Imperium with Ground Combat Module’ was built for module Imperium with Ground Combat Module

Details

VASSAL build.module.ExtensionsLoader$LoadExtensionException: Extension ‘Imperium with Ground Combat Module’ was built for module Imperium with Ground Combat Module
at VASSAL build.module.ModuleExtension.setAttribute(ModuleExtension.java:309)
at VASSAL build.AbstractBuildable.build(AbstractBuildable.java:57)
at VASSAL build.module.ModuleExtension.build(ModleExtension,java:139)
at VASSAL launch.EditExtensionAction.loadModule(Edit Extension.java:56)
at VASSAL launch.LoadModuleAction.performAction(LoadModuleAction.java:75)
at VASSAL launch.Editor.launch(Editor.java:88)
at VASSAL launch.Launcher$1.run(Launcher.java:149)
at java.awteventInvocationEvent.dispatch(Unknown Source)
at java.awtEventQueue.dispatchEventImpl(Unknown Source)
at java.awtEventQueue.access$200(Unknown Source)
at java.awtEventQueue$3.run(Unknown Source)
at java.awtEventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awtEventQueue.dispatchEvent(Unknown Source)
at java.awtEventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awtEventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awtEventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awtEventDispatchThread.pumpEvents(Unknown Source)
at java.awtEventDispatchThread.run(Unknown Source)

That’s it. Could have misspelled something, but I think that is what the details say.

Do you need more information? I am still waiting.

Thus spake Charles McLellan:

Do you need more information? I am still waiting.

I need more time. I’m in the middle of moving from Germany to England.


J.

Thus spake Charles McLellan:

Sorry, I can’t figure out how I used to post images here!

Maybe I can type the whole thing, but it will take some time.

X Module Load Failed

VASSAL was unable to load the module
Extension ‘Imperium with Ground Combat Module’ was built for module
Imperium with Ground Combat Module

Details

VASSAL build.module.ExtensionsLoader$LoadExtensionException: Extension
‘Imperium with Ground Combat Module’ was built for module Imperium with
Ground Combat Module
at VASSAL
build.module.ModuleExtension.setAttribute(ModuleExtension.java:309)

I’ve had time to look at this now.

The only way that line 309 in ModuleExtension can be reached is if
the name of the loaded module doesn’t match the module name stored in
the extension. What you’re seeing in the error message is the extension
name and the name of the module that the extension thinks it was built
for.

So, the name of the module you had loaded was not “Imperium with Ground
Combat Module” when you tried to load your extension.


J.

Thanks for the response. Hope that you are settled now.

I will have to go back and see what all this means. I’ve forgotten much of what I thought that I knew.

I am not an extension expert, but I noticed you better create all your extensions checking the “allow opening by any module” option.

If you do not do that, then whenever you try to port that extension to a new module (or just change the name of the original module using it), it won’t work. No amount of editing the buildfile, moduledata, extensiondata seem to do the trick.

So, in case you hit that problem like I did: go back to “old” module where the extension is. Edit it and check the “allow opening by any module” option. Save it, maybe directly in the _ext folder of the “new” module. Then it should appear in the available extensions for the “new” module (or “add” the saved extension to your “new” module if you saved it elsewhere).

where do you find the “allow opening by any module” option?

Actually, I think that I am just going to surrender at this point. Having read and reread the instructions, I just don’t comprehend what needs to be done.

Thanks for all the attempts to help.

Good-bye!

Edit the extension, then click the “Extension Properties” button (below the Help menu. Then check “allow loading with any module”.