map tutorial - Writen by XieChengnuo

Inferis' Magellan Tutorial

the unprofessional edition. yay!! \o/


Table of Contents...
  1. Before You Begin
The Process...
Here's how the process works. First, the files that the program needs are:
  1. The Lightmap files - these files contain the basic information for all the provinces' shapes, and which province corresponds to which province ID. Note that these files need to be changed if you want to change the name on the province shown on the map.
    • Map\lightmap1.tbl - graphic of the map on closest zoom
    • Map\lightmap2.tbl
    • Map\lightmap3.tbl
    • Map\lightmap4.tbl - graphic of the map on farthest zoom
    • Map\lightmap5.tbl - (unused zoom level)
  2. Other map files - these files contain various information such as what is adjacent to what, what the rough bounding regions of each province are, files for terra incognita. That's about all you really need to know.
    • Map\adjacent.tbl
    • Map\boundbox.tbl
    • Map\id.tbl
    • Map\idgrid.tbl
    • Map\incgrid.tbl
  3. Db\Province.csv - this file defines what the gameplay values of each province will be - the province name, the resource it has, what terrain it is, etc. You can edit this file with any normal .csv editor, or with a simple text editor, if you have dextrous hands and a sharp mind. See Havard's EU editing Empire - editing province.csv for more details.

Magellan will take these files, and convert them into an Intermediate Format (.eu2map) - that is, it will convert it to something that it can understand. These files will end with .eu2map (the first part of the name will be whatever you choose). This way, you can make a map depicting the Warcraft World, and name it warcraft.eu2map, or you could make a map depicting the EU2 map, and name it myMap.eu2map, and Magellan would have all this information stored for you in these .eu2map files.

Once it has done this, it will then be able to convert the Intermediate Format into a format that you can edit. Currently, the program exports the map data into a Photoshop format (.psd), which you can then use a basic Photoshop editor to edit. We'll go through the exact process of this together.

Magellan makes 4 layers in the PSD file (Click for more information about layers):

  1. Borders layer - this layer is used to store information about borders between provinces.
  2. IDs layer - this layer is for telling EU2 which province to select when you click on that part of the map. It looks like all the provinces, but is in gaudy colours and looks funky. You'll also note that it is set to "Overlay" in the blending mode, and that you can sort of see through it. We'll get more to that later.
  3. Shading layer - this layer is basically a picture, and you can draw whatever you want on it. The Vanilla EU map draws the provinces as close to the IDs layer as possible.
  4. Map Info layer - DON'T touch this layer! Magellan needs this information in order to help you build your map.

Finally, when you have finished editing your map to your satisfaction, you will ask Magellan to convert the file from .psd format back to .eu2map format. From that format, it can then import your map into the game, where it can be played and enjoyed!

Before You Begin...
Having all the Files...
When you download Magellan Sulawesi, you should come across 6 friends:
  1. mcolor.exe
  2. mextract.exe
  3. mimage.exe
  4. minject.exe
  5. mprovince.exe
  6. mview.exe

What do each of the programs do? Here is a short description:
mcolor.exe - Basically, each province in the whole EU2 world is given a specific colour (in the RRGGBB color code). This program will tell you which province is given which colour. You will then use this information in the IDs layer in the .psd file.
mextract.exe - This program is used to take the maps out of the EU2 program, and to convert them to .eu2map format.
mimage.exe - This program is used to copy sections out of the .eu2map, and make a .psd out of it. Once you finish editing your .psd file, you will use this program to put the updated .psd file into the .eu2map. Since it is incredibly CPU demanding to put the entire map into a .psd file, you will have to tell it which section to take out of the map.
minject.exe - This program is used to take an .eu2map file and inject it into the game (that is, to write all the .tbl files, and update the province.csv in the game). It is used in the last stage of the process, just before playing the game to test out your new map. mprovince.exe - This program is used to extract or import province.csv data so that you can edit terrain information, resource or the placement of sprite icons -- it creates a province.csv or a province.xml. mview.exe - This program is used to view the maps inside a .eu2map file. You can also use this program to determine the coordinates of the section that you want to pull out of the .eu2map.

Other Programs...
What other programs do you need?
  1. Adobe Photoshop - any version past 3 should be fine.
  2. Europa Universalis II - an installed copy on your hard drive. You should make a backup of the Map directory and Db\province.csv before you do any editing to the game.
  3. Lots of Paradox Interactive Games - Just so that you can keep the company in business and still making games ^_^

SHUT UP!!! I want to get right down to business...
Alright, alright. I'll present a quick and dirty version to get you to your .psd file then:

- decide exactly what section of the map you want to edit
	(you won't be able to edit the entire world at once, it's just too big and CPU-intensive)
- BACKUP YOUR Map directory and Db\province.csv!!!
- Open a command line (Start -> Run -> "command.exe")
- Go to your Magellan directory (where you unzipped your files)
- enter this command: mextract.exe myMap.eu2map 

	(this will create a file called myMap.eu2map which will contain all of your information)
- enter this command: mview.exe myMap.eu2map 
- use the program to find:
	> the x-coordinate of the top-left corner of the map section that you want to edit (1)
	> the y-coordinate of the top-left corner of the map section that you want to edit (2)
	> the width of the map section that you want to edit (3)
	> the height of the map section that you want to edit (4)
	> the x,y coordinates of the map can be found as the numbers at the very bottom left of the window.
	> future versions of Magellan will allow you to input a command directory from the mview.exe tool
