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
Celebes release

Small update: here's the Celebes release. Not much has changed:
Small update with a few fixes:
* reverted back to old boundbox handling. It's probably not completely correct, but better than the last release.
* mview: added the block visualiser code
* mview: fixed bugs with different map sizes
* mview: allow changing of zoomlevel if eu2map file contains the proper lightmaps (experimental, probably still a bit buggy)
* mview: disabled certain controls on lightmaps other than zoom 1​

Warning: technical stuff ahead :D
I've also found the reason for the lightmap 3 artifacts that Kaigon reported. It has to do with the current shrinking algorithm. As you may or may not know, each block in the map is encoded as a tree structure. To combine 4 blocks into one (=shrinking), I create a larger tree by having a root node with the 4 blocks as it's children. This gives one tree, but it's deeper than allowed so I do some clipping in the leaves of the tree to make it a EU2-legal structure again, which is then encoded using the regular process. The advantage of this method is that it's fast and mostly correct, except for one thing: there can be an abrupt change in lightness value in part of a block, and more specifically: between two blocks. Ingame, this is rendered as the gradient Kaigon showed.

The only solution is to do a better (but slower) shrinking algorithm, that complete "draws" each block (instead of just uncompressing the tree structure), shrinks the resulting image and encodes it again. As said, this is slower, but also not trivial to code.

With my other projects (Versailles - Magellan for Victoria and EU3) I don't feel like putting a lot of time in it; perhaps if enough people complain, who knows... :)

Otherwise, keep the bugreports coming! ;)
 
Last edited by a moderator:

cool-toxic

Alexander
25 Badges
Jun 25, 2004
4.957
0
www.eu2ftg.com
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Lost Empire - Immortals
  • For The Glory
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Hey Inferis,
I got a problem, i can't export the lightmap 2 and 3 from the .eu2map file.

I wanted to import a blank map to delete an old map, so i figured out from reading your research about the lightmaps, that lightmap 1 is double as big as lightmap 2, so i made it 1024 instead of 2048.
Code:
C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.2-Celebes-2020>mimage /E MDMAP NEWFIX3 /R:1024,1024,1024,1024 /2

A report comes out:

Code:
*** Environment Info ***

Magellan Build Version: Celebes 2.2.0.*
EU2 Lib Version: 2.2.0.1955
Date: 2006-09-30 13:25:51
Tool: mimage, Version=2.2.0.1955, Culture=neutral, PublicKeyToken=null (v2.2.0.1955)
OSVersion: Win32NT - 5.1.2600.131072
CurrentDir: C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.2-Celebes-2020
SystemDir: C:\WINDOWS\system32
CommandLine: mimage /E MDMAP NEWFIX3 /R:1024,1024,1024,1024 /2
CLR: 2.0.50727.42
EU2: (no install)

*** Error Info ***

System.IndexOutOfRangeException: Index was outside the bounds of the array.


And when i use:
Code:
C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.2-Celebes-2020>mimage /I NEWFIX MDMAP /3

It says that it's injecting to Lightmap 1..
 

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
cool-toxic said:
Hey Inferis,
I got a problem, i can't export the lightmap 2 and 3 from the .eu2map file.

I wanted to import a blank map to delete an old map, so i figured out from reading your research about the lightmaps, that lightmap 1 is double as big as lightmap 2, so i made it 1024 instead of 2048.
Code:
C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.2-Celebes-2020>mimage /E MDMAP NEWFIX3 /R:1024,1024,1024,1024 /2

A report comes out:

Code:
*** Environment Info ***

Magellan Build Version: Celebes 2.2.0.*
EU2 Lib Version: 2.2.0.1955
Date: 2006-09-30 13:25:51
Tool: mimage, Version=2.2.0.1955, Culture=neutral, PublicKeyToken=null (v2.2.0.1955)
OSVersion: Win32NT - 5.1.2600.131072
CurrentDir: C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.2-Celebes-2020
SystemDir: C:\WINDOWS\system32
CommandLine: mimage /E MDMAP NEWFIX3 /R:1024,1024,1024,1024 /2
CLR: 2.0.50727.42
EU2: (no install)

*** Error Info ***

System.IndexOutOfRangeException: Index was outside the bounds of the array.


And when i use:
Code:
C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.2-Celebes-2020>mimage /I NEWFIX MDMAP /3

It says that it's injecting to Lightmap 1..
Hm, is that all the errorinfo you get?

Are you sure there is a lightmap 2 in the file?
 

cool-toxic

Alexander
25 Badges
Jun 25, 2004
4.957
0
www.eu2ftg.com
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Lost Empire - Immortals
  • For The Glory
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Inferis said:
Hm, is that all the errorinfo you get?

Yes.


Inferis said:
Are you sure there is a lightmap 2 in the file?
Yes, i've checked it with the Celebes edition, where we can view the lightmaps, i have the Some from the Au map on the two other lightmaps because i used it as a template, because Magellan only makes one lightmap when using /C.
 

cool-toxic

Alexander
25 Badges
Jun 25, 2004
4.957
0
www.eu2ftg.com
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Lost Empire - Immortals
  • For The Glory
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Here's what Virgenes and Celebes report if i try this command:

Code:
C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.0-Virgenes-2020>minject NEWMDMAP /D:MAP /L

On a Map file with only the lightmap 1.

Code:
*** Environment Info ***

Magellan Build Version: Virgenes 2.0.0.*
Date: 2006-09-30 19:36:26
Tool: minject, Version=2.0.0.26351, Culture=neutral, PublicKeyToken=null (v2.0.0.26351)
OSVersion: Win32NT - 5.1.2600.131072
CurrentDir: C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.0-Virgenes-2020
SystemDir: C:\WINDOWS\system32
CommandLine: minject NEWMDMAP /D:MAP /L
CLR: 2.0.50727.42
EU2: (no install)

*** Error Info ***

System.InvalidOperationException: Operation is not valid due to the current state of the object.
 

17blue17

Field Marshal
68 Badges
Nov 9, 2003
6.367
297
Visit site
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • 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
  • Stellaris
  • 500k Club
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Nemesis
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
cool-toxic said:
Here's what Virgenes and Celebes report if i try this command:

Code:
C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.0-Virgenes-2020>minject NEWMDMAP /D:MAP /L

On a Map file with only the lightmap 1.

Code:
*** Environment Info ***

Magellan Build Version: Virgenes 2.0.0.*
Date: 2006-09-30 19:36:26
Tool: minject, Version=2.0.0.26351, Culture=neutral, PublicKeyToken=null (v2.0.0.26351)
OSVersion: Win32NT - 5.1.2600.131072
CurrentDir: C:\Documents and Settings\HP_Ejer\Skrivebord\magellan.2.0-Virgenes-2020
SystemDir: C:\WINDOWS\system32
CommandLine: minject NEWMDMAP /D:MAP /L
CLR: 2.0.50727.42
EU2: (no install)

*** Error Info ***

System.InvalidOperationException: Operation is not valid due to the current state of the object.

I beleive you forgot part of the command - you just typed /d:map - instead of /D:c:\map assuming your install is at c:\map and therefore it can't find your install.
 

Polak

Léonard devint ch'ti
3 Badges
Sep 24, 2001
2.865
11
  • For The Glory
  • March of the Eagles
  • 500k Club
Hi,

By drawing and changing some Id Provinces, Iv've got this error message :

Code:
*** Environment Info ***

Magellan Build Version: Sulawesi 2.2.1.*
EU2 Lib Version: 2.2.1.24675
Date: 2006/12/12 20:04:21
Tool: mimage, Version=2.2.1.24675, Culture=neutral, PublicKeyToken=null (v2.2.1.24675)
OSVersion: Win32NT - 5.0.2195.262144
CurrentDir: E:\TOOLS
SystemDir: C:\WINNT\system32
CommandLine: mimage /i amsud map /1 /g:1
CLR: 2.0.50727.42
EU2: (no install)

*** Error Info ***

EU2.Map.Codec.MapBlockHandling.NodeCompressionException: Node compression failed at (6655,5119): River adjacency index (=17) lookup between province (=1933) and river (=1402) is out of range. ---> EU2.Map.Codec.MapBlockHandling.AdjacencyIndexOutOfRangeException: River adjacency index (=17) lookup between province (=1933) and river (=1402) is out of range.

What it means ? I cheked Id-Provinces layer and Border Layer, and I don't see any trouble :confused:
 

KaRei

Lt. General
14 Badges
Dec 27, 2005
1.588
47
  • Ancient Space
  • Crusader Kings II
  • Europa Universalis III
  • Divine Wind
  • For The Glory
  • Heir to the Throne
  • Majesty 2 Collection
  • Victoria: Revolutions
  • Rome Gold
  • Sengoku
  • Rome: Vae Victis
  • Europa Universalis III: Collection
  • Stellaris
  • Age of Wonders
