Create account / Log in

Extensions

Topics related to Vassal game modules.

Moderators: uckelman, Tim M

Extensions

Postby Charles McLellan » September 18th, 2014, 9:03 pm

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.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby plloyd1010 » September 19th, 2014, 3:38 am

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.
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Extensions

Postby Charles McLellan » September 22nd, 2014, 2:48 pm

you can manually edit the build file. I use Notepad++ when I do that.


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?

Building an extension is just like building a module.... You should work through the tutorial in back of the Design Guide....


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?

...apart from the obvious relativity.


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.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby plloyd1010 » September 23rd, 2014, 2:54 pm

What is "Notepad++"?

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

...but not how to end making a module. I mean shouldn't the instruction end with something as a "vmod"?

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).

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

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.
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Extensions

Postby Charles McLellan » September 23rd, 2014, 6:00 pm

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!
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby plloyd1010 » September 23rd, 2014, 7:49 pm

Make a copy of the originating module and try it. Don't be afraid to break a copy.
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Extensions

Postby Charles McLellan » October 2nd, 2014, 12:37 pm

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.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby uckelman » October 2nd, 2014, 12:43 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 9014
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Extensions

Postby Charles McLellan » October 2nd, 2014, 7:42 pm

[url]File:Module Load Failed.png[/url]

[img]File:Module%20Load%20Failed.png[/img]

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.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby Charles McLellan » October 2nd, 2014, 8:45 pm

Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby Charles McLellan » October 2nd, 2014, 8:50 pm

Image
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby Charles McLellan » October 2nd, 2014, 9:19 pm

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.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby Charles McLellan » October 4th, 2014, 12:23 pm

Do you need more information? I am still waiting.
Charles McLellan
 
Posts: 126
Joined: May 29th, 2008, 8:59 pm
Location: Huntsville, AL

Re: Extensions

Postby uckelman » October 4th, 2014, 2:01 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 9014
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Extensions

Postby uckelman » January 1st, 2015, 9:26 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 9014
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Next

Return to Module General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests