RMS Tutorials: All About Cliffs
************************************************************
This tutorial assumes that you have some basic understanding of the
This article assumes that you have absolutely no knowledge about cliffs. If you
************************************************************
Cliffs are best thought of as a special type of terrain which automatically comes with cliff objects placed on it – sort of like forest terrain, which automatically comes with tree objects on it.
<PLAYER_SETUP>
<LAND_GENERATION>
<ELEVATION_GENERATION>
<CLIFF_GENERATION>
<TERRAIN_GENERATION>
<CONNECTION_GENERATION>
<OBJECTS_GENERATION>
The order in which you put them in your script
************************************************************
Grab yourself a text editor (Notepad will do) and create a blank file called
Open up the game and generate that map. You should see a large and utterly uninteresting field of grass, which makes sense, given that the script is blank.
<CLIFF_GENERATION>
Make sure you have
<CLIFF_GENERATION>
is the only section of a random map script where typing the section header is enough to achieve something.
<LAND_GENERATION>
create_player_lands
{
terrain_type DIRT
land_percent 50
}
<CLIFF_GENERATION>
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
<CLIFF_GENERATION>
header:
min_number_of_cliffs 10
max_number_of_cliffs 10
You should now see that there are
min_number_of_cliffs 9999
max_number_of_cliffs 9999
You will see a large number of cliffs on your map. But there will not be 9999 cliffs, because there isn’t room for that many cliffs on your map. You will notice that
min_distance_cliffs 0
Now your map will be absolutely filled with cliffs (except for the centers of the player lands).
min_distance_cliffs 3
min_length_of_cliff 10
max_length_of_cliff 12
Your cliffs should now be 10, 11 or 12 tiles long. All pretty self-explanatory so far, right?
cliff_curliness 50
This is a % which determines how curly your cliffs are. At 0, cliffs will be very straight, and at 100 they will be extremely twisted.
************************************************************
What I’ve covered so far is all not to difficult to grasp, and you could have probably worked it out yourself without my help. You may be wondering if you are wasting your time with this tutorial, but I just wanted to cover the basics first to make sure that the rest makes sense.
Change the min and max number of cliffs back to 10.
<LAND_GENERATION>
create_player_lands
{
terrain_type DIRT
land_percent 50
}
<CLIFF_GENERATION>
min_number_of_cliffs 10
max_number_of_cliffs 10
min_distance_cliffs 3
min_length_of_cliff 10
max_length_of_cliff 12
cliff_curliness 50
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
Now, I want you to generate a
Size Tiles on Sides Total Tiles Area ratio to 100x100 map
Tiny 120x120 14400 1.4
Small 144x144 20736 2.1
Medium 168x168 28224 2.8
Large 200x200 40000 4.0
Huge 220x220 48400 4.8
Gigantic 240x240 57600 5.8
LudiKRIS 480x480 230400 23.0
If we think that a medium map looks good with roughly 10 cliffs, then we should execute some scaling which
if TINY_MAP
min_number_of_cliffs 5
max_number_of_cliffs 5
elseif SMALL_MAP
min_number_of_cliffs 7
max_number_of_cliffs 7
elseif MEDIUM_MAP
min_number_of_cliffs 10
max_number_of_cliffs 10
elseif LARGE_MAP
min_number_of_cliffs 14
max_number_of_cliffs 14
elseif HUGE_MAP
min_number_of_cliffs 17
max_number_of_cliffs 17
elseif GIGANTIC_MAP
min_number_of_cliffs 21
max_number_of_cliffs 21
elseif LUDIKRIS_MAP
min_number_of_cliffs 82
max_number_of_cliffs 82
endif
************************************************************
This is where things actually get interesting and new possibilities open up.
Change the
<LAND_GENERATION>
base_terrain WATER
create_player_lands
{
terrain_type DIRT
land_percent 50
}
<CLIFF_GENERATION>
min_number_of_cliffs 9999
max_number_of_cliffs 9999
min_distance_cliffs 1
min_length_of_cliff 10
max_length_of_cliff 12
cliff_curliness 50
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
You will see that cliffs are not placed on the
min_terrain_distance 4
Cliffs will now stay 4 tiles away from the nearest body of
I mentioned earlier that it was important to know that
<LAND_GENERATION>
base_terrain GRASS
create_player_lands
{
terrain_type DIRT
land_percent 50
}
<CLIFF_GENERATION>
min_number_of_cliffs 9999
max_number_of_cliffs 9999
min_distance_cliffs 1
min_length_of_cliff 10
max_length_of_cliff 12
cliff_curliness 50
min_terrain_distance 0
<TERRAIN_GENERATION>
create_terrain WATER
{
base_terrain GRASS
land_percent 100
number_of_clumps 99999
}
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
You will see that you ocean is now completely filled with cliffs. This is because the
Using
<LAND_GENERATION>
base_terrain WATER
create_player_lands
{
terrain_type MED_WATER
land_percent 50
}
create_land
{
terrain_type DESERT
land_percent 25
}
<CLIFF_GENERATION>
min_number_of_cliffs 9999
max_number_of_cliffs 9999
min_distance_cliffs 1
min_length_of_cliff 10
max_length_of_cliff 12
cliff_curliness 50
min_terrain_distance 0
<TERRAIN_GENERATION>
create_terrain GRASS
{
base_terrain WATER
land_percent 100
number_of_clumps 99999
}
create_terrain DIRT
{
base_terrain MED_WATER
land_percent 100
number_of_clumps 99999
}
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
Even though there is almost no
************************************************************
I mentioned earlier that cliffs are sort of
<LAND_GENERATION>
base_terrain DESERT
create_player_lands
{
terrain_type DIRT
land_percent 5
}
<CLIFF_GENERATION>
min_number_of_cliffs 10
max_number_of_cliffs 10
<TERRAIN_GENERATION>
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
<LAND_GENERATION>
base_terrain DESERT
create_player_lands
{
terrain_type DIRT
land_percent 5
}
<CLIFF_GENERATION>
min_number_of_cliffs 10
max_number_of_cliffs 10
<TERRAIN_GENERATION>
create_terrain BAMBOO
{
base_terrain DESERT
land_percent 100
number_of_clumps 99999
spacing_to_other_terrain_types 5
}
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
set_place_for_every_player
max_distance_to_players 0
}
What you should see is that the massive bamboo forest stays 5 tiles away from
#const GRASS_CLIFFS 16
create_terrain ICE
{
base_terrain GRASS_CLIFFS
land_percent 100
number_of_clumps 99999
spacing_to_other_terrain_types 0
}
You should now see tiny patches of ICE under parts of your cliffs. I’ve chosen ICE to make it easy to see, but if you want to make it impossible to see then you should replace terrain 16 with the surrounding terrain – in this case DESERT.
************************************************************
That pretty much wraps up this tutorial on cliffs. You should now understand almost everything there is to know about cliffs when it comes to random map scripting. You know that
Using everything you’ve learned, you can harness the power of controlled cliff placement to generate some unusual map designs. For some examples, take a look at my
Let me know if you have any questions or find any mistakes. I hope this was useful!
......../¯/\
......./ / / \ Check out my Blacksmith submissions as well as my Random Map Scripts.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
[This message has been edited by Zetnus (edited 12-17-2018 @ 11:58 AM).]