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

Coder

First Lieutenant
53 Badges
Oct 5, 2002
232
5
Visit site
  • Victoria 3 Sign Up
  • Europa Universalis 4: Emperor
  • Crusader Kings III
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Hearts of Iron II: Beta
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Europa Universalis III Complete
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For The Glory
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis IV: Res Publica
eu2 files are interconnected, but after separating them into more logical (but less space efficient) editor's own file format(s) the editor can be built separately from the compiler
thus the editor doesn't have to know much about eu2 complicated file formats
so all the heavy linking together will happen when compiling simple (possibly large) data into those various tbl files...

the possibilities of modifying only relatively small parts of the map (something like 32x24 blocks of 32x32px at a time for example):
boundbox.tbl can be modified province by province so this is not a problem when modifying only part of the map; id.tbl can be loaded in (separated into scanlines and individual spans) and only the affected scanlines need to be modified; idgrid.tbl can be compiled using lightmap.tbl or id.tbl to get the original data if the modified part doesn't match an region exaclty; adjacent.tbl should not be a problem since there already is a program for modifying it and it isn't linked to other tbl files; incgrid.tbl blocks match lightmap.tbl blocks so the (only?) problem here is that we don't know the exact format of incgrid.tbl?;
and then there's this lightmap.tbl which again doesn't need to be modified all at once - the indexes need to be recalculated (loaded into memory, modified part is compiled into quadtrees and id lists and then saved)
the blocks that are only partially modified in zoomed out lightmaps can be decompiled, modified and compiled
the problem might be that we are using rasterised map image so zoomed out lightmaps might need some special attention (for image quality and determining which pixel belongs to which province, the answer to the latter might be comparing original(paradox) lightmap's ownership data to original id.tbl)

the problems are the things we don't understand (incgrid.tbl and rivers in lightmap.tbl)
those could ruin the plan to unpack, modify and compile only a part of the map at a time
 

bwyb00

Major
56 Badges
Mar 28, 2004
696
43
  • Stellaris
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
Inferis said:
The incgrid format is pretty clear, actually. I just haven't updated the info on my site.

You probably say on your site you are not sure how the "boundbox.tlb" is used by the EU2 engine file for the same reason... or maybe simply don't really care about this but i am pretty sure it is used for computing the screen coordinates to redraw when a province color was modified (because you select it or it snowed...).
It might of course have other use but that would explain why the games worked without this file with a white screen.
 

G-Klav

Lt. General
28 Badges
Jun 1, 2003
1.320
1
Visit site
  • Europa Universalis IV: Res Publica
  • Age of Wonders III
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: El Dorado
  • Europa Universalis III: Collection
  • 500k Club
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Hearts of Iron II: Armageddon
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III
  • Diplomacy
  • Crusader Kings II
  • Cities in Motion 2
Great work, Inferis! :)
This will be so useful when it's ready!
 

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
Hah, I found out what the weird encoding stuff is in the id table for each block. It's for drawing borders: that pixels of the map that are "covered" by borders are stored like the rest of the pixels, but the ownership (or, the province the pixel belongs to) is encoded differently.

It incorporates info on what province the actual pixel belongs to (like it would be a normal pixel), but also if the pixel is a river (and so, what river it is), or the id of the province bordering the pixel.

That way, the game can decide how it should draw the map: info for drawing the borders is there, but it sometimes isn't used. That's all.

Of course, we don't need to draw borders in an editor, but there has to be a way to define them, so I'll need to incorporate stuff like that anyway.

And here are some shots of a testing program I'm using... Nothing fancy, all it does for the moment is read and display the map. I'm almost finished on the encoding code, though. While this will be a great step forward, it is not an editor.

Depending on my schedule, I'll promise (edited by kurtbrian) to have something rudimentary by september or so. :eek:o

Shaded drawing, with borders (these are the actual shades defined in colorscales.csv):
codecvis0.jpg


Shaded drawing, no borders:
codecvis1.jpg


Grayscale drawing:
codecvis2.jpg


Stuff to do before starting work on an editor:
* code stuff to read/write adjacent.tbl
* add adjacency checks to encoding process (the last part)
* code stuff to read/write TI information

Then I'll be testing the encoding process thoroughly, and after that it's combining stuff into one program. ;)
 
Last edited by a moderator:

unmerged(12680)

I'm Lazy.
Dec 12, 2002
2.818
1
Visit site
Inferis said:
Hah, I found out what the weird encoding stuff is in the id table for each block. It's for drawing borders: that pixels of the map that are "covered" by borders are stored like the rest of the pixels, but the ownership (or, the province the pixel belongs to) is encoded differently.

It incorporates info on what province the actual pixel belongs to (like it would be a normal pixel), but also if the pixel is a river (and so, what river it is), or the id of the province bordering the pixel.

That way, the game can decide how it should draw the map: info for drawing the borders is there, but it sometimes isn't used. That's all.

Of course, we don't need to draw borders in an editor, but there has to be a way to define them, so I'll need to incorporate stuff like that anyway.

And here are some shots of a testing program I'm using... Nothing fancy, all it does for the moment is read and display the map. I'm almost finished on the encoding code, though. While this will be a great step forward, it is not an editor.

Depending on my schedule, I'll promise (edited by kurtbrian) to have something rudimentary by september or so. :eek:o

Sep, hmm? ;) You know what will happen if you don't keep your promise, right? :D
 
Last edited by a moderator:

kurtbrian

Older than dirt
10 Badges
Sep 9, 2001
9.122
0
www.lemonamiga.com
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
Inferis said:
I said expect. I don't see the word promise anywhere. :rolleyes: :p
please check again....

now get back to work!

:D

Disclaimer: This is of course meant as a joke, should you feel offended I apoligize