|
Bringing your own game to life is
extremely rewarding and, as you will soon see, with MapView the
process is easier than you ever could have thought possible!
|
In
brief, creating a User-Defined Module (UDM) involves combining
a set of image files and a definition file using a program
called the UDM Compiler to create your own module! |
 |
Before you Begin
When creating a game module,
be aware that using scanned images of published games may be an
infringement of copyright laws. Owning a copy of a commercially published
game does not generally grant you any kind of rights in regards to
reproducing it. While a game publisher may look the other way
when you and a far-flung friend create a module to PBEM a game you
both own, they are likely to frown upon seeing their hard work being
offered up for free on the web.
We recommend that you use
image editing software (such as Paint
Shop Pro) to create your own game boards, maps, and other
images.
Files and File Types
| Name/Extension |
Title |
Description |
|
.bmp
.jpg
.gif
.ico |
Image Files |
Image files are used for the background
board or map file and also for the playing pieces. You can
specify up to three different images per playing piece (one for
its appearance in the pallet, one for its appearance while on
the game board, and one used during drag-drop operations). |
| .xml |
Module
Definition |
The module definition file
is written in XML format, which is similar to HTML. It
is used to describe all aspects of the module, from which
images to use to name of the game itself. |
| .udm |
User-Defined
Module |
The User-Defined
Module houses everything needed to bring your game to
life. It is a completely self-contained and compressed
file. To install a user-defined module you just need to
drop it into the usermods directory and start MapView! |
| .cmf |
Custom
MapView Game File |
Once you have your UDM
installed, the games that you play and save are stored as
Custom MapView Game Files. A single game file stores
your whole game, and is compressed for easy
emailing. |
| .mvm |
MapView
Module |
MapView Modules are the
standard Module format supported by MapView. These
modules support a few additional features that are of benefit
when using a module in a commercial setting, such as product
registration. These files can be installed by simply
placing them in the modules directory. |
| .mvf |
MapView Game
File |
Games created using a
MapView Module are saved in this format. Functionally
the same as a .cmf file. |
| udmcmp12.exe |
UDM Compiler |
The UDM Compiler is used to
create you own custom module. You literally drag-n-drop
your module definition file onto the compiler icon and it
outputs your new User-Defined Module! |
Steps to Create a Module
-
Create a directory
(folder) to hold all of the files you'll be using to create your
module. It can be named and located wherever is convenient
for you. This is called your work directory.
-
Create the images you wish
to include in your game and place them all in your work
directory. You can use just about any image editing software
to create these images.
-
Create your module
definition file and place it in your work directory. The
module definition file is basically a text file with HTML-like
structures in it. The specific contents of the file will be
covered later, but the important thing to know now is that it is
just a text file with a .xml extension instead of a .txt
extension. You can use Notepad (or any other text editor) to
create and maintain this file.

| NOTE: |
When using Notepad to create and
maintain an XML file, you must be sure to include the .xml
extension and also select All Files from the Save as
type list. Otherwise Notepad will default the file
extension to .txt. |
-
-
-

