separating existing module data into module and extension?

I hope I did not go too far in my module creation process before doing this.
I have a bunch of pieces in at-start stacks on a show/hide map window. The pieces do use prototypes from the rest of the module (and those prototypes access variables etc from the main module).

What I want to do at some point down the road is split the module into a module and an extension consisting of this map window and contained at-start stacks of game pieces.

Can one do this by creating a new extension in the editor and using a cut-and-paste mechanism? I would think not since the editor is set up to edit one or the other not both.

Can I create a copy of the module file and rename it and load it as a extension and edit away the duplicate material? Or is there enough difference in module and extension formats to preclude this?

Here is what I did.

I created a new extension for the module, all the stuff including the ‘to-be-extension’ map and stacks showed up greyed out in the extension editor.

I simply copied and pasted the map in question in the extension editor. It then showed up as a actual extension item.

I saved the extension at that point, telling the editor to ignore the error in the duplicated map name (probably could have momentarily changed the name and it would have been safer).

Then I edited the module and removed the now-duplicated item.

Finally I added the extension to the module under my module manager.

Everything seems to work correctly this way, I can play the game and I can edit either the extension or the module.

If it sounds like I did shot myself in the toe let me know.

That’s the way I do it…


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

This did not have the desired effect after all.

The player card images, which I really need to have moved into the extension file along with their piece definitions and stacks and map data etc, are still present in the main module file and not in the extension file. A little bit of thought would have led me to expect this to be the case, but alas I did not think it through enough ahead of time apparently.

However, I am not really sure how to move the images over since that gets handled behind the scenes in the editor code and build file. I expect if I added further player cards at this point to the extension they would correctly be added to the extension archive structure. But what to do to get the original ones (originally in the main module) to switch over to the extension?

What can I do about this?

*********** REPLY SEPARATOR ***********

On 12/05/2009 at 11:32 AM IrishBouzouki wrote:

Add a .zip suffix to your module and your extension.

Within each of them you will find an ‘images’ directory that contain all of the image files.

Copy the images you need from the images directory of the module to the images directory of the extension.

Delete the images from the module.

Rename the module and extension and remove the .zip suffix.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)