yantri Mailorder - Home of the Homes
A lot of funny things
Scenarios
Random Maps
RMS Tutorial
Other Stuff
Age of Kings Title

random map script tutorial


The Original Article can be found at: http://www.mrfixitonline.com/readPosting.asp?PostingId=228892
View or download the text version of this file: create_random_maps_rms.txt

From the Beginning

RMS Tutorial Step by step, how to make a Random Map Script

For this tutorial, we're going to start with a blank text file, and end up with a map script similar to Black Forest. So using Notepad, RMSEdit, BBEdit, or any other text editor (Not Microsoft Word or Corel Wordperfect), open up a new blank document.

At the beginning of any RMS script file, it is a good idea to use comments to put the title and a description of the map. Comments begin with a "/*" (slash asterisk) and end with a "*/" (asterisk slash). Anything you write between the opening and closing marks are ignored by the game. So at the top of your blank script file, type this, or copy and paste:

/*

Tutorial

This is a tutorial to help me learn how to make a Random Map Script

*/

It is a general idea to use comments throughout your scripts to help others figure out what's going on.

After the opening comments, we need to tell the game to place the players randomly on the map. So type this into your script (remember: capitalization matters!):

<PLAYER_SETUP>

 random_placement 

This must be at the top of every script, and there are no other options other than to place the players randomly. So just type it in and move on.

And now we're ready to get to the good stuff...

Step 1: The Land First of all, we need some land. Obviously the land refers to the layout of grass, dirt, water, and forest. So, to understand land, it is important to know that we will be defining what is called a Base Terrain, and then creating islands in that base terrain. But our islands don't always have to be traditional islands of dirt or grass on water. We can have islands of grass on a base terrain of dirt, or islands of snow on a base terrain of forest. A Black Forest map creates islands of grass with a base terrain of forest, and then connects these islands to create the pathways between them (we'll get to connecting islands later). Of course, we can have these islands touching each other, or separated by any distance desired. Or we can tell them to take up the entire map, so that the land is all basically the same.

There are two types of land: player lands, and non-player lands. Player lands are the islands which the players start on. There is one piece of land for each player (but remember, they could be touching, in which case it would appear to be only one large piece of land). The non-player lands are of course, every other piece of land. The non-player lands can be any type of terrain, such as water or shallows. Player lands must be solid land though, since the players must be able to build on these lands.

So let's get started!

First, we need to tell the game that the commands that follow are the part of the script that generate the land. Type this into your script:

<LAND_GENERATION>

Now, let's create some player islands in the forest, similar to what the Black Forest map does. To do that, we'll make the base terrain FOREST and the player lands GRASS. Type this into your script:

base_terrain FOREST

create_player_lands 
{ 
  terrain_type                     GRASS 
  land_percent                     60 
  base_size                        10 
  other_zone_avoidance_distance    6 
} 

As you can probably tell, we set the base terrain to FOREST. Notice how the terrain types are in all capital letters. Next, we create the player lands. Notice how the individual instructions go inside the brackets. It is a good idea, but not required, to indent the commands inside the brackets. It is easier to read this way. So, the player lands will be GRASS, and they will take up 60% of the map. Each player gets an equal share of this percentage. So, if there are 6 players, each will get 10%, and if there are 2 players, each will get 30%. The base size makes sure that each player has a radius of 10 tiles around the center of their land. This keeps an open area so that the player has room to build. Each player will be at least 6 tiles away from each other player. This means that there will be 6 tiles or more of forest, the base terrain, between each player. There are many more commands which we can add inside the brackets if we desire. You can read the list of these commands in the RMSG.doc file, or here.

Now, we have the first part of our script. And guess what? We can even play with it now. But there will be no resources (other than lots of forest). Since in our script we haven't yet told the game to add a town center and villagers (we'll get to that soon), the game will automatically add them for us, because they are needed to play the game.

So let's take a look, and see what happened. Save your file as tutorial.rms and place it in the Random folder of your Age of Kings folder. Make sure that the name is "tutorial.rms" and doesn't have a ".txt" or anything like that at the end. You may need to rename your file if this is the case. Once saved, start the game, go to single player standard game, and select "Custom" from the drop down box labeled "Map Type". The selection box just below that one will then have the list of all of the Random Map Scripts which you have created or downloaded into your Random folder. Select your map, tutorial, and start the game with any of the settings you like. Once in the game, type the cheat commands "marco" and then "polo" to reveal the entire map.

Step 2: Terrain Now that you've got the basic lay of the land, you're ready for terrain. Terrain can also be thought of as types of land, but it generally doesn't change the layout of the overall map. For example, in the terrain section we can place smaller spots of forest throughout the map. Or we can add lakes, spots of snow, or mix the terrain up some to create a more realistic look for the map. Terrain is placed on top of other terrain types. For our map, let's add some spots of snow to the grass around the player starting areas, and some small ponds of water within the forest.

First, we need to tell the game that this part of the script will contain the terrain commands. Type the following into your script:

<TERRAIN_GENERATION>

And now we'll add the snow. Type the this into your script:

create_terrain SNOW 
{ 
  base_terrain      GRASS 
  land_percent                   10 
  number_of_clumps               12 
} 

This will place 12 clumps of SNOW on any GRASS found so far in the map. If no GRASS is found, then no SNOW will be placed. But in our script, we made the player lands GRASS, so this won't be a problem. The SNOW will take up 10 percent of the map, which will be divided evenly into the 12 clumps. If we had specified that the SNOW take up 100% of the land, then all of the GRASS would be covered with snow.

Now let's add the ponds to the forest. Type this into your script:

create_terrain WATER 
{ 
  base_terrain                                    FOREST 
  spacing_to_other_terrain_types   3 
  land_percent                                   15 
  number_of_clumps                        20 
} 

You can probably figure out on your own that this command creates 30 clumps of WATER, placed only on FOREST, which take up 15% of the land. If we don't specify a base_terrain, then the terrain will be placed on every terrain. The spacing_to_other_terrain_types command tells the water to stay at least 3 tiles away from any type of terrain other than its base terrain. This includes other spots of the same type of terrain. So all of the ponds will be at least 3 tiles away from each other, and also 3 tiles way from any other terrain on our map, which so far is GRASS and SNOW.

Remember, terrain is placed in order. So our snow will be placed before our water. In our script this does not matter so much, but if you were to place SNOW on GRASS, and then DIRT on SNOW, the order would be important. Again, if the base_terrain is not found, then the terrain is not placed.

Just like with Land, there are many other commands which can be used inside the brackets of the create_terrain commands. For a list of those commands and what they do, go here.

Now we're ready to move on. First let's see what it looks like. Again, save your file and make sure it's in the Random folder. Start a new game using the script and check it out.

Step 3: Objects Now comes the part that most people like the best. Now we can place objects. Objects are the things in the map such as player's buildings, villagers, military units, resources such as gold and berry bushes, wolves, fish, deer, single trees, etc. There are also a number of objects from the scenario editor which we can include in our random maps such as ruins, skeletons, and heroes. So let's get to it.

We should start by placing a town center, villagers, and a scout. We don't have to do this though, we could start with a large army, or maybe just one unit. But since this is our first map, let's just start with the basics. It is important to note that if we do not specify any objects for the players to begin with, then the game will automatically give each player a town center and villagers.

So let's add some stuff. Just like with the other sections, we have to tell the game that this part of the script is for Objects. Type this:

And now let's add a town center. Type the following into your script:

<OBJECTS_GENERATION>

create_object TOWN_CENTER 
{ 
     set_place_for_every_player 
     min_distance_to_players 0 
     max_distance_to_players 0 
} 

The town center will be a distance of 0 from the center of each player's "island". The set_place_for_every_player command tells the game to give one of this type of object to every player.

Now for the villagers. Type this:

/* Standard 3, 4 (Mayans), or 6 (Chinese) Villagers */ 
create_object VILLAGER 
{ 
     set_place_for_every_player 
     min_distance_to_players 3 
     max_distance_to_players 6 
} 

Notice how we used a comment above the command to tell anyone reading the script what the command does. In this command we did not state the number of villagers to add, and therefore, the game will automatically create the standard number of starting villagers. These villagers will be randomly placed a distance of 3 to 6 tiles away from the center of the player's island. Remember, we just put the town center at that center, so the players will be from 3 to 6 tiles from the town center.

How about a Scout? Type this:

