• 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.
Status
Not open for further replies.
XieChengnuo said:
Hi Jamie,

Good on you for work on the HoI2 map editor! My suggestion is to follow the precedent made by Inferis and have there be several layers in a photoshop .psd file:

1) Lightmaps, this is a grayscale layer 0-255 ranging from pure black to pure white with grays in between. (If in photoshop, you could make this layer start in the "Multiply" blend mode, that would be great.

2) For the border province, you could make a clear layer with pure red indicating the borders (a cool thing you could also add would be if the user could draw green or blue lines to either indicate bridges across islands or blockable straits, which would add the appropriate lines to the adj_defs.csv file)

3) For the province IDs, to use the RGB values - it will be a lot clearer to people which provinces are different if you try and make the colours as far apart from each other as possible, if they are all varying shades of purple, then it can get very difficult to tell at a glance if that's one big province i see or two smaller ones.

3) The rivers overlay could be yet another layer, with actual RGB values, this time

OK, now the extra cool stuff - those nice-to-haves:

a) Some sort of colorscales.csv previewer, where you insert the R,G,B,index values in some sort of slider form, and a picture to the left of your sliders immediately shows you what your province would look like. This would be GREAT as a separate .exe file for people that just want to play around with colorscales.csv without worrying any of the other map-editing stuff.

b) Please have the ability to be able to edit the map as manageable chunks rather than only the whole thing, because the map is pretty huge and we don't all have a million GBs or RAM ^__^. It would be even cooler if we could set the parameters of what exactly which sizes we wanted so we could have a "europe" map and a "iran" map or whatever.

c) Do you have any idea what those artifacts at the bottom of the map are when you go out to maximum zoom? any way to fix that?
Firstly, I don't actually own Photoshop, so what I next say might be stupid.

Is it possible to, after using photoshop, save the layers as different image files (I have not yet worked with psd files, and figuring out how to now would be a very diverting (as in distracting) experience)

Then there could be several maps, each representing the same area
1) A grayscale from 0-255 for the lightmap colorscales
2) Borders continue to remain frustrating, I will think more on this
3) In another layer? OK, but how will RGB values match to province IDs?

For rivers:
This is actually completely separate from the other files, and I perfer to process them separetely, to avoid running out of memory.
A single layer with RGB values will do. But is it possible to fill those chunks that you do not put anything in with that yellowish color on the bottom of map\tiles.bmp? If not thats fine.
The river overlay is actually so simple that I could probably finish that part today, if I get information fast enough (its 8AM for me right now)

Other stuff
a) There are complications...
b) Definitely need chunks. The lightmaps are divided into tiles of 32x32. I was thinking chunks of either 36x36 tiles or 72x72 tiles. The former would require 260 maps, in an arrangement of 26x10, and the latter would require 65 maps, in the arrangement of 13x5

Unfortuantly specifying where the chunks are would be too complicated for now.

c) Could you specify? Are you viewing by province or by colorscales?
 
This will make adjacent.tbl, which will later be used for creating the lightmaps

You need a textfile listing the adjacencies in this format:
Empty lines allowed
Lines with # as the first character will be skipped
Lines with values will look like this:
A;B;C;D
A is the province number
B, C, and D are the adjancies
You can have as many ids after A as you want, separated by a semicolon
These are all legal lines:
43
24;42;59;52;29;10;538;275
42;91

There is no need to arrange the IDs in order
If a province has no connections, you can omit it from the file
BUT the maxprovince number MUST be inside the file (How else would the program know how many provinces there are?
So if there are 100 provinces, even if province 100 has no connections there must be a line:
100

http://www.mediafire.com/?4yvnrcgjhgx

QUESTIONS
In Photoshop, is it possible to extract a layer into its own image, and then slice that image into 117 columns of 256 pixels, and then save each slice into a separate file? Note that the numbers can be different, I am just asking if it is easy to do such things.
 
Last edited:
The overlay maker:

This is what makes the rivers that show up.

In a folder, you have to put certain files in.
The file names should be like: XxY.bmp
Even if the files are .jpg or something else, put .bmp
The X ranges from 0 to 12, and the Y ranges from 0 to 4.
The "x" is just a seperator, keep it there.
Each picture should be 2304x2304 pixels
If an area has nothing that needs to be painted, you may skip that picture.
For transparency, just make the alpha value zero.

http://www.mediafire.com/?f7sxygzwccf

Note that this has not yet been tested.
 
Jamie550 said:
Firstly, I don't actually own Photoshop, so what I next say might be stupid.

Is it possible to, after using photoshop, save the layers as different image files (I have not yet worked with psd files, and figuring out how to now would be a very diverting (as in distracting) experience)

Then there could be several maps, each representing the same area
1) A grayscale from 0-255 for the lightmap colorscales
2) Borders continue to remain frustrating, I will think more on this
3) In another layer? OK, but how will RGB values match to province IDs?

