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

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Aurons Guide on Random Map Script Elevationa
posted 11 October 2004 01:29 PM EDT (US)   
Aurons Guide to Setting Elevations Higher Than Normal

Introduction: In this guide, i will teach you how to set elevations higher than normal, by doing some really simple commands and therefore creating a RM script with extra high elevation. do not worry if the below commands look complicated, they are not. most of this guide is about copy/pasting commands which i bother to write for you. In order to do the below steps, you will need the Notepad this is the only program used in order to create, and edit .xs and .xml files.

A). .xs & .xml files: Random Map Scripting consist of two main files. the .xml file defines the description, and the .xs is in charge of running and creating everthing in the map according to the commands. In order to achieve elevations higher than normal, you will need to insert certain commands which will be in charge of modifying the elevations. It is impossible to create elevations higher than 15 meters via editor. in order to create a .xml and .xs file, you will need to do the following:

1). Open up the Notepad, dont do anything yet, and press "save as"
2). On the "File Name" box, type whatever name to your RM Script and add at the end .xs (Example: MyMap.xs)
3). On the "Save as Type" box, select "All files"
4). On the "Encoding" box, select ANSI
5). Now specify where you will save the file. For now, it doesnt matter where you put it.

In order to create a .xml do the same thing, but in step one, instead of adding .xs, add .xml at the end. (Example: MyMap.xml). By now you should have both .xs and .xml files. make sure both of these files are saved under the same name. If you are having trouble creating these files, simply overwrite over already existing .xs and .xml of a random map. If you are planning to overwrite an existing RMS, make sure it isnt one of the original random maps such as Oasis, or Alfheim.

B). The .xml file: Open the .xml file you just created, and add copy/paste the following:

<?xml version = "1.0" encoding = "UTF-8"?>
<mapinfo details = "PUT DESCRIPTION OF YOUR RMS HERE" imagepath = "ui\ui NAME OF ANY ICON HERE" displayNameID="NAME OF YOUR RMS HERE" cannotReplace=""/>

The setences in caps are the parts you need to edit, and are pretty easy to understand. Inside the mapinfo details tag, you will put the description of your Random Map Script. This is not neccesary to do, you can leave it blank and just including two quotes (""). Insde the imagepath tag, you will add any icon name. the displayNameID tag, you will, of course put the name of your Random Map Script.

C). The .xs File: Open the .xs file you just created, and copy/paste the following:

// Testing/
// Main entry point for random map script/

void main(void){

// Text
rmSetStatusText("",0.01);

// MAP SIZE
int playerTiles=9000;
if(cMapSize == 1)
{
playerTiles =12000;
rmEchoInfo("Large map");

// INIT MAP
rmSetSeaLevel(0.0);
rmSetSeaType("NAME OF A SEA");
rmTerrainInitialize("NAME OF STARTING TERRAIN");
rmSetLightingSet("NAME OF LIGHTING");
rmSetGaiaCiv(cCivNAME OF GAIA CIV);

}
int size=2.0*sqrt(cNumberNonGaiaPlayers*playerTiles/0.9);
rmEchoInfo("Map size="+size+"m x "+size+"m");
rmSetMapSize(size, size);

rmSetStatusText("",0.04);

//ELEVATION
int id = rmCreateArea("the mountain");
rmSetAreaSize(id, 0.1, 0.1);
rmSetAreaLocation(id, 0,1);
rmSetAreaBaseHeight(id, 30.0);
rmSetAreaHeightBlend(id, 2);
rmSetAreaCoherence(id, 0.50);
rmBuildArea(id);

// LOADING:

rmSetStatusText("",0.07);
rmSetStatusText("",0.10);
rmSetStatusText("",0.13);
rmSetStatusText("",0.16);
rmSetStatusText("",0.19);
rmSetStatusText("",0.22);
rmSetStatusText("",0.25);
rmSetStatusText("",0.28);
rmSetStatusText("",0.31);
rmSetStatusText("",0.34);
rmSetStatusText("",0.37);
rmSetStatusText("",0.40);
rmSetStatusText("",0.43);
rmSetStatusText("",0.46);
rmSetStatusText("",0.49);
rmSetStatusText("",0.52);
rmSetStatusText("",0.55);
rmSetStatusText("",0.61);
rmSetStatusText("",0.64);
rmSetStatusText("",0.67);
rmSetStatusText("",0.70);
rmSetStatusText("",0.73);
rmSetStatusText("",0.76);
rmSetStatusText("",0.79);
rmSetStatusText("",0.82);
rmSetStatusText("",0.85);
rmSetStatusText("",0.88);
rmSetStatusText("",0.91);
rmSetStatusText("",0.94);
rmSetStatusText("",1.00);
}