create_object SCOUT /* This will create either a Scout Cavalry or an Eagle Warrior. */ 
{ 
     number_of_objects 1 
     set_place_for_every_player 
     min_distance_to_players 7 
     max_distance_to_players 9 
} 

This will create a Scout; depending on the civilization of the player, it will be a Scout Cavalry or an Eagle Warrior. There will be 1 of them for each player at a distance of 7 to 9 tiles from the town center.

Now for some straggler lone trees. Type this into your script:

create_object OAKTREE 
{ 
    terrain_to_place_on GRASS 
    number_of_objects             20 
    min_distance_group_placement  2 
} 

Aha! Some new commands for you to learn. This will create 20 oak trees (different from palm, bamboo, or alpine trees). There will be 20 of them, not 20 per player, since we didn't use the set_place_for_every_player command. Also, the trees will only be placed on GRASS. Remember how we put SNOW into our map a while back? None of these trees will appear in the SNOW. But what about min_distance_group_placement? This means that each tree will be at least 2 tiles from any other Object, no matter if it is another tree, or a villager, or whatever.

There are quite a few commands which we can put inside the brackets of each create_object command. Here is a list of all of them and their explanations.

Once again, save your map and test it out. You should be able to see all of the villagers, a scout, and the trees we placed around the map.

But there are no resources for the villagers to gather! We can add those also. How about some berry bushes, gold, and stone. Type this:

create_object FORAGE 
{ 
     number_of_objects 6 
     group_placement_radius 3 
     set_tight_grouping 
     set_gaia_object_only 
     set_place_for_every_player 
     min_distance_to_players 10 
     max_distance_to_players 12 
     min_distance_group_placement 4 
} 
create_object GOLD 
{ 
     number_of_objects 7 
     group_placement_radius 3 
     set_tight_grouping 
     set_gaia_object_only 
     set_place_for_every_player 
     min_distance_to_players 8 
     max_distance_to_players 14 
     min_distance_group_placement 4 
} 
create_object STONE 
{ 
     number_of_objects 3 
     number_of_groups 2 
     group_placement_radius 2 
     set_tight_grouping 
     set_gaia_object_only 
     set_place_for_every_player 
     min_distance_to_players 12 
     max_distance_to_players 18 
     min_distance_group_placement 3 
} 

These three object commands will create FORAGE, GOLD, and STONE. If you can't figure out what the commands in the brackets do, then go read about them in the list of commands. And while you're there, check out all of the other options you have, also. So now you have resources.

But how many resources should you place? Most of the scripts from Ensemble Studios use a standard amount of resources. The standard starting resources include:

