Whoops, accidentally removed the old posting - here it is again.
How to merge modules and extensions
The script Python vslmerge.py
can merge modules (.vmod
) and extension (.vmdx
) together into a merged module. The script is available from
Requirements
The requirements are the same as given here.
Usage
The script is used like
$ vslmerge.py <Module> <Module or extension> ... [<OPTIONS>]
where <Module>
is a module file .vmod
and <Module or extension>
is a module (.vmod
) or extension (.vmdx
). Multiple module or extension files can be given. <OPTIONS>
are any valid options. To see which options are available, so
$ vslmerge.py --help
If you need help running script on the command line, see here.
The first passed file should be a module (.vmod
), and any subsequent module should be a module of the same game. The option --assume-same
will enforce that assumption. For example, if you used gsnexport.py
to create modules of different CyberBoard scenarios, of the same game box, into separate modules, then you can use this script to merge them into one module.
Any number of extensions can also be given. These will be merged into the output module, creating a stand-alone module. For example to create a module that only contains the needed extensions or to ensure that all players use the exact same extensions.
Predefined setups (or scenarios) will also be merged into the final output.
By default, the merged module is written to Merged.vmod
. This can be changed by passing the option -o
with a different file name as argument.
The merged module will contain additional information about merged files. Note, however, if you load a save file generated with an extension loaded, which has since been merged in, then you will get a warning. It is safe to ignore that warning. Unfortunately, it is not possible to prevent that warning (technically, because VASSAL.build.module.ModuleExtension
does not have a default constructor, and so elements of that type cannot be added to the buildFile.xml
document).
If you have problems or the like, consider to open an Issue. Please provide
- Information about your Operating System, including version
- Python version
- Date of
vslmerge.py
- Enough data, including modules and extensions (possibly as links), to reproduce the problem.
Hope you will find this utility useful.