You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Random Map Script question -- elevation
posted 12 November 2002 03:27 PM EDT (US)   
Hi =)

I'm learning some basics in scripting a RM, and have looked at the script done by ES, but I can't seem to find the line for editing the map's elevation.

Help would be really appreciated, thanks =).

-Alex

Replies:
posted 12 November 2002 07:29 PM EDT (US)     1 / 6  
I just use the World map elevation tool to flaten all new maps out and then raise the elevation to the level I need for proper ocean, lake and river depth.

click move map down several times and then apply do it some more if needed to get it flat, just remember to move the map up at least 4 or 5 times from the bottom so u can place water on it.

posted 12 November 2002 07:48 PM EDT (US)     2 / 6  
sorry dude i may have miss read your post.
your looking for this type of setting.

rmSetSeaLevel(0.0);
rmGetSeaLevel(0.0);

everything is figured from the sealevel setting i think, i'm still learning and screwing up on this. But after that the

rmTerrainInitialize( base terrain string, float hieght)

command should do the rest.

most of this info is on the CD check the docs area there.

sorry about that I did not find it exactly like u were looking for ither.

posted 12 November 2002 08:13 PM EDT (US)     3 / 6  
Thanks man =)! I'll look into it.

-Alex

posted 12 November 2002 08:39 PM EDT (US)     4 / 6  
Actually, that is only to start the map.
So if you do that, your "ground floor" is 0.

This is from my script (Underworld, if you want to see it just goto http://mods.dgdn.net or see if you can find the old topic I posted on this forum about it; also I posted alot of RMS resources there too...):


int classLava=rmDefineClass("lava");
int numTries=30*cNumberNonGaiaPlayers;
int failCount=0;
for(i=0; <numTries)
{
int id3=rmCreateArea("Elev"+i);
rmSetAreaSize(id3, rmAreaTilesToFraction(15), rmAreaTilesToFraction(120));
rmSetAreaLocation(id3, rmRandFloat(0.0, 1.0), rmRandFloat(0.0, 1.0));
rmSetAreaWarnFailure(id3, false);
rmAddAreaConstraint(id3, avoidBuildings);
rmAddAreaToClass(id3, classLava);
rmSetAreaBaseHeight(id3, rmRandFloat(4.0, 5.0));
if(rmRandFloat(0,1)<0.5)
{
rmSetAreaTerrainType(id3, "Hades4");
rmAddAreaTerrainLayer(id3, "Hades3", 0, 1);
}
else
{
rmSetAreaTerrainType(id3, "Hades7");
rmAddAreaTerrainLayer(id3, "Hades5", 0, 1);
}
rmSetAreaMinBlobs(id3, 3);
rmSetAreaMaxBlobs(id3, 4);
rmSetAreaMinBlobDistance(id3, 10.0);
rmSetAreaMaxBlobDistance(id3, 50.0);
rmSetAreaCoherence(id3, 0.0);

if(rmBuildArea(id3)==false)
{
failCount++;
if(failCount==5)
break;
}
else
failCount=0;
}

numTries=70*cNumberNonGaiaPlayers;
failCount=0;
for(i=0; <numTries)
{
id3=rmCreateArea("Wrinkle"+i);
rmSetAreaSize(id3, rmAreaTilesToFraction(15), rmAreaTilesToFraction(120));
rmSetAreaLocation(id3, rmRandFloat(0.0, 1.0), rmRandFloat(0.0, 1.0));
rmSetAreaWarnFailure(id3, false);
rmSetAreaBaseHeight(id3, rmRandFloat(2.0, 3.0));
rmSetAreaMinBlobs(id3, 2);
rmSetAreaMaxBlobs(id3, 3);
rmSetAreaMinBlobDistance(id3, 10.0);
rmSetAreaMaxBlobDistance(id3, 20.0);
rmSetAreaCoherence(id3, 0.0);

if(rmBuildArea(id3)==false)
{
failCount++;
if(failCount==5)
break;
}
else
failCount=0;
}

These are elevation codes in the Random Maps. You should find somthing similar in the premade scripts. The first id3 section is for me to place lava on, the higher elevations, but less common. The second part is the lower elevations and more common.

rmSetAreaBaseHeight(id3, rmRandFloat(2.0, 3.0));
Is what controls your height. Whether for the lava or just bumps, this controls how high that area is. rmRandFloat is just to pick between two numbers. It can just be

rmSetAreaBaseHeight(id3, 3.0);
If you want it to be always 3.

Remember, if you map init to 0, it will be 3 above 0. But I think if you map init 1, it will only be 2 above 1.
Water should appear areas under 0.



Angel AzN | News Editor Lead EH, HeavenGames LLC
"Damn the torpedoes! Full speed ahead!" -Admiral Farragut, Civil War Battle of Mobile Bay
HeavenGamesEmpires Heaven | 3DMark05 Score3DMark03 Score | WearYELLOW
posted 12 November 2002 11:47 PM EDT (US)     5 / 6  
Thanks dude, there's a lot to learn here, I can use some of this too.
Of course thats why I come to the forum to hopefully Pick someone elses Brain for a little info.
posted 13 November 2002 03:36 AM EDT (US)     6 / 6  
Thanks for your help and tips AzN! I really appreciate it. Goodluck to you taglag ;-).

-Alex

[This message has been edited by Alexandergreat3 (edited 07-24-2003 @ 04:32 PM).]

Age of Mythology Heaven » Forums » Scenario Design » Random Map Script question -- elevation
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames