.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Idiot's Guide to Making Custom Maps? (http://forum.shrapnelgames.com/showthread.php?t=35875)

Ballbarian August 26th, 2007 12:42 AM

Re: Idiot\'s Guide to Making Custom Maps?
 
It does not draw borders but it does detect red pixels in an effort to guess neighbors (or it did in dom2 and I am pretty sure it does in dom3).

I gave a lot of thought to this when I was working on my own custom map editor. If you draw an imaginary line between two points (provinces) and check each pixel's color along that line and set a flag when you hit a border (red) pixel, then skip ahead a few pixels (to clear a border that might be several pixels wide at that point) and if you reach the 2nd point without hitting another set of red border pixels, then you can say that it is likely for the 2 points to be neighbors. This is not 100% foolproof, but it can generate a fair guesstimate. http://forum.shrapnelgames.com/images/smilies/happy.gif

Gandalf Parker August 26th, 2007 01:02 AM

Re: Idiot\'s Guide to Making Custom Maps?
 
Johan has says that red borders help the game detect province boundaries. Its not a necessity but it helps. Ive used red+blue for water borders and red+green for land borders. But just before distribution I like to hit them both with a good dose of transparency.

Zylithan August 27th, 2007 01:30 AM

Re: Idiot\'s Guide to Making Custom Maps?
 
Alright, I'm back with more stupid questions/ better clarification of an old question.

I can make a map now, and assign neighbors. But when I play the map, if I right click on a province, sometimes it selects a different province - especially for unusually shaped provinces. There has to be some way for me to define the geometric boundaries of the provinces. I attached a simple map, as a .bmp ( normally I use .tga)
Depending on where I click in province 5 (as determined by visual red lines) in game, sometimes the computer decides I want info about 5, but often also 1,2,3,4,6. It chooses whichever white dot I am closest to I think. How can I tell it to identify the red lines with the geometrical outline of my provinces?

Thanks!

Edi August 27th, 2007 02:54 AM

Re: Idiot\'s Guide to Making Custom Maps?
 
Every white pixel is a separate province. So if you have for example two white pixels next to each other, both will be provinces and will act accordingly, which may be part of your problem.

If this is not the case, then you need to right-click as close to the province flag as possible to select it.

Gandalf Parker August 27th, 2007 10:25 AM

Re: Idiot\'s Guide to Making Custom Maps?
 
The game doesnt actually recognize the boundaries as far as in-game clicking. Only the dots.

If your map is playing too small for comfort then you might want to change the defaultzoom in the .map file

Zylithan August 27th, 2007 02:04 PM

Re: Idiot\'s Guide to Making Custom Maps?
 
I only have single pixel white dots now.

My problem is that when I click (in game) in a space that looks like part of one province, the computer selects a different province. Now, if I click right on the flag, I always get the correct province. But for long or irregularly shaped provinces (see my attachment) this is a problem.

Now, maybe this is how the game is... where you click on the overland map, it just selects the closest white dot. But I have never had this problem when playing a map I did not make personally. Then again, most provinces are roughly spherical in the maps I have played. So maybe this will be a problem on any map with dramatically nonspherical provinces. (This is my conclusion based on what Gandalf said above.)

The image I attached isnt meant to be a real map, of course, but it is a tool for explaining my problem, and for me learning the system.

Thanks!

Ballbarian August 27th, 2007 02:31 PM

Re: Idiot\'s Guide to Making Custom Maps?
 
The attachment is not working for me.
404 file not found... attachments broken again?

lch August 27th, 2007 02:32 PM

Re: Idiot\'s Guide to Making Custom Maps?
 
You haven't attached anything anywhere, from how I see it. The game counts mouseclicks towards the next nearest white dot, and depending on the shape of your provinces and placement of those white dot "centers", that might not be what you had in mind.

Zylithan August 27th, 2007 03:08 PM

Re: Idiot\'s Guide to Making Custom Maps?
 
Ballbarin - it says 7 people downloaded the attachment about 6 posts up from here. Maybe they all failed? I don't know. Maybe I can PM it to you if you are interested?

Ich - What do you mean " counts mouseclicks towards the next nearest white dot"

Ballbarian August 27th, 2007 03:20 PM

Re: Idiot\'s Guide to Making Custom Maps?
 
Download counts don't matter. 3 of those are me trying the link and getting a 404.

I think what Ich means is that wherever you click, the game selects the closest province marker to that point and that becomes the selected province.

The game does not know, nor care about the shape of the province or it's borders. All it cares about is the almighty white dot. http://forum.shrapnelgames.com/images/smilies/happy.gif

So imagine that "1" is a province that circles province "2".

111
121
111

If 1's white dot is located in the top center spot and I click on the bottom center spot, then province 2 is going to be selected, not 1.

Hope that helps to clear things up.


All times are GMT -4. The time now is 09:30 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.