RMS Tutorials: Unequal Player Starts - part 1
************************************************************
This tutorial assumes that you are familiar with the basic concepts of RM scripting – ie. you understand what all the parts of a standard ES map script do, and you are able to write your own basic scripts. If this is not the case, I suggest you read my
************************************************************
To begin with, I will quote part of the original RMSG by Ensemble Studios:
As you might have guessed from the title of this tutorial, it
First however, I would like to draw your attention to the rest of what I have quoted:
This applies especially if you are creating map with unequal starting positions; people playing your map are trusting you to have designed something that is balanced and fair, and that is fun to play. Furthermore, by giving you the information to create unequal player starts, I am trusting you to use it appropriately.
************************************************************
If you use the
So let’s see how this works:
<LAND_GENERATION>
base_terrain WATER
create_land
{
terrain_type GRASS2
land_percent 15
assign_to_player 1
}
create_land
{
terrain_type DESERT
number_of_tiles 150
assign_to_player 2
}
create_land
{
terrain_type DIRT
number_of_tiles 300
assign_to_player 2
}
create_land
{
terrain_type LEAVES
number_of_tiles 300
assign_to_player 4
}
<OBJECTS_GENERATION>
create_object CASTLE
{
set_place_for_every_player
}
If you place this into a blank random map script and then start up a
We’ve already managed to establish some basic asymmetry between the player lands.
The create_land command can have the following attributes:
terrain_type TYPE
land_percent % / number_of_tiles N
base_size N
base_elevation N(1-7) (requires UP/HD)
left_border %, right_border %, top_border %, bottom_border %
land_position %(0-100) %(0-99)
border_fuzziness %
clumping_factor %
zone N / set_zone_randomly
other_zone_avoidance_distance N
land_id N
assign_to_player N(1-8)
However, if you use
This still leaves you with many options to create unequal starts in terms of land size, shape, zone, avoidance distance, and most importantly, terrain (the focus of this guide).
************************************************************
One of the best ways to give players unequal starting resources/buildings/units is to make sure the players have different terrains in their starting lands. In the above example, I used GRASS2 and DESERT to make the differences abundantly clear; however you can be much more subtle about it too.
Let’s create an AI-friendly single-player version of land nomad to illustrate how to do this:
<LAND_GENERATION>
base_terrain GRASS
/* for the human player */
create_land
{
terrain_type GRASS2
land_percent 10
base_size 15
other_zone_avoidance_distance 5
assign_to_player 1
}
/* for the computer players */
create_land
{
terrain_type GRASS
land_percent 10
base_size 15
other_zone_avoidance_distance 5
assign_to_player 2
}
create_land
{
terrain_type GRASS
land_percent 10
base_size 15
other_zone_avoidance_distance 5
assign_to_player 3
}
/* repeat for players 4-8 */
How is this going to let us create unequal starts if they look almost the same? That is where we need to move to the objects section.
************************************************************
While you could theoretically use differences in the sizes of lands to unequally place objects, the easiest way is to create and use differences in the terrains of the lands. You can use
Let's take our previous example of creating an AI-friendly land nomad and add an objects section after the land_generation from above.
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
terrain_to_place_on GRASS
set_place_for_every_player
group_placement_radius 18
min_distance_to_players 0
max_distance_to_players 0
}
create_object VILLAGER
{
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 21
}
What this will do is place a TC for players 2-7 because they have GRASS in the center of their lands. Player 1 will not get a TC, because player 1 has GRASS2 instead of GRASS. All players will get their villagers as usual.
Thus we have a basic script that shows how you can use unequal player starts to make an AI-friendly Single-player version of a map. Of course you would still need to add in all the other objects and terrains from the land nomad map in order to make it complete, but that is simply a matter of copy-and-paste for the most part.
************************************************************
Above, I’ve used a simple example to illustrate this concept, but once you’ve got a grasp of it you can make some quite impressive maps:
For both of these maps I created AI-friendly single-player versions.
In this map Bultro gives the players randomized unequal starting positions to provide for some unusual yet surprisingly balanced gameplay.
In this one, I’ve made extensive use of unequal player starts to create an entry for the Pretty Town Contest. It’s a showcase map rather than something you actually play a match on.
It will generate great 1vX games (with X from 2 to 5), where the Overlord (P1) is alone versus everyone else but he has as many TCs as opponents.
There are other things you can try too. For example, you can use can create 2 set of player lands – one using
Be creative!
************************************************************
Since writing this, I have been told that
This is my first University submission and I hope you learned something from it. Let me know if you have any questions or find any mistakes or need clarification about something.
......../¯/\
......./ / / \ 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 Leif Ericson (edited 02-19-2017 @ 06:01 PM).]