For rivers:
This is actually completely separate from the other files, and I perfer to process them separetely, to avoid running out of memory.
A single layer with RGB values will do. But is it possible to fill those chunks that you do not put anything in with that yellowish color on the bottom of map\tiles.bmp? If not thats fine.
The river overlay is actually so simple that I could probably finish that part today, if I get information fast enough (its 8AM for me right now)

Other stuff
a) There are complications...
b) Definitely need chunks. The lightmaps are divided into tiles of 32x32. I was thinking chunks of either 36x36 tiles or 72x72 tiles. The former would require 260 maps, in an arrangement of 26x10, and the latter would require 65 maps, in the arrangement of 13x5

Unfortuantly specifying where the chunks are would be too complicated for now.

c) Could you specify? Are you viewing by province or by colorscales?

Here does this help?

http://www.fileformat.info/format/psd/

Would it not be faster to only retrieve the parts of the map the user requests instead of getting the entire map and splitting it up into chunks? If the chunk size/location is not customizable, then there are big worries about having to deal with anti-aliased text that goes over the border of a chunk.
 
XieChengnuo said:
Here does this help?

http://www.fileformat.info/format/psd/

Would it not be faster to only retrieve the parts of the map the user requests instead of getting the entire map and splitting it up into chunks? If the chunk size/location is not customizable, then there are big worries about having to deal with anti-aliased text that goes over the border of a chunk.
I see your point, but I will have to think about how to accomplish it.

But the overlays should be easy enough to do by standard chunks, correct?

I think that after making the layers, you should save them separately for the colorscales, province ownership, and borders, because the .psd file looks very complex. Separating the pieces into different pieces will be very helpful.

Also, how should RGB values be converted to province IDs? Would this work:
First divide the R, G, and B by 16, to get values ranging from 0 to 15. Then, do R*256 + G*16*B. This would give province IDs ranging from 0 to 4080.
 
Jamie550 said:
I see your point, but I will have to think about how to accomplish it.

But the overlays should be easy enough to do by standard chunks, correct?

I think that after making the layers, you should save them separately for the colorscales, province ownership, and borders, because the .psd file looks very complex. Separating the pieces into different pieces will be very helpful.

Also, how should RGB values be converted to province IDs? Would this work:
First divide the R, G, and B by 16, to get values ranging from 0 to 15. Then, do R*256 + G*16*B. This would give province IDs ranging from 0 to 4080.

I think it would be easier for the end-user if they were all put in one file because they need to see the overlay and if they match appropriately. It would be very difficult to work on each layer as separate files. I don't mind if you take more time in developing to work with the .psd file in favour of getting all the layers into one file. If there's anything I can do to speed along this process, let me know.

Unfortunately, the algorithm you have to translate RGB values into provIDs is not reversable (i.e. difficult to translate provIDs to RGB values for output to the .psd file). In addition, remember that adjacent provinces for vanilla HoI2 tend to have provIds very close to one another, which means that, with this algorithm they would have very similar colours (difficult to tell apart). Here's Inferis' method: http://forum.paradoxplaza.com/forum/showpost.php?p=4021662&postcount=1401

Take a look at it. What Inferis does, actually is allows for a variety of different methods to convert provIDs to R,G,B values. I would go one step further and actually allow this conversion to be done by modders in a plain-text file.

For clarity, have it so modders can just make a quick .csv:
#provID;R;G;B (RGB values must be between 0 and 255!)
0;255;62;16 #Berlin
1543;217;153;200 #Potsdam
...

The reason for this is for massive projects that require a restructuring of the map, it's a lot easier for map-makers to work separately from database modders, where the map-makers plop down whatever colours they want (being sure not to duplicate any one colour for more than one province), and database modders using "allocated" provIDs, and then just having somebody map the two together at the end of the process.
 
I will do what you suggested for the ownership ID coloring thing.

Isn't it possible to save each individual layer in Photoshop? Or do you mean that I should make the overlay editor also able to deal with dynamic-sized blocks, like the lightmap editor will be?

EDIT: Actually, now that I am making my own (simple) file format, the idea of using .psd files sounds more appealing.
 
Last edited:
The BoundBoxMaker is completed!

After editing your lightmaps, you can run this to generate boundbox.tbl

Maxprovince for HoI is 2608, for Vicky is 2864

