Adding a simple map
We will first see how you can add a simple map. Assume you have created a PNG, a JPG or a GIF as foundation for a map. If you have another format, convert it, preverably PNG. Next, check the size of the map. The larger the map, the slower the UGMT will react when loading it. In extreme cases it will even refuse to load it. Consider 1000x1000 pixels an upper limit. Say your map is called "MyPlace.png" and is a 600x800 pixel PNG file.
You know that there exists an atlas called "Community". This is where all fan-published material goes. Since "MyPlace" is for your personal use only, we call that atlas "Personal". Create a directory called Personal in the sub-directory maps of the UGMT, i.e. where the map plugin resides. It's on the same level as the sub-directory Community. In this directory create a file called personal.xml and open it. (You can choose any name here, as long as it ends with .xml.) Add the following lines and save it:
<atlas name="Personal"> <map name="MyPlace" img="MyPlace.png" scale="200"/> </atlas>
The name of the map will appear in the map-tree when you start the UGMT, the img is the PNG file you created. scale gives the scale of your map in pixels/league. The "200" above are an example which is true for the local maps in the UGMTSamples.zip, but your scale is possibly different.
Now make sure the file "MyPlace.png" resides in the Personal directory. That's it, your map can now be used with the UGMT.
Add another map
Place the new PNG in the same directory as the first and add a line like
<map name="MyOtherPlace" img="MyOtherPlace.png" scale="200"/>
before the last line you previously entered, i.e. before "</atlas>". Again, that's it.
You can add up to three layers for each map, which are overlayed by the UGMT. Each of these layers is another PNG file. The upper layers should be mostly transparent, otherwise they would cover the lower ones, which is not what you want. The informal hierarchy is:
You see, Layer-3 hasn't been used yet. Let's assume your Graphics tool provides you with an effective way to generate such an overlay and you export a layer-1 png, mostly transparent, as "MyPlace_1.png". Put it where you put the other files. Now edit the second line to read
<map name="MyPlace" img="MyPlace.png" layer1="MyPlace_1.png" scale="200"/>
This is all you need and similarly layer2 and layer3 are added. Be aware of the memory consumption of two or more images that need to be displayed on top of each other - another reason to use mainly transparent overlays. If you use local maps, man made structures may be the bulk, so don't use layers for it.
Preparing for travel
In case you like to travel on maps, you need to be very aware of colors. Colors are used to determine terrain. Your currently displayed image is used for that. When you click on a pixel to determine the travel rate, the color of that pixel is checked. Make sure your image contains only a fixed set of colors, each belonging to a specific terrain/vegetation type. Suppose your base image is of such a type. Then for each of these colors add a line right after the beginning, i.e. after "<atlas ...>"
<color name="fefefe" vegetation="alpine" terrain="mountains"/>
Here "fefefe" is the color value and "alpine" and "mountains" specify the appropriate vegetation and terrain. Following is a list of terrains and vegetations that the travel tool understands
Take note that the currently displayed image is used for travelling, so roads must be visible to take effect! But what about names? If they appear in the pixel you click on what will the travel rate be? What about roads, do you have to specify a color for each terrain a road winds through? The answer to these questions is simple. Any time terrain or vegetation (or both) are missing, the missing part is obtained from the vicinity. For instance, if your names are written in black, just specify
For roads, just leave out the terrain. Finally, these colors must match (and are valid) for all the maps of an atlas. This is why they are specified for an atlas, not for a map. This restriction will probably be lifted in the future.
Advanced travel support
The above recipe has a drawbrack. Since the colors for travel are picked up from the base image, you either have to reduce colors considerably in the or specify hundreds of colors in atlas XML file if you have an elaborate map. To make things more easy, you can specify a separate image for the travel tool, which is never visible, but used to determine travel. You can keep your hand-crafted maps with lots of colors and create a reduced image having only the colors matching to the terrains/vegetations present on your map. This image you put where everything else goes. Say, it is called "MyPlace_travel.png". You should change your line to
<map name="MyPlace" img="MyPlace.png" raster="MyPlace_travel.png" scale="200"/>
This can be combined with layers, but if a so-called raster is specified, the visible image is never consulted, so your raster should contain all the roads (while it may miss the names, since it is never visible).
Odds & Ends
There is another addition in a map that may be specified.
<map name="MyPlace" img="MyPlace.png" tacticalspeed="0" scale="200"/>
This is another aid for travelling. Your map may be "tactical" or "strategic" (or inbetween) in nature. The latter use the travel rules based on terrain and vegetation, whiol ethe former use the "Movement" attribute of characters, respectively groups. The tacticalspeed inserted into the map specification above specifies a number in the range 0 - 1. A 0 means "Movement" attributes are not considered, 1 means only "Movement" is considered. For example, a 0.9 means terrain/vegegation is marginal but not ignored totally. Interior maps should have a 1, generally.
Now, say you have a lot of HTML files and possibly a number of supporting images. You know that there exists an index called "Community". This is where all fan-published material goes. Since your index is for your personal use only, we call that index "Personal". Create a directory called Personal in the sub-directory index of the UGMT, i.e. where the index plugin resides. It's on the same level as the sub-directory Community. Suppose you'd like to have an entry for "Sholkin Bay". In this directory create a file called personal.xml and open it. (You can choose any name here, as long as it ends with .xml.) Add the following lines and save it:
<index version="0.1"> <entry name="Sholkin Bay" value="Personal/Sholkin.html"/> </index>
Sholin Bay will now appear in your personal index and when you select it, it will try to load the file "Personal/Sholkin.html". Note that the base is the directory the files reside in (and shouldn't really be modified using a HTML base-tag) We have thus assumed such a file exists in the subdirectory index (not Personal itself!) Any further index entries are added between <index ... > and </index>. The order is not important, entries will be sorted automatically.
When you try to combine the index and map, you essentially want clickable regions on a map that select the corresponding index entry or that you can use the "Locate" button to find a map location for an index entry. You must be able create something like a so-called clickable image map through an external tool, otherwise it might be hard. The UGMT does not provide any means to create such map yet.
Suppose you have a tool that lets you create a clickable image map from the map "MyPlace.png". You will create circles, polygons and rectangles on specific regions of your image, specify a "link" for each and save these as "MyPlace.html". Let's look at what the tool saved. The saved file should contain lines like
<area shape="circle" coords="496,917,36" href="Personal/MyPlace"/>
You might have chosen a different shape, such as a rectangle, then the number of coordinates will differ then. The href is the important here. It mus begin with the atlas - "Personal" in this case - and then specify the map this shape refers to - "MyPlace" in the example. Now find the index entry we look for. Say "Sholkin Bay" from above. We then replace the first line with the second set of lines
<entry name="Sholkin Bay" value="Personal/Sholkin.html"/> <entry name="Sholkin Bay" value="Personal/Sholkin.html"> <area shape="circle" coords="496,917,36" href="Personal/MyPlace"/> </entry>
Observe the missing slash on the new first line! Any further locations to a single entry are just added parallel to the first area.
This is all there is to it. Note that in this way you can add index entries for maps from another atlas.
|∗Editing Data∗||∗Adding Data∗||∗Sample Conversion∗|