Creating a Minimap

From CryWiki

Jump to: navigation, search
About
Author Not specified.
Skill Level Intermediate
Compatibility Temporary Fix
Requirements Not specified.
Date Added Not specified.
Last Modified Not specified.

This tutorial will teach you how to create and setup a minimap for your custom level.

Contents

Prerequisites

  • Working Map

Preparing the minimap

First, you have to hide the helpers. Otherwise they will be visible in your minimap.

Then, open the editor's minimap by going to View→Open View Pane→Map.

Search for your map in the map window. Keep the right mouse button pressed and move the mouse until you find your map, adjust the size with the middle button so you can see it completely. In our tutorial, our map is represented by a big "my map" logo.

The blue object in the minimap is the actual position of your camera. To get ride of it, move your camera in the perspective window and go far away from your map.

When you are done, capture the screen using the Print Screen key.

Saving the Minimap

Now, open a paint program and paste in the image you've just captured. How you can do this depend on your paint program, sometimes you have just to select Paste somewhere in the Edit menu, sometimes you have to create a new file first then select Paste.

Crop the image so that only the map is visible.

Resize the image in order to have a size of 2048x2048. If you do it well, the width and the height of the image should be equal. It is important because you have to keep the image proportions.

Save the file using the DirectDrawSurface format (.DDS) or the JPEG format (.JPG) Other formats have not been tested but they may work.

For the DDS options, I used DXT1 and no MIP maps.

Creating the XML File

Note
If you already have a file named "(mapname).xml", where (mapname) is your map's name, you can skip this step.

Create a new XML file in your level's folder (where the .cry and other files are located). XML files are just text files so you can create a ".txt" file and change its extension to ".xml".

Warning
The XML file must have the same name of your map. For example if your map is called MyMap, the XML file must be called MyMap.xml

Importing the Minimap

In this new XML file, add the following

<MetaData>
 <MiniMap Filename="myminimap.dds" startX="0" startY="0" endX="sizex" endY="sizey"/>
</MetaData>

Replace "myminimap.dds" with the name of your minimap image file.

Replace sizex and sizey with your level's heightmap size x 2. For example, if you map size is 2048x2048 you must set sizex to 4096 and sizey to 4096. If you don't remember the size of your heightmap select Terrain→Resize Terrain in the Sandbox2 editor.

Save the XML file.

Open filelist.xml, which is located in your level's folder. You should see something like

<download name="MyMap" type="Map">
 <index src="filelist.xml" dest="filelist.xml"/>
 <files>
  <file src="level.pak" dest="level.pak" size="18532624" md5="1afd161b67d4236167ae942fba49cc8d"/>
 </files>
</download>
</code>

Insert the following line after the <code><file src=... line and replace MyMap.xml with the name of the XML file you created.

<file src="MyMap.xml" dest="MyMap.xml" size="" md5=""/>

You will have the following in filelist.xml

<download name="MyMap" type="Map">
 <index src="filelist.xml" dest="filelist.xml"/>
 <files>
  <file src="level.pak" dest="level.pak" size="18532624" md5="1afd161b67d4236167ae942fba49cc8d"/>
  <file src="MyMap.xml" dest="MyMap.xml" size="" md5=""/>
 </files>
</download>

Save filelist.xml.

Note
The size and the md5 checksum will be calculated by the editor when you select Export to engine... However it is recommended to reload your map before doing so as the editor may have not noticed the changes in your filelist.xml.

Result

As you may noticed, the minimap is, in fact, a simple image. Therefore you can change the image however you want. The minimap generated by the Sandbox2 editor is a great start if you want to create your own minimap because it will help you to keep the map correctly aligned.

Credits

Nov

See also

Customize the Loading Screen

Personal tools