Aurons Guide to Setting Elevations Higher Than Normal

by Auron
created 11/09/04

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 necessary. 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 currently are. please note that the words after the “//” dont have to be edited and aren’t 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. if you go to school, they would teach you something like

left 0.5 = x, and right 0.5 = y

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:

Example of Higher Elevation: HERE

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 guide.