| NOTE: |
When using Notepad to create and
maintain an XML file, you must be sure to include the .xml
extension and also select All Files from the Save as
type list. Otherwise Notepad will default the file
extension to .txt. |
-
Creating a module
The
procedure to create a module for Mapview is fairly simple.
You will need to have a registered version of Mapview to enable
your games to be saved.
Here
is the quick basic procedure to create a module:
First
thing to do is create a working directory.
This can be in any location and have any name you wish.
I usually like to have it in the Mapview directory since you
will be copying the completed udm file here anyway.
In
this new directory you will need to have the udmcmp12.exe, xml file,
various graphics files.
Edit
the xml file with a text editor and then save it. Drag and drop the xml file onto the udmcmp12.exe and if all
of the code is correct and all of the image files are in the working
directory it should create a new udm file in the same directory. Move this file into the c:\program files\Motcreations\Mapview\usermods
directory. You can now
restart Mapview and the module should be available when you start a
new game.
Editing the .xml file
The
xml file is the main component for your custom module.
In it you will specifiy all of the module parameters and tell
the compiler what graphic images to use for all of the game pieces.
Below is a small portion of
the main parts of a xml file.
There
are several sections to the xml file.
All of the sections start with <text> and end with
</text>. For
example, if you look at the section that contains information about
the German infantry units you will see the following:
- <module_def format_version="1">
+ <game_info>
+ <game_id>
+ <board_settings>
+ <image_settings>
+ <tabs>
<initial_setup_cmf />
</module_def>
The
first several lines specify the main configuration about the module
and we will come back to them later.
The next section is tabs.
When you open a Mapview module, on the left side of the
screen there is all the unit icons for a game.
If you expand the tabs section of the xml file you will see
that there is also categories underneath.
These categories are where you define each individual player
force or any other miscellaneous tabs for a game.
In an A&A type game you will have a category for each
country such as Germany, Russia, USA, UK, and Japan.
You will also have a category for a miscellaneous items such
as industrial complexes and arrows.
In the program these will show up as the various tabs players
click on to access the different countries pieces.
When you add a new
countries pieces you will need to create a new <category>
under tabs and then close the </category > when you have added
all the units.
Once all of the categories
are specified you will need to make sure they are all within the
<tabs> start and </tabs> close.
General game
configurations
All of the modules main
information is contained in the first few lines of code in the xml
file.
Here is an example:
- <module_def format_version="1">
- <game_info>
<title>Battle of the Bulge</title>
<author>Der Panzinator</author>
<url>www.AxisDomain.0catch.com</url>
<copyright>n/a</copyright>
<min_mv_version>1.2.0</min_mv_version>
</game_info>
- <game_id>
<unique_id>Battle of the Bulge</unique_id>
<version>1</version>
</game_id>
- <board_settings>
<board_image>bulgemap.jpg</board_image>
<label_font_name>Time New Roman</label_font_name>
<label_font_size>10</label_font_size>
<label_is_transparent>False</label_is_transparent>
</board_settings>
- <image_settings>
<mask_html_color>#FFFFCC</mask_html_color>
<pallet_img_width>44</pallet_img_width>
<pallet_img_height>24</pallet_img_height>
<map_image_width>44</map_image_width>
<map_image_height>24</map_image_height>
</image_settings>
+ <tabs>
<initial_setup_cmf />
</module_def>
This
is from a new module I am working on for a Battle of the Bulge game.
The first line specifies the module default format version.
You can just leave this as 1 for now.
I don’t think its necessary to change this.
The
game info section is fairly straight forward.
You just need to put in the name of the module and fill in
text that is highlighted in bold.
Under
the game id section you will need to give the module a unique id and
version number.
The
board settings is where you will specify the map image.
This is the name of the file in your working directory that
has the mapboard image. It
should be either a jpg or gif file to keep file size down.
I believe that a bmp file will also work but will make for a
much larger udm file when compiled since bmp’s are large file
size.
The
font can be changed for all of the text in the game by change the
font fields.
The
image settings section is where you will specify the general image
size for your game piece icons and mask color.
If you intend to use square icons you can change these values
to all 44 for example.
The
mask color is the hex value for the color that you will use in your
unit icon graphics to denote transparent.
When making your icon graphics you will simply use this color
for any area you want to show up as transparent.
If you make a tank you will make your outline and then maybe
a one pixel white border to help make it stand out and then the
background will all be #FFFFCC which is a sort of beige color.
Mapview will take that color and make it transparent.
This way you have a small tank icon instead of a tank picture
inside a rectangle box.
Be
careful not to use this color for your image since Mapview will make
it clear.
Compiling
the module
Once
you have completed your xml file you can save it in your working
directory. The name you
give the xml file will be the name of the udm module once it is
compiled.
After you save the xml
file you just simply click and drag it onto the udmcmp12.exe file
and it will create your udm module.
You can then move the created udm file to your c:\program
files\Motcreations\Mapview\usermods directory.
After you open the module
you can now place all of the pieces where they need to go for any
initial setup for the game. You
can then save the file into the working directory as a .cmf file and
then edit the xml file on the last line by putting in the name of
your saved file on this line:
<initial_setup_cmf>your
file name goes here</initial_setup_cmf>
Then
recompile the module and when you open a new game all the starting
pieces will be where they need to be.
In
a nutshell that is the procedure for creating a Mapview custom
user-defined module. After
you complete one it is easy to just edit some lines of xml code to
create additional modules.
Any
additional questions and information can be found at www.Motcreations.com
You
can go to the website forum and there will be someone to help you
out.
|