You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.2 replies
Age of Kings Heaven » Forums » AI & RM Scripting » AoK Coastal Map script?
Bottom
Topic Subject:AoK Coastal Map script?
Captain Keno
Squire
posted 08-06-18 05:18 PM CT (US)         
Hey guys. do you guys know what the coding is for the original coastal random map script? I heard AOK has something like that and I was wondering if there was some way I could download it? if you guys could lead me to it or someone can share it, via email, that would be helpful. I was hoping to ask nicely for purposes involving Star Wars Galactic Battlegrounds and I really have no idea how to make one. Help?

[This message has been edited by Captain Keno (edited 08-06-2018 @ 05:18 PM).]

AuthorReplies:
Leif Ericson
Seraph Emeritus
posted 08-06-18 07:21 PM CT (US)     1 / 2       
All of the RMS scripts that come with the game are stored in the gamedata.drs files inside the Data folder. You can use Turtle Pack to view them, but here is the entire code for the Coastal map. A slightly different version of the map is included at the end of Ensemble Studios' random map scripting guide if you want something annotated with helpful comments. If you want to turn the code below into a random map file, copy and paste the code in Notepad and save the text file as Coastal.rms inside the game's Random folder.

/* ************ COASTAL ************ */
/* 21 JULY 99 */

#include_drs random_map.def 54000
ai_info_map_type COASTAL

/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */

/* ****************************************************** */
<LAND_GENERATION>

base_terrain WATER

start_random
percent_chance 20
#define DESERT_MAP
percent_chance 20
#define ALPINE_MAP
percent_chance 20
#define ASIAN_MAP
end_random

create_player_lands
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
start_random
percent_chance 50
land_percent 52
percent_chance 50
land_percent 60
end_random
base_size 8
start_random
percent_chance 25
left_border 8
top_border 8
bottom_border 8
percent_chance 25
left_border 8
top_border 8
right_border 8
percent_chance 25
right_border 8
left_border 8
bottom_border 8
percent_chance 25
right_border 8
top_border 8
bottom_border 8
end_random
border_fuzziness 15
zone 1
other_zone_avoidance_distance 7
clumping_factor 15
}

/* ****************************************************** */
<TERRAIN_GENERATION>

/* MIXING WATER */

create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 10
spacing_to_other_terrain_types 2
land_percent 40
}

create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 1
}

create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 8
spacing_to_other_terrain_types 3
land_percent 20
}

create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 1
}

create_terrain MED_WATER
{
base_terrain DEEP_WATER
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 1
}

create_terrain WATER
{
base_terrain MED_WATER
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 1
}

/* PRIMARY FOREST */

if DESERT_MAP
create_terrain PALM_DESERT
{
base_terrain DIRT
spacing_to_other_terrain_types 5
land_percent 9
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
elseif ALPINE_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 9
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
elseif ASIAN_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 9
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 9
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
endif

/* PRIMARY PATCH */

if DESERT_MAP
create_terrain DESERT
{
base_terrain DIRT
number_of_clumps 12
spacing_to_other_terrain_types 0
land_percent 8
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 8
spacing_to_other_terrain_types 0
land_percent 6
set_scale_by_size
}
elseif ASIAN_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 8
spacing_to_other_terrain_types 0
land_percent 6
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 8
spacing_to_other_terrain_types 0
land_percent 9
set_scale_by_size
}
endif

/* SECONDARY FOREST */

if DESERT_MAP
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 3
land_percent 1
number_of_clumps 3
set_avoid_player_start_areas
set_scale_by_groups
}
elseif ALPINE_MAP
create_terrain FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 3
land_percent 1
number_of_clumps 3
set_avoid_player_start_areas
set_scale_by_groups
}
elseif ASIAN_MAP
create_terrain BAMBOO
{
base_terrain GRASS2
spacing_to_other_terrain_types 3
land_percent 1
number_of_clumps 3
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain PALM_DESERT
{
base_terrain DIRT
spacing_to_other_terrain_types 3
land_percent 1
number_of_clumps 3
set_avoid_player_start_areas
set_scale_by_groups
}
endif

/* SECONDARY PATCH */

if DESERT_MAP
create_terrain DIRT3
{
base_terrain DIRT
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain DIRT3
{
base_terrain GRASS2
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
elseif ASIAN_MAP
create_terrain DIRT3
{
base_terrain GRASS2
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
endif

/* TERTIARY PATCH */

if DESERT_MAP
create_terrain GRASS3
{
base_terrain DIRT
number_of_clumps 30
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain GRASS
{
base_terrain GRASS2
number_of_clumps 30
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
elseif ASIAN_MAP
create_terrain GRASS
{
base_terrain GRASS2
number_of_clumps 30
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT3
{
base_terrain GRASS
number_of_clumps 30
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
endif

/* ****************************************************** */
<OBJECTS_GENERATION>

#include_drs land_and_water_resources.inc 54102

create_object FORAGE
{
number_of_groups 1
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 19
max_distance_to_players 120
min_distance_group_placement 9
}

create_object DEER
{
number_of_objects 4
group_variance 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 19
}

if DESERT_MAP
create_object PALMTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
else
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif

/* BALANCING FISH - WAS 40 */

if DESERT_MAP
create_object DORADO
{
number_of_objects 15
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
elseif ALPINE_MAP
create_object SALMON
{
number_of_objects 15
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
elseif ASIAN_MAP
create_object TUNA
{
number_of_objects 15
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
else
create_object DORADO
{
number_of_objects 5
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object TUNA
{
number_of_objects 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
endif

create_object SHORE_FISH
{
number_of_objects 25
set_scaling_to_map_size
min_distance_group_placement 3
set_gaia_object_only
}

create_object MARLIN1
{
number_of_groups 5
number_of_objects 1
set_scaling_to_map_size
set_gaia_object_only
min_distance_group_placement 10
max_distance_to_other_zones 7
}

create_object MARLIN2
{
number_of_groups 5
number_of_objects 1
set_scaling_to_map_size
set_gaia_object_only
min_distance_group_placement 10
max_distance_to_other_zones 7
}

/* ****************************************************** */

<ELEVATION_GENERATION>

create_elevation 7
{
if DESERT_MAP
base_terrain DIRT
elseif ALPINE_MAP
base_terrain GRASS2
elseif ASIAN_MAP
base_terrain GRASS2
else
base_terrain GRASS
endif
number_of_clumps 14
number_of_tiles 2000
set_scale_by_groups
set_scale_by_size
}

<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

/* ****************************************************** */
<CONNECTION_GENERATION>
create_connect_all_players_land
{
/* replace_terrain GRASS DESERT */
replace_terrain WATER SHALLOW
replace_terrain MED_WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
/* replace_terrain FOREST DESERT
replace_terrain PALM_DESERT DESERT */
terrain_cost WATER 7
terrain_cost MED_WATER 9
terrain_cost DEEP_WATER 15
terrain_cost FOREST 7
terrain_cost PINE_FOREST 7
terrain_cost PALM_DESERT 7
terrain_cost SHALLOW 3
terrain_cost DESERT 1
terrain_cost GRASS 2
terrain_cost BEACH 7
terrain_size WATER 2 1
terrain_size MED_WATER 2 1
terrain_size DEEP_WATER 2 1
terrain_size GRASS 0 0
terrain_size FOREST 0 0
terrain_size PINE_FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
}

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-

[This message has been edited by Leif Ericson (edited 08-06-2018 @ 07:24 PM).]

Captain Keno
Squire
posted 08-07-18 08:11 PM CT (US)     2 / 2       
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames