.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Map Editing question (http://forum.shrapnelgames.com/showthread.php?t=39109)

Ballbarian June 4th, 2008 11:11 PM

Re: Map Editing question
 
SMALL=1
LARGE=2
SEA=4
SOMEWATER=8
MOUNTAIN=16
SWAMP=32
WASTE=64
FOREST=128
FARM=256
NOSTART=512
MANYSITES=1024
DEEP=2048
CAVE=4096
FIRE=8192
AIR=16384
WATER=32768
EARTH=65536
ASTRAL=131072
DEATH=262144
NATURE=524288
BLOOD=1048576
PRIEST=2097152
EDGEMOUNT=4194304

Edi June 5th, 2008 01:53 AM

Re: Map Editing question
 
Quote:

NTJedi said:

the 1024 = manysites ... what's the percentage increase?

30. I think the terrain effects on magic site frequency are listed in the site searching threads linked from the Strategy Index.

Agrajag June 5th, 2008 05:49 AM

Re: Map Editing question
 
1 Attachment(s)
Thanks again Edi, and thank you Ballbarian (though for some reason I keep thinking its Ballbrian).

And just so no one gets their hopes up, here's what my maps look like currently http://forum.shrapnelgames.com/image...ies/tongue.gif (attached)

Amhazair June 5th, 2008 07:19 AM

Re: Map Editing question
 
That looks suspiciously like the Middle East. Except it's somewhat green. http://forum.shrapnelgames.com/images/smilies/happy.gif

Ballbarian June 5th, 2008 09:04 AM

Re: Map Editing question
 
Looks like you are off to a good start Agrajag. What language are you using?

(I was torn between Ballbarian and Ballbaby, and Ballbarian sounded more manly so I went that route. http://forum.shrapnelgames.com/images/smilies/happy.gif )

Edratman June 5th, 2008 09:15 AM

Re: Map Editing question
 
I am now confused by the masks.

What is the difference between "site location masks" and "terrain masks"?

When I open a map file I see, for example,

"#terrain 331 4194312"

Which category does "4194312" fall into?

I have never typed in that number. Whenever I want to change terrain types I just open the map editor and click away. (I'm a little less fastidious about province colors than most.)

Agrajag June 5th, 2008 09:31 AM

Re: Map Editing question
 
Quote:


That looks suspiciously like the Middle East. Except it's somewhat green.

Hehe, didn't notice it before, but I guess you are right http://forum.shrapnelgames.com/images/smilies/happy.gif
That just proves that it can output maps that look realistic http://forum.shrapnelgames.com/images/smilies/laugh.gif

Quote:

Looks like you are off to a good start Agrajag. What language are you using?

C++ with Allegro, on Code::Blocks http://forum.shrapnelgames.com/images/smilies/happy.gif
Though from a hard-core programming perspective you could argue I'm just using "OOP C" http://forum.shrapnelgames.com/image...ies/tongue.gif

It'll probably look a bit better when I'm finished, but I'll get to beautifying it after I'm finished with the province setting stuff and with the border-determining-and-drawing stuff. (Luckily I've already got some algorithms in my head http://forum.shrapnelgames.com/images/smilies/happy.gif)

Edi June 5th, 2008 09:38 AM

Re: Map Editing question
 
Quote:

Edratman said:
I am now confused by the masks.

What is the difference between "site location masks" and "terrain masks"?

There are two types of terrain masks. The first one is locmask or terrain mask for sites. This is used in site modding to determine what kind of terrain sites can appear in. The second type is terrain mask for map terrain in map files.

Quote:

Edratman said:
When I open a map file I see, for example,

"#terrain 331 4194312"

Which category does "4194312" fall into?

That's 4194304 (border mountain) + 8 (fresh water), which is what you get if you check both border mountain and fresh water checkboxes for the same province. Province terrain masks are always a sum of the terrain masks of all terrains contained therein.

Quote:

Edratman said:
I have never typed in that number. Whenever I want to change terrain types I just open the map editor and click away. (I'm a little less fastidious about province colors than most.)

Which is precisely the way to do it if you want to avoid headaches. The specialsite terrains need to be added manually, though.

Edratman June 5th, 2008 10:13 AM

Re: Map Editing question
 
It is patently obvious that I've never used the site mask codes. I have only used #feature and #knownfeature.

You are going to have to walk me through this.

Air and water site codes (from previous post in this thread) are 16384 and 32768 respectively, for a total of 49152.

Using my example province, "#terrain 331 4194312", how would I put random air and water sites there? I see three possibilities:

1. Add the two values up - "#terrain 331 4194312" goes to #terrain 331 4243464 (4194312 + 49152)

2. Both are separate line entries -
#terrain 331 4194312
#terrain 331 49152

3. There is a separate code for masks and used as a separate entry:
i.e. (as a WAG) #terrainmask 331 49152

Personally, I am thinking choice #3.

However, either way, I now am sure that this old dog won't be learning this trick.

Thanks for your help Edi.

Edi June 5th, 2008 11:49 AM

Re: Map Editing question
 
The specialsite terrain masks just mean that in random site determination sites of those paths are favored.

#1 is the way it works. Final terrain mask is the sum of all applicable individual masks.

Assigning sites by #feature and #knownfeature lock that site in stone, i.e. it's always there. The special terrain masks affect the probabilities of available random sites, so you are more likely but not guaranteed to get something.


All times are GMT -4. The time now is 04:06 PM.

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