- close the tool
- enter this command: mimage.exe /e myMap.eu2map maps/a.psd /R:(1),(2),(3),(4) 

	> instead of maps/a.psd, replace it with the name of the .psd file that you want
		(the default will create a file called a.psd in the maps directory)
	> replace circled numbers with the above information
	> (btw, the map's dimensions are : 18944 pixels wide by 7296 pixels high)
	> I'll include a rough map later to help you out in this area.
- open up photoshop, and open up your .psd file to begin editing
- have fun and for god's sake!! don't anti-alias and use the PENCIL TOOL, NOT the brush tool!!!

How does one insert it into the game? It's a little bit more complex, but basically (if you have NOT added provinces):

- enter the command: mimage.exe /i maps/a.psd myMap.eu2map /G:1 
- enter the command: minject.exe myMap.ex2map 
And that should be done! However, if you've added provinces, you'll need to do a bit of province.csv editing to give these new provinces terrains and such.

Using Photoshop...
The Concept of Layers...
Photoshop uses layers to allow for easy editing. What do we mean by this? Imagine that each "layer" is a transparent sheet. These sheets are stacked on top of one another. So say you have 3 layers, A, B and C. A is on top, B is in the middle, and C is at the bottom of the stack. You then paint a circle on A, and then you paint a rectangle on B. The circle will cover a part of the rectangle, and the rectangle will be obscured by the circle. This is because A is covering B. Now, when you take the A layer off, you can see the entire rectangle. This is just like taking one of the transparent sheets out of the stack. In this way, we can edit layer A without affecting layer B, and vice versa.

Loading the Actions...
The next thing that you need to do is to load the actions properly into your Photoshop. Click on Window > Actions in the menubar, and then click the right arrow in the circle thingy, at the top right of the window that appears. Then click Load Actions... Here is a little picture to make things clearer:


Now load "magellan.atn" (Click to download). These actions will allow you to create maps that look just like the EU2 game.

Basic Photoshop Editing...
One thing you MUST ALWAYS REMEMBER is to always, always add an extra layer on top of the original so that you are not modifying the original image. Because if you move on to part B and then all of a sudden you didn't like that job that you did on part A, then you have to undo all of your work on part B AND part A, redo part A AND part B... ugh... what a pain. So press the new layer button on the layer window (SHIFT+CTRL+N).

Now the two large coloured squares on the left toolbar are the primary (top left) and secondary (bottom right) colours. Usually only the first is the one that's used the most. If it is not black in colour, then we need to change it to black in colour by clicking on it. The Color Picker window will appear, and then we can use the eye dropper on our image to select the colour we want. Now that we have selected our color, click OK. Then click the Brush Tool (B) and start brushing! Use long, straight strokes. It may take some practice.

Another way to change colours quickly is to hold down ALT. This will change your cursor to the eyedropper. Then simply click on a part of the picture, and your brush colour will change to that colour. Convenient!

A useful tool that you will use often is the Zoom Tool (Z). This is the magnifying glass on the toolbar to the left. Press it, and left-click on the image. It will zoom in. Now left-click and drag and make a selection box. The zoom will then zoom in as big as the box. Thus, the smaller the selection box that you make, the closer it will zoom in. To zoom out, hold down the ALT key and click and the screen will zoom out.

OK now we are finished editing our picture and are ready to make a shield. Save your source image as a separate PSD file so that if you screw up you always have this step to fall back on.

Making it look like an EU2 Vanilla Map...
To make it look like an EU2 Vanilla map, you'll need some basic photoshopping skills, so read the previous section carefully, and make sure you understand everything.

NOTE: I've now put this into an action. Go into your actions and run the "Create New Shading Set" action, and it will do all this for you. You will still have to run the "Update Provinces" action after running this action.

The New Shading Layer Set You'll need to Make a new Layer Set, labelled "New Shading", and inside this layer set, you'll need the following layers:

  • "Oceans" Layer. It is blank for now. Set its blend mode to "Lighten", and its Opacity to 45%
  • "Lines" Layer. Do a foreground fill on that layer with the colour: #AFAFAF. This layer will have a lot of layer effects, which we'll go over shortly.
  • "Flats" Layer. Foreground fill this layer with: #C0C0C0

Use the following layer effects on the "Lines" Layer:
Drop Shadow Settings
Outer Glow Settings
Bevel and Emboss Settings
Contour Settings
Color Overlay Settings
Finally, press F9 to activate the "Update Provinces" action in my Map Actions. And voila, everything should look like an EU2 vanilla map. Note that all the text is gone. You will have to do that yourself, using the Bernhard Modern True Type Font. Make sure for Bernhard Modern, that the font size is 17px, and that it is in all capitals.

If My Teaching Sucks...
PLEASE tell me. I need to know these things so that I can improve; and if I improve then the teaching will get better and everybody will be happier! In specific, if there's anything you need help with, feel free to e-mail me and I'll do my best to help you; just remember I'm a busy person and may not be able to reply to you immediately.

Back to the Main Page

XieChengnuo's Home Page