• 6 Berries • 1 group of 7 gold mines • 2 groups of 4 gold mines • 1 group of 5 stone mines • 1 group of 4 stone mines • 1 group of 4 sheep (or turkeys) • 2 groups of 2 sheep (or turkeys) • 1 group of 4 deer • 2 boars (or javelinas) • 2 wolves (or jaguars) • 1 group of 3 straggler trees surrounding the town center • 1 group of 2 straggler trees surrounding the town center You don't have to make your map fit into this structure though. In fact, some of the most fun maps vary the resources somehow. ES has made a random map which randomly selects different amounts of resources surrounding the players' starting areas. (We'll get to randomness later.)

Step 4: Connections But how will the players' armies get to the enemy towns? The forest is in the way! We solve this problem with Connections. We can connect the lands we laid out in step 1 above with Connections. We can connect all the lands together, or just player lands, or even just the lands of players on the same team. The real Black Forest map uses 2 connections, one to create all the pathways between all the players, and another to create the roads which go between allies.

So let's connect the players together. First, as usual, we need to tell the game that this part of the map is for Connections, so type this:

<CONNECTION_GENERATION>

Now, let's connect all the players together with pathways through the forest. Type this:

create_connect_all_players_land 
{ 
     replace_terrain FOREST    LEAVES 
     replace_terrain WATER      SHALLOW 
     replace_terrain GRASS      DIRT 
     replace_terrain SNOW        GRASS_SNOW 
     terrain_cost    WATER     7 
     terrain_cost    FOREST    4 
     terrain_cost    GRASS    1 
     terrain_cost    SNOW      3 
     terrain_size    LEAVES         3       2 
     terrain_size    SHALLOW         3       1 
     terrain_size    DIRT         1       1 
     terrain_size    GRASS_SNOW         1       1 
} 

But what does this do? The first section of instructions tells the map what terrains to replace and what to replace them with. We will replace FOREST with the LEAVES terrain type, WATER with SHALLOWS, GRASS with DIRT, and SNOW with GRASS_SNOW (which looks like halfway melted snow on top of grass). The second set of instructions sets the costs for replacing each type of terrain. The game will try to create the pathway with the lowest cost. So, for example, if we set WATER to a high cost, the pathway will most likely avoid that type of terrain in favor of a lower cost terrain. If all the costs are the same, the pathway will head straight towards the other player with no curves. The third set of instructions tells the map how wide to make each pathway. The first number is the width, and the second is the variation. So, in our script, the LEAVES will be 3 tiles wide with a variation of 2, which means that the pathway could be anywhere from 1 (3-2) to 5 (3+2) tiles wide.

Note that sometimes it is important to replace the BEACH terrain. BEACH can be crossed by boats and land units. If you plan to connect to land masses which are separated by water together with solid ground such as GRASS or DIRT, then replace the BEACH with the same terrain as the water. If you plan to use shallows, this is not needed. When you create land on top of water, the beach terrain is automatically placed at the edges, you do not need to place it yourself.

Instead of connecting all the players together, we could replace create_connect_all_players_land with create_connect_teams_lands to connect only players of the same team together. Or we could use create_connect_all_lands to connect all of the player and non-player lands together, but in our map we don't have any non-player lands.

So now you're once again ready to save your script and load it up into the game. Once you get it running, experiment with the terrain_cost values to alter the path that the connections take. Try setting the cost of water to a low value and forest to a high value. The connections will then seem to go from one pond to the next.

If you want more info... How Connections Really Work

Step 5: Cliffs and Elevation Now we can make our map even more realistic by adding cliffs and elevation. Elevation is placed after Land and before Terrain Cliffs are placed after Objects and before Connections. First let's add some elevation. Type this:

<ELEVATION_GENERATION>

create_elevation 7 
{ 
     base_terrain GRASS 
     number_of_clumps 14 
     number_of_tiles 3000 
     set_scale_by_groups 
     set_scale_by_size 
} 

This will create 14 clumps of elevation up to a height of 7, since elevations are placed up to the specified elevation. Elevations automatically avoid player start areas. For a list of the commands you can use between the brackets, go here. Note that we first told the game that the following commands are in the Elevation Generation section.

Now for some Cliffs, type this:

<CLIFF_GENERATION>

min_number_of_cliffs 5 
max_number_of_cliffs 8 
min_length_of_cliff 4 
max_length_of_cliff 10 
cliff_curliness 10 
min_distance_cliffs 3 

It's fairly self explanatory, now that you've made it this far. Notice there are no brackets in this part. These commands will place between 5 and 8 cliffs with a length of 4 to 10 tiles long. Each section of cliff will have a 10% chance of changing direction, and each cliff will be at least 3 tiles away from other cliffs. For a list of cliff commands, go here.

Once again, test out your map.

That concludes the first part of this basic step by step tutorial. Now you're ready for some more advanced scripting... Advanced Commands

Advanced Commands

RMS Tutorial Step by step, how to make a Random Map Script

More Advanced Stuff There are some very powerful features of the scripting process which we're now going to explain. Have you been wondering now some maps randomly choose a different terrain type each time you play? Black Forest, for example, will sometimes be a normal forest, sometimes a snowy pine forest, and sometimes be a tropical jungle. Other maps randomly choose starting conditions such as resource amounts. So how do we do all this stuff?

Step 1: #define The first step is to define some constants. At the top of a script, before the section, we can put a line that looks like this:

#define MY_CONSTANT

The "MY_CONSTANT" part is called the variable, and we can name the variable whatever we like. Later we can use this variable to our advantage by checking to see if the variable has been declared or not.

Step 2: Randomness So now that we can define variables, we need to know how to create randomness. We can use the random commands to randomly decide which variables to declare, and then use that to our advantage later on by checking to see which variable was declared. The random commands look like this:

start_random 
    percent_chance 65 
        #define HAPPY 
    percent_chance 35 
        #define SAD 
end_random 

First, notice how we use the #define command within the random commands. The first line starts the random command, and the last line ends it. The "percent_chance" line tells the game what percentage of the time to choose that action. In this case, the variable HAPPY will be defined 65% of the time, and the variable SAD will be defined 35% of the time. The totals should add up to 100%. If they do not, then the remaining percentage will be the chance that none of the variables get declared.

So now we either have a variable HAPPY declared or a variable SAD declared, now what?

Step 3: Conditionals So now we can test to see which variables have been defined. We can use a conditional command to do this. A conditional command looks like this:

if HAPPY 
    (do something) 
endif 

So, if the HAPPY variable has been defined, the script will execute the commands. For example, in your script you might have something that looks like this:

if HAPPY 
    create_object ARCHER 
    { 
         number_of_objects 10 
         set_place_for_every_player 
    } 
endif 

In this case, 10 archers would be placed on the map per player if the HAPPY variable is declared.

But we can do more:

if HAPPY 
    (do something) 
elseif SAD 
    (do something else) 
else 
    (do another thing) 
endif 

Now we have even more options. If HAPPY is not defined, then the script checks to see if SAD is defined. If neither of these two are defined, then the control goes to the "else" command, which can be thought of as the default command if nothing else is defined. Notice again how the endif ends the entire block of "if" commands. Keep in mind that only 1 of the actions will be executed. If HAPPY is defined, it's action is executed, and then the script skips the rest of the "if" commands until it reaches the endif.

There is a list of variables already defined which can be used and checked with the "if" command. One set of variables is for the size of the map, so that the script can take actions depending on the map size, such as adding more resources to larger maps.

Map Sizes: 
TINY_MAP 
SMALL_MAP 
MEDIUM_MAP 
LARGE_MAP 
HUGE_MAP 
GIGANTIC_MAP 
Game Types: 
KING_OF_THE_HILL 
REGICIDE 

Now we can check to see if the map is a certain size, or if the game being played is a certain type. So, if the game is REGICIDE, we would want to add a KING for each player, obviously so that someone can win by killing their opponent's king. In king of the hill games the wonder is automatically added to the middle of the map, so you don't have to worry about adding it yourself. You do however, have to take care of adding the REGICIDE starting conditions. The standard start for a regicide game are like this:

if REGICIDE 
create_object VILLAGER 
{ 
  number_of_objects             7 
  set_place_for_every_player 
  min_distance_to_players       6 
  max_distance_to_players       6 
} 
create_object KING 
{ 
  set_place_for_every_player 
  min_distance_to_players      6 
  max_distance_to_players       6 
} 
create_object CASTLE 
{ 
  set_place_for_every_player 
  min_distance_to_players    10 
  max_distance_to_players    10 
} 
endif 

Notice the use of the "if" and "endif". The variable "REGICIDE" is automatically declared, so we don't have to put the #define at the top of our script.

Step 4: Embedded Randoms and Conditionals: Now, if we want to do something even more complex, we can put random commands inside other random commands, conditionals inside other conditionals, and conditionals inside random commands. Remember, the "start_random" and "end_random" are what keep the random commands separated, and the "if" and "endif" commands keep the conditionals separated. It is strongly recommended that you use some type of indentation and/or comments to keep track of embedded commands, as they can get complicated very quickly. Check this out:

start_random 
    percent_chance 20 
        if LARGE_MAP 
        elseif HUGE_MAP 
            #define VARIABLE2 
        else 
            #define VARIABLE3 
        endif 
    percent_chance 30 
        start_random 
            percent_chance 90 
                if TINY_MAP 
                    #define VARIABLE4
                else 
                    if KING_OF_THE_HILL 
                        #define VARIABLE5 
                    elseif REGICIDE 
                        #define VARIABLE6 
                    endif 
                endif 
            percent_chance 10 
                #define VARIABLE7 
        end_random 
    percent_chance 50 
        if MEDIUM_MAP
            #define VARIABLE8 
        elseif HUGE_MAP 
            #define VARIABLE9
        endif 
end_random 

Wow, that's really complex! Notice the use of indentation to try to keep track of where the random statements and conditionals begin and end.

Most often in maps you will see the random statements and conditionals used to define resources and terrain types. At the beginning of the map, a random statement is used to randomly choose the terrain of the map, such as snow, asian, etc. Once the variable is randomly declared, you can look further down into the map to see how conditionals are used to create the various terrain depending on the declared variable. Remember, the name of the variable is irrelevant, and is only used to help you remember what is going on in the script. Many people think that by putting a line such as:

#define JUNGLE_MAP

at the top of their script will automatically create a jungle type terrain for the map. THIS IS NOT THE CASE! Once you randomly define your variable, you must check to see if it has been defined with "if" commands and then use the desired terrain in your script. You could very easily declare a JUNGLE_MAP variable, then test to see if it has been declared, and place SNOW terrain if it has been declared. This obviously would not create a jungle type map, even though we defined a variable called JUNGLE_MAP.

Step 5: The #const command

Another little trick to use in your scripts is to use the #const command. It looks like this:

#const MY_UNIT 200 

It's similar to the #define command, except you give it a number after you define the variable name. The number will correspond to a number in the game's database. Every terrain and object has a number associated with it. The number 200 is associated with the hero Robin Hood. Many of these constants are already declared, and Robin Hood is one of them (you can use ROBIN_HOOD in your script). Just as you would write:

create_object ROBIN_HOOD 
{ 
   .... 
} 

the result will be the same if you use the number:

create_object 200 
{ 
   .... 
} 

And, now that we've declared MY_UNIT at the top of the script, we can say

create_object MY_UNIT 
{ 
    .... 
} 

and a Robin Hood until will appear.

While most of the commonly used units and terrains have already been defined (see the list of already defined terrains and objects), we can use the #const command to uncover the other more hidden terrains and units in the game. We call the number associated with the terrains or units "construction numbers", and through extensive testing and help from Ensemble Studios we have discovered many of the undocumented units.

To see the list of all the terrains, units, and their associated construction numbers, go to the Construction Numbers List page, of which most of the work was done by Raymond Tukkers. Thanks Raymond!

Land

Land Generation Reference Page

The base terrain is the default terrain for the map, and is declared like this: base_terrain (terrain) where "(terrain)" is any of the terrain types such as GRASS, DESERT, SNOW, FOREST, etc.

(list of terrain types)

Once the base terrain is established, the other lands can be placed. There are two types of land, normal lands (just called Lands) and Player Lands. In most random maps, Player Lands include a Town Center, Scout Cavalry, villagers, and the starting resources placed near the Town Center. Player Lands are also useful for telling terrain, such as forests, to avoid the player start areas. Land is all generated at the same time, so the order used in placing land is not important.

create_player_lands Creates lands that players will start on. The percentage of land allotted to player lands is divided among all the players. Therefore, if player lands were specified to take up 20% of the map, then 2 players would each get 10%, but 4 players would each get 5%. It is important that player lands be large enough to contain a player’s town. Player lands are always set at a constant elevation of 2.

Example:

create_player_lands 
{ 
    terrain_type           GRASS 
    base_size                10 
    land_percent           20 
} 

Note the use of brackets with the instructions between them.

create_land Creates an area of land that is not for players. Example:

create_land 
{ 
    terrain_type           WATER 
    land_percent           60 
} 

The following commands can be used within the brackets of create_player_lands and create_land:

terrain_type Specifies what type of terrain to make the land. For Player Lands, this must be grass or desert to avoid goofy results.

land_percent Defines what percent of the map is taken up by the land area. For Player Lands, this area will be divided by the number of players, so if the number is set to 60% and there are 6 players, each will start with about 10% of the map.

number_of_tiles <# tiles> An alternate way of specifying land area size, in this case by number of tiles. Unlike land_percent, these areas will not scale with map size. It is necessary to use only land_percent or number_of_tiles.

base_size <# tiles> Specifies a minimum radius that the land grows from. This instruction is useful for insuring that each player has an area large enough to build a town and keep at least some buildings free from naval bombardment. If base_size is not specified, Player Lands may be thin and snaky.

left_border   right_border   top_border   bottom_border   Percent from edge to stop land growth. This instruction recognizes the distance to the map border, so it is useful for placing terrain near the middle of the map. For example, defining a border of 25 will place land near the center of the map, while a border of 5 will place land almost to the edge of the map. In Mediterranean and Baltic maps, this instruction places the inland sea near the center of the map. In Continental maps, this instruction insures there is a border of water. “Top” is the upper left border of the map. Just specifying Top and Bottom but not Left or Right can create a narrow strip of terrain such as in Scandinavia. Note that the map land has a hard-coded feature to round off edges to make land look more natural. As maps get smaller (border > 20%) they may look less like rectangles and more like circles or octagons.

border_fuzziness The percent chance per tile of stopping at a border. If this instruction is not used, borders will be straight lines. Specifying a low number, 5-20, will make edges ragged and more like real geography.

clumping_factor <# factor> Clumping affects how much land tends to form squares instead of rectangles. The default value is 8, and the range is 1 to 15. Lower numbers tend to produce snaky islands while higher numbers tend to produce squares. Note that clumping_factor for land and for terrain have different ranges and defaults.

land_id <# id> Assigns a label to a certain land area that can be used to assign objects only to that land. This does not work. Do not attempt to use it and get the results you expect.

zone <# zone> This is a descriptive command, used to assign a label to a certain land area. Zones with the same zone id can overlap, while land areas with different id’s are distinct. If used in create_player_lands, and no zone is specified, each player will be on their own island (though it will only look like an island if the base terrain is water). However, if you give all the players the same zone, their lands will touch and they will be closer together.

set_zone_by_team Will keep all players on a certain team in the same zone. For example, on an island map this will allow a team to share an island. To keep everyone on their own island, do not include this command. In order for this to take effect, the "Team Together" checkbox must be checked.

set_zone_randomly Will randomly determine zones, so that some players may be on the same island, while others may not be. Archipileago uses this to randomly decide if players are on their own islands, share islands with teammates, or share islands with enemies.

other_zone_avoidance_distance <# tiles> Zone avoidance is used to specify the width of base terrain between player lands. For example, if the base terrain is WATER, and player lands are GRASS, if other_zone_avoidance_distance is set to 5, then there will be a space of at least 5 tiles of WATER between player lands.

assign_to_player <# player> Assigns a land area to a certain player. Note, this does not work with player lands.

back to the top

LIST OF TERRAINS (ALL)

BAMBOO
DEEP_WATER
DESERT
DIRT
DIRT2
DIRT3
DIRT_SNOW
FOREST
GRASS
GRASS2
GRASS3
GRASS_SNOW
ICE
JUNGLE
LEAVES
MED_WATER
PALM_DESERT
PINE_FOREST
ROAD
SHALLOW
SNOW
SNOW_FOREST
WATER
BEACH

LIST OF OBJECTS (SELECTION)

/* *** UNITS *** */

/* STANDARD UNITS */

CASTLE
KING
SCOUT
TOWN_CENTER
VILLAGER

/* SHANTI UNITS */

HORSE
MONK
TRADE_CART
TRADE_COG

/* UNIQUE UNITS */

BERSERK
CONQUISTADOR
SAMURAI
TEUTONIC_KNIGHT
WAR_ELEPHANT
WAR_WAGON

/* BUILDINGS */

BOMBARD_TOWER
HOUSE
OUTPOST
PYRAMID
WATCH_TOWER
YURT

/* SHIPS */

FISHING_SHIP
FIRE_SHIP
GALLEY
TRANSPORT_SHIP

/* OTHER UNITS */

ARCHER
CAVALRY_ARCHER
CROSSBOWMAN
EAGLE_WARRIOR
HUSKARL
HUSSAR
KNIGHT
MILITIA
PIKEMAN
ROBIN_HOOD
SKIRMISHER
WAR_GALLEY

/* *** GAIA OBJECTS *** */

STONE
GOLD

/* FOOD */

DEER
FORAGE
SHEEP
TURKEY

/* FISH */

DORADO
MARLIN1
MARLIN2
SALMON
SHORE_FISH
SNAPPER
TUNA

/* TREES */

BAMBOO_TREE
JUNGLE_TREE
OAKTREE
PALMTREE
PINETREE
SNOWPINETREE

/* WILD ANIMALS */

JAGUAR
WOLF

/* DESIGN */

GRAVE
HAY_STACK
PLANT
ROCK
ROMAN_RUINS
SEA_ROCKS_1
SEA_ROCKS_2
SHIPWRECK
SIGN

(remember it's case-sensitive: capitalization matters!)