• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Miihkali

Old Guard
6 Badges
Apr 11, 2007
2.979
23
  • Crusader Kings II
  • Darkest Hour
  • For The Glory
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
As you may have noticed, I'm currently creating a Hyborian Age mod which is going to have a custom map. I have now created a very rough draft for the map, but when the MapUtility v1.2.5b MapMaker.exe reaches the modified files it crashes with the following note left in the log:

Code:
#################################
An exception has occurred.
#################################
Exception: System.ArgumentException
	Derived from System.SystemException
	Derived from System.Exception
9.8.2014 16:26:12
Message: bitmap must be Format24bppRgb
Source: CoreLib

STACK TRACE
CoreLib.Graphics.ImageData`1[T] ToData(System.Drawing.Bitmap)
   kohteessa CoreLib.Graphics.ImageData`1.ToData(Bitmap b)
   kohteessa MapEditor.SimpleImageRadishMaker.LoadAPic(Boolean required, String path, ColorType type)
   kohteessa MapEditor.SimpleImageRadishMaker.LoadFile()
   kohteessa MapEditor.RadishMaker..ctor(LineData data)
   kohteessa MapEditor.RadishMaker.MakeFile(LineData data)
   kohteessa MapEditor.MakeFileTask.TaskOverride()
   kohteessa CoreLib.Task.DoTask(Int32 index, TaskQueue tq)
   kohteessa CoreLib.TaskQueue.DoWork(Object value)
   kohteessa System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   kohteessa System.Threading.ThreadHelper.ThreadStart(Object obj)

What to do? I suppose the problem is "Message: bitmap must be Format24bppRgb", i.e. some settings in the image file, but I am not very good with GFX so I have no idea about such things...
 
Last edited:
All map files must be in png format, but in few different bit depth:

a) ID layer - 24 bits
b) colorscales - 8 bits
c) borders - 32 bits
d) tiles - 32 bits

If you set them wrong, the Map Utility will crash.
 
This is how and in which application I save all map files. I had some problem with correct file formats when I've bought new computer and changed OS from Windows XP 32-bits to Windows 7 64-bits.

1. I draw every layer in Photoshop. Then I save all files in Photoshop as png 32-bit. Note that tiles and borders layers must have transparent background. After this step both tiles and borders are finished. ID and colorscales must be still converted, unfortunately Photoshop doesn't allow us to save those files in correct format.

2. ID layer - I use paint.net application. To save those layers in correct format you need to open your ID layer files and then follow these steps:
File --> save as --> 24-bit png

3. Colorscales -I use Infraview application. To save those layers in correct format you need to open your colorscales files and then follow these steps:
Image --> Convert to Grayscale
+
Image --> Negative
+
File --> Save (original folder)
(In result you'll see file mostly in black, with white and gray lines. For some reason on my new computer (Win 7 64-bits) it works like that while on my old comp (Win XP 32-bits) I didn't have to use negative option so If your map will be too dark, don't convert to Negative.)
 
A few things I have noticed myself:
- If ID.csv is opened by another program, the mapmaker will crash.
- Colorscales can be saved with GIMP as indexed picture and it will work.

EDIT: Here's the original discussion I had with Mumia about map-modding. It might be useful for somebody.

mumia said:
Miihkali said:
I'm planning some major modifications to an existing map. I haven't decided yet if I'm going to use vanilla, DH Full, or E3 map as a base. I used to make small modifications to the HoI2 vanilla map, but it was years ago. I read the map modding guide in Modding documentation folder, but I think some questions were left unanswered. You seem to be the most talented map modder on the DH forum, so I decided to ask if you could help me with these dilemmas.

First, when I used an early version of Jamie's map editor, a map didn't work if you didn't add and remove insane amounts of connections between provinces. The number of connections had to remain exactly the same all the time. I guess the connection limit has been removed from DH engine. Am I correct?

Secondly, does the newest version of Jamie's map editor add and remove connections automatically. I.e., does it detect if a new province blocks a connection between two existing provinces and remove the connection? And, vice versa, does it add the new connections between new provinces, or do I need to add and remove connections manually?

Thirdly, assuming there's no need to worry about connections, is basically any kind of ID map (those colourful .png files) correct? Let's say I paint every single ID .png file with the colour of province #1 so there should be just one huge province. If I export that map, will it work? If I start adding new provinces, will the map be basically correct?

Fourthly, is it possible to modify the size of in which .png files are exported. Modding would be easier if each .png file would be twice as high as the default and thus there wouldn't be as many separate .png files to edit.

1. Since DH v1.0 there are no connection limit anymore. You don't need to add or remove any connections unless you really want.
2. If you add new province Map Utility will automatically find all its connections. If two previously connected provinces are not connected anymore Map utility will remove that connection. Note, that if there were a river or sea connection between those two previously connected provinces in adj-defs.csv you need to delete it manually or your armies will teleport from one unconnected province to the other.
3. Yes, I think you can paint all provinces in one color and just add step by step other provinces. To see such map in game and avoid CTD would need to remove country files in inc format in scenarios folder.
4. Here, you should ask Martin or other DH dev. I think they used differently scaled images, I tried to do the same but failed as i don't know what to write in Map Utility settings file. I found it very annoying to scale all images to 3744 x 1440, it's 64 ID, colorscales, rivers and borders files... it would be very useful to change those settings.
 
Last edited:
It works!

9amemw.png


Still lots to do, but the first draft works! Feels great! :D

Thank you for your help.
 
Ok, I have now started to fill the world with smaller provinces and I don't have any technical issues (right now) I'm facing a new problem that seems to be by far the most difficult: how to come up with provinces that:

1) fit to each other
2) have natural-looking, yet not too wild shapes
3) are roughly equally sized
4) have about the same number of connections to other provinces.

I guess it is only matter of good taste and experience, but I still wanted to ask, if somebody had good tips to give.

I have personally discovered that about 120 to 150 pixels is a good diameter for a province, though Mumia (as the author of E3 map) would probably disagree. :D It definitely depends on the combat system, too.
 
Last edited: