• 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.

WiSK

Major
11 Badges
Apr 30, 2002
603
1
  • Cities in Motion
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
XieChengnuo said:
Accurate world map projections!! :D :D :D

Like I said in post 537, an accurate map means a lot of islands are very very small. It also might be difficult to fit into 16 megs.
 

Birger

Not really here...
6 Badges
Sep 21, 2001
3.993
0
www.wappenwiki.org
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • For The Glory
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
Hive said:
Noooooo! The EUII-style map is SO much better than Vicky/CK! :eek:


I love the details in the CK map, even the COTN and TT maps are beautiful. :)
The EU is just too cartoonish... :p
 

unmerged(5110)

Field Marshal
Jul 29, 2001
4.432
0
tse.dyndns.org
WiSK said:
Like I said in post 537, an accurate map means a lot of islands are very very small. It also might be difficult to fit into 16 megs.
no biggie, i've been looking into the projections and we can just blow up the islands or do a cool island grouping = province deal... i have some ideas in mind, definitely
 

Hive

Lex Superior
19 Badges
Oct 16, 2002
12.250
15
  • Heir to the Throne
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Hearts of Iron Anthology
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Crusader Kings II
Birger Jarl said:
I love the details in the CK map, even the COTN and TT maps are beautiful. :)
The EU is just too cartoonish... :p

But the "cartoonish" look is all that's needed. It gives an easier overview and are less hardware demanding...
 

unmerged(22171)

Recruit
Nov 20, 2003
8
0
Visit site
WiSK said:
Sounds pretty cool :)

Just to double-check: you realise you need to make two maps? One is the graphical rendition of the map, and one defines the borders and the provinces like a kind of mask. It's not clear yet the specifications of the second part, because Inferis hasn't defined the exact functionality of his editor. However, as long as you have the borders as a separate layer then I think you can probably generate this quite simply.

EDIT: To see what I mean, have a look at Inferis' map viewer. The graphic marked 'lightmap' is a representation of how the picture data is stored, while the graphic marked 'IDMap' shows how the borders and provinces are stored.

Ah, it's called a 'halo' then? But any idea which font it is that Paradox uses on the standard maps?

Two Maps... Yes I had figured that before the work Inferis has done. I have a Very large file 85% done which is essentially a Collage of Screen shots. this has a separate layer of "borders" which is identical to that in the link... at 4-pixels, and a further Layer which is blocks of Black from which i can make vector paths for use in naming etc.

However I will halt this map (An extracted map from the game would be a better base to do an improved PTI free map based on the current one) and instead concentrate on a Euro centric map (of the area bounded in my previous post) derived from the map i have already. Its essentially over twice the scale of the Games map so should very detailed in province terms. Jersey, Bornholm, etc are all doable.

N.B. would love copies of the in game maps if they can be extracted to a Grey-scale geography, and a bmp border file. :)

The Number of existing provinces, and the number of possible additions are as yet unknown. will let you all know (i don't claim extensive knowledge all essential European additions only Baltic).

Re halo... that's one way to do it. Essentially create a Path in Photoshop to contain all land. then using the Borders map... Blur the hell out of it to get the gradation or halo effect desired.

So in Summery: Needed Graphical files...

1) A full size grey scale map with borders
2) A Full sized Bit map of borders.
3) A full Sized Layer of Paths of provinces (to apply bevel effects etc if desired) easily achieved with Streamline.
3) A Document With a Low Res Map to Perform Naming. Any app that has the desired Text abilities should do, I'll use Indesign.
4) A Vector Document derived from the paths to perform the desired effects and or in which to easily create the grey scale map. Illustrator etc, I will use freehand probably.
5) Bits and pieces art if you want to change the Map furniture, such as the trees, hills, Towns, etc. These are of course applied in game and are separate from the map...

RE the font, from the quick mock-up a Medium weight times seemed to be fine (I have not studied the Serifs too closely yet). I'm sure Johan would tell us if it was a specific font.

The hard part will no doubt be the province descriptions etc. and all the data needed to describe the map to the game.... graphics are easily done in dedicated apps.

*wishes fortitude to Inferis in the quest*
 

WiSK

Major
11 Badges
Apr 30, 2002
603
1
  • Cities in Motion
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
Despite Inferis' excellent descriptions of the lightmap#.tbl files, I'm still having trouble understanding the exact meaning of the index1/river/index2/colour province descriptors. Can anyone explain it for me?

I'm looking specifically at block (228, 46) in lightmap1.tbl which I thought would be a good example as it contains a convergence of Anglia, Lincoln and Bristol around a river. However, it seems to have more province descriptors than I would expect. What are they all for?

Some specific questions:
* index1 is absolute, right? the max number of descriptors is 60?
* what does river==15 mean, and what does river!=15 mean?
* index2 is relative to index1, right? is it signed or unsigned?
* Inferis suggests colour is unused, so why are there so many province descriptor pairs where colour is the only difference?

Another point, looking at Johan's posted bit of code. If the quadtree is traversed breadth-first, why bother representing the tree in memory, why not just render each subsection of the 32x32 block as you go through the bitstream?
 

WiSK

Major
11 Badges
Apr 30, 2002
603
1
  • Cities in Motion
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
WiSK said:
Some specific questions:
* index1 is absolute, right? the max number of descriptors is 60?
* what does river==15 mean, and what does river!=15 mean?
* index2 is relative to index1, right? is it signed or unsigned?
* Inferis suggests colour is unused, so why are there so many province descriptor pairs where colour is the only difference?

Looking again through Johan's 'MapCodec', some things become apparent.
* index1 is an index into the ID table (kinda self-referencing, or sibling referencing)
* index2 and river however, are indices into adjacent.tbl (I think!)
* the codec then checks to see if the border between index1 and index2 needs to be drawn
* in that case, and there is a river defined (!=15), index1 becomes the river province
* in case of no border, i'm not sure what's going on here

This explains to me why changing adjacent.tbl often gives problems with the game's rendering of province borders. In effect, by changing the size of the list of adjacent provinces, you are messing with the indexing system used in the lightmap files.
 

WiSK

Major
11 Badges
Apr 30, 2002
603
1
  • Cities in Motion
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
WiSK said:
Another point, looking at Johan's posted bit of code. If the quadtree is traversed breadth-first, why bother representing the tree in memory, why not just render each subsection of the 32x32 block as you go through the bitstream?

Answer: because the position of the next part of the datablock is dependent on the length of the bitstream.
 

Inferis

TBL File Hacker
21 Badges
Jul 2, 2001
1.574
0
www.inferis.org
  • Stellaris
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis III: Collection
  • Cities: Skylines
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis III
Interesting stuff guys. ;)

The editor, once it's done, will be an import/export tool, as it's too hard and frankly quite stupid to implement a drawing tool when perfectly good tools exists (think Photoshop, Paint Shop pro, or even Paint). So, you define a region of the map to export, and the "editor" will generate a set of files containing the necessary data to "edit" that area in an image editor. There will be 3 files: one containing the visuals of the map, one containing the border mask and one containing the identity map (ie what pixel belong to what province). Ideally, the tool should spew out a layered PSD file, but I'm not going to focus on that (yet). For now, it will probably be 3 PNG or JPG files.

You can edit all files in your editor, and then import the modified images into the editor. So it's up to the modder to provide valid data. ;) The editor will then import the files back into the EU2 format.

The editor will also have it's own file format: this will allow you to work on multiple maps. You can then generate the EU2 maps from within the editor for use in the game itself.

I've been able to code a bit, but not much. However, since I'm settling down in my new house, I'll be having more time on my hands soon, especially since the GF's out of the house in the couple of next weekends. ;)

I'll keep you guys posted on any progress, of course.
 

Inferis

TBL File Hacker
21 Badges
Jul 2, 2001
1.574
0
www.inferis.org
  • Stellaris
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis III: Collection
  • Cities: Skylines
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis III
WiSK said:
Looking again through Johan's 'MapCodec', some things become apparent.
* index1 is an index into the ID table (kinda self-referencing, or sibling referencing)
* index2 and river however, are indices into adjacent.tbl (I think!)
* the codec then checks to see if the border between index1 and index2 needs to be drawn
* in that case, and there is a river defined (!=15), index1 becomes the river province
* in case of no border, i'm not sure what's going on here

This explains to me why changing adjacent.tbl often gives problems with the game's rendering of province borders. In effect, by changing the size of the list of adjacent provinces, you are messing with the indexing system used in the lightmap files.
Well, yes and no. :)

The "complex" entries in the IDList of each block are the ones for pixels that lie on a border. Since a lot of borders are defined by rivers too, some of that information is encoded too.

Essentially, the index 1 is an index in the same idlist. It references the "original" province of the pixel. Index2 and river are indeed indexes into the adjacency table of the province defined by index1. Depending on if the border is a river or not, those values would be set accordingly (no river = river adjacency will have all bits set, and index2 will just be the index into the province adjacency table).

For the pixels with "no border", the normal encoding method is used.
 

Inferis

TBL File Hacker
21 Badges
Jul 2, 2001
1.574
0
www.inferis.org
  • Stellaris
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis III: Collection
  • Cities: Skylines
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis III
WiSK said:
Answer: because the position of the next part of the datablock is dependent on the length of the bitstream.
Also, the rendering algorithm is dependent on neighbouring blocks to do it's drawing...
The EU2 engine does not really decompress the tree in memory. It traverses it each time using the data as defined in the lightmap files, doing what's needed along the way.
 

WiSK

Major
11 Badges
Apr 30, 2002
603
1
  • Cities in Motion
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
Inferis said:
Ideally, the tool should spew out a layered PSD file, but I'm not going to focus on that (yet).
That might be a bit of work, unless you know the PSD format or it is trivial to guess. Considering the ease with which a user can import 3 files into 3 new layers in a Photoshop file, I think there are better things to waste your time on :)

Inferis said:
Depending on if the border is a river or not, those values would be set accordingly (no river = river adjacency will have all bits set, and index2 will just be the index into the province adjacency table).
It's this bit from Johan's code I'm wondering about...
Code:
if ((!(gpMap->MapMode._DrawFlags & PROVINCE_DRAW_BORDERS))
 || Province[id1].GetBorderStatus() == Province[id2].GetBorderStatus())
{
	if (river != INVALID_ADJ)
		id1 = Province[id1].GetNeighbor(river);
	BlockDecompressed.IdTable[a] = id1;
} else {
	if (Province[id1].IsViewable())
		BlockDecompressed.IdTable[a] = MAX_PROVINCE;
	else
		BlockDecompressed.IdTable[a] = MAX_PROVINCE+2;
}
The first part is clear: if we shouldn't draw the border, then draw the underlying river or province. The second part must be to indicate to the rendering engine that it must draw a border, but what's MAX_PROVINCE+2 ?

Inferis said:
Also, the rendering algorithm is dependent on neighbouring blocks to do it's drawing...
Can you explain what you mean here? Which neighbouring blocks, and how is it dependent?
 

WiSK

Major
11 Badges
Apr 30, 2002
603
1
  • Cities in Motion
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
Well, I'm getting there, albeit slowly. Spent all last night making a quicker non-recursive algorithm for unpacking the QuadTree. Seems to work :)

screenshot

Now need to make it show the provId mask, border mask and shading. Also need to rewrite the class I made for the adjacent.tbl and include it in this project.
 

Hive

Lex Superior
19 Badges
Oct 16, 2002
12.250
15
  • Heir to the Throne
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • March of the Eagles
  • Europa Universalis III Complete
  • Hearts of Iron Anthology
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Crusader Kings II
WiSK said:
Well, I'm getting there, albeit slowly. Spent all last night making a quicker non-recursive algorithm for unpacking the QuadTree. Seems to work :)

screenshot

Now need to make it show the provId mask, border mask and shading. Also need to rewrite the class I made for the adjacent.tbl and include it in this project.

I have no idea what you are doing... but good work, keep it up! :D