• 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
Inferis said:
No, that's not it. Might be another problem,
I was talking about the border problem southwest of the block you've highlighted. It shows up in the game when a different nation owns Macedonia and Bulgaria to the nation that owns Thrace.

EDIT: by the way, what I call province descriptors is what you call the IDList.

Inferis said:
but using my own programs block viewer (which displays the quadtree info quite nicely, see screenshot below)
This looks really fantastic, much easier than what I have which is a listbox filled with all of the quadleaves.

Inferis said:
I found out that the border values have id 0: terra incognita.
This is the fault of id.tbl, which has id 0 on the borders, and which is used in the tree coding algorithm. Those 0s should actually have the correct province ids.

Solution: generate my own id.tbl from the lightmap1.tbl data. Quite feasible, and still part of my original plan, but I hadn't done it yet because it takes some work. The same applies to the bordermap. I'd better do these first, then. :rolleyes:

Johan, is the id.tbl shipped with EU2 the version used for creating the lightmaps? Or shouldn't I be getting the info from that file?
:confused:
Johan did mention that id.tbl is an artifact from the production process. I myself use it for hit testing, as the data is accurate enough for that. But it is filled with faults, not least that the border lines are empty. AFAIR, they are not 0s as you said above, but they are not even defined. Also, every 64 blocks horizontally and vertically there are undefined lines running straight across the whole map.

If I were you, I'd regenerate the whole thing. Even though I still don't understand why you want to use it at all... :)
 

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:
This looks really fantastic, much easier than what I have which is a listbox filled with all of the quadleaves.
Yeah, it was quite a help in getting things right.
Wasn't very difficult to code either: I store the quadtrees as actual trees after loading a block, and my object model has a few methods for easy traversal. This approach has paid of more than once. Only disadvantage is that it takes up more memory, but in the context of an editor this isn't much of a problem.

WiSK said:
Johan did mention that id.tbl is an artifact from the production process. I myself use it for hit testing, as the data is accurate enough for that. But it is filled with faults, not least that the border lines are empty. AFAIR, they are not 0s as you said above, but they are not even defined. Also, every 64 blocks horizontally and vertically there are undefined lines running straight across the whole map.

True.

WiSK said:
If I were you, I'd regenerate the whole thing. Even though I still don't understand why you want to use it at all... :)

Well, you need to. The border pixels need to be encoded with the nearest land province available, and the id.tbl data is the only source I have for finding out what the nearest land pixel is. You can't use adjacent.tbl for this, as it's too inaccurate.

Ultimately, it is up to the user using the editor to provide this info himself. In this case, we can rely on the existing data since we're not modifying province shapes. The ulitmate test of "the editor" will be starting from an empty map and create something new from that point, and see how EU2.exe likes it. :p
 

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
Also, Johan: is there a reason the borders are stored using 2 values (the "color" value in the explanation on my webpages)? AFAIK, the engine doesn't differentiate between them when drawing the map. I guess it's a leftover from earlier development.

If so, does that mean I can safely ignore the value and make it always have a 0 or 1?
 

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:
does that mean I can safely ignore the value and make it always have a 0 or 1?
I was also wondering about this. I did a test the other day, whereby I removed all references to descriptors which have the color bit set. Well not removed exactly, but replaced with the corresponding descriptor with no color bit set. Anyway, it worked fine in EU2. Borders looking exactly the same as they did before.

However, I didn't try yet to remove the actual descriptors from the IDList, but I have enough methods implemented to be able to do this and repack the lightmap. I'll try it tonight if you want.
 

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:
But it is filled with faults, not least that the border lines are empty. AFAIR, they are not 0s as you said above, but they are not even defined. Also, every 64 blocks horizontally and vertically there are undefined lines running straight across the whole map.
I don't see those. Perhaps you have another version? :p

Below some (resized) screenshots from a quick hack to my program that visualises ids.

Generated from the lightmap:

id-lightmap.jpg


From id.tbl:

id-orig.jpg


Differences (marked in red):

id-diff.jpg


Visuals:

id-vis.jpg


Note the difference at the top of Scotland: the islands are absent in the lightmap data, but they do show in id.tbl. This leads me to think that id.tbl isn't quite up to date as it should be. There are more examples, for example a small island near the Azores too.

I hope Johan can clear something up? ;)
 

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:
More likely is that I'm doing something wrong :rolleyes:

Here is an example of the line running through Jutland and Skane.
Every 64 blocks you say: that's 64x32 = 2048. Quite coincidentally the size of the blocks in idgrid.tbl. ;)
I'll check my algorithm for id.tbl decoding to see if I can find these... It's weird they don't show up for me...
 

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:
Every 64 blocks you say: that's 64x32 = 2048. Quite coincidentally the size of the blocks in idgrid.tbl. ;)
I'll check my algorithm for id.tbl decoding to see if I can find these... It's weird they don't show up for me...
I don't know why I said 'every 64 blocks' because it's not true. I had a closer look, and the lines seem to extend wherever there is a border starting from the left side of the map. So I'm more and more convinced I'm doing something wrong now :confused:
 

AmbassadeBelgie

EVIL DICTATOR!
11 Badges
Sep 21, 2003
1.004
0
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Diplomacy
  • Europa Universalis III
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
this will allow you hillbillies to edit the names on the provinces.
That's enough for me!!!! Thank you, InfeGodris!!! Can't wait to change "Artois" into something better, and to get "Brabant" the Hell outta there!

Won't be possible to change province shapes.
Oh well...can't have everything, but seeing the Jaron province, my hopes are higher than even I expected! :p

P.S. Yeah, I know this post is two pages late, but c'mon, I am bringin in my own opinion. GREAT WORK, WiSK and INFERIS!!!!!!

Th :rofl:
 

unmerged(5110)

Field Marshal
Jul 29, 2001
4.432
0
tse.dyndns.org
Inferis said:
I don't see those. Perhaps you have another version? :p

Below some (resized) screenshots from a quick hack to my program that visualises ids.

Generated from the lightmap:

id-lightmap.jpg


From id.tbl:

id-orig.jpg


Differences (marked in red):

id-diff.jpg


Visuals:

id-vis.jpg


Note the difference at the top of Scotland: the islands are absent in the lightmap data, but they do show in id.tbl. This leads me to think that id.tbl isn't quite up to date as it should be. There are more examples, for example a small island near the Azores too.

I hope Johan can clear something up? ;)
Inferis, IIRC, those islands aren't coloured in in the game.

Perhaps the differences between the two files could be related to the fact that one does the colouring in of the map, while the other does the graphics borders of the map or something? I dunno
 

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
tombom said:
Those islands are coloured in blue by the game. I think there is something to do with id.tbl in the map rendering code.

They are coloured in blue because they are a part of the sea zones surrounding them, and aren't counted as actual provinces.

At least that's my guess.
 

unmerged(5110)

Field Marshal
Jul 29, 2001
4.432
0
tse.dyndns.org
Hive said:
They are coloured in blue because they are a part of the sea zones surrounding them, and aren't counted as actual provinces.

At least that's my guess.
Yeah, that's what I was meaning to say, that they aren't coloured as part of the province, but as part of the sea.
 

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
Ein small update...

thrace-vis-fixed.jpg


As you can see, I solved the border problem. You own fault, I was using a wrong offset somewhere when saving the file. :rolleyes:

Secondly, I have generated a new id.tbl from the lightmap data, and it fired up EU2 afterwards. Didn't seem to pose a problem, although I didn't play long.

Next step: do lightmap2.tbl and lightmap3.tbl. Is not a straightforward as it may seem. For example, for lightmap1.tbl I can just reference id.tbl, as it's on the same scale. For the zoomed versions, I need to properly scale down id.tbl too. I was thinking of using every other/every other 2 pixels, but that will yield inaccurate results. Thus some proper reduction is in order (ie selecting the most prominent ID for a stretch ID values).

I'd better stop rambling now, as most of you don't understand what I'm talking about anyway.
 

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:
As you can see, I solved the border problem. You own fault, I was using a wrong offset somewhere when saving the file. :rolleyes:
x-1 or something?

Inferis said:
Next step: do lightmap2.tbl and lightmap3.tbl. Is not a straightforward as it may seem. For example, for lightmap1.tbl I can just reference id.tbl, as it's on the same scale. For the zoomed versions, I need to properly scale down id.tbl too. I was thinking of using every other/every other 2 pixels, but that will yield inaccurate results. Thus some proper reduction is in order (ie selecting the most prominent ID for a stretch ID values).
Not possible just to use the quadtree to make smaller blocks? That was my plan anyway. Any good reason to shelve it?

Inferis said:
I'd better stop rambling now, as most of you don't understand what I'm talking about anyway.
Yes, but for the ones who do, we hang on your every word... :D
 

unmerged(5110)

Field Marshal
Jul 29, 2001
4.432
0
tse.dyndns.org
P.S. Yeah I know that we'll still have to keep the same number of provinces in total.

Also, is there any chance you could see if your program could be adapted to Paradox's other games, such as HoI? Victoria? CK? or possibly even HoI2?

The community will be forever in your debt!