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

First of all, thanks for this graet program, I really aprriciate your work :) ;)

Second, let's get to business :) I would like to ask for some help. For me the map viewer works fine but the editor keeps crashing... What should I do?
 
Daemoncool said:
Hi!

First of all, thanks for this graet program, I really aprriciate your work :) ;)

Second, let's get to business :) I would like to ask for some help. For me the map viewer works fine but the editor keeps crashing... What should I do?
What is the error message? What are you doing when it crashes?
 
Jamie550 said:
What is the error message? What are you doing when it crashes?

Well, I copied the exe into the Doomsday directory, then launch it. After this, a little black dos window appears for a few sec, then it says that some error occured... (typical windows error message, I don't know the text exactly, because I have Hungarian windows)

The error's parameters:

AppName: mapeditor v1.exe AppVer: 1.0.0.0 AppStamp:47dd3357
ModName: kernel32.dll ModVer: 5.1.2600.3119 ModStamp:46239c47
fDebug: 0 Offset: 00012a5b
 
ADukes said:
Now it's okay.

EDIT: The map viewer doesn't display the map.
Where do I get the psd.txt file from?


EDIT2: Ah okay, the psd.txt I must create myself.

I would like to see better instructions how to use the programs.

The map viewer extracts some png files (Zoom_4_#_#). But what I have to do then?
The Map Viewer displays the map now?

Better instructions will come someday.

In the context of modding the map, what you have to do is first copy those files to whereever you keep the maps in preperation for editing. Then you need to list the name in psd.txt so that the editor will know to look for that file.

(BTW, Zoom_4_0_0.colorscales.png, Zoom_4_0_0.provId.png, etc should be entered as Zoom_4_0_0.png)
 
Daemoncool said:
Well, I copied the exe into the Doomsday directory, then launch it. After this, a little black dos window appears for a few sec, then it says that some error occured... (typical windows error message, I don't know the text exactly, because I have Hungarian windows)

The error's parameters:

AppName: mapeditor v1.exe AppVer: 1.0.0.0 AppStamp:47dd3357
ModName: kernel32.dll ModVer: 5.1.2600.3119 ModStamp:46239c47
fDebug: 0 Offset: 00012a5b
You have .NET Framework 3.5? You downloaded a new CoreLib.dll?
 
Fixed. Thx.

EDIT: Some additional questions.

What's the command line syntax to export the whole map at once (if it's possible at all)?
Are all parts of a map necessary for the map editor to create a changed map or are changed parts enough?
I guess the first one, because I couldn't get the editor working while testing it with a changed part only:
Code:
Unhandled Exception: System.ArgumentOutOfRangeException: Index out of bounds.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument arg
ument, ExceptionResource resource)
   bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
   bei System.SZArrayHelper.get_Item[T](Int32 index)
   bei MapEditor.SimpleImageData..ctor(String line)
   bei MapEditor.LineData.Interpret(String line)
   bei MapEditor.Program.Main(String[] args)
 
Last edited:
The whole map is 936x360 blocks. The offsets are 0, 0
The picture size could be 936,360 in which case the image numbers are 1, 1
Or for more reasonable size pics, use 72,72 as size and 13,5 as image numbers

I don't remember the correct order of these, just use -help if you don't know.

Yes, a whole map is necessary.
 
Okay.

That's the syntax "mapviewer_v5 -extract0,0,936,360,1,1". Is it right, that I only get the map_0_0.colorscales.png (took 1 minute)? Or does it take just a long time to create the two other files (after 20 minutes still no additional files)?

With "mapviewer_v5 -extract0,0,72,72,13,5" as you suggested the only thing I get is the first part of the map.
 
Apparently I didn't test enough. The links have been updated.

A valid argument is:

MapViewer -extract(0,0,72,72,13,5)
Parentheses are optional, probably.

I highly do not recommend that you try to extract the whole map at once. Probably it ran out of memory and thus crashed. But if it still happens with smaller pieces please report.
 
Jamie550 said:
Apparently I didn't test enough. The links have been updated.
Okay, this one does work.

Jamie550 said:
Probably it ran out of memory and thus crashed. But if it still happens with smaller pieces please report.
That's probably the case.

Okay, I reached offset=432,288 size=72,72.
While extracting borders an unexpected error occured.

Memory usage is at 50%, mapviewer uses 1.5GB vitual and 1.4GB RAM memory. I have 2GB RAM and pagefile size is 2GB.
 
I'm going to have to take a look at memory management in the future. For now, just change the arguments to continue extracting from where you left off.

It should be: -extract(432,0,72,72,50,5)

(Note that you can put 50 because the viewer should detect any outofbounds and cancel them. But if you want to calculate the correct number, you can do that too.
 
Okay, continued with "mapviewer -extract432,288,72,72,13,5" and it looks like the extracting process is finished.

But there was an error message between the start and the end:
Code:
Doing the following image: Offset=(576,288), Size=(72,72)
Extracting map...
Unhandled Exception: Done!
Extracting grayscale image...System.NullReferenceException: Object reference wasn't commited to an object instance.
   at CoreLib.Graphics.ImageData.Dispose()
   at CoreLib.Graphics.ImageData.Finalize()
Done!
Extracting province ownership image...Done!
Extracting borders...Done!

Doing the following image: Offset=(648,288), Size=(72,72)
Extracting map...Done!
Extracting grayscale image...Done!
Extracting province ownership image...Done!
Extracting borders...Done!

EDIT: Ah, we were posting at the same time.
I was wrong with the command line to continue.
"-extract(432,0,72,72,50,5)" does work.
 
Last edited:
Yes 195 images, so I guess the extracting was successful. The last one is map_864_288.


EDIT: What's the max province number? 2609? There are 2609 (0-2608) listed in the province.csv, but not all are in use.

That's how my psd.txt looks like:
Code:
map_0_0.png;0;0
map_0_144.png;0;144
map_0_216.png;0;216
map_0_288.png;0;288
map_0_72.png;0;72
map_144_0.png;144;0
map_144_144.png;144;144
map_144_216.png;144;216
map_144_288.png;144;288
map_144_72.png;144;72
map_216_0.png;216;0
map_216_144.png;216;144
map_216_216.png;216;216
map_216_288.png;216;288
map_216_72.png;216;72
map_288_0.png;288;0
map_288_144.png;288;144
map_288_216.png;288;216
map_288_288.png;288;288
map_288_72.png;0;72
map_360_0.png;360;0
map_360_144.png;360;144
map_360_216.png;360;216
map_360_288.png;360;288
map_360_72.png;360;72
map_432_0.png;432;0
map_432_144.png;432;144
map_432_216.png;432;216
map_432_288.png;432;288
map_432_72.png;432;72
map_504_0.png;504;0
map_504_144.png;504;144
map_504_216.png;504;216
map_504_288.png;504;288
map_504_72.png;504;72
map_576_0.png;576;0
map_576_144.png;576;144
map_576_216.png;576;216
map_576_288.png;576;288
map_576_72.png;576;72
map_648_0.png;648;0
map_648_144.png;648;144
map_648_216.png;648;216
map_648_288.png;648;288
map_648_72.png;648;72
map_72_0.png;72;0
map_72_144.png;72;144
map_72_216.png;72;216
map_72_288.png;72;288
map_72_72.png;72;72
map_720_0.png;720;0
map_720_144.png;720;144
map_720_216.png;720;216
map_720_288.png;720;288
map_720_72.png;720;72
map_792_0.png;792;0
map_792_144.png;792;144
map_792_216.png;792;216
map_792_288.png;792;288
map_792_72.png;792;72
map_864_0.png;864;0
map_864_144.png;0;144
map_864_216.png;0;216
map_864_288.png;0;288
map_864_72.png;864;72
Is it right? I guess not, otherwise I wouldn't get an error message:
Code:
Enter the number of the choice that you want
1
What is the max province number?
2609
Populating adjancies...Done!
Working on file: map_0_0.png

Unhandled Exception: System.ArgumentException: Invalid Parameter.
   at System.Drawing.Bitmap..ctor(String filename)
   at MapEditor.AdjacentMaker.AdjacentMaker.LoadFile(LineData line, RgbImageDat
a wrap)
   at MapEditor.AdjacentMaker.AdjacentMaker.MakeAdjacent(List`1 files)
   at MapEditor.Program.Main(String[] args)
 
Last edited:
For HoI, the number is 2610.

Are all of these in the same folder?
MapEditor
psd.txt
map_0_0.colorscales.png
map_0_0.provid.png
map_0_0.borders.png
map_0_72.colorscales.png
etc.

If you want to keep the maps in a different folder, say mapeditor root\map images, you need to do "map images\map_0_0.png", etc.

The error was due to a file not being found, probably a xxxxx.provid.png file. (xxxxx is anything, but most likely mapeditor root\map_0_0
 
Jamie550 said:
Are all of these in the same folder?
MapEditor
psd.txt
map_0_0.colorscales.png
map_0_0.provid.png
map_0_0.borders.png
map_0_72.colorscales.png
etc.
No, they weren't. Now they are, but I still get the error message.

Jamie550 said:
If you want to keep the maps in a different folder, say mapeditor root\map images, you need to do "map images\map_0_0.png", etc.
With or w/o the "" ?
 
Status
Not open for further replies.