Some of the commands under Init Map are not neccesary. the above script will give you a random map with an elevation. Like on the .xml file, the parts in caps are the parts you can edit by yourself and do not leave these parts how they are currenly are. please note that the words after the "//" dont have to be edited and arent part of the script. In order to modify the current elevation, you would need to edit the following lines:

int id = rmCreateArea("the mountain");
rmSetAreaSize(id, 0.1, 0.1);
rmSetAreaLocation(id, 0,1);
rmSetAreaBaseHeight(id, 30.0);
rmSetAreaHeightBlend(id, 2);
rmSetAreaCoherence(id, 0.50);
rmBuildArea(id);

SetAreaSize; sets the width of the mountain
Set AreaLocation; sets the place where the elevation will be modified. 0.5, 0.5 is the center of the map. in the example above 0.1, 0.1 would be a corner of the map.
rmSetAreaBaseHeight(id, 30.0); this sets how much high you want your cliff to be. in the picture, its set as 60.0.
note that when you create a height higher than normal, you cannot smooth it, roughed it, or use any tools of the editors. you can just add objects and paint areas using the tools in the editor.
rmSetAreaCoherence(id, 0.50); sets the intensety of how much your mountain will smooth. 1.00 is really smooth and rounded.
rmBuildArea(id); hmm, this one i forgot. but you can look at Monthys guide.

Those are the commands you would need to edit in order to get the desired elevation. Example of a RM script Elevation: IMAGE. If you are too lazy to copy/paste the stuff i just wrote down, use Mateis MapGen that also has the option of setting different elevations. note that there are different ways to make this effect get applyed. Some objects might not be visible depending on how high you have set the elevation to be. This will sometimes come in handy for cinematics, or doing some good eyecandy. after you have modifed our RMS, save both files and put them in AoM/rm folder for AoM, or at AoT/rm2 folder for AoM: TT. When the RM script is done, click on new, and set whatever size before loading the map. when the map is loaded, save it as an scenario.

Final Notes: After reading this guide, you should now know some basic random map scripting, including creating .xs and .xml files by your own. If the RMS fails to load, make sure you used the right characters when you were editing the cap setenses you had to edit. if the map still fails to load, contact me at nick_nbm@hotmail.com. Special thanx to Matei and Monthys random map script.

You can also download this guide Here
Comments/Suggestions? Post them


[This message has been edited by auron 2 (edited 11-16-2004 @ 06:26 PM).]

Replies:
posted 11 October 2004 01:43 PM EDT (US)     1 / 18  
posted 11 October 2004 01:59 PM EDT (US)     2 / 18  
duuuuuuuuuuhhhhhhhhhhh too much words .... good guide anyway
posted 11 October 2004 02:50 PM EDT (US)     3 / 18  
duuuuuuuuuuuuhhhhhhhhhhhhhh.....cant u read?

Nice guide Auron.


(¯`-.:=LJC=:.-´¯)
|Member of|Ambition Designs| & |TOAO Clan|
|Download|The Greek Dream|
|Check|F.A.Q|
posted 11 October 2004 02:56 PM EDT (US)     4 / 18  
thanx...although gerbil30 is right, not many people will bother to read it, since it looks complex(although it isnt)

like i said, its just copy/pasting commands in the .xs file, and editing a few parts


Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||

[This message has been edited by auron 2 (edited 10-11-2004 @ 03:00 PM).]

posted 11 October 2004 03:00 PM EDT (US)     5 / 18  

Quote:

duuuuuuuuuuuuhhhhhhhhhhhhhh.....cant u read?


what did u type LJC? i couldnt read :P

i will only complicate you - trust in me and fall as well
posted 11 October 2004 03:06 PM EDT (US)     6 / 18  
heh :P

(¯`-.:=LJC=:.-´¯)
|Member of|Ambition Designs| & |TOAO Clan|
|Download|The Greek Dream|
|Check|F.A.Q|
posted 11 October 2004 03:35 PM EDT (US)     7 / 18  
Auron do you have other screen shots of the elevation, can't really see what your showing in that bottom shot.

I got my mt. by editing the crap out of a jotunheim script. Seemed to have lost it though
I think this is the line that really does it.

rmSetAreaBaseHeight(rockPatch, rmRandFloat(5.0, 9.0));


Think I used 60.00 or so.

Its in the script area for (dressing Mountians)

Also I shrank the allotted area for towncenters down to 0.

posted 11 October 2004 04:49 PM EDT (US)     8 / 18  
the screenshot shows a RM script elevation(left) and an elevation with the editor(right). bascily making a difference between them

@sziggi, the high elevation on that screenshot also uses a 60.0 elevation.

thanx


Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||
posted 11 October 2004 06:08 PM EDT (US)     9 / 18  
Great guide Auron !!

(although i already knew about your work in progress about this one )

Best regards,

The Vandhaal

P.s. for all others look at Aurons eye candy shots to see this guide at work in a scene ( You used this script in the angel/devil screenshots right ? at the starfield if i am correct )


BEST REGARDS,
THE VANDHAAL

El Vandhaal tiene gusto de las mujeres atractivas que usan los talones altos y las medias cosidas | Le Vandhaal qui aime les femmes qui portent des talons hauts et bas cousus.
HG moderators if you feel paranoid then translate the above here
More: ((( THE VANDHAAL WEBSITE)))(((STEAM VANDHAAL AOM EE COLLECTION)))(((VANDHAAL BLOG)))
[This message has been edited by The Vandhaal (edited 12-31-2999 @ 23:59 PM).]
posted 11 October 2004 07:24 PM EDT (US)     10 / 18  
you mean this one:


Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||
posted 12 October 2004 06:19 AM EDT (US)     11 / 18  
I'm going to try this later today, but I have one question: If I have followed all the steps and get it working, will it work immediately on my partialy finished map? (might be regarded as a dumb question, but I really know nothing about this)

The Oden King
-LFS--LTA-
posted 12 October 2004 11:32 AM EDT (US)     12 / 18  
@ Auron,

yep that one...it shows nicely what you can do with this guide !

best regards,
The vandhaal


BEST REGARDS,
THE VANDHAAL

El Vandhaal tiene gusto de las mujeres atractivas que usan los talones altos y las medias cosidas | Le Vandhaal qui aime les femmes qui portent des talons hauts et bas cousus.
HG moderators if you feel paranoid then translate the above here
More: ((( THE VANDHAAL WEBSITE)))(((STEAM VANDHAAL AOM EE COLLECTION)))(((VANDHAAL BLOG)))
[This message has been edited by The Vandhaal (edited 12-31-2999 @ 23:59 PM).]
posted 12 October 2004 11:41 AM EDT (US)     13 / 18  
I didn't really read it, but I'm sure it's good .
posted 12 October 2004 12:03 PM EDT (US)     14 / 18  
Very nice guide.

Will this work for anyone who downloads my scen and doesn't have that rms scripting?


"We are as happy as our minds make up to be" - Abraham Lincoln
Proud member of Ambition Designs
posted 12 October 2004 02:57 PM EDT (US)     15 / 18  
yes, of course. RM scripting isnt like modding.

when you succesfully do the RM script, and load the map in the editor, you save it as an scenario. when you save it as an scenario, there is no need of the .xs script you made. and same goes for the 11 different god gaia templates i made, you ask the same question

@AoMplayer, thanx

second time i made the news: thanx mods

EDIT: @TheodenKing, a random map script has to be completed in order to work. if you at least make one spelling error in the .xs file, the map will fail to load.

If you mean like editing the elevation of an already existing scenario, then you cant. you first save it as an scenario, and from there, you work it on the editor.


Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||

[This message has been edited by auron 2 (edited 10-12-2004 @ 03:18 PM).]

posted 13 October 2004 04:24 AM EDT (US)     16 / 18  
Good job dude!
posted 01 November 2004 09:08 PM EDT (US)     17 / 18  
It probably would have been easier to just make it downloadable don't you think?
posted 01 November 2004 09:18 PM EDT (US)     18 / 18  
Download what? The guide?

It's only about a page or two long. It's kinda annoying to dl a web page and then have to find and double-click it just to read. :-/

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