I was trying to make some modification in shading layer and I can't move through the import process from intermediate type back to TBL. Wrong character in path it says... but where that wrong character is??? :confused:

Code:
*** Environment Info ***

Magellan Build Version: Sulawesi 2.2.1.*
EU2 Lib Version: 2.2.1.24674
Date: 2008.10.15 22:11:43
Tool: minject, Version=2.2.1.24674, Culture=neutral, PublicKeyToken=null (v2.2.1.24674)
OSVersion: Win32NT - 5.1.2600.196608
CurrentDir: C:\Documents and Settings\Petr.DRAGON.000\Plocha\Magellan
SystemDir: C:\WINDOWS\system32
CommandLine: [COLOR=Yellow][B]minject Vanilla.eu2map /D:"C:\Program Files\Paradox Entertainment\Europa Universalis 2\"[/B][/COLOR]
CLR: 2.0.50727.1433
EU2: (no install)

*** Error Info ***

System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path)
   at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Path.GetFullPath(String path)
   at MapInject.Boot.Main(String[] args)

EDIT:
Ah, double backslashes fixed it. :D
 

chefkoch

Banned
Oct 3, 2007
698
0
Try:
Code:
mextract.exe /?
That will work for all the tools. There you can see the possible commands.

Where should i try it?

I tried this with start>run>c:\ ... \mextract.exe /?

and with the prompt in good old DOS manner.


The only thing that happens is that a small window opens for a millisecond.
 

Nelson007

8banner
34 Badges
Nov 18, 2005
543
5
  • 500k Club
  • Surviving Mars
  • Europa Universalis IV
  • Crusader Kings II: Horse Lords
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Pride of Nations
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Sengoku
  • Knights of Honor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Crusader Kings III Referal
  • Arsenal of Democracy
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • Majesty 2 Collection
  • Iron Cross
  • Europa Universalis III Complete
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis III Complete
  • Deus Vult
  • Darkest Hour
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
I have some problem

Code:
*** Environment Info ***

Magellan Build Version: Marianas-rc1 2.4.0.*
EU2 Lib Version: 2.4.0.18225
Date: 2009/12/06 02:46:17
Tool: mextract, Version=2.4.0.18225, Culture=neutral, PublicKeyToken=null (v2.4.0.18225)
OSVersion: Win32NT - 6.1.7600.0
CurrentDir: C:\Users\nelson
SystemDir: C:\Windows\system32
CommandLine: C:\Users\nelson\Desktop\WAtK_Lite\mextract.exe  lee.eu2map /C:\Program files\Europa Universalis 2 /C /O /1
CLR: 2.0.50727.4927
EU2: C:\Program Files\Strategy First\Europa Universalis 2

*** Error Info ***

System.ArgumentException: Specify new map size as WIDTH,HEIGHT.
parameter name: new map size
   in MapExtract.MapExtractParsedArguments.MapExtractParsedArguments_ProcessOption(ParsedArguments sender, ProcessArgumentEventArgs e)
   in MapToolsLib.ParsedArguments.ProcessArgumentHandler.Invoke(ParsedArguments sender, ProcessArgumentEventArgs e)
   in MapToolsLib.ParsedArguments.OnProcessArgument(ArgumentType type, String value, String data)
   in MapToolsLib.ParsedArguments.Parse(String[] args)
   in MapExtract.MapExtractParsedArguments..ctor(String[] args)
   in MapExtract.Boot.Main(String[] args)
[code]
 

ConjurerDragon

Generalissimus
63 Badges
Apr 19, 2005
5.270
474
  • Teleglitch: Die More Edition
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • The Kings Crusade
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Impire
  • Victoria 2
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • War of the Roses
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Pride of Nations
  • Rise of Prussia
  • Shadowrun: Hong Kong
  • East India Company Collection
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • A Game of Dwarves
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • Hearts of Iron III
Inferis website for Magellan seems to have went offline again.
http://inferis.org/eu2/magellan/
I attached two versions of Inferis Magellan maptool in case someone would need it and can’t download it due to the broken links.
 

Attachments

  • magellan.2.4.0-Marianas-rc1-2020.zip
    859,9 KB · Views: 19
  • magellan.2.2.1-Sulawesi-2020.zip
    883,9 KB · Views: 15