RMS Features

Overview of the new RMS Features present in Age of Empires II: Definitive Edition .

rnd

This can be used to randomize any numeric parameter by specifying min and max value.

Example:

create_object SHEEP
{
   number_of_objects rnd(2,4) /* randomly places either 6 groups of 2, 6 groups of 3, or 6 groups of 4 sheep */
   number_of_groups      6
   set_loose_grouping
   set_gaia_object_only
   terrain_to_place_on   GRASS3
}

direct_placement

This can be used in <PLAYER_SETUP> instead of random_placement. Players can then be assigned to specific lands with assign_to_player.

Example:

<PLAYER_SETUP>
  direct_placement
<LAND_GENERATION>

base_terrain WATER
create_land
{           
terrain_type                     DIRT
land_position 90 70
land_percent 10
base_size                        6
border_fuzziness                 1
other_zone_avoidance_distance    4
assign_to_player 1
  zone 1
}

create_land
{           
terrain_type                     SNOW
land_position 90 30
land_percent 10
base_size                        6
border_fuzziness                 1
other_zone_avoidance_distance    4
assign_to_player 2
  zone 2
}

terrain_mask

This can be used in <TERRAIN_GENERATION> to force a terrain to mask over or under another with values 1 and 2 respectively:

create_terrain SNOW
{
  base_terrain                   GRASS
  number_of_clumps               10
  spacing_to_other_terrain_types 1
  land_percent                   20
  set_scale_by_size
  terrain_mask 1      /* SNOW is masked on top of GRASS */
}

create_terrain SNOW
{
  base_terrain                   GRASS

  number_of_clumps               10
  spacing_to_other_terrain_types 1
  land_percent                   20
  set_scale_by_size
  terrain_mask 2      /* SNOW is masked underneath GRASS */
}

circle_radius

This can be used in create_player_lands under <LAND_GENERATION> to position the players into a circle and control the distance to the center of the map. The first value determines the distance (0-50) while the second value controls the amount of variation (the higher the value, the more variation).

NOTE: left_border, right_border, bottom_border, top_border do not affect the players’ starting positions when circle_radius is used.

Example:

create_player_lands
{                    
  terrain_type                     GRASS
  land_percent                     3
  base_size                        12
  circle_radius                    40 1
  border_fuzziness                 20
  other_zone_avoidance_distance    9
}

resource_delta

This can be used to modify the value of a resource (eg. Gold, sheep)

Example:

create_object GOLD
{
  number_of_objects             9
  number_of_groups             12
  set_place_for_every_player
  set_gaia_object_only
  resource_delta +300 /* adds 300 extra gold to each goldmine */
 }

create_connect_to_nonplayer_land

This can be used in <CONNECTION_GENERATION> to connect players to a non-player land (such as an island in the middle of the map) but not to each other. In all other aspects it functions the same as the other connection types.

Example:

<CONNECTION_GENERATION>
create_connect_to_nonplayer_land
{
  replace_terrain WATER       SHALLOW
  terrain_cost    WATER              7
  terrain_size    WATER              2       1
}

color_correction

This can be used on its own under <TERRAIN_GENERATION> to set a specific color correction based on the season. Currently, the four color correction settings are defined as follows:

CC_DESERT
CC_JUNGLE
CC_AUTUMN
CC_WINTER

If a color correction setting isn’t defined, the default color correction is used.

Example in a script:

<TERRAIN_GENERATION>
color_correction      CC_DESERT

enable_waves

 This can be used on its own under <LAND_GENERATION> to disable waves on maps where waves on water do not visually fit. When it’s not included, it is by default set to 1 (waves on). Setting it to 0 turns the waves off.

Example:

<LAND_GENERATION>

  base_terrain               GRASS3
  enable_waves               0

place_on_forest_zone and avoid_forest_zone

 These can be used under <OBJECTS_GENERATION> to determine an object’s placement – either placing it exclusively on forest zone, or away from it. Forest zone is considered to be the area under a forest terrain along with 1-tile radius around it. In the picture below, the black terrain indicates what is considered to be a forest zone.

Example:

create_object DLC_IBEX
{
  number_of_objects             9
  set_place_for_every_player
  set_gaia_object_only
  place_on_forest_zone
 max_distance_to_players        20
 }


find_closest

This can be used under <OBJECTS_GENERATION> to force an object to be placed on the closest available tile to the player’s center depending on other specified conditions.

Example:

create_object DLC_IBEX
{
  number_of_objects             1
  set_place_for_every_player
  set_gaia_object_only
  terrain_to_place_on DIRT
  find_closest        /* finds the closest tile based on the other conditions – in this case it can only be placed on DIRT and cannot be further than 30 tiles away */
  max_distance_to_players       30 
 }

actor_area, actor_area_radius, actor_area_to_place_in, avoid_actor_area, avoid_all_actor_areas

A set of commands that can be used under <OBJECTS_GENERATION> to identify a specific area in which objects are placed, and later can be used to refer to it in order to either keep objects close or away from each other. When placing an object, its area can be marked using actor_area and then that area’s radius can be determined with actor_area_radius. Both commands are followed by a number, the first represents the ID of that area, the second determines its radius in tiles.

Example:

create_object DLC_IBEX
{
  number_of_objects             1
  set_place_for_every_player
  set_gaia_object_only
  terrain_to_place_on DIRT
  find_closest
  actor_area 20       /* this actor area is assigned ID 20 */
  actor_area_radius 2 /* 2-tile radius */
 }

Later on, this actor area can be referred to with another object. The command avoid_actor_area can be used to specify a particular area that the new object should avoid, while actor_area_to_place_in does the exact opposite – placing the new object inside the specified actor area.

Example:

create_object FORAGE
{
  number_of_objects             4
  set_place_for_every_player
  set_gaia_object_only
  terrain_to_place_on DIRT
  actor_area_to_place_in 20   /* These forage bushes should be placed inside the actor area of the ibex object – that is, within its 2-tile radius. At the same time, they must also be placed on DIRT. */
 }

Lastly, avoid_all_actor_areas can be used to prevent an object from appearing on any previously defined actor_area.

force_placement

This can be used under <OBJECTS_GENERATION> when placing units into an area that might not have enough available tiles. Normally, untis are placed one per tile and when there are no more available tiles, no more units are placed . This overrides that functionality similarly to tight_grouping and allows multiple units to be placed next to each other on the same tile if necessary.

layer_to_place_on

A variation of terrain_to_place_on which can be used under <OBJECTS_GENERATION> when the object in question should be placed on a terrain that is only masked on top of another using terrain_mask. Note that if a terrain is masked on top of another with terrain_mask 1, it should later be referred to with layer_to_place_on. However, if it’s masked with terrain_mask 2 (therefore underneath) or not masked at all, terrain_to_place_on can still be used.