Log in

View Full Version : Need help with Map Editor


Pangeas
June 10th, 2008, 01:15 AM
Hello Dominionists. I have been having a hard time editing maps. I am able to save my maps as .tga and .map files however I can't do anything in the map editor itself. The text of the mapedit.pdf says to: "...Load in the map you have drawn and click in all borders and terrains. After the map file has been saved you can edit it manually in a text editor if you want to add some extra map commands.."
I see big stacks of the wood flag poles for provinces but they are all bunched together in weird corners of my map and I can't move them around to identify the different provinces. They are just stuck/bunched up on the edges. I've looked around and can't find any how-to's for using the map editor itself. I've tried to 'click in the borders and terrains' but nothing is working. Does anyone know what this means? Does anyone know where I can get a list of GUI map editor commands or other how-to doc? The mapedit.pdf seems to only have text editor commands.

Any help you can provide to would be greatly appreciated.

Thanks
Pangeas

Ballbarian
June 10th, 2008, 01:45 AM
Pangeas,
Your problem is white pixels (RGB 255,255,255).
Dominions knows where provinces are by these white pixels. To use white in your maps, use something like RGB 254,255,255. To the human eye it will still look white. http://forum.shrapnelgames.com/images/smilies/wink.gif

Once you have all of the pure white switched to off white, you can draw a single white pixel wherever you would like a province. Then the flags will only appear on these locations. Province borders must be drawn manually. You define neighbors in the map editor and terrain for individual provinces. I think that once you have your pixel problem straightened out and play around in the editor you will start to see how it works.

If you still have specific problems, feel free to ask in the Scenarios, Maps and Mods forum (http://www.shrapnelcommunity.com/threads/postlist.php?Cat=&Board=d3smm) forum.

Oh, and welcome to the community! We can always use more maps. http://forum.shrapnelgames.com/images/smilies/happy.gif

Pangeas
June 10th, 2008, 03:11 AM
Thanks Ballbarian! I'll give it a shot and will post my successes and questions in the appropriate location http://forum.shrapnelgames.com/images/smilies/happy.gif

Endoperez
June 10th, 2008, 08:25 AM
Visual borders aren't necessary for province neighbours, but the map editor can guess the correct neighbours better if the provinces' borders are drawn in red.

Gandalf Parker
June 10th, 2008, 10:29 AM
some added notes:
Make sure to make the white "dots" only ONE pixel big. Dont let your paint program put a nice round dot on the province. It needs to be the absolute smallest size.

Doing the borders in red to let the program setup initial neighbors can be handy. But dont sweat it if you hate the look. You can change the border colors to anything you want when you upload the map for others to play on (in fact, you can even delete them completely)

lch
June 13th, 2008, 05:48 PM
Endoperez said:
Visual borders aren't necessary for province neighbours, but the map editor can guess the correct neighbours better if the provinces' borders are drawn in red.


I call shenanigans. Red province borders might help a human to recognize them easier, but it would certainly surprise me to see that it had any effect on the map editor. It just looks for white dots. The neighbor finding algorithm seems to be VERY basic, from what I've seen in tests: Draw a circle around a province dot. Connect all other white dots inside the circle as neighbors. So there is a hell lot of possible improvement. I've got Python code to accurately find province neighbors from map files on non-wrapped maps, plain Delaunay triangulation. I was about to extend it to handle wrapped maps, but then other things took over and I didn't complete it. Is there interest in the Python code?

Gandalf Parker
June 13th, 2008, 06:05 PM
Johan has said that the Dom3 internal tool for map editing does prefer red borders for more logical recognition of neighbors. Apparently it does not have to be completely red (255 0 0) but I didnt play with it to find the limits.

But the game-play program does not use borders at all.

Endoperez
June 13th, 2008, 06:08 PM
What Gandalf said. I haven't tested it, but I've heard red is supposed to help.

lch
June 13th, 2008, 06:23 PM
You live to learn. If it comes from JK then I guess that it's a reliable source. http://forum.shrapnelgames.com/images/smilies/happy.gif I'm still in favor of Delaunay, though.

Ballbarian
June 14th, 2008, 12:40 AM
I can confirm that this is the case and I have even emulated it in my own neighbor finding algorithm. http://forum.shrapnelgames.com/images/smilies/wink.gif

Agrajag
June 14th, 2008, 06:06 AM
I'd be interested in a link to an explanation of how to properly implement a good algorithm for Delaunay http://forum.shrapnelgames.com/images/smilies/happy.gif
I was planning on doing something that would create similar output, but in a very inefficient way.

lch
June 14th, 2008, 01:10 PM
Agrajag said:
I'd be interested in a link to an explanation of how to properly implement a good algorithm for Delaunay http://forum.shrapnelgames.com/images/smilies/happy.gif


It's a very popular problem in Algorithmic / Computational Geometry. One popular algorithm by Fortune uses a sweepline, which you might have seen elsewhere, e.g. in a course on Efficient Algorithms. Understanding how the algorithm works is not that hard. Understanding why it really works and actually implementing it might be a little trickier. http://forum.shrapnelgames.com/images/smilies/wink.gif