
RMS Tutorials: Unequal Player Starts - part 2
************************************************************
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
************************************************************
This is part 2 of my tutorial about unequal player starts.
************************************************************
As in part 1, we will be using the
This is exactly the same example as before, only we have added a
<LAND_GENERATION>
base_terrain WATER
create_land
{
terrain_type GRASS2
land_percent 15
assign_to_player 1
land_id 1
}
create_land
{
terrain_type DESERT
number_of_tiles 150
assign_to_player 2
land_id 2
}
create_land
{
terrain_type DIRT
number_of_tiles 300
assign_to_player 2
land_id 2
}
create_land
{
terrain_type LEAVES
number_of_tiles 300
assign_to_player 4
land_id 4
}
<OBJECTS_GENERATION>
create_object CASTLE
{
set_place_for_every_player
}
So, let's generate that map in the scenario editor. Ooops ... no one has any castles!
This is because
So, let us try that:
<OBJECTS_GENERATION>
create_object CASTLE
{
place_on_specific_land_id 1
}
create_object CASTLE
{
place_on_specific_land_id 2
}
create_object CASTLE
{
place_on_specific_land_id 3
}
create_object CASTLE
{
place_on_specific_land_id 4
}
Now we have the expected behavior (ie. the same as in part 1 of this tutorial).
************************************************************
Yes! But we need to be careful to make sure we implement it correctly. The
<LAND_GENERATION>
base_terrain GRASS
/* for the human player */
create_land
{
land_percent 10
base_size 15
assign_to_player 1
land_id 1
}
/* for the computer players */
create_land
{
land_percent 10
base_size 15
assign_to_player 2
land_id 2
}
create_land
{
land_percent 10
base_size 15
assign_to_player 3
land_id 3
}
/* repeat for players 4-8 */
Now we need to add our player objects.
<OBJECTS_GENERATION>
create_object TOWN_CENTER
{
group_placement_radius 18
min_distance_to_players 0
max_distance_to_players 0
place_on_specific_land_id 2
}
create_object TOWN_CENTER
{
group_placement_radius 18
min_distance_to_players 0
max_distance_to_players 0
place_on_specific_land_id 3
}
/* repeat for players 4-8 */
create_object VILLAGER
{
min_distance_to_players 6
max_distance_to_players 21
place_on_specific_land_id 1
}
create_object VILLAGER
{
min_distance_to_players 6
max_distance_to_players 21
place_on_specific_land_id 2
}
create_object VILLAGER
{
min_distance_to_players 6
max_distance_to_players 21
place_on_specific_land_id 3
}
/* repeat for players 4-8 */
************************************************************
So, should you use
The
Every object normally placed with
In our specific example with a nomad map, we would probably be able to to avoid this issue, since resources can be spread across the map, rather than placed as player objects. However, it is important to keep this in mind when making any map with unequal starts, since you are very likely to have many more
Basically, choose whichever method suits the map you want to create while making sure that you don't exceed 99
That's all! I hope this was informative

......../¯/\
......./ / / \ 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 03-21-2017 @ 05:56 PM).]