If you want to test it now, point it to the current lightmap1, and get the new boundbox.tbl file.

Here is the link: http://www.mediafire.com/?1mw5dyx9tzm

So to make a new map:
1) List adjacent provinces
2) Use AdjacentMaker to make adjacent.tbl
3) Use OverlayMaker to make index.tbl and tiles.bmp
4) Use the tool to make the lightmaps. This step cannot yet be done
5) Use BoundBoxMaker to make boundbox.tbl
6) Delete navaldist.tbl, and let the game recreate it

EDIT: To begin planning for lightmap editing: Make a list of provinceIds and colors like so:
5;24;85;24
This means that when the editor sees the color with the R value of 24, the G value of 85, and the B value of 24, it will know that the province is number 5.

To add comments, either use # for a whole line, or add extra semicolons
The following two comments are legal:
#Bismark
5;38;100;488;Bismark
But the next is not:
10;48;28;42#Bismark
 
Last edited:
Please comment:

Version 0.1 of the Map Editor Photoshop File Specifications

Bottommost layer:
Divided into blocks of 32x32 pixels. Each block will either be filled with black, to signify that it should be transcribed, or kept transparent to prevent copying.
Notes:
a) A separate text file should be included to describe what pixel on the big map (0, 0) is
b) Transcription is described only blocks of 32x32. Either a block is completely included or it is not

Province ownership layer
Colored with RGB values according to the province that owns the pixel.
Notes:
a) What a certain RGB value represents will be determined by a separate .csv file, in this format:
ProvinceId;Red;Green;Blue;Optional Comment;There can be as many semicolons as you want;But the first four sections must be as specified
#Lines can also be blank or commented out as a whole
42;49;20;44#This comment is illegal

Grayscale layer
Colored with a grayscale, to determine the index into colorscales.
The index will be value/4 (Note that remainders are truncated, so a value of 3 will not round to 4 and make 1, but will become 0.

Tile layer
Transparent, unless something should be present. If there is a river or terrain there, just draw it with regular RGB

Border layer
Transparent, except for borders between land provinces
When there is a land border, have two colors, which are TBD. One will represent an "inner" coloring, and the other will represent an "outer coloring". To understand what this means, use the Map Viewer, viewing by province on a zoom greater than the smallest one, and look at the country borders, that often have four colors. Each different color is a province. Each actual province has two of these: an outer and inner, which look different somehow.

PS. Please send me some .psd files to experiment on
 
Last edited:
I'd say this is sufficient for a beta test. I am sure new ideas will surface with testing and use.

:cool:
 
Jamie grate job when you release new version he he.
I have question Can I copy link to HOI map editor beta to stonyroad.de many others users can find you grate editing tools and maybe help you
 
Version 2 of the HoiVicMapViewer!

http://www.mediafire.com/?19dly4zymyd

Fixes the bug with viewing from colorscales. Now it should look much better.

Also: Send me your .psd files, please.

@snajper06: There actually is no map editor beta yet. The lightmap tool is far from finished. But if you (or others) want to host some of my tools, there are two conditions:
1) There is a reliable way of contacting you about new versions, and you tell me that reliable way
2) When a new version appears, within a few days of my contacting you, you should remove the old version and post the new version.
 
Last edited:
Hi Jamie550 - Do you have a website? Then you can establish an RSS feed for people to use. An alternative is to get people to sign up to a mailing list, and when you have updates, you just send to the mailing list.

As for the .psd file ... do you have an e-mail address that I can send to or something??
 
XieChengnuo said:
Hi Jamie550 - Do you have a website? Then you can establish an RSS feed for people to use. An alternative is to get people to sign up to a mailing list, and when you have updates, you just send to the mailing list.

As for the .psd file ... do you have an e-mail address that I can send to or something??
jamieli550 at gmail.com (removing the spaces and changing the "at", of course)

I will discuss with somebody of the possibility of a website. If not, we can use a mailing list.
 
Jamie550 said:
jamieli550 at gmail.com (removing the spaces and changing the "at", of course)

I will discuss with somebody of the possibility of a website. If not, we can use a mailing list.

Ask the guys at Modhoi, iam sure the would host it for you.

Link to their site: http://www.modhoi.com/
 
Gormadoc said:
Ask the guys at Modhoi, iam sure the would host it for you.

Link to their site: http://www.modhoi.com/
I actually don't need a host, mediafire is easier, has no delays in downloading, and I can instantly upload new files. What would be useful is some way for people to sign up to a rss feed that I can send announcements to. But to do that I need some sort of website. Without rss, we will have to rely on email and pm.
 
Status
Not open for further replies.