rendered paste body/* random map types for ai */
/* Numbers come from Object Category ID */
/* 09 AUG 99 */
/* random_map.def 54000
Std_Elevation.inc 54100
Std_resources.inc 54101
Land_and_water_resources.inc 54102
Land_resources.inc 54103
Arabia.rms 54201
Archipelago.rms 54202
Baltic.rms 54203
Black_forest.rms 54204
Coastal.rms 54205
Continental.rms 54206
Crater_lake.rms 54207
Fortress.rms 54208
Gold_rush.rms 54209
Highland.rms 54210
Islands.rms 54211
Mediterranean.rms 54212
Migration.rms 54213
Nomad.rms 54214
Random.rms 54216
Rivers.rms 54217
Team_islands.rms 54218 */
#const ARABIA 9
#const ARCHIPELAGO 10
#const BALTIC 11
#const BLACK_FOREST 12
#const COASTAL 13
#const CONTINENTAL 14
#const CRATER_LAKE 15
#const FORTRESS 16
#const GOLD_RUSH 17
#const HIGHLAND 18
#const ISLANDS 19
#const MEDITERRANEAN 20
#const MIGRATION 21
#const RIVERS 22
#const TEAM_ISLANDS 23
/* TERRAIN TYPES */
#const BAMBOO 18
#const BEACH 2
#const DESERT 14
#const DIRT 6
#const DIRT2 11
#const DIRT3 3
#const FOREST 10
#const GRASS 0
#const GRASS2 12
#const GRASS3 9
#const ICE 26
#const LEAVES 5
#const PALM_DESERT 13
#const PINE_FOREST 19
#const SHALLOW 4
#const WATER 1 /* WATER1 */
#const MED_WATER 23 /* WATER3 */
#const DEEP_WATER 22 /* WATER2 */
/* #const TRAIL 26 */
#const SNOW 24
#const SNOW2 25
/* OBJECT TYPES */
/* GAIA */
#const BAMBOO_TREE 348
#const BOAR 48
#const CACTUS 709
#const DEER 65
#const MARLIN1 450 /* DOLPHIN1 */
#const MARLIN2 451 /* DOLPHIN2 */
#const FISH 53 /* FISHX */
#const DORADO 455 /* FISH1 */
#const SALMON 456 /* FISH2 */
#const TUNA 457 /* FISH3 */
#const SNAPPER 458 /* FISH4 */
#const SHORE_FISH 69
#const FORAGE 59
#const FOREST_TREE 411
#const GOLD 66
#const HAWK 96
#const OAKTREE 349
#const PALMTREE 351
#const PINETREE 350
#const SHEEP 594
#const SKELETON 710
#const STONE 102
#const TREE1 399
#const TREE2 400
#const TREE3 401
#const TREE4 402
#const TREE5 403
#const WOLF 126
#const RABID_WOLF 202
#const RELIC 285
/* UNITS */
#const ARCHER 4
#const KING 434
#const KNIGHT 38
#const MANGONEL 280
#const MILITIA 74
#const VILLAGER 83
#const SCOUT 448
#const SPEARMAN 93
#const GALLEY 539
/* BUILDINGS */
#const ARCHERY_RANGE 87
#const BARRACKS 12
#const BLACKSMITH 103
#const CASTLE 82
#const FARM 50
#const HOUSE 70
#const MARKET 84
#const OUTPOST 598
#const STABLE 101
#const TOWN_CENTER 109
#const WALL 117
#const WATCH_TOWER 79
/* ******* STANDARD MINIMUM RESOURCES ************ */
/* 11 AUG 99 */
/* ONLY USED FOR GOLD RUSH and CRATER LAKE */
/* PLAYER START OBJECTS */
create_object TOWN_CENTER
{
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 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
}
/* SPECIAL STUFF FOR REGICIDE */
/* FORTRESS AND MIGRATION NEED TO BE UPDATED */
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
/* NEAR FORAGE */
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 6
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
max_distance_to_players 12
min_distance_group_placement 5
}
create_object SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
min_distance_group_placement 5
}
create_object DEER
{
number_of_objects 4
group_variance 1
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
min_distance_group_placement 4
}
create_object BOAR
{
number_of_objects 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
/* NEAR GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 12
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR GOLD */
create_object GOLD
{
number_of_objects 3
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 18
max_distance_to_players 24
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* NEAR STONE */
create_object STONE
{
number_of_objects 5
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 18
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR STONE */
create_object STONE
{
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 20
max_distance_to_players 26
min_distance_group_placement 7
max_distance_to_other_zones 7
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
create_object WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 30
max_distance_to_players 40
}
/* create_object RABID_WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 40
max_distance_to_players 50
} */
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}/* ******* LAND AND WATER RESOURCES ************ */
/* 24 JUNE 99 */
/* EXACTLY THE SAME AS LAND RESOURCES -- GO FIGURE */
/* PLAYER START OBJECTS */
create_object TOWN_CENTER
{
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 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
}
/* SPECIAL STUFF FOR REGICIDE */
/* FORTRESS AND MIGRATION NEED TO BE UPDATED */
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
/* NEAR FORAGE */
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 6
}
/* NEAR GOLD */
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 12
max_distance_to_players 16
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* MEDIUM GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 18
max_distance_to_players 26
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 25
max_distance_to_players 35
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* NEAR STONE */
create_object STONE
{
number_of_objects 5
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 18
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR STONE */
create_object STONE
{
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 20
max_distance_to_players 26
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
max_distance_to_players 12
}
create_object SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
}
create_object DEER
{
number_of_objects 4
group_variance 1
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
}
create_object BOAR
{
number_of_objects 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 12
min_distance_to_players 30
max_distance_to_players 40
}
/* create_object RABID_WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 40
max_distance_to_players 50
} */
/* RESOURCES BY MAP */
if LARGE_MAP
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 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if HUGE_MAP
create_object FORAGE
{
number_of_groups 2
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if GIGANTIC_MAP
create_object FORAGE
{
number_of_groups 3
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
/* EXTRA GOLD */
if TINY_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if SMALL_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 3
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 3
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object GOLD
{
number_of_groups 4
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object GOLD
{
number_of_groups 5
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
/* EXTRA STONE */
if TINY_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if SMALL_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 4
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 5
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
create_object WOLF
{
number_of_groups 3
set_loose_grouping
start_random
percent_chance 75
number_of_objects 1
percent_chance 25
number_of_objects 2
end_random
set_scaling_to_map_size
set_gaia_object_only
min_distance_group_placement 12
min_distance_to_players 40
max_distance_to_players 120
}
/* ******* LAND RESOURCES ************ */
/* 28 JUNE 99 */
/* PLAYER START OBJECTS */
create_object TOWN_CENTER
{
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 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
}
/* SPECIAL STUFF FOR REGICIDE */
/* FORTRESS AND MIGRATION NEED TO BE UPDATED */
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
/* NEAR FORAGE */
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 6
}
/* NEAR GOLD */
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 12
max_distance_to_players 16
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* MEDIUM GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 18
max_distance_to_players 26
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 25
max_distance_to_players 35
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* NEAR STONE */
create_object STONE
{
number_of_objects 5
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 18
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR STONE */
create_object STONE
{
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 20
max_distance_to_players 26
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
max_distance_to_players 12
}
create_object SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
}
create_object DEER
{
number_of_objects 4
group_variance 1
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
}
create_object BOAR
{
number_of_objects 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 30
max_distance_to_players 40
}
/* create_object RABID_WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 40
max_distance_to_players 50
} */
/* *****RESOURCES BY MAP***** */
if LARGE_MAP
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 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object FORAGE
{
number_of_groups 2
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object FORAGE
{
number_of_groups 3
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
/* EXTRA GOLD */
if TINY_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if SMALL_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 3
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 3
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object GOLD
{
number_of_groups 4
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object GOLD
{
number_of_groups 5
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
/* EXTRA STONE */
if TINY_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if SMALL_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 4
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 5
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
create_object WOLF
{
number_of_groups 3
set_loose_grouping
start_random
percent_chance 75
number_of_objects 1
percent_chance 25
number_of_objects 2
end_random
set_scaling_to_map_size
set_gaia_object_only
min_distance_group_placement 12
min_distance_to_players 40
max_distance_to_players 120
}
/* Fish handled on individual maps */
/* ************ ARABIA ************ */
/* 5 AUG 99 */
#include_drs random_map.def 54000
ai_info_map_type ARABIA
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
start_random
percent_chance 50
#define DESERT_MAP
end_random
if DESERT_MAP
base_terrain DIRT
else
base_terrain GRASS3
endif
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
else
terrain_type GRASS3
endif
land_percent 25
base_size 9
border_fuzziness 15
}
/* ****************************************************** */
<TERRAIN_GENERATION>
/* PRIMARY FOREST */
if DESERT_MAP
create_terrain PALM_DESERT
{
base_terrain DIRT
spacing_to_other_terrain_types 5
land_percent 12
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain FOREST
{
base_terrain GRASS3
spacing_to_other_terrain_types 5
land_percent 12
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 16
spacing_to_other_terrain_types 0
land_percent 10
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS3
number_of_clumps 26
spacing_to_other_terrain_types 1
land_percent 9
set_scale_by_size
}
endif
/* SECONDARY FOREST */
if DESERT_MAP
create_terrain FOREST
{
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
}
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT3
{
base_terrain GRASS3
number_of_clumps 24
spacing_to_other_terrain_types 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain DESERT
{
base_terrain GRASS
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* OASES */
if DESERT_MAP
create_terrain WATER
{
base_terrain PALM_DESERT
spacing_to_other_terrain_types 1
land_percent 1
number_of_clumps 8
set_avoid_player_start_areas
set_flat_terrain_only
set_scale_by_groups
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
#include_drs land_resources.inc 54103
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
}
else
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif
if DESERT_MAP
create_object SHORE_FISH
{
number_of_objects 4
min_distance_group_placement 5
set_gaia_object_only
set_scaling_to_map_size
}
endif
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 7
{
if DESERT_MAP
base_terrain DIRT
else
base_terrain GRASS3
endif
number_of_clumps 20
number_of_tiles 6000
set_scale_by_groups
set_scale_by_size
}
/* ****************************************************** */
<CLIFF_GENERATION>
min_number_of_cliffs 10
max_number_of_cliffs 15
min_length_of_cliff 3
max_length_of_cliff 10
/* ************ ARCHIPELAGO ************ */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type ARCHIPELAGO
/* ****************************************************** */
<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 ASIAN_MAP
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 35
base_size 12
start_random
percent_chance 50
zone 8
percent_chance 50
set_zone_randomly
end_random
left_border 4
right_border 4
top_border 4
bottom_border 4
border_fuzziness 7
other_zone_avoidance_distance 7
}
/* ************** RESOURCE ISLANDS ************ */
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 20
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 23
left_border 5
right_border 5
top_border 5
bottom_border 5
}
/* ================= MEDIUM */
if MEDIUM_MAP
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ====================== LARGE */
if LARGE_MAP
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 24
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ======================== HUGE */
if HUGE_MAP
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 22
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 24
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ======================== GIGANTIC */
if GIGANTIC_MAP
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 22
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 24
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ****************************************************** */
<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 DESERT
spacing_to_other_terrain_types 5
land_percent 6
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 3
number_of_clumps 5
set_avoid_player_start_areas
set_scale_by_groups
}
create_terrain BAMBOO
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 3
number_of_clumps 5
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 6
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if DESERT_MAP
create_terrain DIRT
{
base_terrain DESERT
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 15
set_scale_by_size
}
elseif ASIAN_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 16
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 10
spacing_to_other_terrain_types 0
land_percent 2
set_scale_by_size
}
endif
/* SECONDARY PATCH */
if DESERT_MAP
create_terrain DIRT3
{
base_terrain DESERT
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 1
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 1
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 0
land_percent 1
set_scale_by_size
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
/* PLAYER START OBJECTS */
create_object TOWN_CENTER
{
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 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
}
/* SPECIAL STUFF FOR REGICIDE */
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
/* FORAGE */
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 6
}
/* NEAR GOLD */
create_object GOLD
{
number_of_groups 2
number_of_objects 7
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 12
max_distance_to_players 28
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* STONE */
create_object STONE
{
number_of_groups 2
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
min_distance_group_placement 7
max_distance_to_other_zones 4
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
max_distance_to_players 12
min_distance_group_placement 5
}
create_object SHEEP
{
number_of_groups 2
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 24
min_distance_group_placement 5
}
create_object DEER
{
number_of_objects 4
group_variance 1
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
min_distance_group_placement 4
}
create_object BOAR
{
number_of_objects 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
create_object WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 12
min_distance_to_players 30
max_distance_to_players 50
}
if DESERT_MAP
create_object DORADO
{
number_of_objects 16
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 12
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
elseif ASIAN_MAP
create_object TUNA
{
number_of_objects 18
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 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object TUNA
{
number_of_objects 9
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 9
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
endif
create_object SHORE_FISH
{
number_of_objects 30
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
}
/* ************************************** */
/* BONUS RESOURCES */
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object STONE
{
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
/* ======================= MEDIUM */
if MEDIUM_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
endif
/* =========================== LARGE */
if LARGE_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object STONE
{
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ====================== HUGE */
if HUGE_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 22
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ====================== GIGANTIC */
if GIGANTIC_MAP
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 22
}
create_object STONE
{
number_of_objects 8
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 8
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ================================= END */
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
else
create_object OAKTREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif
/* ********* BALTIC ********** */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type BALTIC
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
start_random
percent_chance 50
#define ALPINE_MAP
end_random
<LAND_GENERATION>
if ALPINE_MAP
base_terrain GRASS2
else
base_terrain GRASS
endif
/* CREATE THE INLAND SEA */
create_land
{
terrain_type WATER
land_percent 85
left_border 10
right_border 10
top_border 10
bottom_border 10
border_fuzziness 40
zone 16
}
create_player_lands
{
if ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 50
base_size 9
other_zone_avoidance_distance 7
set_zone_by_team
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 3
spacing_to_other_terrain_types 1
land_percent 40
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 6
spacing_to_other_terrain_types 3
land_percent 25
}
create_terrain MED_WATER
{
base_terrain DEEP_WATER
number_of_clumps 6
spacing_to_other_terrain_types 1
land_percent 1
}
/* PRIMARY FOREST */
if ALPINE_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 9
number_of_clumps 12
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 12
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if 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
}
else
create_terrain DIRT3
{
base_terrain GRASS
number_of_clumps 8
spacing_to_other_terrain_types 0
land_percent 9
set_scale_by_size
}
endif
/* SECONDARY FOREST */
if ALPINE_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
}
else
create_terrain PINE_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
}
endif
/* SECONDARY PATCH */
if 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
}
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 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
}
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 SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
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 ALPINE_MAP
create_object PINETREE
{
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
create_object SALMON
{
number_of_objects 20
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object TUNA
{
number_of_objects 5
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
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 5
{
base_terrain GRASS
number_of_clumps 14
number_of_tiles 2000
set_scale_by_groups
set_scale_by_size
}
create_elevation 7
{
base_terrain GRASS2
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 10
min_length_of_cliff 4
max_length_of_cliff 10
cliff_curliness 10
min_distance_cliffs 3
/* ****************************************************** */
/* <CONNECTION_GENERATION>
create_connect_teams_lands
{
replace_terrain GRASS DESERT
replace_terrain WATER SHALLOW
replace_terrain FOREST DIRT2
replace_terrain PALM_DESERT DIRT2
terrain_cost WATER 7
terrain_cost 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 GRASS 0 0
terrain_size FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
} */
/* ************* BLACK FOREST ****************** */
/* 4 MAY 99 */
#include_drs random_map.def 54000
ai_info_map_type BLACK_FOREST
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
base_terrain FOREST
create_player_lands
{
terrain_type GRASS
land_percent 50
base_size 13
other_zone_avoidance_distance 6
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 20
number_of_clumps 24
set_avoid_player_start_areas
}
create_terrain GRASS
{
base_terrain FOREST
spacing_to_other_terrain_types 1
land_percent 7
number_of_clumps 9
set_avoid_player_start_areas
}
create_terrain LEAVES
{
base_terrain GRASS
spacing_to_other_terrain_types 1
land_percent 3
number_of_clumps 26
}
create_terrain LEAVES
{
base_terrain GRASS
spacing_to_other_terrain_types 1
land_percent 1
number_of_clumps 40
}
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
/* PONDS FOR DA FISHIES */
create_terrain WATER
{
base_terrain GRASS
spacing_to_other_terrain_types 1
land_percent 1
number_of_clumps 4
set_avoid_player_start_areas
set_flat_terrain_only
}
create_terrain MED_WATER
{
base_terrain WATER
spacing_to_other_terrain_types 2
land_percent 1
number_of_clumps 4
set_avoid_player_start_areas
set_flat_terrain_only
}
/* ****************************************************** */
<OBJECTS_GENERATION>
/* PLAYER START OBJECTS */
#include_drs land_resources.inc 54103
create_object BOAR
{
number_of_objects 3
group_variance 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
create_object OAKTREE
{
number_of_objects 100
set_gaia_object_only
min_distance_to_players 6
min_distance_group_placement 2
}
create_object SHORE_FISH
{
number_of_objects 3
set_gaia_object_only
set_scaling_to_map_size
}
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 4
{
base_terrain GRASS
number_of_clumps 10
number_of_tiles 700
set_scale_by_groups
}
<ELEVATION_GENERATION>
create_elevation 7
{
base_terrain FOREST
number_of_clumps 7
number_of_tiles 4300
set_scale_by_groups
}
/* ****************************************************** */
<CONNECTION_GENERATION>
create_connect_all_players_land
{
replace_terrain GRASS GRASS
replace_terrain GRASS2 GRASS2
replace_terrain GRASS3 GRASS3
replace_terrain WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
replace_terrain FOREST GRASS
terrain_cost WATER 5
terrain_cost FOREST 2
terrain_cost GRASS 1
terrain_cost BEACH 4
terrain_size WATER 2 1
terrain_size GRASS 0 0
terrain_size GRASS2 0 0
terrain_size GRASS3 0 0
terrain_size FOREST 3 1
terrain_size DESERT 0 0
terrain_size SNOW2 0 0
}
create_connect_teams_lands
{
replace_terrain GRASS SNOW2
replace_terrain WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
replace_terrain FOREST SNOW2
replace_terrain PALM_DESERT DESERT
terrain_cost WATER 7
terrain_cost FOREST 7
terrain_cost GRASS 2
terrain_cost BEACH 4
terrain_cost SNOW2 1
terrain_size WATER 2 1
terrain_size GRASS 1 0
terrain_size GRASS2 1 0
terrain_size GRASS3 1 0
terrain_size FOREST 1 0
terrain_size DESERT 0 0
terrain_size SNOW2 0 0
}
/* ************ 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
}
/* ************ CONTINENTAL ************ */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type CONTINENTAL
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
base_terrain WATER
start_random
percent_chance 20
#define ASIAN_MAP
percent_chance 20
#define ALPINE_MAP
end_random
/* Fill in center */
create_land
{
if ASIAN_MAP
terrain_type GRASS2
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 10
base_size 7
left_border 25
right_border 25
top_border 25
bottom_border 25
}
create_player_lands
{
if ASIAN_MAP
terrain_type GRASS2
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 50
base_size 9
start_random
percent_chance 50
left_border 8
right_border 6
percent_chance 50
left_border 6
right_border 8
end_random
start_random
percent_chance 50
top_border 8
bottom_border 6
percent_chance 50
top_border 6
bottom_border 8
end_random
border_fuzziness 10
set_zone_randomly
other_zone_avoidance_distance 5
}
/* ****************************************************** */
<TERRAIN_GENERATION>
/* MIXING WATER */
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 3
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 5
spacing_to_other_terrain_types 5
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
}
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 1
}
/* PRIMARY FOREST */
if ASIAN_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 7
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 7
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 7
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if ASIAN_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 8
spacing_to_other_terrain_types 0
land_percent 4
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
}
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 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
}
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
}
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 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
}
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
}
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 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
}
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
}
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 SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 19
}
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
}
if ASIAN_MAP
create_object BAMBOO_TREE
{
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
}
else
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif
create_object FISH
{
number_of_objects 25
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
if 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 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 WATER SHALLOW
replace_terrain MED_WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
terrain_cost WATER 7
terrain_cost MED_WATER 9
terrain_cost DEEP_WATER 15
terrain_cost FOREST 7
terrain_cost BAMBOO 7
terrain_cost PALM_DESERT 7
terrain_cost PINE_FOREST 7
terrain_cost SHALLOW 3
terrain_cost DESERT 1
terrain_cost DIRT2 2
terrain_cost DIRT3 3
terrain_cost GRASS 2
terrain_cost GRASS2 2
terrain_cost GRASS3 2
terrain_cost BEACH 7
terrain_size WATER 3 1
terrain_size MED_WATER 3 1
terrain_size DEEP_WATER 3 1
terrain_size GRASS2 0 0
terrain_size GRASS3 0 0
terrain_size GRASS 0 0
terrain_size FOREST 0 0
terrain_size BAMBOO 0 0
terrain_size PINE_FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
terrain_size DIRT2 0 0
terrain_size DIRT3 0 0
}
/* ********* CRATER LAKE ********** */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type CRATER_LAKE
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
base_terrain GRASS
/* CREATE THE INLAND SEA */
create_land
{
terrain_type WATER
land_percent 85
left_border 10
right_border 10
top_border 10
bottom_border 10
border_fuzziness 40
base_size 7
zone 16
}
/* CREATE THE SPIRE */
create_land
{
terrain_type GRASS2
land_percent 5
left_border 25
right_border 25
top_border 25
bottom_border 25
other_zone_avoidance_distance 10
zone 15
}
create_player_lands
{
terrain_type GRASS
land_percent 50
/* 60 */
base_size 9
other_zone_avoidance_distance 7
/* set_zone_by_team */
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 3
spacing_to_other_terrain_types 1
land_percent 40
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 6
spacing_to_other_terrain_types 2
land_percent 25
}
create_terrain MED_WATER
{
base_terrain DEEP_WATER
number_of_clumps 5
spacing_to_other_terrain_types 1
land_percent 1
}
create_terrain PINE_FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 3
land_percent 10
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 3
land_percent 4
number_of_clumps 20
set_avoid_player_start_areas
set_scale_by_groups
}
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
/* ****************************************************** */
<OBJECTS_GENERATION>
/* PLAYER START OBJECTS */
#include_drs std_resources.inc 54101
/* RESOURCES IN THE MIDDLE */
create_object GOLD
{
terrain_to_place_on GRASS2
number_of_objects 12
number_of_groups 3
group_variance 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 5
}
/* SCATTERED STONE */
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_to_players 20
max_distance_to_players 45
min_distance_group_placement 9
}
if LARGE_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
create_object WOLF
{
terrain_to_place_on GRASS2
number_of_objects 4
number_of_groups 2
set_loose_grouping
set_gaia_object_only
}
create_object SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
create_object SALMON
{
number_of_objects 25
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SHORE_FISH
{
number_of_objects 25
set_scaling_to_map_size
min_distance_group_placement 3
set_gaia_object_only
}
/* ***** PRETTY TREES ********* */
create_object PINETREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 5
{
base_terrain GRASS
number_of_clumps 14
number_of_tiles 2000
set_scale_by_groups
set_scale_by_size
}
create_elevation 7
{
base_terrain GRASS2
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 10
min_length_of_cliff 4
max_length_of_cliff 10
cliff_curliness 10
min_distance_cliffs 3
/* ****************************************************** */
/* <CONNECTION_GENERATION>
create_connect_teams_lands
{
replace_terrain GRASS DESERT
replace_terrain WATER SHALLOW
replace_terrain FOREST DIRT2
replace_terrain PALM_DESERT DIRT2
terrain_cost WATER 7
terrain_cost 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 GRASS 0 0
terrain_size FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
} */
/* ************ FORTRESS ************ */
/* 16 AUG 99 */
#include_drs random_map.def 54000
ai_info_map_type FORTRESS
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
base_terrain WATER
start_random
percent_chance 20
#define DESERT_MAP
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
else
terrain_type GRASS
endif
land_percent 85
base_size 9
border_fuzziness 15
zone 1
other_zone_avoidance_distance 7
}
/* ****************************************************** */
<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
}
if DESERT_MAP
create_terrain PALM_DESERT
{
base_terrain DIRT
spacing_to_other_terrain_types 1
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 1
land_percent 9
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
endif
if DESERT_MAP
create_terrain DESERT
{
base_terrain DIRT
number_of_clumps 14
spacing_to_other_terrain_types 0
land_percent 8
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 10
spacing_to_other_terrain_types 0
land_percent 12
set_scale_by_size
}
endif
if DESERT_MAP
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 1
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 1
land_percent 1
number_of_clumps 3
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* OASES */
if DESERT_MAP
create_terrain WATER
{
base_terrain PALM_DESERT
spacing_to_other_terrain_types 1
land_percent 1
number_of_clumps 8
set_avoid_player_start_areas
set_flat_terrain_only
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
}
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
}
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>
/* BUILDINGS */
create_object TOWN_CENTER
{
set_place_for_every_player
group_placement_radius 18
min_distance_to_players 0
max_distance_to_players 0
}
create_object WATCH_TOWER
{
number_of_objects 4
set_place_for_every_player
min_distance_to_players 13
max_distance_to_players 15
min_distance_group_placement 6
}
create_object WALL
{
number_of_objects 9999
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 20
}
create_object VILLAGER
{
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
create_object HOUSE
{
number_of_objects 4
set_loose_grouping
set_place_for_every_player
min_distance_to_players 12
max_distance_to_players 12
}
create_object BARRACKS
{
set_place_for_every_player
min_distance_to_players 8
max_distance_to_players 14
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 8
max_distance_to_players 10
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 8
max_distance_to_players 10
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 8
max_distance_to_players 10
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 8
max_distance_to_players 10
min_distance_group_placement 2
}
endif
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
}
/* SPECIAL STUFF FOR REGICIDE */
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
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
}
else
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
}
endif
/* NEAR FORAGE */
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 3
}
/* NEAR GOLD */
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 11
max_distance_to_players 15
min_distance_group_placement 7
}
/* MEDIUM GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 18
max_distance_to_players 26
min_distance_group_placement 7
}
/* FAR GOLD */
create_object GOLD
{
number_of_objects 4
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 25
max_distance_to_players 35
min_distance_group_placement 7
}
/* NEAR STONE */
create_object STONE
{
number_of_objects 5
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 11
max_distance_to_players 15
min_distance_group_placement 7
}
/* FAR STONE */
create_object STONE
{
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 20
max_distance_to_players 26
min_distance_group_placement 7
}
create_object BOAR
{
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 30
max_distance_to_players 35
min_distance_group_placement 3
}
create_object WOLF
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 12
min_distance_to_players 35
max_distance_to_players 40
}
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
/* EXTRA GOLD */
if TINY_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if SMALL_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object GOLD
{
number_of_groups 4
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object GOLD
{
number_of_groups 5
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
/* EXTRA STONE */
if TINY_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if SMALL_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 4
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 5
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
min_distance_group_placement 9
}
endif
if DESERT_MAP
create_object DORADO
{
number_of_objects 5
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 3
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
else
create_object DORADO
{
number_of_objects 2
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object TUNA
{
number_of_objects 3
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 3
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
endif
create_object SHORE_FISH
{
number_of_objects 10
set_scaling_to_map_size
min_distance_group_placement 3
set_gaia_object_only
}
create_object FARM
{
number_of_objects 5
set_place_for_every_player
group_placement_radius
min_distance_to_players 4
max_distance_to_players 4
}
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 5
{
base_terrain GRASS
number_of_clumps 5
number_of_tiles 500
set_scale_by_groups
}
<ELEVATION_GENERATION>
create_elevation 3
{
base_terrain GRASS
number_of_clumps 10
number_of_tiles 600
set_scale_by_groups
}
/* ****************************************************** */
<CLIFF_GENERATION>
min_number_of_cliffs 5
max_number_of_cliffs 10
min_length_of_cliff 3
max_length_of_cliff 10
/* ********* GOLD RUSH ********** */
/* 4 MAY 99 */
#include_drs random_map.def 54000
ai_info_map_type GOLD_RUSH
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
base_terrain GRASS
/* CREATE BADLANDS IN THE MIDDLE */
/* EMPTY LAND */
create_land
{
terrain_type DIRT
land_percent 85
left_border 15
right_border 15
top_border 15
bottom_border 15
zone 16
min_placement_distance 100
}
/* GOOD STUFF */
create_land
{
terrain_type DIRT
land_percent 5
left_border 40
right_border 40
top_border 40
bottom_border 40
zone 15
land_id 22
}
create_player_lands
{
terrain_type GRASS
land_percent 50
base_size 9
other_zone_avoidance_distance 7
set_zone_by_team
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 12
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 5
number_of_clumps 20
set_avoid_player_start_areas
set_scale_by_groups
}
/* LAKEAGE */
create_terrain WATER
{
base_terrain GRASS
land_percent 1
number_of_clumps 4
spacing_to_other_terrain_types 1
set_avoid_player_start_areas
set_flat_terrain_only
}
create_terrain MED_WATER
{
base_terrain WATER
land_percent 1
number_of_clumps 4
spacing_to_other_terrain_types 1
set_avoid_player_start_areas
set_flat_terrain_only
}
create_terrain DESERT
{
base_terrain DIRT
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 8
set_scale_by_size
}
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
/* ****************************************************** */
<OBJECTS_GENERATION>
/* PLAYER START OBJECTS */
#include_drs std_resources.inc 54101
create_object DEER
{
number_of_objects 6
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 19
}
/* RESOURCES IN THE MIDDLE */
create_object GOLD
{
terrain_to_place_on DIRT
number_of_objects 12
number_of_groups 6
group_variance 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 5
place_on_specific_land_id 22
max_distance_to_players 14
}
create_object WOLF
{
terrain_to_place_on DIRT
number_of_objects 4
number_of_groups 4
set_loose_grouping
set_gaia_object_only
min_distance_to_players 25
}
/* SCATTERED STONE */
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_to_players 20
max_distance_to_players 45
min_distance_group_placement 9
}
if LARGE_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
/* ***** PRETTY TREES ********* */
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
create_object SHORE_FISH
{
number_of_objects 5
set_scaling_to_map_size
min_distance_group_placement 3
set_gaia_object_only
}
create_object SKELETON
{
number_of_objects 14
set_scaling_to_map_size
set_gaia_object_only
terrain_to_place_on DIRT
}
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 5
{
base_terrain GRASS
number_of_clumps 14
number_of_tiles 2000
set_scale_by_groups
set_scale_by_size
}
create_elevation 7
{
base_terrain DIRT
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 10
min_length_of_cliff 4
max_length_of_cliff 10
cliff_curliness 10
min_distance_cliffs 3
/* ****************************************************** */
/* <CONNECTION_GENERATION>
create_connect_teams_lands
{
replace_terrain GRASS DESERT
replace_terrain WATER SHALLOW
replace_terrain FOREST DIRT2
replace_terrain PALM_DESERT DIRT2
terrain_cost WATER 7
terrain_cost 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 GRASS 0 0
terrain_size FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
} */
/* ************ HIGHLAND ************ */
/* 7 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type HIGHLAND
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
base_terrain WATER
start_random
percent_chance 33
#define ALPINE_MAP
percent_chance 33
#define ASIAN_MAP
end_random
create_player_lands
{
if ALPINE_MAP
terrain_type GRASS2
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 100
base_size 9
/* randomly choose if we have rivers and to what extent */
start_random
percent_chance 60
set_zone_by_team
percent_chance 40
set_zone_randomly
end_random
start_random
percent_chance 50
other_zone_avoidance_distance 7
percent_chance 50
other_zone_avoidance_distance 10
end_random
border_fuzziness 15
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 6
spacing_to_other_terrain_types 2
land_percent 15
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 10
spacing_to_other_terrain_types 2
land_percent 10
}
/* PRIMARY FOREST LARGE CLUMP */
if ALPINE_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 9
number_of_clumps 4
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 4
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 4
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY FOREST SMALL CLUMP */
if ALPINE_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 8
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
elseif ASIAN_MAP
create_terrain BAMBOO
{
base_terrain GRASS2
spacing_to_other_terrain_types 5
land_percent 8
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 8
number_of_clumps 10
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if 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 DIRT3
{
base_terrain GRASS
number_of_clumps 8
spacing_to_other_terrain_types 0
land_percent 9
set_scale_by_size
}
endif
/* SECONDARY FOREST */
if ALPINE_MAP
create_terrain FOREST
{
base_terrain GRASS3
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 PINE_FOREST
{
base_terrain GRASS3
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 FOREST
{
base_terrain DIRT3
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 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 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_resources.inc 54103
create_object SHEEP
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 19
min_distance_group_placement 5
}
create_object BOAR
{
number_of_objects 2
group_variance 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
if 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
create_object SALMON
{
number_of_objects 4
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SHORE_FISH
{
number_of_objects 16
min_distance_group_placement 5
set_gaia_object_only
set_scaling_to_map_size
}
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 7
{
if 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 WATER SHALLOW
replace_terrain MED_WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
terrain_cost WATER 7
terrain_cost MED_WATER 9
terrain_cost DEEP_WATER 15
terrain_cost FOREST 7
terrain_cost PALM_DESERT 7
terrain_cost SHALLOW 3
terrain_cost DESERT 1
terrain_cost DIRT2 1
terrain_cost DIRT3 1
terrain_cost GRASS 2
terrain_cost GRASS2 2
terrain_cost GRASS3 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 GRASS2 0 0
terrain_size GRASS3 0 0
terrain_size FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
terrain_size DIRT2 0 0
terrain_size DIRT3 0 0
}
/* ************ ISLANDS ************ */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type ISLANDS
/* ****************************************************** */
<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
end_random
/* exp. with size -- was 40% and 7 dist rivers */
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 35
base_size 9
left_border 7
right_border 7
top_border 7
bottom_border 7
border_fuzziness 7
other_zone_avoidance_distance 9
}
/* ************** RESOURCE ISLANDS ************ */
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 20
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 23
left_border 5
right_border 5
top_border 5
bottom_border 5
}
/* ================= MEDIUM */
if MEDIUM_MAP
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ====================== LARGE */
if LARGE_MAP
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 24
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ======================== HUGE */
if HUGE_MAP
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 22
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 24
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ======================== GIGANTIC */
if GIGANTIC_MAP
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 21
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 22
left_border 5
right_border 5
top_border 5
bottom_border 5
}
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 24
left_border 5
right_border 5
top_border 5
bottom_border 5
}
endif
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 10
spacing_to_other_terrain_types 2
land_percent 40
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 6
spacing_to_other_terrain_types 3
land_percent 20
}
/* PRIMARY FOREST */
if DESERT_MAP
create_terrain PALM_DESERT
{
base_terrain DIRT
spacing_to_other_terrain_types 4
land_percent 6
number_of_clumps 15
set_avoid_player_start_areas
set_scale_by_groups
}
elseif ALPINE_MAP
create_terrain PINE_FOREST
{
base_terrain GRASS2
spacing_to_other_terrain_types 4
land_percent 6
number_of_clumps 15
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 4
land_percent 6
number_of_clumps 15
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if DESERT_MAP
create_terrain DESERT
{
base_terrain DIRT
number_of_clumps 10
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 16
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 10
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* SECONDARY PATCH */
if DESERT_MAP
create_terrain DIRT3
{
base_terrain DIRT
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 1
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain DIRT3
{
base_terrain GRASS2
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 1
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 1
set_scale_by_size
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
/* PLAYER START OBJECTS */
create_object TOWN_CENTER
{
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 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
}
/* SPECIAL STUFF FOR REGICIDE */
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
/* FORAGE */
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 6
}
/* NEAR GOLD */
create_object GOLD
{
number_of_groups 2
number_of_objects 7
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 12
max_distance_to_players 28
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* STONE */
create_object STONE
{
number_of_groups 2
number_of_objects 5
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
min_distance_group_placement 7
max_distance_to_other_zones 4
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
max_distance_to_players 12
}
create_object SHEEP
{
number_of_groups 2
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 24
}
create_object DEER
{
number_of_objects 4
group_variance 1
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 14
max_distance_to_players 30
}
create_object BOAR
{
number_of_objects 1
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance__to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
if DESERT_MAP
create_object DORADO
{
number_of_objects 16
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 12
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
elseif ALPINE_MAP
create_object SALMON
{
number_of_objects 18
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 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object TUNA
{
number_of_objects 9
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 9
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
endif
create_object SHORE_FISH
{
number_of_objects 30
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
}
/* ************************************** */
/* BONUS RESOURCES */
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object STONE
{
number_of_objects 2
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
/* ======================= MEDIUM */
if MEDIUM_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
endif
/* =========================== LARGE */
if LARGE_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object STONE
{
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ====================== HUGE */
if HUGE_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 22
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ====================== GIGANTIC */
if GIGANTIC_MAP
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 22
}
create_object STONE
{
number_of_objects 8
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 8
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ================================= END */
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
else
create_object OAKTREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif
/* ********* MEDITERRANEAN ********** */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type MEDITERRANEAN
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
start_random
percent_chance 40
#define DESERT_MAP
end_random
if DESERT_MAP
base_terrain DIRT
else
base_terrain GRASS
endif
/* CREATE THE INLAND SEA */
create_land
{
terrain_type WATER
land_percent 80
left_border 15
right_border 20
top_border 15
bottom_border 20
border_fuzziness 40
other_zone_avoidance_distance 2
zone 16
}
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
else
terrain_type GRASS
endif
land_percent 30
base_size 7
zone_1
other_zone_avoidance_distance 5
border_fuzziness 10
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 3
spacing_to_other_terrain_types 1
land_percent 40
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 6
spacing_to_other_terrain_types 5
land_percent 5
}
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 12
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 12
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if DESERT_MAP
create_terrain GRASS
{
base_terrain DIRT
number_of_clumps 8
spacing_to_other_terrain_types 1
land_percent 4
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 8
spacing_to_other_terrain_types 1
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
}
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 DESERT
{
base_terrain DIRT
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 5
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT3
{
base_terrain GRASS
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
#include_drs land_and_water_resources.inc 54102
create_object SHEEP
{
number_of_objects 3
group_variance 1
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
if DESERT_MAP
create_object PALMTREE
{
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
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
}
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 5
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
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 FOREST DESERT
replace_terrain PALM_DESERT DESERT
terrain_cost WATER 7
terrain_cost 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 GRASS 0 0
terrain_size FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
} */
/* ************ MIGRATION ************ */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type MIGRATION
/* ****************************************************** */
<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
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 15
base_size 9
border_fuzziness 7
other_zone_avoidance_distance 7
clumping_factor 15
}
/* ***FREE BIG ISLAND*** */
create_land
{
if DESERT_MAP
terrain_type_to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
if DESERT_MAP
create_object DORADO
{
number_of_objects 16
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 12
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
elseif ALPINE_MAP
create_object SALMON
{
number_of_objects 18
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 10
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object TUNA
{
number_of_objects 9
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
create_object SNAPPER
{
number_of_objects 9
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
endif
create_object SHORE_FISH
{
number_of_objects 30
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
}
/* ************************************** */
/* BONUS RESOURCES */
create_object GOLD
{
number_of_groups 2
number_of_objects 3
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object STONE
{
number_of_objects 2
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
/* ======================= MEDIUM */
if MEDIUM_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
endif
/* =========================== LARGE */
if LARGE_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object STONE
{
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 4
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ====================== HUGE */
if HUGE_MAP
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_objects 5
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 22
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ====================== GIGANTIC */
if GIGANTIC_MAP
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_objects 7
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 22
}
create_object STONE
{
number_of_objects 8
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 23
}
create_object STONE
{
number_of_objects 8
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 24
}
endif
/* ================================= END */
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
else
create_object OAKTREE
{
number_of_objects 15
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif
/* ********* MEDITERRANEAN ********** */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type MEDITERRANEAN
/* ****************************************************** */
<PLAYER_SETUP>
random_placement /* note this is only currently valid entry */
/* ****************************************************** */
<LAND_GENERATION>
start_random
percent_chance 40
#define DESERT_MAP
end_random
if DESERT_MAP
base_terrain DIRT
else
base_terrain GRASS
endif
/* CREATE THE INLAND SEA */
create_land
{
terrain_type WATER
land_percent 80
left_border 15
right_border 20
top_border 15
bottom_border 20
border_fuzziness 40
other_zone_avoidance_distance 2
zone 16
}
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
else
terrain_type GRASS
endif
land_percent 30
base_size 7
zone_1
other_zone_avoidance_distance 5
border_fuzziness 10
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 3
spacing_to_other_terrain_types 1
land_percent 40
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 6
spacing_to_other_terrain_types 5
land_percent 5
}
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 12
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 12
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if DESERT_MAP
create_terrain GRASS
{
base_terrain DIRT
number_of_clumps 8
spacing_to_other_terrain_types 1
land_percent 4
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 8
spacing_to_other_terrain_types 1
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
}
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 DESERT
{
base_terrain DIRT
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 5
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT3
{
base_terrain GRASS
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
#include_drs land_and_water_resources.inc 54102
create_object SHEEP
{
number_of_objects 3
group_variance 1
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
if DESERT_MAP
create_object PALMTREE
{
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
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
}
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 5
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
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 FOREST DESERT
replace_terrain PALM_DESERT DESERT
terrain_cost WATER 7
terrain_cost 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 GRASS 0 0
terrain_size FOREST 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
} */
/* ************ MIGRATION ************ */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type MIGRATION
/* ****************************************************** */
<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
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 15
base_size 9
border_fuzziness 7
other_zone_avoidance_distance 7
clumping_factor 15
}
/* ***FREE BIG ISLAND*** */
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 40
border_fuzziness 10
other_zone_avoidance_distance 10
land_id 21
start_random
percent_chance 50
left_border 13
right_border 10
percent_chance 50
left_border 10
right_border 13
end_random
start_random
percent_chance 50
top_border 13
bottom_border 10
percent_chance 50
top_border 10
bottom_border 13
end_random
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 10
spacing_to_other_terrain_types 2
land_percent 60
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 6
spacing_to_other_terrain_types 5
land_percent 10
}
/* PRIMARY FOREST */
if DESERT_MAP
create_terrain PALM_DESERT
{
base_terrain DIRT
spacing_to_other_terrain_types 5
land_percent 6
number_of_clumps 14
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 6
number_of_clumps 14
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 6
number_of_clumps 14
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if DESERT_MAP
create_terrain DESERT
{
base_terrain DIRT
number_of_clumps 8
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
}
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 GRASS3
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
}
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
}
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>
/* PLAYER START OBJECTS */
create_object TOWN_CENTER
{
set_place_for_every_player
group_placement_radius 14
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 6
}
create_object SCOUT
{
number_of_objects 1
set_place_for_every_player
min_distance_to_players 7
max_distance_to_players 9
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PALMTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
elseif ASIAN_MAP
create_object BAMBOO_TREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object PINETREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
else
create_object OAKTREE
{
number_of_objects 2
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 4
max_distance_to_players 5
min_distance_group_placement 2
}
create_object OAKTREE
{
number_of_objects 3
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 6
max_distance_to_players 8
min_distance_group_placement 2
}
endif
/* SPECIAL STUFF FOR REGICIDE */
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
/* NEAR FORAGE */
create_object FORAGE
{
number_of_objects 7
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 6
}
/* GOLD MINE */
create_object GOLD
{
number_of_objects 8
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 7
max_distance_to_other_zones 5
}
/* STONE MINE */
create_object STONE
{
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 7
max_distance_to_other_zones 5
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
min_distance_group_placement 5
}
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 10
min_distance_group_placement 5
}
create_object DEER
{
number_of_objects 4
group_variance 1
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 8
min_distance_group_placement 4
}
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
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
}
else
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
min_distance_to_players 8
set_scaling_to_map_size
}
endif
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 15
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 15
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 4
}
else
create_object DORADO
{
number_of_objects 10
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
set_gaia_object_only
min_distance_group_placement 3
}
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
}
/* *************************************************** */
/* ****IN THE NEW WORLD**** */
create_object RELIC
{
number_of_objects 5
min_distance_to_players 25
temp_min_distance_group_placement 20
place_on_specific_land_id 21
}
create_object BOAR
{
number_of_objects 2
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
min_distance_to_players 25
place_on_specific_land_id 21
}
create_object SHEEP
{
number_of_objects 4
set_gaia_object_only
set_scaling_to_player_number
min_distance_to_players 25
place_on_specific_land_id 21
}
create_object GOLD
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_group_placement 10
min_distance_to_players 25
place_on_specific_land_id 21
}
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_to_players 25
min_distance_group_placement 10
place_on_specific_land_id 21
}
create_object FORAGE
{
number_of_groups 1
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_group_placement 7
min_distance_to_players 25
place_on_specific_land_id 21
}
create_object WOLF
{
number_of_objects 2
set_gaia_object_only
set_scaling_to_player_number
min_distance_group_placement 6
min_distance_to_players 25
place_on_specific_land_id 21
}
/* RESOURCES BY MAP */
if LARGE_MAP
create_object FORAGE
{
number_of_groups 1
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if HUGE_MAP
create_object FORAGE
{
number_of_groups 2
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if GIGANTIC_MAP
create_object FORAGE
{
number_of_groups 3
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if LARGE_MAP
create_object GOLD
{
number_of_groups 1
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if HUGE_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if GIGANTIC_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if LARGE_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 6
group_variance 1
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_group_placement 7
place_on_specific_land_id 21
}
endif
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 7
{
if DESERT_MAP
base_terrain DIRT
elseif ALPINE_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 3
max_number_of_cliffs 5
min_length_of_cliff 4
max_length_of_cliff 5
cliff_curliness 10
min_distance_cliffs 3
/* ************ NOMAD ************ */
/* 5 APR 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
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DESERT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 60
base_size 8
start_random
percent_chance 50
left_border 8
percent_chance 50
right_border 8
end_random
start_random
percent_chance 50
top_border 8
percent_chance 50
bottom_border 8
end_random
border_fuzziness 15
zone 1
other_zone_avoidance_distance 7
clumping_factor 15
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain DEEP_WATER
{
base_terrain WATER
number_of_clumps 3
spacing_to_other_terrain_types 5
land_percent 20
}
/* PRIMARY FOREST */
if DESERT_MAP
create_terrain PALM_DESERT
{
base_terrain DESERT
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
}
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 GRASS
{
base_terrain DESERT
number_of_clumps 8
spacing_to_other_terrain_types 1
land_percent 4
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 8
spacing_to_other_terrain_types 1
land_percent 6
set_scale_by_size
}
else
create_terrain DESERT
{
base_terrain GRASS
number_of_clumps 8
spacing_to_other_terrain_types 1
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 GRASS3
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 DESERT
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 DESERT
number_of_clumps 24
spacing_to_other_terrain_types 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* TERTIARY PATCH */
if DESERT_MAP
create_terrain GRASS3
{
base_terrain DESERT
number_of_clumps 30
spacing_to_other_terrain_types 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT3
{
base_terrain GRASS
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
create_object VILLAGER
{
set_place_for_every_player
min_distance_to_players 25
}
create_object RELIC
{
set_gaia_object_only
set_place_for_every_player
}
/* SPECIAL STUFF FOR REGICIDE */
if REGICIDE
create_object KING
{
set_place_for_every_player
min_distance_to_players 25
}
endif
/* NEAR FORAGE */
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_group_placement 6
}
/* BAA BAA */
create_object SHEEP
{
number_of_objects 4
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 5
}
create_object SHEEP
{
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 5
}
create_object SHEEP
{
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 5
}
create_object DEER
{
number_of_objects 6
group_variance 2
group_placement_radius 3
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 4
}
create_object BOAR
{
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
create_object BOAR
{
number_of_objects 1
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 16
max_distance_to_players 22
}
/* NEAR GOLD */
create_object GOLD
{
number_of_objects 6
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 11
max_distance_to_other_zones 7
}
/* FAR GOLD */
create_object GOLD
{
number_of_objects 6
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* NEAR STONE */
create_object STONE
{
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 7
max_distance_to_other_zones 7
}
/* FAR STONE */
create_object STONE
{
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_group_placement 7
}
/* RESOURCES BY NUMBER OF PLAYERS */
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_group_placement 7
}
create_object GOLD
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
set_scaling_to_player_number
min_distance_group_placement 7
}
/* RESOURCES BY MAP */
if LARGE_MAP
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 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if HUGE_MAP
create_object FORAGE
{
number_of_groups 2
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if GIGANTIC_MAP
create_object FORAGE
{
number_of_groups 3
number_of_objects 5
group_placement_radius 3
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if LARGE_MAP
create_object STONE
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if HUGE_MAP
create_object STONE
{
number_of_groups 2
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if GIGANTIC_MAP
create_object STONE
{
number_of_groups 3
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 7
}
endif
if SMALL_MAP
create_object GOLD
{
number_of_groups 1
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if MEDIUM_MAP
create_object GOLD
{
number_of_groups 2
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if LARGE_MAP
create_object GOLD
{
number_of_groups 3
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if HUGE_MAP
create_object GOLD
{
number_of_groups 4
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
if GIGANTIC_MAP
create_object GOLD
{
number_of_groups 5
number_of_objects 6
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
min_distance_group_placement 9
}
endif
create_object HAWK
{
number_of_objects 6
set_scaling_to_map_size
}
create_object WOLF
{
number_of_objects 1
set_scaling_to_map_size
set_gaia_object_only
min_distance_to_players 40
max_distance_to_players 120
}
/* BALANCING FISH - WAS 40 */
create_object FISH
{
number_of_objects 15
set_scaling_to_map_size
terrain_to_place_on WATER
set_gaia_object_only
}
create_object FISH
{
number_of_objects 10
set_scaling_to_map_size
terrain_to_place_on DEEP_WATER
set_gaia_object_only
}
create_object SHORE_FISH
{
number_of_objects 25
set_scaling_to_map_size
terrain_to_place_on WATER
min_distance_group_placement 3
set_gaia_object_only
}
create_object DOLPHIN
{
number_of_groups 10
number_of_objects 1
set_scaling_to_map_size
terrain_to_place_on DEEP_WATER
set_gaia_object_only
min_distance_group_placement 10
}
create_object DEER
{
number_of_objects 2
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
}
else
create_object OAKTREE
{
number_of_objects 30
set_gaia_object_only
set_scaling_to_map_size
}
endif
/* ****************************************************** */
<ELEVATION_GENERATION>
#include std_elevation.inc
/* ****************************************************** */
<CONNECTION_GENERATION>
create_connect_all_players_land
{
/* replace_terrain GRASS DESERT */
replace_terrain WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
/* replace_terrain FOREST DESERT
replace_terrain PALM_DESERT DESERT */
terrain_cost WATER 7
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 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
}
/* ************ RANDOM ************ */
/* ** RANDOMLY CHOOSES A STANDARD MAP ** */
/* 28 APR 99 */
start_random
percent_chance 9
#include_drs Archipelago.rms 54202
percent_chance 9
#include_drs Baltic.rms 54203
percent_chance 10
#include_drs Coastal.rms 54205
percent_chance 9
#include_drs Continental.rms 54206
percent_chance 9
#include_drs Highland.rms 54210
percent_chance 9
#include_drs Arabia.rms 54201
percent_chance 9
#include_drs Mediterranean.rms 54212
percent_chance 9
#include_drs Migration.rms 54213
percent_chance 9
#include_drs Rivers.rms 54217
percent_chance 9
#include_drs Islands.rms 54211
percent_chance 9
#include_drs Team_islands.rms 54218
end_random/* ********* RIVERS ********** */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type RIVERS
/* ****************************************************** */
<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 ASIAN_MAP
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 65
base_size 11
start_random
percent_chance 50
left_border 8
percent_chance 50
right_border 8
end_random
start_random
percent_chance 50
top_border 8
percent_chance 50
bottom_border 8
end_random
border_fuzziness 7
other_zone_avoidance_distance 5
clumping_factor 15
}
/* BONUS ISLAND */
create_land
{
if DESERT_MAP
terrain_type DIRT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 20
left_border 5
right_border 5
top_border 5
bottom_border 5
}
/* NUISANCE ISLAND 1 */
create_land
{
if DESERT_MAP
terrain_type DESERT
elseif ASIAN_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 25
left_border 5
right_border 5
top_border 5
bottom_border 5
}
/* NUISANCE ISLAND 2 */
create_land
{
if DESERT_MAP
terrain_type GRASS
elseif ASIAN_MAP
terrain_type GRASS3
else
terrain_type DIRT
endif
land_percent 1
border_fuzziness 10
other_zone_avoidance_distance 7
land_id 25
left_border 5
right_border 5
top_border 5
bottom_border 5
}
/* ****************************************************** */
<TERRAIN_GENERATION>
create_terrain MED_WATER
{
base_terrain WATER
number_of_clumps 20
spacing_to_other_terrain_types 2
land_percent 15
}
create_terrain DEEP_WATER
{
base_terrain MED_WATER
number_of_clumps 10
spacing_to_other_terrain_types 2
land_percent 5
}
/* 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 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 8
spacing_to_other_terrain_types 0
land_percent 8
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 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 GRASS
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 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 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 DEER
{
number_of_objects 4
group_variance 1
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 25
min_distance_group_placement 5
}
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 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
/* BONUS ISLAND RESOURCES */
create_object GOLD
{
number_of_groups 2
number_of_objects 4
group_placement_radius 2
set_tight_grouping
set_gaia_object_only
place_on_specific_land_id 20
}
create_object SALMON
{
number_of_objects 25
set_scaling_to_map_size
set_gaia_object_only
max_distance_to_other_zones 2
}
create_object SHORE_FISH
{
number_of_objects 30
set_scaling_to_map_size
/* min_distance_group_placement 3 */
set_gaia_object_only
}
/* ****************************************************** */
<ELEVATION_GENERATION>
create_elevation 7
{
if DESERT_MAP
base_terrain DIRT
elseif ASIAN_MAP
base_terrain GRASS2
else
base_terrain GRASS
endif
number_of_clumps 14
number_of_tiles 1000
set_scale_by_groups
set_scale_by_size
}
/* ****************************************************** */
<CONNECTION_GENERATION>
create_connect_all_players_land
{
replace_terrain WATER SHALLOW
replace_terrain MED_WATER SHALLOW
replace_terrain DEEP_WATER SHALLOW
terrain_cost WATER 7
terrain_cost MED_WATER 9
terrain_cost DEEP_WATER 15
terrain_cost FOREST 7
terrain_cost BAMBOO 7
terrain_cost PALM_DESERT 7
terrain_cost SHALLOW 3
terrain_cost DESERT 1
terrain_cost DIRT 1
terrain_cost DIRT 2
terrain_cost DIRT 3
terrain_cost GRASS 2
terrain_cost BEACH 7
terrain_size WATER 3 1
terrain_size MED_WATER 3 1
terrain_size DEEP_WATER 3 1
terrain_size GRASS 0 0
terrain_size FOREST 0 0
terrain_size BAMBOO 0 0
terrain_size PALM_DESERT 0 0
terrain_size DESERT 0 0
}
/* ************ TEAM ISLANDS ************ */
/* 21 JULY 99 */
#include_drs random_map.def 54000
ai_info_map_type TEAM_ISLANDS
/* ****************************************************** */
<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
end_random
create_player_lands
{
if DESERT_MAP
terrain_type DIRT
elseif ALPINE_MAP
terrain_type GRASS2
else
terrain_type GRASS
endif
land_percent 45
base_size 12
border_fuzziness 15
start_random
percent_chance 50
left_border 7
right_border 9
percent_chance 50
left_border 9
right_border 7
end_random
start_random
percent_chance 50
top_border 7
bottom_border 9
percent_chance 50
top_border 9
bottom_border 7
end_random
set_zone_by_team
other_zone_avoidance_distance 22
}
/* ****************************************************** */
<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 6
number_of_clumps 8
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 8
number_of_clumps 8
set_avoid_player_start_areas
set_scale_by_groups
}
else
create_terrain FOREST
{
base_terrain GRASS
spacing_to_other_terrain_types 5
land_percent 8
number_of_clumps 8
set_avoid_player_start_areas
set_scale_by_groups
}
endif
/* PRIMARY PATCH */
if DESERT_MAP
create_terrain DESERT
{
base_terrain DIRT
number_of_clumps 10
spacing_to_other_terrain_types 1
land_percent 4
set_scale_by_size
}
elseif ALPINE_MAP
create_terrain GRASS3
{
base_terrain GRASS2
number_of_clumps 16
spacing_to_other_terrain_types 1
land_percent 4
set_scale_by_size
}
else
create_terrain DIRT
{
base_terrain GRASS
number_of_clumps 10
spacing_to_other_terrain_types 1
land_percent 9
set_scale_by_size
}
endif
/* SECONDARY FOREST */
if DESERT_MAP
create_terrain FOREST
{
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
}
elseif ALPINE_MAP
create_terrain FOREST
{
base_terrain GRASS3
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 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain GRASS3
{
base_terrain GRASS
number_of_clumps 24
spacing_to_other_terrain_types 1
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 1
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 1
land_percent 2
set_scale_by_size
}
else
create_terrain DIRT3
{
base_terrain GRASS
number_of_clumps 30
spacing_to_other_terrain_types 1
land_percent 2
set_scale_by_size
}
endif
/* ****************************************************** */
<OBJECTS_GENERATION>
#include_drs land_and_water_resources.inc 54102
create_object DEER
{
number_of_objects 6
number_of_groups 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
create_object BOAR
{
number_of_objects 2
set_loose_grouping
set_gaia_object_only
set_place_for_every_player
min_distance_to_players 35
min_distance_group_placement 5
}
if DESERT_MAP
create_object PALMTREE
{
number_of_objects 20
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
elseif ALPINE_MAP
create_object PINETREE
{
number_of_objects 20
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
else
create_object OAKTREE
{
number_of_objects 20
set_gaia_object_only
set_scaling_to_map_size
min_distance_to_players 8
}
endif
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
}
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
else
base_terrain GRASS
endif
number_of_clumps 14
number_of_tiles 1200
set_scale_by_groups
set_scale_by_size
}
<CLIFF_GENERATION>
min_number_of_cliffs 3
max_number_of_cliffs 5
min_length_of_cliff 4
max_length_of_cliff 8
cliff_curliness 10
min_distance_cliffs 3
/* ****************************************************** */
<CONNECTION_GENERATION>
create_connect_teams_lands
{
replace_terrain GRASS SNOW2
replace_terrain GRASS2 SNOW2
replace_terrain GRASS3 SNOW2
replace_terrain WATER GRASS
replace_terrain MED_WATER GRASS
replace_terrain DEEP_WATER GRASS
replace_terrain BEACH GRASS
replace_terrain FOREST SNOW2
replace_terrain PALM_DESERT SNOW2
replace_terrain PINE_FOREST SNOW2
replace_terrain DESERT SNOW2
replace_terrain DIRT SNOW2
replace_terrain DIRT2 SNOW2
replace_terrain DIRT3 SNOW2
terrain_cost WATER 5
terrain_cost MED_WATER 7
terrain_cost DEEP_WATER 15
terrain_cost FOREST 7
terrain_cost PALM_DESERT 7
terrain_cost PINE_FOREST 7
terrain_cost DESERT 5
terrain_cost DIRT 5
terrain_cost DIRT2 5
terrain_cost DIRT3 5
terrain_cost GRASS 2
terrain_cost GRASS2 2
terrain_cost GRASS3 2
terrain_cost BEACH 4
terrain_cost SNOW2 1
terrain_size WATER 6 1
terrain_size DEEP_WATER 6 1
terrain_size GRASS 1 0
terrain_size GRASS2 1 0
terrain_size GRASS3 1 0
terrain_size FOREST 3 1
terrain_size PALM_DESERT 3 1
terrain_size PINE_FOREST 3 1
terrain_size DESERT 0 0
terrain_size DIRT 0 0
terrain_size DIRT2 0 0
terrain_size DIRT3 0 0
terrain_size SNOW2 0 0
}
;starting loads
(load "petersen civ loads")
(load "petersen difficulty loads")
(load "petersen gather")
(load "petersen upgrades")
(load "petersen castle")
(load "petersen full tech")
(load "petersen rush")
(defrule
(true)
=>
(set-goal military-parity YES) ;goal 3
(set-goal attack-control NO) ;goal 4
(set-goal resource-needed NO) ;goal 5
(set-goal rush-control NOTICE) ;goal 6
(set-goal secondary-build NO) ;goal 8
(set-goal combat-arm NOTICE) ;goal 11
(set-goal soldiers-available NO);goal 10
(set-goal combat-supp UNIT20) ;goal 12
(set-goal age-advancement NO) ;goal 14
(disable-self)
)
(defrule
(true)
=>
(set-goal upgrade-conflict NO) ;goal 16
(set-goal wonder-attempt MAYBE) ;goal 20
(set-goal enemy-soldiers NO) ;goal 26
(set-goal get-mad NO) ;goal 28
(set-goal siege-available YES) ;goal 34
(disable-self)
)
;========================DARK AGE RULES
(defrule
(true)
=>
(set-strategic-number sn-coop-share-information 1)
(set-strategic-number sn-coop-share-attacking 1)
(set-strategic-number sn-maximum-town-size 15)
(set-strategic-number sn-task-ungrouped-soldiers 0)
(set-strategic-number sn-zero-priority-distance 250)
(set-strategic-number sn-blot-exploration-map 0)
(set-strategic-number sn-attack-intelligence 1)
(set-strategic-number sn-gather-defense-units 1)
(set-strategic-number sn-defense-distance 2)
(set-strategic-number sn-maximum-gaia-attack-response 2)
(set-strategic-number sn-ignore-attack-group-under-attack 0)
(set-strategic-number sn-minimum-boar-hunt-group-size 5)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-stone-dropsite-distance 3)
(set-strategic-number sn-gold-dropsite-distance 3)
(set-strategic-number sn-retask-gather-amount 20)
(set-strategic-number sn-camp-max-distance 20)
(set-strategic-number sn-mill-max-distance 20)
(set-strategic-number sn-enemy-sighted-response-distance 10)
(set-strategic-number sn-group-form-distance 10)
(set-strategic-number sn-allow-civilian-defense 1)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-town-defend-priority 1)
(set-strategic-number sn-gold-defend-priority 2)
(set-strategic-number sn-stone-defend-priority 3)
(set-strategic-number sn-forage-defend-priority 0)
(set-strategic-number sn-relic-defend-priority 0)
(set-strategic-number sn-cap-civilian-builders 8)
(set-strategic-number sn-cap-civilian-gatherers 100)
(set-strategic-number sn-minimum-civilian-explorers 0)
(set-strategic-number sn-cap-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-explorers 0)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-maximum-wood-drop-distance 20)
(set-strategic-number sn-maximum-food-drop-distance 20)
(set-strategic-number sn-maximum-hunt-drop-distance 40)
(set-strategic-number sn-maximum-fish-boat-drop-distance 30)
(set-strategic-number sn-maximum-gold-drop-distance 20)
(set-strategic-number sn-maximum-stone-drop-distance 20)
(disable-self)
)
;start exploring
(defrule
(or
(game-time > 600)
(and
(starting-resources < high-resources)
(difficulty > hardest)
)
)
=>
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(disable-self)
)
(defrule
(or
(starting-resources == high-resources)
(difficulty == hardest)
)
=>
(set-strategic-number sn-percent-civilian-builders 85)
(set-strategic-number sn-percent-civilian-gatherers 15)
(disable-self)
)
; explore a bit at need
(defrule
(game-time < 600)
(military-population == 0)
(civilian-population < 15)
(or
(dropsite-min-distance food == -1)
(civilian-population > 10)
)
=>
(set-strategic-number sn-minimum-civilian-explorers 1)
(set-strategic-number sn-cap-civilian-explorers 1)
(set-strategic-number sn-percent-civilian-explorers 5)
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 80)
)
; Shut the explorers off when we get enough food
(defrule
(strategic-number sn-percent-civilian-explorers > 0)
(or
(or
(game-time > 900)
(dropsite-min-distance food > -1)
)
(military-population > 0)
)
=>
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-minimum-civilian-explorers 0)
(set-strategic-number sn-cap-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
)
(defrule
(or
(players-current-age any-enemy > feudal-age)
(players-military-population any-enemy > 2)
)
=>
(set-strategic-number sn-allow-civilian-defense 0)
(disable-self)
)
; villager count
(defrule
(current-age == dark-age)
(civilian-population < civ-dark)
(nor
(goal rush-control 2)
(or
(goal rush-control BOOMING)
(goal rush-control FEEDING)
)
)
(can-train villager)
=>
(train villager)
)
(defrule
(current-age == dark-age)
(or
(and
(or
(goal rush-control 2)
(goal rush-control FEEDING)
)
(civilian-population < civ-dark-rush)
)
(and
(goal rush-control BOOMING)
(civilian-population < civ-feudal)
)
)
(can-train villager)
=>
(train villager)
)
;maintain housing
(defrule
(difficulty <= moderate)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#load-if-defined DIFFICULTY-EASIEST
(defrule
(military-population < 10)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#end-if
#load-if-defined DIFFICULTY-EASY
(defrule
(military-population < civ-dark-rush)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#end-if
;maintain a town center
(defrule
(game-time > 45)
(building-type-count town-center < 1)
(can-build town-center)
=>
(build town-center)
)
; Build a mill when we find food
(defrule
(building-type-count-total house > 0)
(building-type-count-total mill == 0)
(or
(resource-found food)
(game-time > 900)
)
(can-build mill)
=>
(build mill)
)
(defrule
(game-time > 90)
(resource-found wood)
(building-type-count-total house > 0)
(building-type-count-total lumber-camp == 0)
(can-build lumber-camp)
=>
(build lumber-camp)
)
;build farms
(defrule
(building-type-count-total lumber-camp > 0)
(building-type-count-total mill > 0)
(idle-farm-count <= 1)
(sheep-and-forage-too-far)
(can-build farm)
(not (goal wonder-attempt YES) )
=>
(build farm)
)
(defrule
(building-type-count-total barracks == 0)
(can-build-with-escrow barracks)
(or
(and
(building-type-count-total lumber-camp > 0)
(building-type-count-total mill > 0)
)
(current-age > dark-age)
)
=>
(release-escrow wood)
(build barracks)
)
(defrule
(building-type-count-total barracks == 1)
(can-build-with-escrow barracks)
(goal rush-control RUSHING)
(not (goal 1 10) )
=>
(release-escrow wood)
(build-forward barracks)
)
(defrule
(current-age == dark-age)
(building-type-count-total mining-camp == 0)
(goal resource-needed GOLD)
(resource-found gold)
(can-build mining-camp)
=>
(build mining-camp)
)
;=======================FEUDAL AGE RULES
(defrule
(current-age >= feudal-age)
=>
(set-strategic-number sn-maximum-town-size feudal-town-size)
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(set-strategic-number sn-camp-max-distance 35)
(set-strategic-number sn-mill-max-distance 35)
(set-strategic-number sn-group-form-distance 20)
(set-strategic-number sn-enemy-sighted-response-distance 10)
(set-strategic-number sn-ignore-attack-group-under-attack 1)
(disable-self)
)
(defrule
(current-age >= feudal-age)
=>
(set-goal combat-supp UNIT20)
(set-goal age-advancement NO)
(enable-timer t-production 1)
(enable-timer t-lumbercamp 1)
(disable-timer t-ageup)
(disable-self)
)
(defrule
(current-age == feudal-age)
(current-age-time < 600)
(wood-amount > 500)
=>
(set-strategic-number sn-percent-civilian-builders 50)
(set-strategic-number sn-percent-civilian-gatherers 50)
(disable-self)
)
(defrule
(current-age == feudal-age)
(current-age-time >= 600)
=>
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(disable-self)
)
; villager count
(defrule
(current-age == feudal-age)
(civilian-population < civ-feudal)
(nor
(goal rush-control 3)
(or
(goal rush-control BOOMING)
(goal rush-control FEEDING)
)
)
(can-train villager)
=>
(train villager)
)
(defrule
(current-age == feudal-age)
(or
(and
(goal rush-control 3)
(civilian-population < civ-dark)
)
(and
(or
(goal rush-control BOOMING)
(goal rush-control FEEDING)
)
(civilian-population < civ-castle)
)
)
(can-train villager)
=>
(train villager)
)
;periodically task idle guys, so they don't clog up production
(defrule
(timer-triggered t-lumbercamp)
(strategic-number sn-task-ungrouped-soldiers == 0)
=>
(set-strategic-number sn-task-ungrouped-soldiers 1)
)
(defrule
(timer-triggered t-lumbercamp)
(strategic-number sn-task-ungrouped-soldiers == 1)
=>
(set-strategic-number sn-task-ungrouped-soldiers 0)
)
; Build camps at need
(defrule
(timer-triggered t-lumbercamp)
(current-age >= feudal-age)
(resource-found wood)
(dropsite-min-distance wood > 5)
(can-build lumber-camp)
=>
(build lumber-camp)
)
(defrule
(current-age >= feudal-age)
(resource-found gold)
(building-type-count-total mining-camp == 0)
(can-build-with-escrow mining-camp)
=>
(release-escrow wood)
(build mining-camp)
)
(defrule
(current-age >= feudal-age)
(resource-found stone)
(building-type-count-total mining-camp == 1)
(can-build-with-escrow mining-camp)
=>
(release-escrow wood)
(build mining-camp)
)
(defrule
(timer-triggered t-lumbercamp)
(current-age >= feudal-age)
(building-type-count-total market > 0)
(building-type-count-total blacksmith > 0)
(building-type-count-total mining-camp >= 1)
(building-type-count-total mining-camp < mining-count)
(resource-found gold)
(resource-found stone)
(or
(dropsite-min-distance gold > 7)
(dropsite-min-distance stone > 7)
)
(can-build mining-camp)
=>
(build mining-camp)
)
(defrule
(timer-triggered t-lumbercamp)
=>
(disable-timer t-lumbercamp)
(enable-timer t-lumbercamp 30)
)
(defrule
(building-type-count-total archery-range == 0)
(or
(goal rush-control 3)
(goal rush-control RUSHING)
)
(or
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
(or
(goal pre-unique-arm CAVARCHER)
(goal pre-unique-arm ARCHER)
)
)
(can-build-with-escrow archery-range)
=>
(release-escrow wood)
(build archery-range)
)
(defrule
(goal combat-arm LIGHTCAV)
(building-type-count-total stable == 0)
(or
(goal rush-control 3)
(goal rush-control RUSHING)
)
(can-build-with-escrow stable)
=>
(release-escrow wood)
(build stable)
)
;feudal age market -- always keep a market handy!
(defrule
(building-type-count-total market == 0)
(can-build-with-escrow market)
=>
(release-escrow wood)
(build market)
)
;get a blacksmith
(defrule
(building-type-count-total market > 0)
(building-type-count-total barracks > 0)
(building-type-count-total blacksmith == 0)
(can-build-with-escrow blacksmith)
=>
(release-escrow wood)
(build blacksmith)
)
(defrule
(building-type-count-total market > 0)
(building-type-count-total archery-range == 0)
(or
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
(or
(or
(goal combat-supp CAVARCHER)
(goal combat-supp ARCHER)
)
(or
(goal pre-unique-arm CAVARCHER)
(goal pre-unique-arm ARCHER)
)
)
)
(can-build-with-escrow archery-range)
=>
(release-escrow wood)
(build archery-range)
)
(defrule
(building-type-count-total market > 0)
(building-type-count-total stable == 0)
(or
(or
(goal combat-arm CAVALRY)
(goal combat-arm LIGHTCAV)
)
(or
(or
(goal combat-supp CAVALRY)
(goal combat-supp LIGHTCAV)
)
(or
(goal pre-unique-arm CAVALRY)
(goal pre-unique-arm LIGHTCAV)
)
)
)
(can-build-with-escrow stable)
=>
(release-escrow wood)
(build stable)
)
(defrule
(current-age >= feudal-age)
(current-age-time > 300)
(building-type-count-total mill < feudal-mill-count)
(wood-amount > 400)
(can-build mill)
=>
(build mill)
)
(defrule
(cc-players-building-type-count any-ally market > 0)
(unit-type-count-total trade-cart == 0)
(wood-amount > 300)
(gold-amount > 300)
(nor
(town-under-attack)
(and
(goal 1 10)
(not (map-type team-islands) )
)
)
(can-train trade-cart)
=>
(train trade-cart)
(disable-self)
)
(defrule
(current-age == imperial-age)
(cc-players-building-type-count any-ally market > 0)
(unit-type-count-total trade-cart == 0)
(wood-amount > 300)
(gold-amount > 300)
(nor
(town-under-attack)
(and
(goal 1 10)
(not (map-type team-islands) )
)
)
(can-train trade-cart)
=>
(train trade-cart)
(disable-self)
)
(defrule
(cc-players-building-type-count any-ally dock >= 1)
(unit-type-count-total trade-cog == 0)
(wood-amount > 300)
(gold-amount > 300)
(not (goal 1 0) )
(can-train trade-cog)
=>
(train trade-cog)
(disable-self)
)
(defrule
(current-age == imperial-age)
(cc-players-building-type-count any-ally dock >= 1)
(unit-type-count-total trade-cog == 0)
(wood-amount > 300)
(gold-amount > 300)
(not (goal 1 0) )
(can-train trade-cog)
=>
(train trade-cog)
(disable-self)
)
;======================== CASTLE AGE RULES
;see age advancement rules for strategic number-settings
(defrule
(current-age >= castle-age)
=>
(set-strategic-number sn-sentry-distance 4)
(set-strategic-number sn-maximum-town-size castle-town-size)
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(set-strategic-number sn-blot-exploration-map 1)
(set-strategic-number sn-camp-max-distance 50)
(set-strategic-number sn-mill-max-distance 50)
(set-strategic-number sn-group-form-distance 30)
(set-strategic-number sn-enemy-sighted-response-distance 15)
(set-goal age-advancement NO)
(disable-timer t-ageup)
(disable-self)
)
; villager count
(defrule
(current-age == castle-age)
(civilian-population < civ-castle)
(nor
(goal rush-control 4)
(or
(goal rush-control BOOMING)
(goal rush-control FEEDING)
)
)
(can-train villager)
=>
(train villager)
)
(defrule
(current-age == castle-age)
(or
(and
(goal rush-control 4)
(civilian-population < civ-feudal)
)
(and
(or
(goal rush-control BOOMING)
(goal rush-control FEEDING)
)
(civilian-population < civ-castle)
)
)
(can-train villager)
=>
(train villager)
)
;Siege Workshop
(defrule
(building-type-count-total siege-workshop == 0)
(can-build-with-escrow siege-workshop)
=>
(release-escrow wood)
(build siege-workshop)
)
;University & maintain it
(defrule
(building-type-count-total university == 0)
(or
(building-type-count-total siege-workshop > 0)
(wood-amount > 500)
)
(can-build-with-escrow university)
=>
(release-escrow wood)
(build university)
)
; Build a monastery
(defrule
(building-type-count-total monastery == 0)
(or
(goal monk-rating GOOD)
(or
(building-type-count-total siege-workshop > 0)
(wood-amount > 500)
)
)
(not (goal monk-rating NO) )
(can-build-with-escrow monastery)
=>
(release-escrow wood)
(build monastery)
)
(defrule
(goal monk-rating GOOD)
(building-type-count-total monastery < 2)
(building-type-count-total siege-workshop > 0)
(can-build monastery)
=>
(build monastery)
)
(defrule
(current-age >= castle-age)
(current-age-time > 300)
(building-type-count-total mill < castle-mill-count)
(wood-amount > 500)
(can-build mill)
=>
(build mill)
)
;=============================IMPERIAL AGE RULES
;see age advancement rules for strategic number-settings
(defrule
(current-age == imperial-age)
=>
(set-strategic-number sn-maximum-town-size imperial-town-size)
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(set-strategic-number sn-camp-max-distance 50)
(set-strategic-number sn-mill-max-distance 50)
(set-strategic-number sn-enemy-sighted-response-distance 15)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(current-age == imperial-age)
(civilian-population < civ-castle)
(can-train villager)
=>
(train villager)
)
(defrule
(current-age == imperial-age)
(population >= pop-cap)
(unit-type-count villager > civ-castle)
=>
(delete-unit villager)
)
;another town center?
(defrule
(current-age == imperial-age)
(building-type-count town-center < town-center-count)
(wood-amount > 400)
(can-build town-center)
=>
(build town-center)
)
(defrule
(current-age == imperial-age)
(current-age-time > 300)
(building-type-count-total mill < imperial-mill-count)
(wood-amount > 700)
(can-build mill)
=>
(build mill)
)
;****************
;forward builders!
; start the run-through for island maps
(defrule
(goal 1 10)
(goal rush-control RUSHING)
(difficulty <= moderate)
(building-type-count barracks == 1)
(building-type-count-total blacksmith > 0)
(strategic-number sn-number-forward-builders == 0)
(unit-type-count villager >= civ-dark-rush)
(goal combat-arm INFANTRY)
=>
(set-strategic-number sn-number-forward-builders 1)
)
(defrule
(goal 1 10)
(goal rush-control RUSHING)
(difficulty <= moderate)
(building-type-count stable == 1)
(building-type-count-total university > 0)
(strategic-number sn-number-forward-builders == 0)
(unit-type-count villager >= civ-dark-rush)
(or
(goal combat-arm CAVALRY)
(goal combat-arm LIGHTCAV)
)
=>
(set-strategic-number sn-number-forward-builders 1)
)
(defrule
(goal 1 10)
(goal rush-control RUSHING)
(difficulty <= moderate)
(building-type-count archery-range == 1)
(building-type-count-total market > 0)
(strategic-number sn-number-forward-builders == 0)
(unit-type-count villager >= civ-dark-rush)
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
=>
(set-strategic-number sn-number-forward-builders 1)
)
(defrule
(goal 1 10)
(goal rush-control RUSHING)
(difficulty <= hard)
(building-type-count siege-workshop == 1)
(strategic-number sn-number-forward-builders == 0)
(unit-type-count villager >= civ-dark-rush)
(or
(or
(building-type-count-total archery-range > 1)
(building-type-count-total castle > 1)
)
(or
(building-type-count-total barracks > 1)
(building-type-count-total stable > 1)
)
)
=>
(set-strategic-number sn-number-forward-builders 1)
)
(defrule
(goal 1 10)
(goal rush-control RUSHING)
(difficulty <= hard)
(goal castle-attempt 2)
(unit-type-count villager > civ-dark-rush)
(building-type-count-total castle < 3)
(can-build-with-escrow castle)
=>
(set-strategic-number sn-number-forward-builders 3)
)
(defrule
(goal 1 10)
(or
(or
(unit-type-count transport-ship == 0)
(attack-soldier-count < ten-percent-pop)
)
(or
(or
(unit-type-count villager < 10)
(not (goal rush-control RUSHING) )
)
(or
(goal military-parity NO)
(town-under-attack)
)
)
)
(strategic-number sn-number-forward-builders >= 1)
=>
(set-strategic-number sn-number-forward-builders 0)
)
(defrule
(goal rush-control RUSHING)
(goal castle-attempt 2)
(difficulty <= hard)
(unit-type-count villager > civ-dark-rush)
(building-type-count-total castle < 3)
(can-build-with-escrow castle)
=>
(release-escrow stone)
(build-forward castle)
)
(defrule
(goal castle-attempt 2)
(difficulty <= hard)
(unit-type-count villager > civ-dark-rush)
(building-type-count-total castle < 3)
(can-build-with-escrow castle)
(nor
(goal wonder-attempt POSSIBLE)
(goal rush-control RUSHING)
)
=>
(release-escrow stone)
(build castle)
)
(defrule
(difficulty <= moderate)
(building-type-count barracks < 3)
(building-type-count barracks == 1)
(can-build barracks)
(or
(goal combat-arm INFANTRY)
(current-age == dark-age)
)
(or
(goal rush-control RUSHING)
(goal rush-control 2)
)
=>
(build-forward barracks)
)
(defrule
(difficulty <= moderate)
(building-type-count barracks < 3)
(current-age > feudal-age)
(can-build barracks)
(nor
(goal rush-control RUSHING)
(goal rush-control 2)
)
(or
(goal combat-arm INFANTRY)
(goal combat-supp INFANTRY)
)
=>
(build barracks)
)
(defrule
(goal rush-control RUSHING)
(difficulty <= moderate)
(building-type-count archery-range == 1)
(building-type-count-total market > 0)
(can-build archery-range)
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
=>
(build-forward archery-range)
)
(defrule
(difficulty <= moderate)
(building-type-count archery-range < 3)
(building-type-count-total market > 0)
(can-build archery-range)
(not (goal rush-control RUSHING) )
(or
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
(or
(goal combat-supp CAVARCHER)
(goal combat-supp ARCHER)
)
)
=>
(build archery-range)
)
(defrule
(goal rush-control RUSHING)
(difficulty <= moderate)
(building-type-count stable == 1)
(building-type-count-total university > 0)
(can-build stable)
(or
(goal combat-arm CAVALRY)
(goal combat-arm LIGHTCAV)
)
=>
(build-forward stable)
)
(defrule
(difficulty <= moderate)
(building-type-count stable < 3)
(building-type-count-total university > 0)
(can-build stable)
(not (goal rush-control RUSHING) )
(or
(or
(goal combat-arm CAVALRY)
(goal combat-arm LIGHTCAV)
)
(or
(goal combat-supp CAVALRY)
(goal combat-supp LIGHTCAV)
)
)
=>
(build stable)
)
(defrule
(goal rush-control RUSHING)
(difficulty <= hard)
(building-type-count siege-workshop == 1)
(can-build siege-workshop)
(or
(or
(building-type-count-total archery-range > 1)
(building-type-count-total castle > 1)
)
(or
(building-type-count-total barracks > 1)
(building-type-count-total stable > 1)
)
)
=>
(build-forward siege-workshop)
)
(defrule
(difficulty <= hard)
(building-type-count siege-workshop == 1)
(can-build siege-workshop)
(or
(or
(building-type-count-total archery-range > 1)
(building-type-count-total castle > 1)
)
(or
(building-type-count-total barracks > 1)
(building-type-count-total stable > 1)
)
)
(not (goal rush-control RUSHING) )
=>
(build siege-workshop)
)
;**************************************
;BASIC DIPLOMACY
#load-if-not-defined TEAMS-LOCKED
(defrule
(current-age >= feudal-age)
(players-stance any-computer-ally neutral)
=>
(set-stance this-any-computer-ally neutral)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-ally enemy)
=>
(set-stance this-any-computer-ally enemy)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-neutral ally)
=>
(set-stance this-any-computer-neutral ally)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-neutral enemy)
=>
(set-stance this-any-computer-neutral enemy)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-enemy ally)
=>
(set-stance this-any-computer-enemy ally)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-enemy neutral)
=>
(set-stance this-any-computer-enemy neutral)
)
;BASIC DIPLOMACY VS. HUMANS
;if the human player doesn't go neutral at our request
(defrule
(goal get-mad NO)
(players-stance any-human-neutral enemy)
(or
(difficulty <= moderate)
(current-age > dark-age)
)
=>
(chat-to-player-using-id this-any-human-neutral 22027)
;"I am Neutral to thee. Set thy diplomacy to Neutral to me."
(disable-timer t-chathelp)
(enable-timer t-chathelp 120)
(set-goal get-mad ANGRY)
)
(defrule
(not (goal get-mad NO) )
(or
(players-stance any-human-neutral neutral)
(players-stance any-human-neutral ally)
)
=>
(chat-to-player-using-id this-any-human-neutral 22028)
(chat-to-player-using-id this-any-human-neutral 22029)
;"Thou art wise to be a potential friend."
;"Thou shalt hear from me again."
(disable-timer t-chathelp)
(set-goal get-mad NO)
)
(defrule
(goal get-mad ANGRY)
(timer-triggered t-chathelp)
(players-stance any-human-neutral enemy)
=>
(set-goal get-mad ANGRIER)
(disable-timer t-chathelp)
(enable-timer t-chathelp 180)
(chat-to-player-using-id this-any-human-neutral 22030)
(chat-to-player-using-id this-any-human-neutral 22031)
;"Thou hast ignored my generous invitation. I am merciful, and give you another chance."
;"Set thy diplomacy to Neutral to me. Now."
)
(defrule
(goal get-mad ANGRIER)
(timer-triggered t-chathelp)
(players-stance any-human-neutral enemy)
=>
(set-goal get-mad ANGRIEST)
(disable-timer t-chathelp)
(enable-timer t-chathelp 180)
(chat-to-player-using-id this-any-human-neutral 22032)
(chat-to-player-using-id this-any-human-neutral 22033)
;"How unwise. Thou art still hostile to me. Set to Neutral at once versus me!"
;"This is thy last opportunity."
)
(defrule
(goal get-mad ANGRIEST)
(timer-triggered t-chathelp)
(players-stance any-human-neutral enemy)
=>
(set-goal personality 10)
(disable-timer t-chathelp)
(disable-self)
)
;when an ally turns on us
(defrule
(goal get-mad NO)
(or
(players-stance any-human-ally neutral)
(players-stance any-human-ally enemy)
)
=>
(chat-to-player-using-id this-any-human-ally 22147)
;"I am thine Ally, friend. Pray set thine diplomacy to Ally, too."
(disable-timer t-chathelp)
(enable-timer t-chathelp 120)
(set-goal get-mad ANGRY)
)
(defrule
(not (goal get-mad NO) )
(players-stance any-human-ally ally)
=>
(chat-to-player-using-id this-any-human-ally 22148)
;"Thou art gracious to remain mine friend."
(disable-timer t-chathelp)
(set-goal get-mad NO)
)
(defrule
(goal get-mad ANGRY)
(timer-triggered t-chathelp)
(or
(players-stance any-human-ally neutral)
(players-stance any-human-ally enemy)
)
=>
(set-goal get-mad ANGRIER)
(disable-timer t-chathelp)
(enable-timer t-chathelp 180)
(chat-to-player-using-id this-any-human-ally 22149)
(chat-to-player-using-id this-any-human-ally 22150)
;"What evil is this? Thou art still not friendly?!"
;"Perhaps thou didst not understand? Be mine Ally, for I am thine."
)
(defrule
(goal get-mad ANGRIER)
(timer-triggered t-chathelp)
(or
(players-stance any-human-ally neutral)
(players-stance any-human-ally enemy)
)
=>
(set-goal get-mad ANGRIEST)
(disable-timer t-chathelp)
(enable-timer t-chathelp 180)
(chat-to-player-using-id this-any-human-ally 22151)
(chat-to-player-using-id this-any-human-ally 22152)
;"Oh, falsest of friends. This is thy last chance!"
;"If thou wilt have me for Ally, thou must do likewise."
)
(defrule
(goal get-mad ANGRIEST)
(timer-triggered t-chathelp)
(or
(players-stance any-human-ally neutral)
(players-stance any-human-ally enemy)
)
=>
(set-goal personality 10)
(disable-timer t-chathelp)
(disable-self)
)
;end result -- go hostile!!
(defrule
(stance-toward any-human neutral)
(nor
(player-in-game any-computer-ally)
(or
(player-in-game any-computer-enemy)
(player-in-game any-computer-neutral)
)
)
=>
(chat-to-player-using-id this-any-human 22034)
(chat-to-player-using-id this-any-human 22035)
;"I have thought better of mine previous merciful plan."
;"Thou must be exterminated, and I shall forever be thine foe."
(set-stance this-any-human enemy)
(set-stance every-computer ally)
(set-goal personality 12)
(disable-timer t-chathelp)
(disable-timer t-chat)
(disable-self)
)
(defrule
(goal personality 10)
(or
(stance-toward any-human neutral)
(stance-toward any-human ally)
)
=>
(chat-to-player-using-id this-any-human 22025)
(chat-to-player-using-id this-any-human 22026)
;"So! Thou has chosen to defy me."
;"It shall be war to the knife!"
(set-stance this-any-human enemy)
(set-stance every-computer ally)
(disable-timer t-chathelp)
(disable-timer t-chat)
(disable-self)
)
#end-if
;**************************************
;goals 1 and 2 = boats
;goal 3 = groups
;goal combat-arm = his unique unit type (also loads correct upgrades)
;goal 36 = good infantry -- 36 NO = don't build, YES = build,
; 2 = only build if we don't have a castle.
;goal 37 = good cavalry
;goal 38 = good horse-archers
;goal 39 = good archers
;starting loads
;*********************************************************
;*********************************************************
#load-if-defined BRITON-CIV
;train longbows, champs, lt cav
(defrule
(goal combat-arm NOTICE)
=>
(set-goal combat-arm ARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 2)
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 25)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(goal combat-arm 1)
(goal combat-arm 5)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
)
#end-if
;*********************************************************
#load-if-defined BYZANTINE-CIV
;train cataphracts, hvy HA, arbalests, handgunners
(defrule
(true)
=>
(set-goal combat-arm CAVALRY)
(set-goal 36 YES)
(set-goal 37 2)
(set-goal 38 YES)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 10)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(or
(can-train hand-cannoneer)
(can-train arbalest)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train hand-cannoneer)
(train arbalest)
(set-goal secondary-build 0)
)
#end-if
;************************************************
#load-if-defined CELTIC-CIV
;train woad raiders, paladins, lt cav, hvy HA, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 YES)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 4)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train paladin)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(or
(current-age < imperial-age)
(not (can-afford-unit paladin) )
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 4)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;********************************
#load-if-defined CHINESE-CIV
;train chu-ko-nu, champs, light cav, hvy scorps;
(defrule
(true)
=>
(set-goal combat-arm ARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 2)
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 25)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;*******************************
#load-if-defined FRANKISH-CIV
;train throwing-axe, paladins, lt cav, hvy HA, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 YES)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 4)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train paladin)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(or
(current-age < imperial-age)
(not (can-afford-unit paladin) )
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 4)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;****************************
#load-if-defined GOTHIC-CIV
;train huskarls, lt cav, hvy HA, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;********************************
#load-if-defined JAPANESE-CIV
;train samurai, hvy HA, arbalests, hand-cannoneer, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(or
(can-train hand-cannoneer)
(can-train arbalest)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train hand-cannoneer)
(train arbalest)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;*********************************
#load-if-defined MONGOL-CIV
;trains mangudai, champs
(defrule
(true)
=>
(set-goal combat-arm CAVARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 2)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 25)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
#end-if
;***********************************
#load-if-defined PERSIAN-CIV
;trains elephants, hvy HA
(defrule
(true)
=>
(set-goal combat-arm CAVALRY)
(set-goal 36 NO)
(set-goal 37 YES)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
#end-if
;***********************************
#load-if-defined SARACEN-CIV
;trains mamluks, hvy HA, arbalests, hand cannoneers
(defrule
(true)
=>
(set-goal combat-arm CAVALRY)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 45)
(set-strategic-number sn-gold-gatherer-percentage 30)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(or
(can-train hand-cannoneer)
(can-train arbalest)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train hand-cannoneer)
(train arbalest)
(set-goal secondary-build 0)
)
#end-if
;*********************************
#load-if-defined TEUTONIC-CIV
;trains TK, paladins, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 YES)
(set-goal 38 NO)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train paladin)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;************************************
#load-if-defined TURKISH-CIV
;trains janissaries, champs, lt cav, hvy scorp
(defrule
(true)
=>
(set-goal combat-arm ARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 25)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;********************************
#load-if-defined VIKING-CIV
;trains berserks, lt cav, arbalests, hvy scorp
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 NO)
(set-goal 38 NO)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train arbalest)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train arbalest)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;*********************************************************
;*********************************************************
#load-if-defined DIFFICULTY-EASIEST
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 10)
(set-strategic-number sn-consecutive-idle-unit-limit 60)
(set-strategic-number sn-easiest-reaction-percentage 20)
(set-difficulty-parameter ability-to-maintain-distance 100)
(set-difficulty-parameter ability-to-dodge-missiles 100)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-EASY
(load "petersen tower")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 25)
(set-strategic-number sn-consecutive-idle-unit-limit 20)
(set-strategic-number sn-easier-reaction-percentage 20)
(set-strategic-number sn-hits-before-alliance-change 50)
(set-difficulty-parameter ability-to-maintain-distance 75)
(set-difficulty-parameter ability-to-dodge-missiles 75)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-MODERATE
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 75)
(set-strategic-number sn-consecutive-idle-unit-limit 5)
(set-strategic-number sn-hits-before-alliance-change 25)
(set-difficulty-parameter ability-to-maintain-distance 50)
(set-difficulty-parameter ability-to-dodge-missiles 50)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARD
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 99)
(set-strategic-number sn-consecutive-idle-unit-limit 1)
(set-strategic-number sn-hits-before-alliance-change 10)
(set-difficulty-parameter ability-to-maintain-distance 0)
(set-difficulty-parameter ability-to-dodge-missiles 0)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARDEST
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 99)
(set-strategic-number sn-hits-before-alliance-change 10)
(set-difficulty-parameter ability-to-maintain-distance 0)
(set-difficulty-parameter ability-to-dodge-missiles 0)
(disable-self)
)
#end-if
;********************************
;********************************
(defrule
(true)
=>
(set-goal military-parity YES) ;goal 3
(set-goal attack-control NO) ;goal 4
(set-goal need-deathmatch-villagers NO) ;goal 7
(set-goal secondary-build 0) ;goal 8
(set-goal combat-arm NOTICE) ;goal 11
(set-goal age-advancement NO) ;goal 14
(set-goal make-warboat NO) ;goal 15
(set-goal upgrade-conflict NO) ;goal 16
(set-goal pre-unique-arm NO) ;goal 17
(disable-self)
)
(defrule
(true)
=>
(set-goal wonder-attempt MAYBE) ;goal 20
(set-goal enemy-soldiers NO) ;goal 26
(set-goal siege-available YES) ;goal 34
(disable-self)
)
(defrule
(cc-players-building-type-count any-enemy castle == 0)
=>
(set-goal rush-control RUSHING)
)
(defrule
(goal rush-control RUSHING)
(cc-players-building-type-count every-enemy castle > 0)
=>
(set-goal rush-control NO)
)
;========================DARK AGE RULES
(defrule
(true)
=>
(set-strategic-number sn-coop-share-information 1)
(set-strategic-number sn-coop-share-attacking 1)
(set-strategic-number sn-maximum-town-size imperial-town-size)
(set-strategic-number sn-task-ungrouped-soldiers 0)
(set-strategic-number sn-zero-priority-distance 250)
(set-strategic-number sn-blot-exploration-map 0)
(set-strategic-number sn-attack-intelligence 1)
(set-strategic-number sn-gather-defense-units 1)
(set-strategic-number sn-defense-distance 2)
(set-strategic-number sn-maximum-gaia-attack-response 1)
(set-strategic-number sn-ignore-attack-group-under-attack 1)
(set-strategic-number sn-allow-civilian-defense 0)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-stone-dropsite-distance 3)
(set-strategic-number sn-gold-dropsite-distance 3)
(set-strategic-number sn-retask-gather-amount 20)
(set-strategic-number sn-camp-max-distance 15)
(set-strategic-number sn-mill-max-distance 15)
(set-strategic-number sn-enemy-sighted-response-distance 15)
(set-strategic-number sn-group-form-distance 10)
(set-strategic-number sn-town-defend-priority 7)
(set-strategic-number sn-gold-defend-priority 2)
(set-strategic-number sn-stone-defend-priority 3)
(set-strategic-number sn-forage-defend-priority 0)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-relic-defend-priority 0)
(set-strategic-number sn-cap-civilian-gatherers 100)
(set-strategic-number sn-percent-civilian-gatherers 0)
(set-strategic-number sn-minimum-civilian-explorers 0)
(set-strategic-number sn-cap-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-cap-civilian-builders 12)
(set-strategic-number sn-percent-civilian-builders 100)
(disable-self)
)
(defrule
(game-time > 600)
=>
(set-strategic-number sn-blot-exploration-map 1)
(disable-self)
)
(defrule
(building-type-count siege-workshop >= 3)
(building-type-count castle >= 3)
(or
(or
(wood-amount < 5000)
(food-amount < 5000)
)
(or
(gold-amount < 2000)
(stone-amount < 700)
)
)
=>
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(enable-timer t-lumbercamp 1)
(disable-self)
)
(defrule
(strategic-number sn-percent-civilian-gatherers == 85)
(or
(or
(wood-amount < 500)
(food-amount < 500)
)
(or
(gold-amount < 500)
(stone-amount < 100)
)
)
=>
(set-strategic-number sn-percent-civilian-builders 10)
(set-strategic-number sn-percent-civilian-gatherers 90)
(disable-self)
)
; villager count
(defrule
(can-train villager)
(civilian-population < 6)
(or
(and
(current-age == feudal-age)
(civilian-population < 8)
)
(or
(and
(current-age == castle-age)
(civilian-population < 10)
)
(and
(current-age == imperial-age)
(civilian-population < civ-dark-rush)
)
)
)
=>
(train villager)
)
(defrule
(strategic-number sn-percent-civilian-gatherers == 90)
(civilian-population < civ-castle)
(can-train villager)
=>
(train villager)
)
(defrule
(building-type-count-total lumber-camp > 0)
(idle-farm-count <= 1)
(sheep-and-forage-too-far)
(can-build farm)
=>
(build farm)
)
;*********************************
;age advancement
(defrule
(can-research feudal-age)
(or
(players-current-age every-human >= feudal-age)
(difficulty <= moderate)
)
=>
(research feudal-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 140)
)
(defrule
(current-age == feudal-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(can-research castle-age)
(or
(players-current-age every-human >= castle-age)
(difficulty <= moderate)
)
=>
(research castle-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 170)
)
(defrule
(current-age == castle-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(can-research imperial-age)
(or
(difficulty <= moderate)
(and
(players-current-age every-human == imperial-age)
(difficulty == easy)
)
)
=>
(research imperial-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 200)
)
(defrule
(difficulty <= moderate)
(current-age == imperial-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NOTICE)
(or
(current-age < imperial-age)
(and
(current-age < imperial-age)
(difficulty <= easy)
)
)
(timer-triggered t-ageup)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
)
;*********************************
;buildings
(defrule
(difficulty <= moderate)
(building-type-count-total house <= fifteen-percent-pop)
(can-build house)
=>
(build house)
)
#load-if-defined DIFFICULTY-EASIEST
(defrule
(military-population < 10)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#end-if
#load-if-defined DIFFICULTY-EASY
(defrule
(military-population < civ-dark-rush)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#end-if
(defrule
(strategic-number sn-gold-gatherer-percentage > 0)
(building-type-count mining-camp == 0)
(resource-found gold)
(can-build mining-camp)
=>
(build mining-camp)
)
(defrule
(strategic-number sn-wood-gatherer-percentage > 0)
(building-type-count lumber-camp == 0)
(can-build lumber-camp)
=>
(build lumber-camp)
)
(defrule
(current-age == imperial-age)
(building-type-count siege-workshop > 0)
(building-type-count castle > 0)
(building-type-count town-center < 3)
(can-build town-center)
=>
(build town-center)
)
;build the following after running low on resources
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(timer-triggered t-lumbercamp)
(resource-found gold)
(resource-found stone)
(or
(dropsite-min-distance gold > 7)
(dropsite-min-distance stone > 7)
)
(can-build town-center)
=>
(build town-center)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(timer-triggered t-lumbercamp)
(resource-found wood)
(dropsite-min-distance wood > 7)
(can-build town-center)
=>
(build town-center)
)
(defrule
(timer-triggered t-lumbercamp)
=>
(disable-timer t-lumbercamp)
(enable-timer t-lumbercamp 60)
)
(defrule
(building-type-count-total mill == 0)
(building-type-count-total market == 0)
(can-build mill)
=>
(build mill)
)
(defrule
(building-type-count-total market == 0)
(can-build market)
=>
(build market)
)
(defrule
(building-type-count-total blacksmith < 2)
(can-build blacksmith)
=>
(build blacksmith)
)
(defrule
(building-type-count-total university == 0)
(can-build university)
=>
(build university)
)
(defrule
(building-type-count-total monastery < 3)
(can-build monastery)
=>
(build monastery)
)
(defrule
(can-build barracks)
(or
(building-type-count castle == 0)
(building-type-count-total barracks < 2)
)
=>
(build barracks)
)
(defrule
(building-type-count-total barracks == 2)
(unit-type-count villager > 3)
(can-build barracks)
=>
(build-forward barracks)
)
(defrule
(building-type-count-total archery-range < 2)
(can-build archery-range)
=>
(build archery-range)
)
(defrule
(building-type-count-total archery-range == 2)
(unit-type-count villager > 3)
(can-build archery-range)
=>
(build-forward archery-range)
)
(defrule
(building-type-count-total stable < 2)
(can-build stable)
=>
(build stable)
)
(defrule
(building-type-count-total stable == 2)
(unit-type-count villager > 3)
(can-build stable)
=>
(build-forward stable)
)
(defrule
(building-type-count-total siege-workshop < 2)
(can-build siege-workshop)
=>
(build siege-workshop)
)
(defrule
(building-type-count-total siege-workshop > 1)
(building-type-count-total siege-workshop < 4)
(unit-type-count villager > 3)
(can-build siege-workshop)
=>
(build-forward siege-workshop)
)
(defrule
(building-type-count-total castle < 3)
(can-build castle)
=>
(build castle)
)
(defrule
(building-type-count-total castle > 2)
(building-type-count-total castle < 5)
(unit-type-count villager > 3)
(can-build castle)
=>
(build-forward castle)
)
(defrule
(or
(and
(goal 1 1)
(building-type-count-total dock < 2)
)
(and
(goal 1 10)
(building-type-count-total dock < 4)
)
)
(can-build dock)
=>
(build dock)
)
;*********************************************************
;DIPLOMACY
#load-if-not-defined TEAMS-LOCKED
(defrule
(current-age >= feudal-age)
(players-stance any-computer-ally neutral)
=>
(set-stance this-any-computer-ally neutral)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-ally enemy)
=>
(set-stance this-any-computer-ally enemy)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-neutral ally)
=>
(set-stance this-any-computer-neutral ally)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-neutral enemy)
=>
(set-stance this-any-computer-neutral enemy)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-enemy ally)
=>
(set-stance this-any-computer-enemy ally)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-enemy neutral)
=>
(set-stance this-any-computer-enemy neutral)
)
#end-if
;*****************************************
;*****************************************
;UPGRADES
(defrule
(can-research my-unique-unit-upgrade)
=>
(research my-unique-unit-upgrade)
)
;DOCK
(defrule
(not (goal 1 0) )
(can-research ri-war-galley)
=>
(research ri-war-galley)
)
(defrule
(not (goal 1 0) )
(can-research ri-galleon)
=>
(research ri-galleon)
)
(defrule
(not (goal 1 0) )
(can-research ri-fast-fire-ship)
=>
(research ri-fast-fire-ship)
)
(defrule
(not (goal 1 0) )
(goal military-parity NO)
(can-research ri-heavy-demolition-ship)
=>
(research ri-heavy-demolition-ship)
)
(defrule
(not (goal 1 0) )
(can-research ri-cannon-galleon)
=>
(research ri-cannon-galleon)
)
(defrule
(not (goal 1 0) )
(can-research ri-deck-guns)
=>
(research ri-deck-guns)
)
;BARRACKS UPGRADES
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-man-at-arms)
=>
(research ri-man-at-arms)
)
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-long-swordsman)
=>
(research ri-long-swordsman)
)
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-two-handed-swordsman)
=>
(research ri-two-handed-swordsman)
)
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-champion)
=>
(research ri-champion)
)
(defrule
(unit-type-count spearman > 0)
(can-research ri-pikeman)
=>
(research ri-pikeman)
)
;STABLE
(defrule
(or
(goal 37 YES)
(and
(building-type-count castle == 0)
(goal 37 2)
)
)
(can-research ri-cavalier)
=>
(research ri-cavalier)
)
(defrule
(or
(goal 37 YES)
(and
(building-type-count castle == 0)
(goal 37 2)
)
)
(can-research ri-paladin)
=>
(research ri-paladin)
)
(defrule
(can-research ri-light-cavalry)
=>
(research ri-light-cavalry)
)
(defrule
(unit-type-count camel > 0)
(can-research ri-heavy-camel)
=>
(research ri-heavy-camel)
)
;ARCHERY RANGE
(defrule
(or
(goal 38 YES)
(and
(building-type-count castle == 0)
(goal 38 2)
)
)
(can-research ri-heavy-cavalry-archer)
=>
(research ri-heavy-cavalry-archer)
)
(defrule
(or
(goal 39 YES)
(and
(building-type-count castle == 0)
(goal 39 2)
)
)
(can-research ri-crossbow)
=>
(research ri-crossbow)
)
(defrule
(or
(goal 39 YES)
(and
(building-type-count castle == 0)
(goal 39 2)
)
)
(can-research ri-arbalest)
=>
(research ri-arbalest)
)
(defrule
(or
(goal 39 YES)
(and
(building-type-count castle == 0)
(goal 39 2)
)
)
(can-research ri-hand-cannon)
=>
(research ri-hand-cannon)
)
(defrule
(unit-type-count skirmisher > 0)
(can-research ri-elite-skirmisher)
=>
(research ri-elite-skirmisher)
)
;SIEGE EQUIPMENT
(defrule
(or
(goal combat-arm INFANTRY)
(goal combat-arm ARCHER)
)
(can-research ri-heavy-scorpion)
=>
(research ri-heavy-scorpion)
)
(defrule
(can-research ri-capped-ram)
(or
(or
(cc-players-building-type-count any-enemy town-center > 2)
(cc-players-building-type-count any-enemy keep > 1)
)
(or
(cc-players-building-type-count any-enemy bombard-tower > 0)
(cc-players-building-type-count any-enemy castle > 0)
)
)
=>
(research ri-capped-ram)
)
(defrule
(or
(or
(cc-players-building-type-count any-enemy town-center > 2)
(cc-players-building-type-count any-enemy keep > 3)
)
(or
(cc-players-building-type-count any-enemy bombard-tower > 1)
(cc-players-building-type-count any-enemy castle > 2)
)
)
(can-research ri-siege-ram)
=>
(research ri-siege-ram)
)
(defrule
(can-research ri-onager)
=>
(research ri-onager)
)
(defrule
(can-research ri-siege-onager)
=>
(research ri-siege-onager)
)
(defrule
(can-research ri-bombard-cannon)
=>
(research ri-bombard-cannon)
)
;*********************************************************
;UNIT PRODUCTION
(defrule
(or
(or
(wood-amount < 5000)
(food-amount < 5000)
)
(or
(gold-amount < 2000)
(stone-amount < 700)
)
)
=>
(set-goal need-deathmatch-villagers YES)
(disable-self)
)
(defrule
(building-type-count castle == 0)
(can-train militiaman-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 36 NO) )
=>
(train militiaman-line)
)
(defrule
(building-type-count castle == 0)
(can-train knight-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 37 NO) )
=>
(train knight-line)
)
(defrule
(building-type-count castle == 0)
(can-train cavalry-archer-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 38 NO) )
=>
(train cavalry-archer-line)
)
(defrule
(building-type-count castle == 0)
(can-train archer-line)
(not (unit-available hand-cannoneer) )
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 39 NO) )
=>
(train archer-line)
)
(defrule
(building-type-count castle == 0)
(can-train hand-cannoneer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 39 NO) )
=>
(train hand-cannoneer)
)
(defrule
(can-train my-unique-unit-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train my-unique-unit-line)
(set-goal secondary-build 1)
)
; monks
(defrule
(unit-type-count my-unique-unit-line > ten-percent-pop)
(unit-type-count-total monk == 0)
(or
(or
(civ-selected celtic)
(civ-selected gothic)
)
(or
(or
(civ-selected mongol)
(civ-selected persian)
)
(civ-selected viking)
)
)
(can-train monk)
=>
(train monk)
)
(defrule
(unit-type-count my-unique-unit-line > ten-percent-pop)
(unit-type-count-total monk < five-percent-pop)
(or
(or
(civ-selected chinese)
(civ-selected frankish)
)
(civ-selected turkish)
)
(can-train monk)
=>
(train monk)
)
(defrule
(unit-type-count my-unique-unit-line > ten-percent-pop)
(unit-type-count-total monk < ten-percent-pop)
(or
(civ-selected briton)
(or
(or
(civ-selected byzantine)
(civ-selected japanese)
)
(or
(civ-selected saracen)
(civ-selected teutonic)
)
)
)
(can-train monk)
=>
(train monk)
)
;*********************************************
;BLACKSMITH
;first level upgrades
(defrule
(can-research ri-forging)
(nand
(goal 36 NO)
(goal 37 NO)
)
=>
(research ri-forging)
)
(defrule
(can-research ri-fletching)
(or
(nand
(goal 38 NO)
(goal 39 NO)
)
(or
(building-type-count-total watch-tower > 0)
(unit-type-count-total war-galley > 0)
)
)
=>
(research ri-fletching)
)
(defrule
(can-research ri-padded-archer-armor)
(nand
(goal 38 NO)
(goal 39 NO)
)
=>
(research ri-padded-archer-armor)
)
(defrule
(can-research ri-scale-mail)
(not (goal 36 NO) )
=>
(research ri-scale-mail)
)
(defrule
(can-research ri-scale-barding)
(not (goal 37 NO) )
=>
(research ri-scale-barding)
)
;second upgrades
(defrule
(can-research ri-iron-casting)
(nand
(goal 36 NO)
(goal 37 NO)
)
=>
(research ri-iron-casting)
)
(defrule
(can-research ri-bodkin-arrow)
(or
(nand
(goal 38 NO)
(goal 39 NO)
)
(or
(building-type-count-total watch-tower > 0)
(unit-type-count-total war-galley > 0)
)
)
=>
(research ri-bodkin-arrow)
)
(defrule
(can-research ri-leather-archer-armor)
(nand
(goal 38 NO)
(goal 39 NO)
)
=>
(research ri-leather-archer-armor)
)
(defrule
(can-research ri-chain-mail)
(not (goal 36 NO) )
=>
(research ri-chain-mail)
)
(defrule
(can-research ri-chain-barding)
(not (goal 37 NO) )
=>
(research ri-chain-barding)
)
;third upgrades
(defrule
(can-research ri-blast-furnace)
(nand
(goal 36 NO)
(goal 37 NO)
)
=>
(research ri-blast-furnace)
)
(defrule
(can-research ri-bracer)
(or
(nand
(goal 38 NO)
(goal 39 NO)
)
(or
(building-type-count-total watch-tower > 0)
(unit-type-count-total war-galley > 0)
)
)
=>
(research ri-bracer)
)
(defrule
(can-research ri-ring-archer-armor)
(nand
(goal 38 NO)
(goal 39 NO)
)
=>
(research ri-ring-archer-armor)
)
(defrule
(can-research ri-plate-mail)
(not (goal 36 NO) )
=>
(research ri-plate-mail)
)
(defrule
(can-research ri-tracking)
(not (goal 36 NO) )
=>
(research ri-tracking)
)
(defrule
(can-research ri-squires)
(not (goal 36 NO) )
=>
(research ri-squires)
)
(defrule
(can-research ri-plate-barding)
(not (goal 37 NO) )
=>
(research ri-plate-barding)
)
(defrule
(can-research ri-husbandry)
(not (goal 37 NO) )
=>
(research ri-husbandry)
)
;SIEGE RESEARCH ITEMS
(defrule
(can-research ri-siege-engineers)
=>
(research ri-siege-engineers)
)
(defrule
(can-research ri-hoardings)
=>
(research ri-hoardings)
)
(defrule
(not (goal 1 0) )
(can-research ri-heated-shot)
=>
(research ri-heated-shot)
)
(defrule
(building-type-count-total watch-tower > 2)
(can-research ri-guard-tower)
=>
(research ri-guard-tower)
)
(defrule
(building-type-count-total guard-tower > 2)
(can-research ri-keep)
=>
(research ri-keep)
)
(defrule
(can-research ri-bombard-tower)
=>
(research ri-bombard-tower)
)
(defrule
(goal wall-build YES)
(can-research ri-fortified-wall)
=>
(research ri-fortified-wall)
)
;SHIPS
(defrule
(not (goal 1 0) )
(can-research ri-careening)
=>
(research ri-careening)
)
(defrule
(not (goal 1 0) )
(can-research ri-dry-dock)
=>
(research ri-dry-dock)
)
(defrule
(not (goal 1 0) )
(can-research ri-shipwright)
=>
(research ri-shipwright)
)
;OTHER RESEARCH ITEMS
(defrule
(can-research ri-ballistics)
=>
(research ri-ballistics)
)
(defrule
(can-research ri-chemistry)
=>
(research ri-chemistry)
)
(defrule
(can-research ri-conscription)
=>
(research ri-conscription)
)
;***********************************
;ECONOMIC UPGRADES
;***********************************
;mining-camp items
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-gold-mining)
=>
(research ri-gold-mining)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-gold-shaft-mining)
=>
(research ri-gold-shaft-mining)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(research-completed ri-gold-mining)
(can-research ri-stone-mining)
=>
(research ri-stone-mining)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(research-completed ri-gold-shaft-mining)
(can-research ri-stone-shaft-mining)
=>
(research ri-stone-shaft-mining)
)
;university stuff
(defrule
(can-research ri-masonry)
=>
(research ri-masonry)
)
(defrule
(can-research ri-architecture)
=>
(research ri-architecture)
)
(defrule
(can-research ri-stonecutting)
=>
(research ri-stonecutting)
)
;market & town center
(defrule
(can-research ri-town-watch)
=>
(research ri-town-watch)
)
(defrule
(can-research ri-town-patrol)
=>
(research ri-town-patrol)
)
(defrule
(player-in-game any-ally)
(can-research ri-cartography)
=>
(research ri-cartography)
)
(defrule
(can-research ri-guilds)
=>
(research ri-guilds)
)
(defrule
(current-age == imperial-age)
(can-research ri-loom)
=>
(research ri-loom)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-wheel-barrow)
=>
(research ri-wheel-barrow)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-hand-cart)
=>
(research ri-hand-cart)
)
(defrule
(player-in-game any-ally)
(can-research ri-coinage)
=>
(research ri-coinage)
)
(defrule
(player-in-game any-ally)
(can-research ri-banking)
=>
(research ri-banking)
)
;monk upgrades
(defrule
(can-research ri-faith)
(or
(cc-players-unit-type-count any-enemy monk > five-percent-pop)
(cc-players-unit-type-count any-enemy monk > 5)
)
=>
(research ri-faith)
)
(defrule
(difficulty <= moderate)
(can-research ri-atonement)
(or
(cc-players-unit-type-count any-enemy monk > five-percent-pop)
(cc-players-unit-type-count any-enemy monk > 5)
)
=>
(research ri-atonement)
)
(defrule
(can-research ri-block-printing)
(unit-type-count monk > five-percent-pop)
=>
(research ri-block-printing)
)
(defrule
(can-research ri-illumination)
(unit-type-count monk > 1)
=>
(research ri-illumination)
)
(defrule
(can-research ri-fervor)
(unit-type-count monk > 1)
=>
(research ri-fervor)
)
(defrule
(difficulty <= moderate)
(can-research ri-redemption)
(unit-type-count monk > five-percent-pop)
=>
(research ri-redemption)
)
(defrule
(can-research ri-sanctity)
(unit-type-count monk > 1)
=>
(research ri-sanctity)
)
;***********************************
;MARKET STUFF
;***********************************
(defrule
(wood-amount > 5000)
(commodity-selling-price wood >= 20)
(can-sell-commodity wood)
=>
(chat-local-to-self "abuse market; sell wood")
(sell-commodity wood)
)
(defrule
(food-amount > 5000)
(commodity-selling-price food >= 20)
(can-sell-commodity food)
=>
(chat-local-to-self "abuse market; sell food")
(sell-commodity food)
)
(defrule
(gold-amount < 1200)
(wood-amount > 5000)
(can-sell-commodity wood)
=>
(chat-local-to-self "need gold; sell wood")
(sell-commodity wood)
)
(defrule
(gold-amount < 1200)
(food-amount > 5000)
(can-sell-commodity food)
=>
(chat-local-to-self "need gold; sell food")
(sell-commodity food)
)
(defrule
(gold-amount < 1200)
(stone-amount > 1000)
(building-type-count-total castle >= 5)
(can-sell-commodity stone)
=>
(chat-local-to-self "need gold; sell stone")
(sell-commodity stone)
)
(defrule
(stone-amount < 650)
(gold-amount > 5000)
(building-type-count-total castle < 5)
(can-buy-commodity stone)
=>
(chat-local-to-self "need stone")
(buy-commodity stone)
)
(defrule
(wood-amount < 1100)
(gold-amount > 5000)
(can-buy-commodity wood)
=>
(chat-local-to-self "need wood")
(buy-commodity wood)
)
(defrule
(food-amount < 1600)
(gold-amount > 5000)
(can-buy-commodity food)
=>
(chat-local-to-self "need food")
(buy-commodity food)
)
;start the run-through
(defrule
(true)
=>
(set-goal infantry-upgrades NO)
(set-goal archer-upgrades NO)
(set-goal cav-upgrades NO)
)
;infantry civs
(defrule
(soldier-count >= five-percent-pop)
(or
(or
(goal combat-arm INFANTRY)
(goal combat-supp INFANTRY)
)
(goal pre-unique-arm INFANTRY)
)
=>
(set-goal infantry-upgrades YES)
)
(defrule
(building-type-count castle > 0)
(soldier-count >= five-percent-pop)
(or
(or
(civ-selected celtic)
(civ-selected frankish)
)
(or
(or
(civ-selected gothic)
(civ-selected japanese)
)
(or
(civ-selected teutonic)
(civ-selected viking)
)
)
)
=>
(set-goal infantry-upgrades YES)
)
;archer civs
(defrule
(soldier-count >= five-percent-pop)
(or
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
(or
(or
(goal combat-supp CAVARCHER)
(goal combat-supp ARCHER)
)
(or
(goal pre-unique-arm CAVARCHER)
(goal pre-unique-arm ARCHER)
)
)
)
=>
(set-goal archer-upgrades YES)
)
(defrule
(building-type-count castle > 0)
(soldier-count >= five-percent-pop)
(or
(or
(civ-selected briton)
(civ-selected chinese)
)
(or
(civ-selected mongol)
(civ-selected turkish)
)
)
=>
(set-goal archer-upgrades YES)
)
;cav civs
(defrule
(soldier-count >= five-percent-pop)
(or
(goal pre-unique-arm CAVALRY)
(or
(or
(goal combat-arm CAVALRY)
(goal combat-arm LIGHTCAV)
)
(or
(goal combat-supp CAVALRY)
(goal combat-supp LIGHTCAV)
)
)
)
=>
(set-goal cav-upgrades YES)
)
(defrule
(building-type-count castle > 0)
(soldier-count >= five-percent-pop)
(or
(or
(civ-selected byzantine)
(civ-selected persian)
)
(civ-selected saracen)
)
=>
(set-goal cav-upgrades YES)
)
;*************************************************
(defrule
(or
(current-age >= feudal-age)
(goal upgrade-conflict NOTICE)
)
=>
(set-escrow-percentage wood 50)
(set-escrow-percentage food 50)
(set-escrow-percentage gold 50)
(set-escrow-percentage stone 50)
)
;********************************************
(defrule
(goal upgrade-conflict NO)
(current-age >= feudal-age)
=>
(generate-random-number 41)
)
(defrule
(difficulty <= moderate)
(food-amount >= 400)
(gold-amount >= 400)
(building-type-count castle > 0)
(unit-type-count my-unique-unit > five-percent-pop)
(or
(research-available my-unique-unit-upgrade)
(research-available ri-elite-longboat)
)
(not (goal upgrade-conflict NOTICE) )
=>
(set-goal upgrade-conflict 90)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 90)
(can-research-with-escrow my-unique-unit-upgrade)
=>
(release-escrow food)
(release-escrow gold)
(research my-unique-unit-upgrade)
(set-goal upgrade-conflict NO)
)
(defrule ;750 food, 475 gold
(goal upgrade-conflict 90)
(unit-type-count my-unique-unit < five-percent-pop)
(unit-type-count-total longboat > 2)
(can-research-with-escrow ri-elite-longboat)
=>
(release-escrow food)
(release-escrow gold)
(research ri-elite-longboat)
(set-goal resource-supp NO)
)
;*************
;TOWN CENTER RESEARCH
(defrule ;50 gold
(goal upgrade-conflict NO)
(civilian-population >= civ-dark)
(random-number <= 1)
(building-type-count town-center > 0)
(research-available ri-loom)
(or
(gold-amount > 250)
(goal age-advancement NOTICE)
)
=>
(set-goal upgrade-conflict 1)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 1)
(can-research-with-escrow ri-loom)
=>
(release-escrow gold)
(research ri-loom)
(set-goal upgrade-conflict NO)
)
(defrule ;75 food
(goal upgrade-conflict NO)
(random-number <= 2)
(building-type-count town-center > 0)
(research-available ri-town-watch)
(or
(goal age-advancement NOTICE)
(food-amount > 700)
)
=>
(set-goal upgrade-conflict 2)
(set-goal resource-supp FOOD-ONLY)
)
(defrule ;300 food, 200 gold
(goal upgrade-conflict NO)
(random-number <= 2)
(building-type-count town-center > 0)
(research-available ri-town-patrol)
=>
(set-goal upgrade-conflict 2)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 2)
(can-research-with-escrow ri-town-watch)
=>
(release-escrow food)
(research ri-town-watch)
(set-goal upgrade-conflict NO)
)
(defrule
(goal upgrade-conflict 2)
(can-research-with-escrow ri-town-patrol)
=>
(release-escrow food)
(release-escrow gold)
(research ri-town-patrol)
(set-goal upgrade-conflict NO)
)
(defrule ;50 wood, 175 food
(difficulty <= moderate)
(can-research-with-escrow ri-wheel-barrow)
(nor
(goal upgrade-conflict NOTICE)
(can-research ri-wheel-barrow)
)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-wheel-barrow)
)
(defrule
(difficulty <= moderate)
(can-research ri-wheel-barrow)
(not (goal upgrade-conflict NOTICE) )
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
=>
(research ri-wheel-barrow)
)
(defrule ;200 wood, 300 food
(civilian-population >= civ-castle)
(difficulty <= hard)
(can-research-with-escrow ri-hand-cart)
(nor
(goal upgrade-conflict NOTICE)
(can-research ri-hand-cart)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-hand-cart)
)
(defrule
(civilian-population >= civ-castle)
(difficulty <= hard)
(can-research ri-hand-cart)
(not (goal upgrade-conflict NOTICE) )
=>
(research ri-hand-cart)
)
;*************
;MINING-CAMP
(defrule ;75 wood, 100 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 3)
(civilian-population >= civ-castle)
(building-type-count mining-camp > 1)
(research-completed ri-gold-mining)
(research-available ri-stone-mining)
=>
(set-goal upgrade-conflict 3)
(set-goal resource-supp WOOD-FOOD)
)
(defrule ;150 wood, 200 food
(goal upgrade-conflict NO)
(goal resource-needed STONE)
(difficulty <= hard)
(random-number <= 3)
(civilian-population >= civ-castle)
(building-type-count mining-camp > 0)
(research-completed ri-gold-shaft-mining)
(research-available ri-stone-shaft-mining)
=>
(set-goal upgrade-conflict 3)
(set-goal resource-supp WOOD-FOOD)
)
(defrule
(goal upgrade-conflict 3)
(or
(can-research-with-escrow ri-stone-mining)
(can-research-with-escrow ri-stone-shaft-mining)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-stone-mining)
(research ri-stone-shaft-mining)
(set-goal upgrade-conflict NO)
)
(defrule ;75 wood, 100 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(current-age > feudal-age)
(random-number <= 4)
(civilian-population >= civ-castle)
(building-type-count mining-camp > 0)
(research-available ri-gold-mining)
=>
(set-goal upgrade-conflict 4)
(set-goal resource-supp WOOD-FOOD)
)
(defrule ;150 wood, 200 food
(goal upgrade-conflict NO)
(difficulty <= hard)
(random-number <= 4)
(civilian-population >= civ-castle)
(building-type-count mining-camp > 0)
(research-available ri-gold-shaft-mining)
=>
(set-goal upgrade-conflict 4)
(set-goal resource-supp WOOD-FOOD)
)
(defrule
(goal upgrade-conflict 4)
(or
(can-research-with-escrow ri-gold-mining)
(can-research-with-escrow ri-gold-shaft-mining)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-gold-mining)
(research ri-gold-shaft-mining)
(set-goal upgrade-conflict NO)
)
;*************
;LUMBER-CAMP
(defrule ;50 wood, 100 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 5)
(building-type-count lumber-camp > 0)
(research-available ri-double-bit-axe)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
=>
(set-goal upgrade-conflict 5)
(set-goal resource-supp WOOD-FOOD)
)
(defrule ;100 wood, 150 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 5)
(civilian-population >= civ-castle)
(building-type-count lumber-camp > 0)
(research-available ri-bow-saw)
=>
(set-goal upgrade-conflict 5)
(set-goal resource-supp WOOD-FOOD)
)
(defrule ;200 wood, 300 food
(goal upgrade-conflict NO)
(difficulty <= hard)
(random-number <= 5)
(civilian-population >= civ-castle)
(building-type-count lumber-camp > 0)
(research-available ri-two-man-saw)
=>
(set-goal upgrade-conflict 5)
(set-goal resource-supp WOOD-FOOD)
)
(defrule
(goal upgrade-conflict 5)
(or
(can-research-with-escrow ri-double-bit-axe)
(or
(can-research-with-escrow ri-bow-saw)
(can-research-with-escrow ri-two-man-saw)
)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-double-bit-axe)
(research ri-bow-saw)
(research ri-two-man-saw)
(set-goal upgrade-conflict NO)
)
;*************
;DOCK
(defrule ;200 wood, 300 gold
(goal upgrade-conflict NO)
(difficulty <= hard)
(random-number <= 6)
(building-type-count dock > 0)
(research-available ri-heavy-demolition-ship)
(not (goal 1 0) )
=>
(set-goal upgrade-conflict 6)
(set-goal resource-supp WOOD-GOLD)
)
(defrule
(goal upgrade-conflict 6)
(can-research-with-escrow ri-heavy-demolition-ship)
=>
(release-escrow wood)
(release-escrow gold)
(research ri-heavy-demolition-ship)
(set-goal upgrade-conflict NO)
)
(defrule ;600 food, 400 gold
(goal upgrade-conflict NO)
(building-type-count dock > 0)
(research-available ri-dry-dock)
(random-number <= 7)
(not (goal 1 0) )
=>
(set-goal upgrade-conflict 7)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 7)
(can-research-with-escrow ri-dry-dock)
=>
(release-escrow food)
(release-escrow gold)
(research ri-dry-dock)
(set-goal upgrade-conflict NO)
)
(defrule ;1000 food, 300 gold
(goal upgrade-conflict NO)
(building-type-count dock > 0)
(research-available ri-shipwright)
(warboat-count > five-percent-pop)
(random-number <= 8)
=>
(set-goal upgrade-conflict 8)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 8)
(can-research-with-escrow ri-shipwright)
=>
(release-escrow food)
(release-escrow gold)
(research ri-shipwright)
(set-goal upgrade-conflict NO)
)
(defrule ;250 food, 150 gold
(building-type-count dock > 0)
(can-research-with-escrow ri-careening)
(nor
(goal 1 0)
(can-research ri-careening)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-careening)
)
(defrule
(building-type-count dock > 0)
(can-research ri-careening)
(not (goal 1 0) )
=>
(research ri-careening)
)
(defrule ;280 wood, 250 gold
(building-type-count dock > 0)
(unit-type-count-total fire-ship-line > 1)
(can-research-with-escrow ri-fast-fire-ship)
(nor
(goal 1 0)
(can-research ri-fast-fire-ship)
)
=>
(release-escrow wood)
(release-escrow gold)
(research ri-fast-fire-ship)
)
(defrule
(building-type-count dock > 0)
(unit-type-count-total fire-ship-line > 1)
(can-research ri-fast-fire-ship)
(not (goal 1 0) )
=>
(research ri-fast-fire-ship)
)
(defrule ;500 wood, 400 food
(difficulty <= moderate)
(building-type-count dock > 0)
(can-research-with-escrow ri-cannon-galleon)
(nor
(goal 1 0)
(can-research ri-cannon-galleon)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-cannon-galleon)
)
(defrule
(difficulty <= moderate)
(building-type-count dock > 0)
(can-research ri-cannon-galleon)
(not (goal 1 0) )
=>
(research ri-cannon-galleon)
)
(defrule ;525 wood, 500 gold
(difficulty <= hard)
(building-type-count dock > 0)
(unit-type-count-total cannon-galleon > 0)
(can-research-with-escrow ri-deck-guns)
(not (can-research ri-deck-guns) )
=>
(release-escrow wood)
(release-escrow gold)
(research ri-deck-guns)
)
(defrule
(difficulty <= hard)
(building-type-count dock > 0)
(unit-type-count-total cannon-galleon > 0)
(can-research ri-deck-guns)
=>
(research ri-deck-guns)
)
(defrule ;230 food, 100 gold
(building-type-count dock > 0)
(unit-type-count-total galley-line > 1)
(can-research-with-escrow ri-war-galley)
(nand
(civ-selected viking)
(building-type-count-total castle > 0)
)
(nor
(goal 1 0)
(can-research ri-war-galley)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-war-galley)
)
(defrule
(building-type-count dock > 0)
(unit-type-count-total galley-line > 1)
(can-research ri-war-galley)
(nand
(civ-selected viking)
(building-type-count-total castle > 0)
)
(not (goal 1 0) )
=>
(research ri-war-galley)
)
(defrule ;315 wood, 400 food
(building-type-count dock > 0)
(can-research-with-escrow ri-galleon)
(nand
(civ-selected viking)
(building-type-count-total castle > 0)
)
(nor
(goal 1 0)
(can-research ri-galleon)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-galleon)
)
(defrule
(building-type-count dock > 0)
(can-research ri-galleon)
(nand
(civ-selected viking)
(building-type-count-total castle > 0)
)
(not (goal 1 0) )
=>
(research ri-galleon)
)
;*************
;MILL
(defrule ;75 wood, 75 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 9)
(building-type-count-total farm >= 8)
(building-type-count mill > 0)
(research-available ri-horse-collar)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
=>
(set-goal upgrade-conflict 9)
(set-goal resource-supp WOOD-FOOD)
)
(defrule ;125 wood, 125 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 9)
(building-type-count-total farm >= 10)
(building-type-count mill > 0)
(research-available ri-heavy-plow)
=>
(set-goal upgrade-conflict 9)
(set-goal resource-supp WOOD-FOOD)
)
(defrule ;250 wood, 250 food
(goal upgrade-conflict NO)
(difficulty <= hard)
(random-number <= 9)
(building-type-count-total farm >= 12)
(building-type-count mill > 0)
(research-available ri-crop-rotation)
=>
(set-goal upgrade-conflict 9)
(set-goal resource-supp WOOD-FOOD)
)
(defrule
(goal upgrade-conflict 9)
(or
(can-research-with-escrow ri-horse-collar)
(or
(can-research-with-escrow ri-heavy-plow)
(can-research-with-escrow ri-crop-rotation)
)
)
=>
(release-escrow wood)
(release-escrow food)
(research ri-horse-collar)
(research ri-heavy-plow)
(research ri-crop-rotation)
(set-goal upgrade-conflict NO)
)
;*************
;MARKET
(defrule ;150 food, 50 gold
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 10)
(player-in-game any-ally)
(building-type-count market > 0)
(research-available ri-coinage)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
=>
(set-goal upgrade-conflict 10)
(set-goal resource-supp FOOD-GOLD)
)
(defrule ;200 food, 100 gold
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 10)
(player-in-game any-ally)
(building-type-count market > 0)
(research-available ri-banking)
=>
(set-goal upgrade-conflict 10)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 10)
(or
(can-research-with-escrow ri-coinage)
(can-research-with-escrow ri-banking)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-coinage)
(research ri-banking)
(set-goal upgrade-conflict NO)
)
(defrule ;100 food, 100 gold
(player-in-game any-ally)
(building-type-count market > 0)
(can-research-with-escrow ri-cartography)
(or
(current-age > feudal-age)
(or
(goal age-advancement NOTICE)
(gold-amount > 300)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-cartography)
)
(defrule ;300 food, 200 gold
(can-research-with-escrow ri-guilds)
=>
(release-escrow food)
(release-escrow gold)
(research ri-guilds)
)
;*************
;BARRACKS
(defrule ;75 food
(goal upgrade-conflict NO)
(goal infantry-upgrades YES)
(random-number <= 11)
(research-available ri-tracking)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
=>
(set-goal upgrade-conflict 11)
(set-goal resource-supp FOOD-ONLY)
)
(defrule
(goal upgrade-conflict 11)
(can-research-with-escrow ri-tracking)
=>
(release-escrow food)
(research ri-tracking)
(set-goal upgrade-conflict NO)
)
(defrule ;750 food, 350 gold
(goal upgrade-conflict NO)
(building-type-count barracks > 0)
(research-available ri-champion)
(random-number <= 12)
(goal combat-arm INFANTRY)
=>
(set-goal upgrade-conflict 18)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 12)
(can-research-with-escrow ri-champion)
=>
(release-escrow food)
(release-escrow gold)
(research ri-champion)
(set-goal upgrade-conflict NO)
)
(defrule ;200 food
(goal upgrade-conflict NO)
(goal infantry-upgrades YES)
(building-type-count barracks > 0)
(research-available ri-squires)
(random-number <= 13)
=>
(set-goal upgrade-conflict 13)
(set-goal resource-supp FOOD-ONLY)
)
(defrule
(goal upgrade-conflict 13)
(can-research-with-escrow ri-squires)
=>
(release-escrow food)
(research ri-squires)
(set-goal upgrade-conflict NO)
)
(defrule ;215 food, 90 gold
(unit-type-count spearman > 2)
(can-research-with-escrow ri-pikeman)
(or
(goal upgrade-conflict NO)
(current-age == imperial-age)
)
(nor
(goal upgrade-conflict NOTICE)
(can-research ri-pikeman)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-pikeman)
)
(defrule
(unit-type-count spearman > 2)
(can-research ri-pikeman)
(or
(goal upgrade-conflict NO)
(current-age == imperial-age)
)
(not (goal upgrade-conflict NOTICE) )
=>
(research ri-pikeman)
)
(defrule ;100 food, 40 gold
(can-research-with-escrow ri-man-at-arms)
(or
(goal upgrade-conflict NO)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
)
(or
(or
(goal combat-arm INFANTRY)
(goal combat-supp INFANTRY)
)
(goal pre-unique-arm INFANTRY)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-man-at-arms)
)
(defrule ;200 food, 65 gold
(can-research-with-escrow ri-long-swordsman)
(or
(goal upgrade-conflict NO)
(current-age-time > 300)
)
(or
(or
(goal combat-arm INFANTRY)
(goal combat-supp INFANTRY)
)
(goal pre-unique-arm INFANTRY)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-long-swordsman)
)
(defrule ;300 food, 100 gold
(can-research-with-escrow ri-two-handed-swordsman)
(or
(goal upgrade-conflict NO)
(current-age-time > 600)
)
(or
(goal combat-arm INFANTRY)
(goal combat-supp INFANTRY)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-two-handed-swordsman)
)
;*************
;STABLE
(defrule ;325 food, 360 gold
(goal upgrade-conflict NO)
(building-type-count stable > 0)
(unit-type-count camel > 2)
(research-available ri-heavy-camel)
(random-number <= 14)
=>
(set-goal upgrade-conflict 14)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 14)
(can-research-with-escrow ri-heavy-camel)
=>
(release-escrow food)
(release-escrow gold)
(research ri-heavy-camel)
(set-goal upgrade-conflict NO)
)
(defrule ;1300 food, 750 gold
(goal upgrade-conflict NO)
(random-number <= 15)
(building-type-count stable > 0)
(research-available ri-paladin)
(or
(goal combat-arm CAVALRY)
(goal combat-arm LIGHTCAV)
)
=>
(set-goal upgrade-conflict 15)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 15)
(or
(can-research-with-escrow ri-cavalier)
(can-research-with-escrow ri-paladin)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-cavalier)
(research ri-paladin)
(set-goal upgrade-conflict NO)
)
(defrule ;250 food
(goal upgrade-conflict NO)
(building-type-count stable > 0)
(research-available ri-husbandry)
(random-number <= 16)
(or
(or
(goal cav-upgrades YES)
(goal combat-arm CAVARCHER)
)
(or
(goal combat-supp CAVARCHER)
(civ-selected mongol)
)
)
=>
(set-goal upgrade-conflict 16)
(set-goal resource-supp FOOD-ONLY)
)
(defrule
(goal upgrade-conflict 16)
(can-research-with-escrow ri-husbandry)
=>
(release-escrow food)
(research ri-husbandry)
(set-goal upgrade-conflict NO)
)
(defrule ;300 food, 300 gold
(can-research-with-escrow ri-cavalier)
(or
(goal upgrade-conflict NO)
(current-age > 300)
)
(or
(goal combat-arm CAVALRY)
(or
(goal combat-supp CAVALRY)
(goal combat-arm LIGHTCAV)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-cavalier)
)
(defrule ;150 food, 50 gold
(can-research-with-escrow ri-light-cavalry)
(or
(or
(goal combat-arm LIGHTCAV)
(goal combat-supp LIGHTCAV)
)
(unit-type-count-total scout-cavalry > 2)
)
(or
(goal upgrade-conflict NO)
(current-age == imperial-age)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-light-cavalry)
)
;*************
;ARCHERY RANGE
(defrule ;350 food, 300 gold
(goal upgrade-conflict NO)
(building-type-count archery-range > 0)
(research-available ri-arbalest)
(random-number <= 17)
(nor
(research-available ri-hand-cannon)
(research-completed ri-hand-cannon)
)
(or
(goal combat-arm ARCHER)
(goal combat-supp ARCHER)
)
=>
(set-goal upgrade-conflict 17)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 17)
(can-research-with-escrow ri-arbalest)
=>
(release-escrow food)
(release-escrow gold)
(research ri-arbalest)
(set-goal upgrade-conflict NO)
)
(defrule
(goal upgrade-conflict 17)
(research-completed ri-hand-cannon)
=>
(set-goal upgrade-conflict NO)
)
(defrule ;450 food, 200 gold
(building-type-count archery-range > 0)
(can-research-with-escrow ri-hand-cannon)
=>
(release-escrow food)
(release-escrow gold)
(research ri-hand-cannon)
)
(defrule ;900 food, 500 gold
(goal upgrade-conflict NO)
(goal combat-arm CAVARCHER)
(building-type-count archery-range > 0)
(research-available ri-heavy-cavalry-archer)
(random-number <= 18)
=>
(set-goal upgrade-conflict 18)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 18)
(can-research-with-escrow ri-heavy-cavalry-archer)
=>
(release-escrow food)
(release-escrow gold)
(research ri-heavy-cavalry-archer)
(set-goal upgrade-conflict NO)
)
(defrule ;250 wood, 160 gold
(unit-type-count skirmisher > 2)
(can-research-with-escrow ri-elite-skirmisher)
(or
(goal upgrade-conflict NO)
(current-age-time > 300)
)
=>
(release-escrow wood)
(release-escrow gold)
(research ri-elite-skirmisher)
)
(defrule ;125 food, 75 gold
(research-available ri-crossbow)
(or
(goal upgrade-conflict NO)
(current-age-time > 300)
)
(nor
(research-available ri-hand-cannon)
(research-completed ri-hand-cannon)
)
(or
(goal combat-arm ARCHER)
(or
(goal combat-supp ARCHER)
(goal pre-unique-arm ARCHER)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-crossbow)
)
;*************
;BLACKSMITH
(defrule ;100 food
(difficulty <= moderate)
(goal infantry-upgrades YES)
(can-research-with-escrow ri-scale-mail)
(or
(goal upgrade-conflict NO)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(research ri-scale-mail)
)
(defrule ;200 food, 100 gold
(difficulty <= moderate)
(goal infantry-upgrades YES)
(can-research-with-escrow ri-chain-mail)
(or
(goal upgrade-conflict NO)
(or
(current-age-time > 300)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-chain-mail)
)
(defrule ;300 food, 150 gold
(goal upgrade-conflict NO)
(random-number <= 19)
(difficulty <= hard)
(goal infantry-upgrades YES)
(building-type-count blacksmith > 0)
(research-available ri-plate-mail)
=>
(set-goal upgrade-conflict 19)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 19)
(can-research-with-escrow ri-plate-mail)
=>
(release-escrow food)
(release-escrow gold)
(research ri-plate-mail)
(set-goal upgrade-conflict NO)
)
(defrule ;150 food
(difficulty <= moderate)
(goal cav-upgrades YES)
(can-research-with-escrow ri-scale-barding)
(or
(goal upgrade-conflict NO)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(research ri-scale-barding)
)
(defrule ;250 food, 150 gold
(difficulty <= moderate)
(goal cav-upgrades YES)
(can-research-with-escrow ri-chain-barding)
(or
(goal upgrade-conflict NO)
(or
(current-age-time > 300)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-chain-barding)
)
(defrule ;350 food, 200 gold
(goal upgrade-conflict NO)
(random-number <= 20)
(difficulty <= hard)
(goal cav-upgrades YES)
(building-type-count blacksmith > 0)
(research-available ri-plate-barding)
=>
(set-goal upgrade-conflict 20)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 20)
(can-research-with-escrow ri-plate-barding)
=>
(release-escrow food)
(release-escrow gold)
(research ri-plate-barding)
(set-goal upgrade-conflict NO)
)
(defrule ;100 food
(difficulty <= moderate)
(goal archer-upgrades YES)
(can-research-with-escrow ri-padded-archer-armor)
(or
(goal upgrade-conflict NO)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(research ri-padded-archer-armor)
)
(defrule ;150 food, 150 gold
(difficulty <= moderate)
(goal archer-upgrades YES)
(can-research-with-escrow ri-leather-archer-armor)
(or
(goal upgrade-conflict NO)
(or
(current-age-time > 300)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-leather-archer-armor)
)
(defrule ;250 food, 250 gold
(goal upgrade-conflict NO)
(random-number <= 21)
(difficulty <= hard)
(goal archer-upgrades YES)
(building-type-count blacksmith > 0)
(research-available ri-ring-archer-armor)
=>
(set-goal upgrade-conflict 21)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 21)
(can-research-with-escrow ri-ring-archer-armor)
=>
(release-escrow food)
(release-escrow gold)
(research ri-ring-archer-armor)
(set-goal upgrade-conflict NO)
)
(defrule ;150 food
(difficulty <= moderate)
(can-research-with-escrow ri-forging)
(or
(goal infantry-upgrades YES)
(goal cav-upgrades YES)
)
(or
(goal upgrade-conflict NO)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(research ri-forging)
)
(defrule ;220 food, 120 gold
(difficulty <= moderate)
(can-research-with-escrow ri-iron-casting)
(or
(goal infantry-upgrades YES)
(goal cav-upgrades YES)
)
(or
(goal upgrade-conflict NO)
(or
(current-age-time > 300)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-iron-casting)
)
(defrule ;275 food, 225 gold
(goal upgrade-conflict NO)
(random-number <= 22)
(difficulty <= hard)
(building-type-count blacksmith > 0)
(research-available ri-blast-furnace)
(or
(goal infantry-upgrades YES)
(goal cav-upgrades YES)
)
=>
(set-goal upgrade-conflict 22)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 22)
(can-research-with-escrow ri-blast-furnace)
=>
(release-escrow food)
(release-escrow gold)
(research ri-blast-furnace)
(set-goal upgrade-conflict NO)
)
(defrule ;100 food, 50 gold
(difficulty <= moderate)
(can-research-with-escrow ri-fletching)
(or
(goal archer-upgrades YES)
(or
(unit-type-count galley-line > five-percent-pop)
(building-type-count watch-tower-line > five-percent-pop)
)
)
(or
(goal upgrade-conflict NO)
(or
(current-age > feudal-age)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-fletching)
)
(defrule ;200 food, 100 gold
(can-research-with-escrow ri-bodkin-arrow)
(or
(goal archer-upgrades YES)
(or
(unit-type-count galley-line > five-percent-pop)
(building-type-count watch-tower-line > five-percent-pop)
)
)
(or
(goal upgrade-conflict NO)
(or
(current-age-time > 300)
(goal age-advancement NOTICE)
)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-bodkin-arrow)
)
(defrule ;300 food, 200 gold
(goal upgrade-conflict NO)
(random-number <= 23)
(difficulty <= hard)
(building-type-count blacksmith > 0)
(research-available ri-bracer)
(or
(goal archer-upgrades YES)
(or
(unit-type-count galley-line > five-percent-pop)
(building-type-count watch-tower-line > five-percent-pop)
)
)
=>
(set-goal upgrade-conflict 23)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 23)
(can-research-with-escrow ri-bracer)
=>
(release-escrow food)
(release-escrow gold)
(research ri-bracer)
(set-goal upgrade-conflict NO)
)
;*************
;SIEGE-WORKSHOP
(defrule ;1100 wood, 1000 food
(goal upgrade-conflict NO)
(goal combat-supp SCORPION)
(difficulty <= moderate)
(random-number <= 24)
(building-type-count siege-workshop > 0)
(research-available ri-heavy-scorpion)
=>
(set-goal upgrade-conflict 24)
(set-goal resource-supp WOOD-FOOD)
)
(defrule
(goal upgrade-conflict 24)
(can-research-with-escrow ri-heavy-scorpion)
=>
(release-escrow wood)
(release-escrow food)
(research ri-heavy-scorpion)
(set-goal upgrade-conflict NO)
)
(defrule
(goal upgrade-conflict 24)
(not (goal combat-supp SCORPION) )
=>
(set-goal upgrade-conflict NO)
)
(defrule ;300 food, 250 gold
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 25)
(building-type-count siege-workshop > 0)
(research-available ri-capped-ram)
=>
(set-goal upgrade-conflict 25)
(set-goal resource-supp FOOD-GOLD)
)
(defrule ;1000 food, 800 gold
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 25)
(building-type-count siege-workshop > 0)
(unit-type-count-total capped-ram > 1)
(research-available ri-siege-ram)
(nor
(research-completed ri-bombard-cannon)
(research-completed ri-siege-onager)
)
=>
(set-goal upgrade-conflict 25)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 25)
(or
(can-research-with-escrow ri-capped-ram)
(can-research-with-escrow ri-siege-ram)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-capped-ram)
(research ri-siege-ram)
(set-goal upgrade-conflict NO)
)
(defrule ;800 food, 500 gold
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 26)
(building-type-count siege-workshop > 0)
(research-available ri-onager)
=>
(set-goal upgrade-conflict 26)
(set-goal resource-supp FOOD-GOLD)
)
(defrule ;1450 food, 1000 gold
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 26)
(unit-type-count-total onager > 1)
(building-type-count siege-workshop > 0)
(research-available ri-siege-onager)
(nor
(research-completed ri-bombard-cannon)
(research-completed ri-siege-ram)
)
=>
(set-goal upgrade-conflict 26)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 26)
(or
(can-research-with-escrow ri-onager)
(can-research-with-escrow ri-siege-onager)
)
=>
(release-escrow food)
(release-escrow gold)
(research ri-onager)
(research ri-siege-onager)
(set-goal upgrade-conflict NO)
)
(defrule ;500 food, 250 gold
(difficulty <= moderate)
(can-research-with-escrow ri-bombard-cannon)
=>
(release-escrow food)
(release-escrow gold)
(research ri-bombard-cannon)
)
(defrule ;600 wood, 500 food
(goal upgrade-conflict NO)
(difficulty <= moderate)
(random-number <= 27)
(building-type-count siege-workshop > 0)
(research-available ri-siege-engineers)
(or
(or
(unit-type-count battering-ram-line > 1)
(unit-type-count mangonel-line > 1)
)
(or
(unit-type-count bombard-cannon > 1)
(unit-type-count trebuchet > 0)
)
)
=>
(set-goal upgrade-conflict 27)
(set-goal resource-supp WOOD-FOOD)
)
(defrule
(goal upgrade-conflict 27)
(can-research-with-escrow ri-siege-engineers)
=>
(release-escrow wood)
(release-escrow food)
(research ri-siege-engineers)
(set-goal upgrade-conflict NO)
)
;*************
;monastery
(defrule ;475 gold
(goal upgrade-conflict NO)
(goal monk-rating GOOD)
(building-type-count monastery > 0)
(unit-type-count-total monk > 2)
(research-available ri-redemption)
(random-number <= 28)
=>
(set-goal upgrade-conflict 28)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 28)
(can-research-with-escrow ri-redemption)
=>
(release-escrow gold)
(research ri-redemption)
(set-goal upgrade-conflict NO)
)
(defrule ;325 gold
(goal upgrade-conflict NO)
(goal monk-rating GOOD)
(cc-players-unit-type-count any-enemy monk > 2)
(building-type-count monastery > 0)
(unit-type-count-total monk > 1)
(research-available ri-atonement)
(random-number <= 29)
=>
(set-goal upgrade-conflict 29)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 29)
(can-research-with-escrow ri-atonement)
=>
(release-escrow gold)
(research ri-atonement)
(set-goal upgrade-conflict NO)
(set-goal resource-supp GOLD-ONLY)
)
(defrule ;200 gold
(goal upgrade-conflict NO)
(goal monk-rating GOOD)
(building-type-count monastery > 0)
(unit-type-count-total monk > 1)
(research-available ri-block-printing)
(random-number <= 30)
=>
(set-goal upgrade-conflict 30)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 30)
(can-research-with-escrow ri-block-printing)
=>
(release-escrow gold)
(research ri-block-printing)
(set-goal upgrade-conflict NO)
)
(defrule ;140 gold
(goal upgrade-conflict NO)
(building-type-count monastery > 0)
(unit-type-count-total monk > 0)
(research-available ri-fervor)
(random-number <= 31)
(or
(goal monk-rating GOOD)
(goal monk-rating FAIR)
)
=>
(set-goal upgrade-conflict 31)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 31)
(can-research-with-escrow ri-fervor)
=>
(release-escrow gold)
(research ri-fervor)
(set-goal upgrade-conflict NO)
)
(defrule ;120 gold
(goal upgrade-conflict NO)
(building-type-count monastery > 0)
(unit-type-count-total monk > 0)
(research-available ri-illumination)
(random-number <= 32)
(or
(goal monk-rating GOOD)
(goal monk-rating FAIR)
)
=>
(set-goal upgrade-conflict 32)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 32)
(can-research-with-escrow ri-illumination)
=>
(release-escrow gold)
(research ri-illumination)
(set-goal upgrade-conflict NO)
)
(defrule ;120 gold
(goal upgrade-conflict NO)
(building-type-count monastery > 0)
(unit-type-count-total monk > 0)
(research-available ri-sanctity)
(random-number <= 33)
(or
(goal monk-rating GOOD)
(goal monk-rating FAIR)
)
=>
(set-goal upgrade-conflict 33)
(set-goal resource-supp GOLD-ONLY)
)
(defrule
(goal upgrade-conflict 33)
(can-research-with-escrow ri-sanctity)
=>
(release-escrow gold)
(research ri-sanctity)
(set-goal upgrade-conflict NO)
)
(defrule ;750 food, 1000 gold
(goal upgrade-conflict NO)
(random-number <= 34)
(cc-players-unit-type-count any-enemy monk > 3)
(building-type-count monastery > 0)
(research-available ri-faith)
=>
(set-goal upgrade-conflict 34)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 34)
(can-research-with-escrow ri-faith)
=>
(release-escrow food)
(release-escrow gold)
(research ri-faith)
(set-goal upgrade-conflict NO)
)
;*************
;UNIVERSITY
(defrule ;175 wood, 150 stone
(goal upgrade-conflict NO)
(random-number <= 35)
(building-type-count university > 0)
(research-available ri-masonry)
=>
(set-goal upgrade-conflict 35)
(set-goal resource-supp WOOD-STONE)
)
(defrule ;200 wood, 300 stone
(goal upgrade-conflict NO)
(random-number <= 35)
(building-type-count university > 0)
(research-available ri-architecture)
(not (goal wonder-attempt POSSIBLE) )
=>
(set-goal upgrade-conflict 35)
(set-goal resource-supp WOOD-STONE)
)
(defrule
(goal upgrade-conflict 35)
(or
(can-research-with-escrow ri-masonry)
(can-research-with-escrow ri-architecture)
)
=>
(release-escrow wood)
(release-escrow stone)
(research ri-masonry)
(research ri-architecture)
(set-goal upgrade-conflict NO)
)
(defrule ;200 wood, 300 stone
(goal upgrade-conflict NO)
(random-number <= 36)
(building-type-count university > 0)
(research-available ri-stonecutting)
(not (goal wonder-attempt POSSIBLE) )
=>
(set-goal upgrade-conflict 36)
(set-goal resource-supp WOOD-STONE)
)
(defrule
(goal upgrade-conflict 36)
(can-research-with-escrow ri-stonecutting)
=>
(release-escrow wood)
(release-escrow stone)
(research ri-stonecutting)
(set-goal upgrade-conflict NO)
)
(defrule ;100 food, 250 stone
(building-type-count watch-tower > 2)
(can-research-with-escrow ri-guard-tower)
(or
(goal upgrade-conflict NO)
(current-age-time > 600)
)
=>
(release-escrow food)
(release-escrow stone)
(research ri-guard-tower)
)
(defrule ;500 food, 350 stone
(goal upgrade-conflict NO)
(random-number <= 37)
(building-type-count university > 0)
(building-type-count guard-tower > 0)
(research-available ri-keep)
=>
(set-goal upgrade-conflict 37)
(set-goal resource-supp FOOD-STONE)
)
(defrule
(goal upgrade-conflict 37)
(can-research-with-escrow ri-keep)
=>
(release-escrow food)
(release-escrow stone)
(research ri-keep)
(set-goal upgrade-conflict NO)
)
(defrule ;800 food, 400 stone
(goal upgrade-conflict NO)
(random-number <= 38)
(building-type-count university > 0)
(building-type-count watch-tower-line > 2)
(research-available ri-bombard-tower)
=>
(set-goal upgrade-conflict 38)
(set-goal resource-supp FOOD-STONE)
)
(defrule
(goal upgrade-conflict 38)
(can-research-with-escrow ri-bombard-tower)
=>
(release-escrow food)
(release-escrow stone)
(research ri-bombard-tower)
(set-goal upgrade-conflict NO)
)
(defrule ;200 food, 200 stone
(can-research-with-escrow ri-murder-holes)
(or
(building-type-count watch-tower-line > 1)
(building-type-count castle > 0)
)
=>
(release-escrow food)
(release-escrow stone)
(research ri-murder-holes)
)
(defrule ;200 food, 100 stone
(goal wall-build YES)
(can-research-with-escrow ri-fortified-wall)
=>
(release-escrow food)
(release-escrow stone)
(research ri-fortified-wall)
)
(defrule ;350 food, 100 gold
(goal upgrade-conflict NO)
(random-number <= 39)
(building-type-count university > 0)
(research-available ri-heated-shot)
(nor
(goal 1 0)
(goal 2 2)
)
=>
(set-goal upgrade-conflict 39)
(set-goal resource-supp FOOD-GOLD)
)
(defrule
(goal upgrade-conflict 39)
(can-research-with-escrow ri-heated-shot)
=>
(release-escrow food)
(release-escrow gold)
(research ri-heated-shot)
(set-goal upgrade-conflict NO)
)
(defrule ;300 wood, 175 gold
(goal upgrade-conflict NO)
(random-number <= 40)
(building-type-count university > 0)
(research-available ri-ballistics)
(or
(unit-type-count galley-line >= five-percent-pop)
(or
(goal archer-upgrades YES)
(research-completed ri-guard-tower)
)
)
=>
(set-goal upgrade-conflict 40)
(set-goal resource-supp WOOD-GOLD)
)
(defrule
(goal upgrade-conflict 40)
(can-research-with-escrow ri-ballistics)
=>
(release-escrow wood)
(release-escrow gold)
(research ri-ballistics)
(set-goal upgrade-conflict NO)
)
(defrule ;300 food, 200 gold
(building-type-count university > 0)
(can-research-with-escrow ri-chemistry)
=>
(release-escrow food)
(release-escrow gold)
(research ri-chemistry)
)
;*************
;CASTLE
(defrule ;400 wood, 400 stone
(goal upgrade-conflict NO)
(random-number <= 41)
(building-type-count castle > 0)
(research-available ri-hoardings)
(not (goal wonder-attempt POSSIBLE) )
=>
(set-goal upgrade-conflict 41)
(set-goal resource-supp WOOD-STONE)
)
(defrule
(goal upgrade-conflict 41)
(can-research-with-escrow ri-hoardings)
=>
(release-escrow wood)
(release-escrow stone)
(research ri-hoardings)
(set-goal upgrade-conflict NO)
)
(defrule ;150 food, 150 gold
(can-research-with-escrow ri-conscription)
=>
(release-escrow food)
(release-escrow gold)
(research ri-conscription)
)
(defrule
(true)
=>
(set-strategic-number sn-number-boat-explore-groups 0)
(set-strategic-number sn-dock-defend-priority 1)
(disable-self)
)
(defrule
(unit-type-count galley-line > 0)
=>
(set-strategic-number sn-number-boat-explore-groups 1)
(disable-self)
)
;make docks
(defrule
(building-type-count-total dock == 0)
(building-type-count-total lumber-camp > 0)
(nand
(goal rush-control RUSHING)
(and
(and
(building-type-count-total barracks == 0)
(building-type-count-total archery-range == 0)
)
(and
(building-type-count-total stable == 0)
(building-type-count-total castle == 0)
)
)
)
(can-build dock)
=>
(build dock)
)
(defrule
(goal 1 10)
(current-age >= feudal-age)
(wood-amount > 400)
(building-type-count-total dock < 2)
(can-build-with-escrow dock)
=>
(release-escrow wood)
(build dock)
)
(defrule
(current-age >= castle-age)
(wood-amount > 500)
(building-type-count-total dock < 2)
(can-build-with-escrow dock)
=>
(release-escrow wood)
(build dock)
)
(defrule
(goal 1 10)
(current-age == imperial-age)
(wood-amount > 500)
(building-type-count-total dock < 3)
(can-build-with-escrow dock)
=>
(release-escrow wood)
(build dock)
)
;build fishing ships in dark age
#load-if-not-defined DEATH-MATCH
(defrule
(current-age == dark-age)
(building-type-count-total lumber-camp > 0)
(civilian-population < civ-dark)
(or
(unit-type-count-total fishing-ship < five-percent-pop)
(and
(goal rush-control BOOMING)
(unit-type-count-total fishing-ship < ten-percent-pop)
)
)
(nand
(goal rush-control RUSHING)
(building-type-count-total barracks == 0)
)
(can-train fishing-ship)
=>
(train fishing-ship)
)
;feudal boats
(defrule
(goal secondary-build 1)
(current-age == feudal-age)
(building-type-count-total blacksmith > 0)
(civilian-population < civ-feudal)
(unit-type-count-total fishing-ship < ten-percent-pop)
(unit-type-count-total galley > 0)
(can-train fishing-ship)
=>
(train fishing-ship)
)
;castle boats
(defrule
(goal secondary-build 1)
(building-type-count-total siege-workshop > 0)
(civilian-population < civ-castle)
(unit-type-count-total fishing-ship < ten-percent-pop)
(or
(current-age == castle-age)
(and
(current-age == imperial-age)
(current-age-time < 2400)
)
)
(can-train fishing-ship)
=>
(train fishing-ship)
)
#end-if
(defrule
(population >= pop-cap)
(unit-type-count fishing-ship > ten-percent-pop)
=>
(delete-unit fishing-ship)
)
(defrule
(population >= pop-cap)
(current-age == imperial-age)
(current-age-time > 2400)
(unit-type-count fishing-ship > 0)
=>
(delete-unit fishing-ship)
)
;start the run-through for military ships & rulers of the sea
(defrule
(not (goal 2 0) )
=>
(set-goal 2 0)
)
(defrule
(current-age >= castle-age)
(cc-players-unit-type-count every-enemy galley-line < five-percent-pop)
(cc-players-unit-type-count every-enemy cannon-galleon-line < five-percent-pop)
(cc-players-unit-type-count every-enemy fire-ship-line < five-percent-pop)
(cc-players-unit-type-count every-enemy longboat-line < five-percent-pop)
=>
(set-goal 2 2)
)
;need to add a section in which he joins our side then betrays us!
(defrule
(current-age >= feudal-age)
=>
(set-goal personality NOTICE)
(generate-random-number 6)
(disable-self)
)
(defrule
(goal personality NOTICE)
(random-number == 1)
=>
(set-goal personality 11)
(disable-self)
)
(defrule
(goal personality NOTICE)
(random-number == 2)
=>
(set-goal personality 12)
(disable-self)
)
(defrule
(goal personality NOTICE)
(random-number == 3)
=>
(set-goal personality 13)
(disable-self)
)
(defrule
(goal personality NOTICE)
(random-number == 4)
=>
(set-goal personality 14)
(disable-self)
)
(defrule
(goal personality NOTICE)
(random-number == 5)
=>
(set-goal personality 15)
(disable-self)
)
(defrule
(goal personality NOTICE)
(random-number == 6)
=>
(set-goal personality 16)
(disable-self)
)
#load-if-not-defined TEAMS-LOCKED
(defrule
(timer-triggered t-chat)
(goal personality BULLY)
(goal rush-control RUSHING)
=>
(chat-to-player-using-id this-any-human-enemy 22105)
(chat-to-player-using-id this-any-human-enemy 22106)
(disable-timer t-chat)
(enable-timer t-chat 1200)
(disable-self)
)
(defrule
(goal personality BULLY)
(players-stance any-human ally)
=>
(chat-to-player-using-id this-any-human 22107)
(set-goal rush-control RUSHING)
(disable-self)
)
#end-if
(defrule
(timer-triggered t-chat)
(xor
(xor
(and
(population > 50)
(players-population any-human-enemy < 40)
)
(and
(population > 40)
(players-population any-human-enemy < 30)
)
)
(and
(population > 30)
(players-population any-human-enemy < 20)
)
)
=>
(chat-to-player-using-id this-any-human-enemy 22108)
(chat-to-player-using-id this-any-human-enemy 22109)
(disable-timer t-chat)
(enable-timer t-chat 1200)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(building-type-count-total market > 0)
(cc-players-building-type-count any-human-enemy market > 0)
(not (goal 1 10) )
=>
(chat-to-player-using-id this-any-human-enemy 22110)
(chat-to-player-using-id this-any-human-enemy 22111)
(disable-timer t-chat)
(enable-timer t-chat 1200)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(building-type-count-total dock > 0)
(cc-players-building-type-count any-human-enemy dock > 0)
(goal 1 10)
=>
(chat-to-player-using-id this-any-human-enemy 22112)
(chat-to-player-using-id this-any-human-enemy 22110)
(disable-timer t-chat)
(enable-timer t-chat 1200)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(stance-toward any-human enemy)
=>
(chat-to-player-using-id this-any-human-enemy 22113)
(clear-tribute-memory this-any-human-enemy food)
(clear-tribute-memory this-any-human-enemy wood)
(clear-tribute-memory this-any-human-enemy gold)
(clear-tribute-memory this-any-human-enemy stone)
(disable-timer t-chat)
(enable-timer t-chat 1200)
(disable-self)
)
(defrule
(or
(or
(players-tribute-memory any-human-enemy wood >= 100)
(players-tribute-memory any-human-enemy food >= 100)
)
(or
(players-tribute-memory any-human-enemy gold >= 100)
(players-tribute-memory any-human-enemy stone >= 100)
)
)
=>
(chat-to-player-using-id this-any-human-enemy 22114)
(clear-tribute-memory this-any-human-enemy food)
(clear-tribute-memory this-any-human-enemy wood)
(clear-tribute-memory this-any-human-enemy gold)
(clear-tribute-memory this-any-human-enemy stone)
)
;for war war-galleys
;goal 2 0 = no problem; 2 1 = enemy warships!; 2 2 = we've won at sea!
;have we lost the ship war? Is it time to give up on boats?
;we need transport-ships
(defrule
(soldier-count >= fifteen-percent-pop)
(unit-type-count-total transport-ship < 2)
(can-train transport-ship)
=>
(train transport-ship)
)
(defrule
(soldier-count >= fifteen-percent-pop)
(unit-type-count-total transport-ship == 0)
(can-train-with-escrow transport-ship)
(not (can-train transport-ship) )
=>
(release-escrow wood)
(train transport-ship)
)
;start the run-through for military ships
(defrule
(goal make-warboat YES)
(current-age > dark-age)
(building-type-count dock > 0)
=>
(set-goal make-warboat NO)
)
(defrule
(current-age == feudal-age)
(or
(building-type-count-total blacksmith > 0)
(wood-amount > 300)
)
(nand
(goal upgrade-conflict NOTICE)
(gold-amount < 250)
)
=>
(set-goal make-warboat YES)
)
(defrule
(current-age == castle-age)
(or
(building-type-count-total castle > 0)
(or
(building-type-count-total university > 0)
(wood-amount > 300)
)
)
(nand
(goal upgrade-conflict NOTICE)
(gold-amount < 850)
)
=>
(set-goal make-warboat YES)
)
(defrule
(current-age == imperial-age)
=>
(set-goal make-warboat YES)
)
(defrule
(goal make-warboat YES)
(goal 2 2)
=>
(set-goal make-warboat NO)
)
;cannon-galleons
(defrule
(warboat-count > 2)
(can-train cannon-galleon-line)
(unit-type-count cannon-galleon-line < ten-percent-pop)
(difficulty <= hard)
(or
(and
(not (goal 2 2) )
(warboat-count < fifteen-percent-pop)
)
(warboat-count < ten-percent-pop)
)
=>
(train cannon-galleon-line)
(set-goal make-fire-boat YES)
)
(defrule
(warboat-count > 2)
(unit-type-count cannon-galleon-line < five-percent-pop)
(difficulty <= hard)
(can-train-with-escrow cannon-galleon-line)
(not (can-train cannon-galleon-line) )
(or
(and
(not (goal 2 2) )
(warboat-count < fifteen-percent-pop)
)
(warboat-count < ten-percent-pop)
)
=>
(release-escrow wood)
(release-escrow gold)
(train cannon-galleon-line)
(set-goal make-fire-boat YES)
)
#load-if-defined VIKING-CIV
;longboats
(defrule
(goal make-warboat YES)
(current-age == castle-age)
(can-train longboat)
(or
(and
(not (goal 2 2) )
(warboat-count < fifteen-percent-pop)
)
(warboat-count < five-percent-pop)
)
=>
(train longboat)
(set-goal make-fire-boat YES)
)
#end-if
;demolition-ships
(defrule
(warboat-count < five-percent-pop)
(unit-type-count-total demolition-ship-line == 0)
(can-train demolition-ship-line)
(not (goal 2 2) )
=>
(train demolition-ship-line)
)
;fire-ships
(defrule
(warboat-count < five-percent-pop)
(current-age == castle-age)
(can-train fire-ship)
(not (goal 2 2) )
=>
(train fire-ship)
(set-goal make-fire-boat NO)
)
(defrule
(goal make-warboat YES)
(goal make-fire-boat YES)
(current-age == castle-age)
(can-train fire-ship)
(or
(and
(not (goal 2 2) )
(warboat-count < fifteen-percent-pop)
)
(warboat-count < five-percent-pop)
)
=>
(train fire-ship)
(set-goal make-fire-boat NO)
)
(defrule
(goal make-warboat YES)
(goal make-fire-boat YES)
(current-age == imperial-age)
(can-train fire-ship-line)
(or
(and
(not (goal 2 2) )
(warboat-count < fifteen-percent-pop)
)
(warboat-count < five-percent-pop)
)
=>
(train fire-ship-line)
(set-goal make-fire-boat NO)
)
;galleys
(defrule
(warboat-count < five-percent-pop)
(can-train galley-line)
(not (unit-available longboat-line) )
(not (goal 2 2) )
=>
(train galley-line)
(set-goal make-fire-boat YES)
)
(defrule
(goal make-warboat YES)
(can-train galley-line)
(not (unit-available longboat-line) )
(or
(and
(not (goal 2 2) )
(warboat-count < fifteen-percent-pop)
)
(warboat-count < five-percent-pop)
)
=>
(train galley-line)
(set-goal make-fire-boat YES)
)
(defrule
(goal siege-available YES)
(or
(building-type-count siege-workshop > 0)
(building-type-count castle > 0)
)
(or
(or
(players-building-type-count any-enemy watch-tower-line > 1)
(players-building-type-count any-enemy castle > 0)
)
(or
(players-building-type-count any-enemy bombard-tower > 0)
(players-building-type-count any-enemy town-center > 1)
)
)
=>
(set-goal siege-available NO)
)
(defrule
(goal siege-available YES)
(or
(players-building-type-count any-enemy stone-wall > 10)
(players-building-type-count any-enemy fortified-wall > 10)
)
=>
(set-goal siege-available NO)
)
(defrule
(goal siege-available NO)
(or
(population >= pop-cap)
(or
(or
(unit-type-count mangonel-line > 0)
(unit-type-count battering-ram-line > 0)
)
(or
(unit-type-count bombard-cannon > 0)
(unit-type-count trebuchet > 0)
)
)
)
=>
(set-goal siege-available YES)
)
(defrule
(goal siege-available NO)
(goal 1 10)
(unit-type-count cannon-galleon > 1)
=>
(set-goal siege-available YES)
)
(defrule
(goal soldiers-available NO)
(or
(or
(unit-type-count militiaman-line > five-percent-pop)
(unit-type-count knight-line > five-percent-pop)
)
(or
(or
(unit-type-count scout-cavalry-line > five-percent-pop)
(unit-type-count cavalry-archer-line > five-percent-pop)
)
(or
(unit-type-count archer-line > five-percent-pop)
(unit-type-count my-unique-unit-line > five-percent-pop)
)
)
)
=>
(set-goal soldiers-available YES)
)
(defrule
(goal soldiers-available YES)
(nor
(or
(unit-type-count militiaman-line > five-percent-pop)
(unit-type-count knight-line > five-percent-pop)
)
(or
(or
(unit-type-count scout-cavalry-line > five-percent-pop)
(unit-type-count cavalry-archer-line > five-percent-pop)
)
(or
(unit-type-count archer-line > five-percent-pop)
(unit-type-count my-unique-unit-line > five-percent-pop)
)
)
)
=>
(set-goal soldiers-available NO)
)
;*****************************************
;MANGONEL/ONAGER
(defrule
(goal siege-available NO)
(can-train-with-escrow mangonel-line)
(nor
(can-train mangonel-line)
(goal upgrade-conflict NOTICE)
)
=>
(release-escrow wood)
(release-escrow gold)
(train mangonel-line)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total mangonel-line < five-percent-pop)
(can-train mangonel-line)
(not (unit-available bombard-cannon) )
=>
(train mangonel-line)
)
(defrule
(goal archer-upgrades YES)
(goal soldiers-available YES)
(difficulty <= hard)
(unit-type-count-total mangonel-line < ten-percent-pop)
(can-train mangonel-line)
(research-completed ri-onager)
(or
(cc-players-building-type-count any-enemy watch-tower-line > 2)
(or
(cc-players-building-type-count any-enemy castle > 0)
(cc-players-building-type-count any-enemy town-center > 1)
)
)
(not (unit-available bombard-cannon) )
=>
(train mangonel-line)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total mangonel-line < ten-percent-pop)
(can-train siege-onager)
=>
(train siege-onager)
)
;****************************************
;RAMS
(defrule
(goal siege-available NO)
(can-train-with-escrow battering-ram-line)
(nor
(can-train battering-ram-line)
(or
(goal upgrade-conflict NOTICE)
(town-under-attack)
)
)
=>
(release-escrow wood)
(release-escrow gold)
(train battering-ram-line)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total battering-ram-line < five-percent-pop)
(can-train battering-ram-line)
(nor
(unit-available bombard-cannon)
(town-under-attack)
)
=>
(train battering-ram-line)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total battering-ram-line < ten-percent-pop)
(cc-players-building-type-count any-enemy bombard-tower == 0)
(research-completed ri-capped-ram)
(can-train battering-ram)
(or
(cc-players-building-type-count any-enemy castle > 0)
(or
(cc-players-building-type-count any-enemy town-center > 1)
(cc-players-building-type-count any-enemy watch-tower-line > 2)
)
)
(nor
(unit-available bombard-cannon)
(town-under-attack)
)
=>
(train battering-ram)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total battering-ram-line < ten-percent-pop)
(can-train siege-ram)
(not (town-under-attack) )
=>
(train siege-ram)
)
;****************************************
;BOMBARD CANNONS
(defrule
(goal siege-available NO)
(difficulty <= hard)
(can-train-with-escrow bombard-cannon)
(nor
(can-train bombard-cannon)
(or
(goal upgrade-conflict NOTICE)
(town-under-attack)
)
)
=>
(release-escrow wood)
(release-escrow gold)
(train bombard-cannon)
(chat-local-to-self "bombard")
)
(defrule
(goal soldiers-available YES)
(difficulty <= hard)
(unit-type-count-total bombard-cannon < five-percent-pop)
(can-train bombard-cannon)
(not (town-under-attack) )
=>
(train bombard-cannon)
(chat-local-to-self "bombard")
)
(defrule
(goal soldiers-available YES)
(difficulty <= hard)
(unit-type-count-total bombard-cannon < ten-percent-pop)
(can-train bombard-cannon)
(or
(soldier-count > twenty-percent-pop)
(map-type black-forest)
)
(not (town-under-attack) )
=>
(train bombard-cannon)
(chat-local-to-self "bombard")
)
;***********************
;TREBUCHETS
(defrule
(goal siege-available NO)
(can-train-with-escrow trebuchet)
(nor
(can-train trebuchet)
(or
(goal upgrade-conflict NOTICE)
(town-under-attack)
)
)
=>
(release-escrow wood)
(release-escrow gold)
(train trebuchet)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total trebuchet < 3)
(soldier-count > fifteen-percent-pop)
(can-train trebuchet)
(not (town-under-attack) )
=>
(train trebuchet)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total trebuchet < 3)
(can-train-with-escrow trebuchet)
(nor
(can-train trebuchet)
(or
(goal upgrade-conflict NOTICE)
(town-under-attack)
)
)
(or
(cc-players-building-type-count any-enemy town-center > 1)
(map-type black-forest)
)
=>
(release-escrow wood)
(release-escrow gold)
(train trebuchet)
)
(defrule
(goal soldiers-available YES)
(unit-type-count-total trebuchet < 3)
(can-train-with-escrow trebuchet)
(nor
(can-train trebuchet)
(or
(goal upgrade-conflict NOTICE)
(town-under-attack)
)
)
(or
(cc-players-building-type-count any-enemy castle > 0)
(cc-players-building-type-count any-enemy watch-tower-line > 3)
)
=>
(release-escrow wood)
(release-escrow gold)
(train trebuchet)
)
;*********************************
#load-if-not-defined DEATH-MATCH
;build superunits
(defrule
(current-age == imperial-age)
=>
(disable-timer t-ageup)
(enable-timer t-ageup 30)
(disable-self)
)
(defrule
(population < unit-max)
(timer-triggered t-ageup)
(can-train my-unique-unit-line)
=>
(train my-unique-unit-line)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(timer-triggered t-ageup)
(can-train champion)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(timer-triggered t-ageup)
(can-train paladin)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(timer-triggered t-ageup)
(can-train heavy-cavalry-archer)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(timer-triggered t-ageup)
(can-train hand-cannoneer)
=>
(train hand-cannoneer)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(timer-triggered t-ageup)
(can-train arbalest)
(or
(goal secondary-build 0)
(not (unit-available hand-cannoneer) )
)
=>
(train arbalest)
(set-goal secondary-build 1)
)
(defrule
(current-age == imperial-age)
(timer-triggered t-ageup)
=>
(disable-timer t-ageup)
(enable-timer t-ageup 30)
)
#end-if
;******************************************************
;train specialty units
(defrule
(unit-type-count-total camel-line < 1)
(can-train camel-line)
(or
(or
(cc-players-unit-type-count any-enemy knight-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy light-cavalry >= five-percent-pop)
(cc-players-unit-type-count any-enemy camel-line >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train camel-line)
)
(defrule
(unit-type-count-total camel-line < 1)
(can-train camel-line)
(or
(or
(cc-players-unit-type-count any-enemy cataphract-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy war-elephant-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy mameluke-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train camel-line)
)
(defrule
(unit-type-count-total camel-line < five-percent-pop)
(can-train camel-line)
(or
(or
(cc-players-unit-type-count any-enemy knight-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy light-cavalry >= ten-percent-pop)
(cc-players-unit-type-count any-enemy camel-line >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train camel-line)
)
(defrule
(unit-type-count-total camel-line < five-percent-pop)
(can-train camel-line)
(or
(or
(cc-players-unit-type-count any-enemy cataphract-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy war-elephant-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy mameluke-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train camel-line)
)
(defrule
(unit-type-count-total spearman-line < 1)
(can-train spearman-line)
(or
(or
(cc-players-unit-type-count any-enemy knight-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy light-cavalry >= five-percent-pop)
(cc-players-unit-type-count any-enemy camel-line >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train spearman-line)
)
(defrule
(unit-type-count-total spearman-line < 1)
(can-train spearman-line)
(or
(or
(cc-players-unit-type-count any-enemy cataphract-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy war-elephant-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy mameluke-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train spearman-line)
)
(defrule
(unit-type-count-total spearman-line < five-percent-pop)
(can-train spearman)
(or
(or
(cc-players-unit-type-count any-enemy knight-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy light-cavalry >= ten-percent-pop)
(cc-players-unit-type-count any-enemy camel-line >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train spearman)
)
(defrule
(unit-type-count-total spearman-line < five-percent-pop)
(can-train spearman-line)
(or
(or
(cc-players-unit-type-count any-enemy cataphract-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy war-elephant-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy mameluke-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train spearman-line)
)
(defrule
(unit-type-count-total skirmisher-line < 1)
(can-train skirmisher-line)
(or
(or
(cc-players-unit-type-count any-enemy archer-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy skirmisher-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy hand-cannoneer >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train skirmisher-line)
)
(defrule
(unit-type-count-total skirmisher-line < 1)
(can-train skirmisher-line)
(or
(or
(cc-players-unit-type-count any-enemy longbowman-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy chu-ko-nu-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy janissary-line >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train skirmisher-line)
)
(defrule
(unit-type-count-total skirmisher-line < five-percent-pop)
(can-train skirmisher-line)
(or
(or
(cc-players-unit-type-count any-enemy archer-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy skirmisher-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy hand-cannoneer >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train skirmisher-line)
)
(defrule
(unit-type-count-total skirmisher-line < five-percent-pop)
(can-train skirmisher-line)
(or
(or
(cc-players-unit-type-count any-enemy longbowman-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy chu-ko-nu-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy janissary-line >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train skirmisher-line)
)
(defrule
(unit-type-count-total light-cavalry < 1)
(can-train light-cavalry)
(or
(or
(cc-players-unit-type-count any-enemy archer-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy skirmisher-line >= five-percent-pop)
(cc-players-unit-type-count any-enemy monk >= five-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train light-cavalry)
)
(defrule
(unit-type-count-total light-cavalry <= five-percent-pop)
(can-train light-cavalry)
(or
(or
(cc-players-unit-type-count any-enemy archer-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
)
(or
(cc-players-unit-type-count any-enemy skirmisher-line >= ten-percent-pop)
(cc-players-unit-type-count any-enemy monk >= ten-percent-pop)
)
)
(or
(goal siege-available YES)
(town-under-attack)
)
=>
(train light-cavalry)
)
;**********************************
;monks
;decide who is to be the monk-builder par excellence.
(defrule
(goal monk-rating GOOD)
(difficulty <= moderate)
(taunt-detected any-ally 230)
=>
(set-goal monk-rating FAIR)
(acknowledge-taunt this-any-ally 230)
(disable-self)
)
(defrule
(taunt-detected any-ally 230)
(difficulty <= moderate)
(or
(goal monk-rating FAIR)
(goal monk-rating POOR)
)
=>
(set-goal monk-rating NO)
(acknowledge-taunt this-any-ally 230)
(disable-self)
)
(defrule
(goal monk-rating GOOD)
(difficulty <= moderate)
(game-time >= 600)
(player-computer any-ally)
=>
(chat-to-player-using-id every-ally 22409) ;230
(disable-self)
)
(defrule
(goal monk-rating FAIR)
(difficulty <= moderate)
(game-time >= 700)
(player-computer any-ally)
=>
(set-goal monk-rating GOOD)
(chat-to-player-using-id every-ally 22409) ;230
(disable-self)
)
(defrule
(goal siege-available YES)
(soldier-count >= five-percent-pop)
(unit-type-count-total monk < 1)
(can-train monk)
(not (goal monk-rating NO) )
=>
(train monk)
)
;make a few monks
(defrule
(goal siege-available YES)
(soldier-count > ten-percent-pop)
(difficulty <= moderate)
(unit-type-count-total monk < five-percent-pop)
(or
(goal monk-rating GOOD)
(and
(goal monk-rating FAIR)
(gold-amount >= 300)
)
)
(can-train monk)
=>
(train monk)
)
;make more monks
(defrule
(goal siege-available YES)
(soldier-count > ten-percent-pop)
(current-age == imperial-age)
(difficulty <= moderate)
(unit-type-count-total monk < ten-percent-pop)
(or
(goal monk-rating GOOD)
(and
(goal monk-rating FAIR)
(gold-amount >= 300)
)
)
(can-train monk)
=>
(train monk)
)
;if we have lots of gold, build monks sans restraint
(defrule
(goal siege-available YES)
(goal monk-rating GOOD)
(difficulty <= moderate)
(soldier-count > ten-percent-pop)
(gold-amount >= 300)
(unit-type-count-total monk < fifteen-percent-pop)
(can-train monk)
=>
(train monk)
)
;************************************************
#load-if-defined DIFFICULTY-EASIEST
#load-if-not-defined TEAMS-LOCKED
(defrule
(true)
=>
(set-stance every-human neutral)
(set-stance every-computer neutral)
(disable-self)
)
(defrule
(cc-players-building-type-count any-human market > 0)
=>
(generate-random-number 2)
(set-goal personality 50)
(disable-self)
)
(defrule
(goal personality 50)
(random-number == 1)
=>
(enable-timer t-chathelp 10)
(set-goal personality 4)
(disable-self)
)
(defrule
(goal personality 50)
=>
(set-goal personality 0)
(disable-self)
)
(defrule
(goal personality 4)
(taunt-detected any-computer 218)
=>
(set-goal personality 0)
(acknowledge-taunt this-any-computer 218)
(disable-timer t-chathelp)
(disable-self)
)
(defrule
(goal personality 4)
(timer-triggered t-chathelp)
=>
(set-goal personality ALLY)
(disable-timer t-chathelp)
(set-stance every-human neutral)
(set-stance every-computer neutral)
(chat-to-player-using-id every-human 22000)
;"Send me 100 resources and I shall join thine side."
(chat-to-player-using-id every-computer 22400) ;218
(disable-self)
)
(defrule
(goal personality ALLY)
(or
(or
(players-tribute any-human-neutral wood >= 100)
(players-tribute any-human-neutral food >= 100)
)
(or
(players-tribute any-human-neutral gold >= 100)
(players-tribute any-human-neutral stone >= 100)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22002)
(chat-to-player-using-id this-any-human-neutral 22003)
;"I am grateful for thy tribute."
;"Let us be friends henceforth!"
(set-stance this-any-human-neutral ally)
(set-stance every-computer enemy)
(disable-self)
)
#end-if
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 10)
(set-strategic-number sn-easiest-reaction-percentage 20)
(set-difficulty-parameter ability-to-maintain-distance 100)
(set-difficulty-parameter ability-to-dodge-missiles 100)
(disable-self)
)
;crude age advancement rules
(defrule
(goal age-advancement NO)
(players-current-age every-human >= feudal-age)
(can-research-with-escrow feudal-age)
=>
(release-escrow food)
(research feudal-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 300)
)
(defrule
(current-age == feudal-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NO)
(players-current-age every-human >= castle-age)
(can-research-with-escrow castle-age)
=>
(release-escrow food)
(release-escrow gold)
(research castle-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 300)
)
(defrule
(current-age == castle-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NOTICE)
(current-age < castle-age)
(timer-triggered t-ageup)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-EASY
(load "petersen tower")
#load-if-not-defined TEAMS-LOCKED
(defrule
(cc-players-building-type-count any-human market > 0)
=>
(generate-random-number 2)
(set-goal personality 50)
(disable-self)
)
(defrule
(goal personality 50)
(random-number == 1)
=>
(enable-timer t-chathelp 10)
(set-goal personality 4)
(disable-self)
)
(defrule
(goal personality 50)
=>
(set-goal personality 0)
(disable-self)
)
(defrule
(goal personality 4)
(taunt-detected any-computer 218)
=>
(set-goal personality 0)
(acknowledge-taunt this-any-computer 218)
(disable-timer t-chathelp)
(disable-self)
)
(defrule
(goal personality 4)
(timer-triggered t-chathelp)
=>
(set-goal personality ALLY)
(set-stance every-human neutral)
(set-stance every-computer neutral)
(chat-to-player-using-id every-computer 22400) ;218
(disable-timer t-chathelp)
(disable-timer t-chat)
(enable-timer t-chat 600)
(disable-self)
)
(defrule
(goal personality ALLY)
(starting-resources == low-resources)
=>
(chat-to-player-using-id every-human 22004)
(chat-to-player-using-id every-human 22005)
;"Send me 200 each of wood, food, gold, and stone!"
;"If thou dost this thing, I shall join thine side."
(disable-self)
)
(defrule
(goal personality ALLY)
(starting-resources == medium-resources)
=>
(chat-to-player-using-id every-human 22006)
(chat-to-player-using-id every-human 22005)
;"Send me 500 each of wood, food, gold, and stone!"
;"If thou dost this thing, I shall join thine side."
(disable-self)
)
(defrule
(goal personality ALLY)
(starting-resources == high-resources)
(stance-toward any-human neutral)
=>
(chat-to-player-using-id every-human 22007)
(chat-to-player-using-id every-human 22005)
;"Send me 1000 each of wood, food, gold, and stone!"
;"If thou dost this thing, I shall join thine side."
(disable-self)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral wood < 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral wood < 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral wood < 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22008)
;"Thou must send me more wood!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral food < 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral food < 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral food < 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22009)
;"Thou must send me more food!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral gold < 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral gold < 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral gold < 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22010)
;"Thou must send me more gold!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral stone < 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral stone < 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral stone < 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22011)
;"Thou must send me more stone!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral wood >= 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral wood >= 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral wood >= 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22012)
;"Thank thee for the wood! It is enough."
(disable-self)
)
(defrule
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral food >= 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral food >= 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral food >= 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22013)
;"Thank thee for the food! It is enough."
(disable-self)
)
(defrule
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral gold >= 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral gold >= 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral gold >= 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22014)
;"Thank thee for the gold! It is enough."
(disable-self)
)
(defrule
(goal personality ALLY)
(or
(and
(starting-resources == low-resources)
(players-tribute any-human-neutral stone >= 200)
)
(or
(and
(starting-resources == medium-resources)
(players-tribute any-human-neutral stone >= 500)
)
(and
(starting-resources == high-resources)
(players-tribute any-human-neutral stone >= 1000)
)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22015)
;"Thank thee for the stone! It is enough."
(disable-self)
)
(defrule
(goal personality ALLY)
(starting-resources == low-resources)
(players-tribute any-human-neutral wood >= 200)
(players-tribute any-human-neutral food >= 200)
(players-tribute any-human-neutral gold >= 200)
(players-tribute any-human-neutral stone >= 200)
=>
(chat-to-player-using-id this-any-human-neutral 22016)
(chat-to-player-using-id this-any-human-neutral 22017)
;"The goods we have obtained from thee are glorious indeed!"
;"Set thine stance to Ally with me!"
(enable-timer t-chatmore 60)
(set-goal 35 NOTICE)
(disable-self)
)
(defrule
(goal personality ALLY)
(starting-resources == medium-resources)
(players-tribute any-human-neutral wood >= 500)
(players-tribute any-human-neutral food >= 500)
(players-tribute any-human-neutral gold >= 500)
(players-tribute any-human-neutral stone >= 500)
=>
(chat-to-player-using-id this-any-human-neutral 22016)
(chat-to-player-using-id this-any-human-neutral 22017)
;"The goods we have obtained from thee are glorious indeed!"
;"Set thine stance to Ally with me!"
(enable-timer t-chatmore 60)
(set-goal 35 NOTICE)
(disable-self)
)
(defrule
(goal personality ALLY)
(starting-resources == high-resources)
(players-tribute any-human-neutral wood >= 1000)
(players-tribute any-human-neutral food >= 1000)
(players-tribute any-human-neutral gold >= 1000)
(players-tribute any-human-neutral stone >= 1000)
=>
(chat-to-player-using-id this-any-human-neutral 22016)
(chat-to-player-using-id this-any-human-neutral 22017)
;"The goods we have obtained from thee are glorious indeed!"
;"Set thine stance to Ally with me!"
(enable-timer t-chatmore 60)
(set-goal 35 NOTICE)
(disable-self)
)
(defrule
(not (goal 35 0) )
(players-stance any-human-neutral ally)
=>
(chat-to-player-using-id this-any-human-neutral 22003)
;"Let us be friends henceforth!"
(set-stance this-any-human-neutral ally)
(set-stance every-computer enemy)
(disable-timer t-chatmore)
(set-goal personality 0)
(set-goal 35 0)
(disable-self)
)
(defrule
(goal 35 NOTICE)
(timer-triggered t-chatmore)
(or
(players-stance any-human-neutral neutral)
(players-stance any-human-neutral enemy)
)
=>
(chat-to-player-using-id this-any-human-neutral 22018)
(chat-to-player-using-id this-any-human-neutral 22019)
;"Thou must to set thine diplomatic"
;"stance towards me to Ally!"
(disable-timer t-chatmore)
(enable-timer t-chatmore 60)
(set-goal 35 98)
(disable-self)
)
(defrule
(goal 35 98)
(timer-triggered t-chatmore)
(or
(players-stance any-human-neutral neutral)
(players-stance any-human-neutral enemy)
)
=>
(chat-to-player-using-id this-any-human-neutral 22020)
(chat-to-player-using-id this-any-human-neutral 22021)
(chat-to-player-using-id this-any-human-neutral 22022)
;"This is thy last warning."
;"Set thine stance to Ally with me,"
;"as I shall do for thee."
(disable-timer t-chatmore)
(enable-timer t-chatmore 60)
(set-goal 35 97)
(disable-self)
)
(defrule
(goal 35 97)
(timer-triggered t-chatmore)
(or
(players-stance any-human-neutral neutral)
(players-stance any-human-neutral enemy)
)
=>
(disable-timer t-chatmore)
(set-goal 35 96)
(disable-self)
)
(defrule
(game-time >= 3600)
(goal personality ALLY)
=>
(set-goal personality 0)
(set-goal 35 96)
(disable-self)
)
(defrule
(goal 35 96)
(stance-toward any-human neutral)
=>
(chat-to-player-using-id this-any-human-neutral 22023)
(chat-to-player-using-id this-any-human-neutral 22024)
;"Thou hast taken far too long to do that simple task."
;"Now we must be foes!"
(disable-timer t-chat)
(set-stance this-any-human enemy)
(set-stance every-computer ally)
)
#end-if
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 25)
(set-strategic-number sn-easier-reaction-percentage 20)
(set-strategic-number sn-hits-before-alliance-change 50)
(set-difficulty-parameter ability-to-maintain-distance 75)
(set-difficulty-parameter ability-to-dodge-missiles 75)
(disable-self)
)
;crude age advancement rules
(defrule
(goal age-advancement NO)
(players-current-age every-human >= feudal-age)
(can-research-with-escrow feudal-age)
=>
(release-escrow food)
(research feudal-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 300)
)
(defrule
(current-age == feudal-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NO)
(players-current-age every-human >= castle-age)
(can-research-with-escrow castle-age)
=>
(release-escrow food)
(release-escrow gold)
(research castle-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 300)
)
(defrule
(current-age == castle-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NO)
(players-current-age every-human == imperial-age)
(can-research-with-escrow imperial-age)
=>
(release-escrow food)
(release-escrow gold)
(research imperial-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 300)
)
(defrule
(current-age == imperial-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NOTICE)
(current-age < imperial-age)
(timer-triggered t-ageup)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-MODERATE
(load "petersen diplomacy")
(load "petersen market")
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 75)
(set-strategic-number sn-hits-before-alliance-change 25)
(set-difficulty-parameter ability-to-maintain-distance 50)
(set-difficulty-parameter ability-to-dodge-missiles 50)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARD
(load "petersen diplomacy")
(load "petersen market")
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 99)
(set-strategic-number sn-hits-before-alliance-change 10)
(set-difficulty-parameter ability-to-maintain-distance 0)
(set-difficulty-parameter ability-to-dodge-missiles 0)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARDEST
(load "petersen diplomacy")
(load "petersen market")
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 99)
(set-strategic-number sn-hits-before-alliance-change 10)
(set-difficulty-parameter ability-to-maintain-distance 0)
(set-difficulty-parameter ability-to-dodge-missiles 0)
(disable-self)
)
(defrule
(current-age == imperial-age)
=>
(enable-timer t-chatmore 1800)
(disable-self)
)
(defrule
(timer-triggered t-chatmore)
=>
(cc-add-resource wood 500)
(cc-add-resource food 500)
(cc-add-resource gold 500)
(cc-add-resource stone 500)
(disable-timer t-chatmore)
(enable-timer t-chatmore 1200)
)
#end-if
(defrule
(timer-triggered t-production)
=>
(generate-random-number 3)
)
(defrule
(timer-triggered t-production)
(or
(goal military-parity NO)
(random-number == 1)
)
=>
(set-goal combat-supp UNIT20)
)
;************************
(defrule
(timer-triggered t-production)
=>
(generate-random-number 12)
)
;feudal-age
(defrule
(goal combat-supp UNIT20)
(current-age == feudal-age)
(timer-triggered t-production)
(random-number <= 5)
(or
(or
(goal combat-arm INFANTRY)
(goal combat-arm CAVALRY)
)
(goal pre-unique-arm INFANTRY)
)
=>
(set-goal combat-supp ARCHER)
)
(defrule
(goal combat-supp UNIT20)
(current-age == feudal-age)
(timer-triggered t-production)
(random-number >= 6)
(random-number <= 10)
(or
(or
(goal combat-arm CAVARCHER)
(goal combat-arm ARCHER)
)
(goal pre-unique-arm ARCHER)
)
=>
(set-goal combat-supp INFANTRY)
)
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(current-age == feudal-age)
(timer-triggered t-production)
(random-number == 11)
=>
(set-goal combat-supp INFANTRY)
)
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(current-age == feudal-age)
(timer-triggered t-production)
(random-number == 12)
=>
(set-goal combat-supp ARCHER)
)
;castle-age & higher
;if Infantry is the main build
(defrule
(goal combat-arm INFANTRY)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 1)
=>
(set-goal combat-supp CAVALRY)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 1)
(building-type-count castle > 0)
(or
(or
(civ-selected celtic)
(civ-selected frankish)
)
(or
(or
(civ-selected gothic)
(civ-selected japanese)
)
(or
(civ-selected teutonic)
(civ-selected viking)
)
)
)
=>
(set-goal combat-supp CAVALRY)
)
(defrule
(goal combat-arm INFANTRY)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 3)
=>
(set-goal combat-supp LIGHTCAV)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 3)
(building-type-count castle > 0)
(or
(or
(civ-selected celtic)
(civ-selected frankish)
)
(or
(or
(civ-selected gothic)
(civ-selected japanese)
)
(or
(civ-selected teutonic)
(civ-selected viking)
)
)
)
=>
(set-goal combat-supp LIGHTCAV)
)
(defrule
(goal combat-arm INFANTRY)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 6)
=>
(set-goal combat-supp CAVARCHER)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 6)
(building-type-count castle > 0)
(or
(or
(civ-selected celtic)
(civ-selected frankish)
)
(or
(or
(civ-selected gothic)
(civ-selected japanese)
)
(or
(civ-selected teutonic)
(civ-selected viking)
)
)
)
=>
(set-goal combat-supp CAVARCHER)
)
(defrule
(goal combat-arm INFANTRY)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 10)
=>
(set-goal combat-supp ARCHER)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 10)
(building-type-count castle > 0)
(or
(or
(civ-selected celtic)
(civ-selected frankish)
)
(or
(or
(civ-selected gothic)
(civ-selected japanese)
)
(or
(civ-selected teutonic)
(civ-selected viking)
)
)
)
=>
(set-goal combat-supp ARCHER)
)
(defrule
(goal combat-arm INFANTRY)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 12)
=>
(set-goal combat-supp SCORPION)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 12)
(building-type-count castle > 0)
(or
(or
(civ-selected celtic)
(civ-selected frankish)
)
(or
(or
(civ-selected gothic)
(civ-selected japanese)
)
(or
(civ-selected teutonic)
(civ-selected viking)
)
)
)
=>
(set-goal combat-supp SCORPION)
)
;if Cavalry is the main build
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 2)
(or
(goal combat-arm CAVALRY)
(and
(building-type-count castle > 0)
(or
(civ-selected byzantine)
(or
(civ-selected persian)
(civ-selected saracen)
)
)
)
)
=>
(set-goal combat-supp INFANTRY)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 9)
(or
(goal combat-arm CAVALRY)
(and
(building-type-count castle > 0)
(or
(civ-selected byzantine)
(or
(civ-selected persian)
(civ-selected saracen)
)
)
)
)
=>
(set-goal combat-supp CAVARCHER)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 11)
(or
(goal combat-arm CAVALRY)
(and
(building-type-count castle > 0)
(or
(civ-selected byzantine)
(or
(civ-selected persian)
(civ-selected saracen)
)
)
)
)
=>
(set-goal combat-supp ARCHER)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 12)
(or
(goal combat-arm CAVALRY)
(and
(building-type-count castle > 0)
(or
(civ-selected byzantine)
(or
(civ-selected persian)
(civ-selected saracen)
)
)
)
)
=>
(set-goal combat-supp SCORPION)
)
;if Light Cav is the main build
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 1)
=>
(set-goal combat-supp INFANTRY)
)
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 6)
=>
(set-goal combat-supp CAVALRY)
)
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 10)
=>
(set-goal combat-supp CAVARCHER)
)
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 11)
=>
(set-goal combat-supp ARCHER)
)
(defrule
(goal combat-arm LIGHTCAV)
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 12)
=>
(set-goal combat-supp SCORPION)
)
;if Cav Archers are the main build
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 4)
(or
(goal combat-arm CAVARCHER)
(and
(building-type-count castle > 0)
(civ-selected mongol)
)
)
=>
(set-goal combat-supp INFANTRY)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 8)
(or
(goal combat-arm CAVARCHER)
(and
(building-type-count castle > 0)
(civ-selected mongol)
)
)
=>
(set-goal combat-supp CAVALRY)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 12)
(or
(goal combat-arm CAVARCHER)
(and
(building-type-count castle > 0)
(civ-selected mongol)
)
)
=>
(set-goal combat-supp LIGHTCAV)
)
;if Archers are the main build
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 4)
(or
(goal combat-arm ARCHER)
(and
(building-type-count castle > 0)
(or
(or
(civ-selected briton)
(civ-selected chinese)
)
(or
(civ-selected mongol)
(civ-selected turkish)
)
)
)
)
=>
(set-goal combat-supp INFANTRY)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 7)
(or
(goal combat-arm ARCHER)
(and
(building-type-count castle > 0)
(or
(or
(civ-selected briton)
(civ-selected chinese)
)
(or
(civ-selected mongol)
(civ-selected turkish)
)
)
)
)
=>
(set-goal combat-supp CAVALRY)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number <= 11)
(or
(goal combat-arm ARCHER)
(and
(building-type-count castle > 0)
(or
(or
(civ-selected briton)
(civ-selected chinese)
)
(or
(civ-selected mongol)
(civ-selected turkish)
)
)
)
)
=>
(set-goal combat-supp LIGHTCAV)
)
(defrule
(goal combat-supp UNIT20)
(timer-triggered t-production)
(random-number == 12)
(or
(goal combat-arm ARCHER)
(and
(building-type-count castle > 0)
(or
(or
(civ-selected briton)
(civ-selected chinese)
)
(or
(civ-selected mongol)
(civ-selected turkish)
)
)
)
)
=>
(set-goal combat-supp SCORPION)
)
;periodically check how we're doing!
(defrule
(timer-triggered t-production)
=>
(disable-timer t-production)
(enable-timer t-production 300)
)
;*******************************************************
;INFANTRY ARMY
(defrule
(soldier-count < ten-percent-pop)
(building-type-count stable == 0)
(building-type-count archery-range == 0)
(building-type-count castle == 0)
(players-military-population any-enemy >= ten-percent-pop)
(can-train militiaman)
=>
(train militiaman)
(chat-local-to-self "emergency militia")
)
(defrule
(goal rush-control RUSHING)
(soldier-count < ten-percent-pop)
(can-train-with-escrow militiaman-line)
(nor
(can-train militiaman-line)
(goal upgrade-conflict NOTICE)
)
(or
(goal combat-arm INFANTRY)
(goal pre-unique-arm INFANTRY)
)
=>
(release-escrow food)
(release-escrow gold)
(train militiaman-line)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(can-train militiaman-line)
(or
(goal combat-arm INFANTRY)
(goal pre-unique-arm INFANTRY)
)
=>
(train militiaman-line)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 0)
(goal combat-supp INFANTRY)
(population < unit-max)
(can-train militiaman-line)
=>
(train militiaman-line)
(set-goal secondary-build 1)
)
;********************************************************************
;CAVALRY ARMY == goal combat-arm CAVALRY & goal combat-supp CAVALRY
(defrule
(goal rush-control RUSHING)
(current-age < castle-age)
(soldier-count < ten-percent-pop)
(can-train-with-escrow militiaman-line)
(nor
(can-train militiaman-line)
(goal upgrade-conflict NOTICE)
)
(or
(goal combat-arm CAVALRY)
(goal pre-unique-arm CAVALRY)
)
=>
(release-escrow food)
(release-escrow gold)
(train militiaman-line)
(set-goal secondary-build 0)
)
(defrule
(goal rush-control RUSHING)
(soldier-count < ten-percent-pop)
(can-train-with-escrow knight-line)
(nor
(can-train knight-line)
(goal upgrade-conflict NOTICE)
)
(or
(goal combat-arm CAVALRY)
(goal pre-unique-arm CAVALRY)
)
=>
(release-escrow food)
(release-escrow gold)
(train knight-line)
(set-goal secondary-build 0)
)
(defrule
(current-age == feudal-age)
(soldier-count < twenty-percent-pop)
(players-military-population any-enemy >= ten-percent-pop)
(or
(goal combat-arm CAVALRY)
(goal pre-unique-arm CAVALRY)
)
(can-train militiaman-line)
=>
(train militiaman-line)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(can-train knight-line)
(or
(goal combat-arm CAVALRY)
(goal pre-unique-arm CAVALRY)
)
=>
(train knight-line)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 0)
(goal combat-supp CAVALRY)
(population < unit-max)
(can-train knight-line)
=>
(train knight-line)
(set-goal secondary-build 1)
)
;********************************************************************
;LIGHT CAV ARMY == goal combat-arm LIGHTCAV & goal combat-supp LIGHTCAV
(defrule
(goal rush-control RUSHING)
(goal combat-arm LIGHTCAV)
(soldier-count < ten-percent-pop)
(can-train-with-escrow scout-cavalry-line)
(nor
(can-train scout-cavalry-line)
(goal upgrade-conflict NOTICE)
)
=>
(release-escrow food)
(train scout-cavalry-line)
(set-goal secondary-build 0)
)
(defrule
(goal combat-arm LIGHTCAV)
(population < unit-max)
(can-train light-cavalry)
(or
(current-age == castle-age)
(not (can-afford-unit knight-line) )
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal combat-arm LIGHTCAV)
(current-age == imperial-age)
(population < unit-max)
(can-train knight-line)
=>
(train knight-line)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 0)
(population < unit-max)
(can-train light-cavalry)
(or
(goal combat-supp LIGHTCAV)
(and
(goal combat-arm LIGHTCAV)
(current-age == imperial-age)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 1)
)
;********************************************************************
;CAV ARCHER ARMY == goal combat-arm CAVARCHER & goal combat-supp CAVARCHER
(defrule
(goal rush-control RUSHING)
(current-age == feudal-age)
(soldier-count < ten-percent-pop)
(can-train-with-escrow archer)
(nor
(can-train archer)
(goal upgrade-conflict NOTICE)
)
(or
(goal combat-arm CAVARCHER)
(goal pre-unique-arm CAVARCHER)
)
=>
(release-escrow wood)
(release-escrow gold)
(train archer)
(set-goal secondary-build 0)
)
(defrule
(goal rush-control RUSHING)
(soldier-count < ten-percent-pop)
(can-train-with-escrow cavalry-archer-line)
(nor
(can-train cavalry-archer-line)
(goal upgrade-conflict NOTICE)
)
(or
(goal combat-arm CAVARCHER)
(goal pre-unique-arm CAVARCHER)
)
=>
(release-escrow wood)
(release-escrow gold)
(train cavalry-archer-line)
(set-goal secondary-build 0)
)
(defrule
(current-age == feudal-age)
(soldier-count < twenty-percent-pop)
(can-train-with-escrow archer-line)
(not (can-train archer-line) )
(or
(goal rush-control RUSHING)
(players-military-population any-enemy >= ten-percent-pop)
)
(or
(goal combat-arm CAVARCHER)
(goal pre-unique-arm CAVARCHER)
)
=>
(train archer-line)
(set-goal secondary-build 0)
)
(defrule
(current-age == feudal-age)
(soldier-count < twenty-percent-pop)
(can-train-with-escrow archer-line)
(not (can-train archer-line) )
(or
(goal rush-control RUSHING)
(players-military-population any-enemy >= ten-percent-pop)
)
(or
(goal combat-arm CAVARCHER)
(goal pre-unique-arm CAVARCHER)
)
=>
(train archer-line)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(can-train cavalry-archer-line)
(or
(goal combat-arm CAVARCHER)
(goal pre-unique-arm CAVARCHER)
)
=>
(train cavalry-archer-line)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 0)
(goal combat-supp CAVARCHER)
(population < unit-max)
(can-train cavalry-archer-line)
=>
(train cavalry-archer-line)
(set-goal secondary-build 1)
)
;*******************************************************
;HAND-CANNONEERS
(defrule
(population < unit-max)
(can-train hand-cannoneer)
(or
(goal combat-arm ARCHER)
(goal pre-unique-arm ARCHER)
)
=>
(train hand-cannoneer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 0)
(goal combat-supp ARCHER)
(population < unit-max)
(can-train hand-cannoneer)
=>
(train hand-cannoneer)
(set-goal secondary-build 1)
)
;*******************************************************
;ARCHER ARMY == goal combat-arm ARCHER & goal combat-supp ARCHER
(defrule
(goal rush-control RUSHING)
(soldier-count < ten-percent-pop)
(can-train-with-escrow archer-line)
(nor
(can-train archer)
(goal upgrade-conflict NOTICE)
)
(or
(goal combat-arm ARCHER)
(goal pre-unique-arm ARCHER)
)
=>
(release-escrow wood)
(release-escrow gold)
(train archer-line)
(set-goal secondary-build 0)
)
(defrule
(population < unit-max)
(can-train archer-line)
(not (unit-available hand-cannoneer) )
(or
(goal combat-arm ARCHER)
(goal pre-unique-arm ARCHER)
)
=>
(train archer-line)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 0)
(goal combat-supp ARCHER)
(population < unit-max)
(can-train archer-line)
=>
(train archer-line)
(set-goal secondary-build 1)
)
;*******************************************************
;SCORPION SUPPORT == goal combat-supp SCORPION
(defrule
(goal secondary-build 0)
(goal combat-supp SCORPION)
(population < unit-max)
(can-train scorpion-line)
=>
(train scorpion-line)
(set-goal secondary-build 1)
)
(defrule
(goal secondary-build 0)
(goal combat-supp SCORPION)
(population < unit-max)
(building-type-count siege-workshop == 0)
(can-train militiaman-line)
=>
(train militiaman-line)
(set-goal secondary-build 1)
)
;*******************************************************
;UNIQUE UNITS! == goal combat-arm UNIQUE
(defrule
(goal rush-control RUSHING)
(goal combat-arm UNIQUE)
(soldier-count < ten-percent-pop)
(can-train-with-escrow my-unique-unit-line)
(nor
(can-train my-unique-unit-line)
(goal upgrade-conflict NOTICE)
)
(or
(civ-selected mongol)
(or
(civ-selected briton)
(civ-selected chinese)
)
)
=>
(release-escrow wood)
(release-escrow gold)
(train my-unique-unit-line)
(set-goal secondary-build 0)
)
(defrule
(goal rush-control RUSHING)
(goal combat-arm UNIQUE)
(soldier-count < ten-percent-pop)
(can-train-with-escrow my-unique-unit-line)
(nor
(can-train my-unique-unit-line)
(goal upgrade-conflict NOTICE)
)
(nor
(civ-selected mongol)
(or
(civ-selected briton)
(civ-selected chinese)
)
)
=>
(release-escrow food)
(release-escrow gold)
(train my-unique-unit-line)
(set-goal secondary-build 0)
)
(defrule
(goal combat-arm UNIQUE)
(population < unit-max)
(can-train my-unique-unit-line)
=>
(train my-unique-unit-line)
(set-goal secondary-build 0)
)
(defrule
(goal combat-arm UNIQUE)
(goal secondary-build 0)
(civ-selected persian)
(unit-type-count war-elephant-line < five-percent-pop)
(can-train-with-escrow war-elephant-line)
(not (goal upgrade-conflict NOTICE) )
=>
(release-escrow food)
(release-escrow gold)
(train war-elephant-line)
(set-goal secondary-build 1)
)
;**********************************
;what if we're all out of gold?
(defrule
(current-age == imperial-age)
(current-age-time > 1800)
(population < thirty-percent-pop)
(gold-amount < 100)
(can-train spearman-line)
(town-under-attack)
=>
(train spearman-line)
(set-goal secondary-build 0)
)
(defrule
(current-age == imperial-age)
(current-age-time > 1800)
(population < thirty-percent-pop)
(gold-amount < 100)
(can-train scout-cavalry-line)
(town-under-attack)
=>
(train scout-cavalry-line)
(set-goal secondary-build 0)
)
(defrule
(current-age == imperial-age)
(current-age-time > 1800)
(population < thirty-percent-pop)
(gold-amount < 100)
(can-train skirmisher-line)
(town-under-attack)
=>
(train skirmisher-line)
(set-goal secondary-build 0)
)
#load-if-defined GAME-SPEED-LOCKED
(defrule
(true)
=>
(set-goal rush-control 0)
(disable-self)
)
#else
(defrule
(true)
=>
(set-goal rush-control 0)
(disable-self)
)
#end-if
;*************************************************************
#load-if-defined POPULATION-CAP-25
(defconst civ-dark-rush 10)
(defconst civ-dark 11)
(defconst civ-feudal 12)
(defconst civ-castle 13)
(defconst pop-cap 25)
(defconst deathmatch-unit-max 13)
(defconst feudal-town-size 20)
(defconst castle-town-size 25)
(defconst imperial-town-size 25)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 19)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 19)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 21)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 23)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 23)
#end-if
(defconst five-percent-pop 1)
(defconst ten-percent-pop 3)
(defconst fifteen-percent-pop 4)
(defconst twenty-percent-pop 5)
(defconst thirty-percent-pop 8)
#end-if
;***************************
#load-if-defined POPULATION-CAP-50
(defconst civ-dark-rush 15)
(defconst civ-dark 20)
(defconst civ-feudal 25)
(defconst civ-castle 30)
(defconst pop-cap 50)
(defconst deathmatch-unit-max 25)
(defconst feudal-town-size 20)
(defconst castle-town-size 25)
(defconst imperial-town-size 30)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 35)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 35)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 40)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 45)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 45)
#end-if
(defconst five-percent-pop 2)
(defconst ten-percent-pop 5)
(defconst fifteen-percent-pop 7)
(defconst twenty-percent-pop 10)
(defconst thirty-percent-pop 15)
#end-if
;***************************
#load-if-defined POPULATION-CAP-75
(defconst civ-dark-rush 20)
(defconst civ-dark 25)
(defconst civ-feudal 30)
(defconst civ-castle 35)
(defconst pop-cap 75)
(defconst deathmatch-unit-max 55)
(defconst feudal-town-size 20)
(defconst castle-town-size 30)
(defconst imperial-town-size 30)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 56)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 56)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 63)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 70)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 70)
#end-if
(defconst five-percent-pop 3)
(defconst ten-percent-pop 8)
(defconst fifteen-percent-pop 10)
(defconst twenty-percent-pop 15)
(defconst thirty-percent-pop 23)
#end-if
;***************************
#load-if-defined POPULATION-CAP-100
(defconst civ-dark-rush 20)
(defconst civ-dark 25)
(defconst civ-feudal 30)
(defconst civ-castle 40)
(defconst pop-cap 100)
(defconst deathmatch-unit-max 70)
(defconst feudal-town-size 20)
(defconst castle-town-size 30)
(defconst imperial-town-size 35)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 70)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 70)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 80)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 90)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 90)
#end-if
(defconst five-percent-pop 5)
(defconst ten-percent-pop 10)
(defconst fifteen-percent-pop 15)
(defconst twenty-percent-pop 20)
(defconst thirty-percent-pop 30)
#end-if
;***************************
#load-if-defined POPULATION-CAP-125
(defconst civ-dark-rush 20)
(defconst civ-dark 25)
(defconst civ-feudal 30)
(defconst civ-castle 45)
(defconst pop-cap 125)
(defconst deathmatch-unit-max 95)
(defconst feudal-town-size 20)
(defconst castle-town-size 35)
(defconst imperial-town-size 40)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 90)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 90)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 103)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 115)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 115)
#end-if
(defconst five-percent-pop 6)
(defconst ten-percent-pop 13)
(defconst fifteen-percent-pop 18)
(defconst twenty-percent-pop 25)
(defconst thirty-percent-pop 38)
#end-if
;***************************
#load-if-defined POPULATION-CAP-150
(defconst civ-dark-rush 20)
(defconst civ-dark 25)
(defconst civ-feudal 30)
(defconst civ-castle 50)
(defconst pop-cap 150)
(defconst deathmatch-unit-max 120)
(defconst feudal-town-size 20)
(defconst castle-town-size 35)
(defconst imperial-town-size 40)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 110)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 110)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 125)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 140)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 140)
#end-if
(defconst five-percent-pop 7)
(defconst ten-percent-pop 15)
(defconst fifteen-percent-pop 22)
(defconst twenty-percent-pop 30)
(defconst thirty-percent-pop 45)
#end-if
;***************************
#load-if-defined POPULATION-CAP-175
(defconst civ-dark-rush 20)
(defconst civ-dark 25)
(defconst civ-feudal 30)
(defconst civ-castle 55)
(defconst pop-cap 175)
(defconst deathmatch-unit-max 145)
(defconst feudal-town-size 20)
(defconst castle-town-size 35)
(defconst imperial-town-size 40)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 125)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 125)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 145)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 165)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 165)
#end-if
(defconst five-percent-pop 8)
(defconst ten-percent-pop 18)
(defconst fifteen-percent-pop 27)
(defconst twenty-percent-pop 35)
(defconst thirty-percent-pop 53)
#end-if
;***************************
#load-if-defined POPULATION-CAP-200
(defconst civ-dark-rush 20)
(defconst civ-dark 25)
(defconst civ-feudal 30)
(defconst civ-castle 60)
(defconst pop-cap 200)
(defconst deathmatch-unit-max 170)
(defconst feudal-town-size 20)
(defconst castle-town-size 35)
(defconst imperial-town-size 40)
#load-if-defined DIFFICULTY-EASIEST
(defconst unit-max 130)
#end-if
#load-if-defined DIFFICULTY-EASY
(defconst unit-max 130)
#end-if
#load-if-defined DIFFICULTY-MODERATE
(defconst unit-max 160)
#end-if
#load-if-defined DIFFICULTY-HARD
(defconst unit-max 190)
#end-if
#load-if-defined DIFFICULTY-HARDEST
(defconst unit-max 190)
#end-if
(defconst five-percent-pop 10)
(defconst ten-percent-pop 20)
(defconst fifteen-percent-pop 30)
(defconst twenty-percent-pop 40)
(defconst thirty-percent-pop 60)
#end-if
;*************************************************************
;*************************************************************
#load-if-defined TINY-MAP
(defconst town-center-count 2)
(defconst feudal-mill-count 1)
(defconst castle-mill-count 1)
(defconst imperial-mill-count 1)
(defconst mining-count 8)
#end-if
;**************************
#load-if-defined SMALL-MAP
(defconst town-center-count 2)
(defconst feudal-mill-count 1)
(defconst castle-mill-count 1)
(defconst imperial-mill-count 1)
(defconst mining-count 8)
#end-if
;**************************
#load-if-defined MEDIUM-MAP
(defconst town-center-count 2)
(defconst feudal-mill-count 1)
(defconst castle-mill-count 1)
(defconst imperial-mill-count 1)
(defconst mining-count 10)
#end-if
;**************************
#load-if-defined NORMAL-MAP
(defconst town-center-count 3)
(defconst feudal-mill-count 1)
(defconst castle-mill-count 1)
(defconst imperial-mill-count 2)
(defconst mining-count 11)
#end-if
;**************************
#load-if-defined LARGE-MAP
(defconst town-center-count 3)
(defconst feudal-mill-count 1)
(defconst castle-mill-count 2)
(defconst imperial-mill-count 3)
(defconst mining-count 12)
#end-if
;**************************
#load-if-defined GIANT-MAP
(defconst town-center-count 4)
(defconst feudal-mill-count 2)
(defconst castle-mill-count 3)
(defconst imperial-mill-count 4)
(defconst mining-count 15)
#end-if
;*************************************************************
(defrule
(not (map-type highland) )
=>
(set-strategic-number sn-minimum-water-body-size-for-dock 3000)
(disable-self)
)
;*************************************************************
#load-if-defined SCENARIO-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(set-goal 1 1)
(set-goal 2 0)
(chat-to-all-using-id 22145)
(chat-to-all-using-id 22146)
;"If this is an all-land or an island map, then please"
;"rework thy AI script accordingly."
(disable-self)
)
#end-if
;*******************************
#load-if-defined ARCHIPELAGO-MAP
(load "petersen fishboat")
(load "petersen warboat island")
(defrule
(true)
=>
(chat-local-to-self "detecting ocean map!")
(set-goal 1 10)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined ISLANDS-MAP
(load "petersen fishboat")
(load "petersen warboat island")
(defrule
(true)
=>
(chat-local-to-self "detecting ocean map!")
(set-goal 1 10)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined MIGRATION-MAP
(load "petersen fishboat")
(load "petersen warboat island")
(defrule
(true)
=>
(chat-local-to-self "detecting ocean map!")
(set-goal 1 10)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined TEAM-ISLANDS-MAP
(load "petersen fishboat")
(load "petersen warboat island")
(defrule
(true)
=>
(chat-local-to-self "detecting ocean map!")
(set-goal 1 10)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined BALTIC-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(chat-local-to-self "detecting water map!")
(set-goal 1 1)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined COASTAL-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(chat-local-to-self "detecting water map!")
(set-goal 1 1)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined CONTINENTAL-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(chat-local-to-self "detecting water map!")
(set-goal 1 1)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined CRATER-LAKE-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(chat-local-to-self "detecting water map!")
(set-goal 1 1)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined MEDITERRANEAN-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(chat-local-to-self "detecting water map!")
(set-goal 1 1)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined RIVERS-MAP
(load "petersen fishboat")
(load "petersen warboat")
(defrule
(true)
=>
(chat-local-to-self "detecting water map!")
(set-goal 1 1)
(set-goal 2 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined ARABIA-MAP
(defrule
(true)
=>
(chat-local-to-self "detecting land map!")
(set-goal 1 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined BLACK-FOREST-MAP
(defrule
(true)
=>
(chat-local-to-self "detecting land map!")
(set-goal 1 0)
(disable-self)
)
(defrule
(difficulty <= hard)
(unit-type-count-total bombard-cannon < five-percent-pop)
(can-train-with-escrow bombard-cannon)
(not (goal upgrade-conflict NOTICE) )
=>
(release-escrow wood)
(release-escrow gold)
(train bombard-cannon)
(chat-local-to-self "bombard")
)
#end-if
;*******************************
#load-if-defined FORTRESS-MAP
(defrule
(true)
=>
(chat-local-to-self "detecting land map!")
(set-goal 1 0)
(disable-self)
)
#end-if
;*******************************
#load-if-defined GOLD-RUSH-MAP
(defrule
(true)
=>
(chat-local-to-self "detecting land map!")
(set-goal 1 0)
(disable-self)
)
(defrule
(current-age >= feudal-age)
(not (strategic-number sn-maximum-town-size == imperial-town-size) )
=>
(set-strategic-number sn-maximum-town-size imperial-town-size)
)
#end-if
;*******************************
#load-if-defined HIGHLAND-MAP
(defrule
(true)
=>
(chat-local-to-self "detecting land map!")
(set-goal 1 0)
(disable-self)
)
(defrule
(current-age == imperial-age)
(building-type-count-total dock == 0)
(wood-amount > 400)
(or
(cc-players-building-type-count any-enemy fortified-wall > 0)
(cc-players-building-type-count any-enemy stone-wall > 0)
)
(can-build dock)
=>
(build dock)
)
(defrule
(current-age == imperial-age)
(unit-type-count-total transport-ship == 0)
(or
(cc-players-building-type-count any-enemy fortified-wall > 0)
(cc-players-building-type-count any-enemy stone-wall > 0)
)
(can-train transport-ship)
=>
(train transport-ship)
)
#end-if
;*************************************************************
#load-if-defined REGICIDE
(defrule
(building-type-count-total castle == 0)
(not (goal castle-attempt YES) )
=>
(set-goal castle-attempt YES)
)
(defrule
(current-age < imperial-age)
(not (goal rush-control 4) )
=>
(set-goal rush-control 4)
)
(defrule ;200 in regicide
(goal military-parity SUPERIOR)
(can-spy)
=>
(spy)
(disable-self)
)
#end-if;*********************************************************
#load-if-defined BRITON-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 10)
(set-goal monk-rating GOOD)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(generate-random-number 24)
(set-goal castle-attempt NO)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 3)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 4)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 5)
(random-number <= 7)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 8)
(random-number <= 12)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 13)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm ARCHER)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm ARCHER) )
=>
(set-goal pre-unique-arm ARCHER)
)
#end-if
;*********************************************************
#load-if-defined BYZANTINE-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 0)
(set-goal monk-rating GOOD)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 22)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 3)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 4)
=>
(set-goal combat-arm CAVALRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 5)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 6)
(random-number <= 8)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 9)
(random-number <= 11)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 12)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm CAVALRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(current-age == feudal-age)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(current-age >= castle-age)
(not (goal pre-unique-arm CAVALRY) )
=>
(set-goal pre-unique-arm CAVALRY)
)
#end-if
;*********************************************************
#load-if-defined CELTIC-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 1)
(set-goal monk-rating POOR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 24)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 5)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 6)
(random-number <= 8)
=>
(set-goal combat-arm CAVALRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 9)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 10)
(random-number <= 12)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 13)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm INFANTRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
#end-if
;*********************************************************
#load-if-defined CHINESE-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 1)
(set-goal monk-rating FAIR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 16)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 3)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 4)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 5)
(random-number <= 7)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 8)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 9)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm ARCHER)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm ARCHER) )
=>
(set-goal pre-unique-arm ARCHER)
)
#end-if
;*********************************************************
#load-if-defined FRANKISH-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 0)
(set-goal monk-rating FAIR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 22)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 1)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 2)
(random-number <= 7)
=>
(set-goal combat-arm CAVALRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 8)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 9)
(random-number <= 11)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 12)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm INFANTRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
#end-if
;*********************************************************
#load-if-defined GOTHIC-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 0)
(set-goal monk-rating POOR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 18)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 5)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 6)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 7)
(random-number <= 9)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 10)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm INFANTRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
(defrule
(goal wall-build YES)
=>
(set-goal wall-build NO)
)
#end-if
;*********************************************************
#load-if-defined JAPANESE-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 2)
(set-goal monk-rating GOOD)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 24)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 5)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 6)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 7)
(random-number <= 9)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 10)
(random-number <= 12)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 13)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm INFANTRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
#end-if
;*********************************************************
#load-if-defined MONGOL-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 0)
(set-goal monk-rating POOR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 32)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 3)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 4)
(random-number <= 8)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 9)
(random-number <= 13)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 14)
(random-number <= 16)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 17)
=>
(set-goal combat-arm UNIQUE)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(current-age == feudal-age)
(not (goal pre-unique-arm ARCHER) )
=>
(set-goal pre-unique-arm ARCHER)
)
(defrule
(goal combat-arm UNIQUE)
(current-age >= castle-age)
(building-type-count castle == 0)
(not (goal pre-unique-arm CAVARCHER) )
=>
(set-goal pre-unique-arm CAVARCHER)
)
#end-if
;*********************************************************
#load-if-defined PERSIAN-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 0)
(set-goal monk-rating POOR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 10)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 1)
=>
(set-goal combat-arm CAVALRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 2)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 3)
(random-number <= 5)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 6)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm CAVALRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(current-age == feudal-age)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(current-age >= castle-age)
(not (goal pre-unique-arm CAVALRY) )
=>
(set-goal pre-unique-arm CAVALRY)
)
#end-if
;*********************************************************
#load-if-defined SARACEN-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 1)
(set-goal monk-rating GOOD)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 22)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 3)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 4)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 5)
(random-number <= 11)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 12)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm CAVALRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(current-age == feudal-age)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(current-age >= castle-age)
(not (goal pre-unique-arm CAVALRY) )
=>
(set-goal pre-unique-arm CAVALRY)
)
#end-if
;*********************************************************
#load-if-defined TEUTONIC-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 0)
(set-goal monk-rating GOOD)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 8)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 1)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 2)
(random-number <= 4)
=>
(set-goal combat-arm CAVALRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 5)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm INFANTRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
#end-if
;*********************************************************
#load-if-defined TURKISH-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 1)
(set-goal monk-rating FAIR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 28)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 3)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 4)
(random-number <= 8)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 9)
(random-number <= 11)
=>
(set-goal combat-arm CAVARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 12)
(random-number <= 14)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 15)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm ARCHER)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm ARCHER) )
=>
(set-goal pre-unique-arm ARCHER)
)
#end-if
;*********************************************************
#load-if-defined VIKING-CIV
(defrule
(goal combat-arm NOTICE)
=>
(set-goal 13 3)
(set-goal monk-rating POOR)
(disable-self)
)
(defrule
(goal combat-arm NOTICE)
=>
(set-goal castle-attempt NO)
(generate-random-number 18)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 1)
(random-number <= 5)
=>
(set-goal combat-arm INFANTRY)
)
(defrule
(goal combat-arm NOTICE)
(random-number == 6)
=>
(set-goal combat-arm LIGHTCAV)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 7)
(random-number <= 9)
=>
(set-goal combat-arm ARCHER)
)
(defrule
(goal combat-arm NOTICE)
(random-number >= 10)
=>
(set-goal combat-arm UNIQUE)
(set-goal pre-unique-arm INFANTRY)
(set-goal castle-attempt YES)
)
(defrule
(goal combat-arm UNIQUE)
(building-type-count castle == 0)
(not (goal pre-unique-arm INFANTRY) )
=>
(set-goal pre-unique-arm INFANTRY)
)
(defrule
(goal castle-attempt NO)
(or
(goal sea-owner YES)
(nor
(player-in-game any-computer-ally)
(or
(player-in-game any-human-ally)
(goal 1 0)
)
)
)
=>
(set-goal castle-attempt YES)
)
#end-if
(defrule
(goal combat-arm UNIQUE)
(current-age >= castle-age)
(building-type-count castle > 0)
(not (goal pre-unique-arm NO) )
=>
(set-goal pre-unique-arm NO)
)
;start the pass
(defrule
(difficulty <= easy)
(not (map-type fortress) )
=>
(enable-wall-placement 2)
(disable-self)
)
(defrule
(current-age > dark-age)
=>
(set-goal wall-build NOTICE)
(enable-timer t-tower 1)
(disable-self)
)
(defrule
(goal wall-build NOTICE)
(or
(or
(goal rush-control RUSHING)
(goal castle-attempt YES)
)
(or
(or
(goal 1 10)
(difficulty >= easy)
)
(map-type fortress)
)
)
=>
(set-goal wall-build NO)
(disable-self)
)
(defrule
(goal wall-build NOTICE)
=>
(set-goal wall-build YES)
(disable-self)
)
(defrule
(goal wall-build NO)
(or
(goal personality 1)
(goal personality 2)
)
(not (map-type fortress) )
=>
(set-goal wall-build YES)
(disable-self)
)
(defrule
(goal wall-build NO)
(current-age == imperial-age)
(nor
(map-type fortress)
(goal castle-attempt YES)
)
=>
(set-goal wall-build YES)
(disable-self)
)
(defrule
(goal wall-build YES)
(goal wonder-attempt POSSIBLE)
=>
(set-goal wall-build NO)
(disable-self)
)
(defrule
(goal wall-build NO)
(building-type-count-total wonder > 0)
(not (map-type fortress) )
=>
(set-goal wall-build YES)
)
;*****************************
;*****************************
;build walls
(defrule
(current-age == feudal-age)
(goal wall-build YES)
(can-build-wall-with-escrow 2 stone-wall-line)
(or
(can-afford-complete-wall 2 stone-wall-line)
(stone-amount > 125)
)
=>
(release-escrow stone)
(build-wall 2 stone-wall-line)
)
(defrule
(goal wall-build YES)
(can-build-wall-with-escrow 2 stone-wall-line)
(or
(can-afford-complete-wall 2 stone-wall-line)
(stone-amount > 300)
)
=>
(release-escrow stone)
(build-wall 2 stone-wall-line)
)
(defrule
(goal wall-build NO)
(building-type-count-total gate > 0)
(wall-completed-percentage 2 >= 75)
(wall-completed-percentage 2 < 100)
(can-build-wall-with-escrow 2 stone-wall-line)
=>
(release-escrow stone)
(build-wall 2 stone-wall-line)
)
(defrule
(goal wall-build YES)
(building-type-count-total gate < 4)
(can-build-gate-with-escrow 2)
=>
(release-escrow stone)
(build-gate 2)
)
(defrule
(goal wall-build YES)
(wall-completed-percentage 2 == 100)
(building-type-count-total gate == 0)
=>
(delete-building stone-wall-line)
(set-goal wall-build NO)
)
(defrule
(goal wall-build YES)
(wall-completed-percentage 2 == 100)
=>
(set-goal wall-build NO)
)
;*****************************
;bombard towers
(defrule
(can-build bombard-tower)
(not (goal wonder-attempt POSSIBLE) )
(or
(not (goal castle-attempt YES) )
(building-type-count-total bombard-tower < 2)
)
(or
(goal wall-build NO)
(timer-triggered t-tower)
)
=>
(build bombard-tower)
)
(defrule
(current-age == feudal-age)
(can-build watch-tower)
(or
(not (goal castle-attempt YES) )
(building-type-count-total watch-tower < 3)
)
(or
(goal wall-build NO)
(timer-triggered t-tower)
)
=>
(build watch-tower)
)
(defrule
(current-age == castle-age)
(can-build watch-tower-line)
(or
(not (goal castle-attempt YES) )
(building-type-count-total watch-tower-line < 6)
)
(not (research-available ri-guard-tower) )
(or
(goal wall-build NO)
(timer-triggered t-tower)
)
=>
(build watch-tower-line)
)
(defrule
(current-age == imperial-age)
(can-build watch-tower-line)
(nor
(can-build bombard-tower)
(goal wonder-attempt POSSIBLE)
)
(or
(not (goal castle-attempt YES) )
(building-type-count-total watch-tower-line < 9)
)
(nor
(research-available ri-guard-tower)
(research-available ri-keep)
)
(or
(goal wall-build NO)
(timer-triggered t-tower)
)
=>
(build watch-tower-line)
)
; post-wonder watch towers -- go nuts!
(defrule
(building-type-count-total wonder > 0)
(can-build-with-escrow bombard-tower)
=>
(release-escrow gold)
(release-escrow stone)
(build bombard-tower)
)
(defrule
(building-type-count-total wonder > 0)
(can-build-with-escrow watch-tower-line)
(nor
(research-available ri-guard-tower)
(research-available ri-keep)
)
=>
(release-escrow wood)
(release-escrow stone)
(build watch-tower-line)
)
(defrule
(timer-triggered t-tower)
(or
(can-afford-complete-wall 2 stone-wall-line)
(stone-amount > 500)
)
=>
(disable-timer t-tower)
(enable-timer t-tower 60)
)
(defrule
(timer-triggered t-tower)
=>
(disable-timer t-tower)
(enable-timer t-tower 300)
);UPGRADES & BUILDS RELATED TO OTHER PLAYERS
#load-if-defined DIFFICULTY-MODERATE
(load-random
20 "petersen dip bully"
5 "petersen dip boomer"
5 "petersen dip feeder"
)
#else
(load-random
10 "petersen dip bully"
10 "petersen dip boomer"
10 "petersen dip feeder"
)
#end-if
;**************************************
;TRIBUTE TO ONE ANOTHER
(defrule
(taunt-detected any-ally 4)
(wood-amount > 200)
(not (goal resource-needed WOOD) )
=>
(release-escrow wood)
(tribute-to-player this-any-ally wood 100)
(acknowledge-taunt this-any-ally 4)
(chat-local-to-self "Tribute wood")
)
(defrule
(taunt-detected any-ally 3)
(food-amount > 200)
(not (goal resource-needed FOOD) )
=>
(release-escrow food)
(tribute-to-player this-any-ally food 100)
(acknowledge-taunt this-any-ally 3)
(chat-local-to-self "Tribute food")
)
(defrule
(goal wonder-attempt NO)
(taunt-detected any-ally 5)
(not (goal resource-needed GOLD) )
=>
(release-escrow gold)
(tribute-to-player this-any-ally gold 100)
(acknowledge-taunt this-any-ally 5)
(chat-local-to-self "Tribute gold")
)
(defrule
(taunt-detected any-ally 6)
(stone-amount > 200)
(not (goal resource-needed STONE) )
=>
(release-escrow stone)
(tribute-to-player this-any-ally stone 100)
(acknowledge-taunt this-any-ally 6)
)
;make the castle
(defrule
(goal castle-attempt NO)
(current-age == imperial-age)
(stone-amount > 400)
(nor
(goal wonder-attempt POSSIBLE)
(goal wonder-attempt YES)
)
=>
(set-goal castle-attempt YES)
)
(defrule
(goal castle-attempt YES)
(can-build-with-escrow castle)
=>
(release-escrow stone)
(set-strategic-number sn-percent-civilian-builders 75)
(set-strategic-number sn-cap-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 25)
(build castle)
(set-goal castle-attempt 2)
)
(defrule
(building-type-count castle > 0)
(or
(not (goal castle-attempt 2) )
(strategic-number sn-cap-civilian-builders == 15)
)
=>
(set-strategic-number sn-percent-civilian-builders 10)
(set-strategic-number sn-cap-civilian-builders 8)
(set-strategic-number sn-percent-civilian-gatherers 90)
(set-goal castle-attempt 2)
)
(defrule
(goal castle-attempt 2)
(building-type-count-total castle == 0)
=>
(set-goal castle-attempt YES)
)
(defrule
(difficulty >= easy)
(game-time > 300)
(soldier-count < five-percent-pop)
(unit-type-count villager < five-percent-pop)
=>
(set-goal 1 19)
(disable-self)
)
(defrule
(difficulty == moderate)
(game-time > 300)
(building-type-count wonder < 1)
(soldier-count < five-percent-pop)
(unit-type-count villager < five-percent-pop)
(not (can-train villager) )
=>
(set-goal 1 19)
(disable-self)
)
(defrule
(difficulty <= hard)
(game-time > 300)
(building-type-count wonder < 1)
(soldier-count == 0)
(unit-type-count cannon-galleon-line == 0)
(unit-type-count villager == 0)
(not (can-train villager) )
=>
(set-goal 1 19)
(disable-self)
)
(defrule
(goal 1 19)
(stance-toward any-human ally)
(difficulty <= moderate)
=>
(release-escrow wood)
(release-escrow food)
(release-escrow gold)
(release-escrow stone)
(tribute-to-player this-any-human wood 10000)
(tribute-to-player this-any-human food 10000)
(tribute-to-player this-any-human gold 10000)
(tribute-to-player this-any-human stone 10000)
(disable-self)
)
(defrule
(goal 1 19)
(players-population any-ally > 10)
(difficulty <= moderate)
=>
(release-escrow wood)
(release-escrow food)
(release-escrow gold)
(release-escrow stone)
(tribute-to-player this-any-ally wood 10000)
(tribute-to-player this-any-ally food 10000)
(tribute-to-player this-any-ally gold 10000)
(tribute-to-player this-any-ally stone 10000)
(disable-self)
)
;*****************************
;delete all units
(defrule
(goal 1 19)
(difficulty >= moderate)
=>
(delete-building watch-tower)
(delete-building guard-tower)
(delete-building keep)
(delete-building bombard-tower)
(delete-building castle)
)
(defrule
(goal 1 19)
(difficulty >= moderate)
(building-type-count watch-tower == 0)
(building-type-count guard-tower == 0)
(building-type-count keep == 0)
(building-type-count bombard-tower == 0)
(building-type-count castle == 0)
=>
(set-goal 1 9)
(disable-self)
)
(defrule
(goal 1 19)
(difficulty <= hard)
=>
(set-goal 1 9)
(disable-self)
)
;*****************************
;** All random taunts moved to aiexpert.txt
(defrule
(goal 1 9)
=>
(chat-to-all-using-range 22300 22)
(chat-to-all-using-id 22322)
;"No wonder thou wert victorious! I shalt abdicate."
(resign)
(disable-self)
)
#load-if-not-defined VICTORY-CONQUEST
(defrule
(goal personality 1)
(not (goal wonder-attempt NO) )
=>
(set-goal wonder-attempt NO)
)
(defrule
(goal wonder-attempt MAYBE)
(taunt-detected any-ally 200)
=>
(set-goal wonder-attempt NO)
(set-goal upgrade-conflict NO)
(acknowledge-taunt this-any-ally 200)
(disable-self)
)
;should we construct a wonder?
(defrule
(goal wonder-attempt MAYBE)
(current-age == imperial-age)
(population > unit-max)
(wood-amount >= 500)
(gold-amount >= 500)
(stone-amount >= 500)
(cc-players-building-type-count every-ally wonder == 0)
(cc-players-building-type-count every-enemy wonder == 0)
(cc-players-building-type-count every-neutral wonder == 0)
(not (goal personality 1) )
=>
(set-goal upgrade-conflict NOTICE)
(set-goal wonder-attempt POSSIBLE)
(chat-to-player-using-id every-ally 22410) ;200
(disable-self)
)
(defrule
(goal upgrade-conflict NOTICE)
(goal wonder-attempt POSSIBLE)
(can-build-with-escrow wonder)
=>
(set-strategic-number sn-maximum-town-size 10)
(set-strategic-number sn-percent-civilian-builders 90)
(set-strategic-number sn-cap-civilian-builders 50)
(set-strategic-number sn-percent-civilian-gatherers 10)
(chat-local-to-self "Time to Wonder")
(set-goal wonder-attempt YES)
(disable-self)
)
(defrule
(goal wonder-attempt YES)
(building-type-count farm > 0)
=>
(delete-building farm)
)
(defrule
(goal wonder-attempt YES)
(building-type-count farm == 0)
(can-build-with-escrow wonder)
=>
(release-escrow wood)
(release-escrow gold)
(release-escrow stone)
(build wonder)
(set-goal upgrade-conflict NO)
(set-goal wonder-attempt NO)
(disable-self)
)
(defrule
(building-type-count-total wonder > 0)
=>
(set-strategic-number sn-maximum-town-size imperial-town-size)
(disable-self)
)
(defrule
(building-type-count wonder > 0)
=>
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-cap-civilian-builders 8)
(set-strategic-number sn-percent-civilian-gatherers 85)
(disable-self)
)
;***********************************
;wonder-bashing
;delete wonder if someone else has beaten us to the punch
(defrule
(building-type-count wonder == 0)
(building-type-count-total wonder > 0)
(cc-players-building-type-count any-ally wonder > 0)
(or
(enemy-captured-relics)
(or
(cc-players-building-type-count any-enemy wonder > 0)
(cc-players-building-type-count any-neutral wonder > 0)
)
)
=>
(delete-building wonder)
(set-strategic-number sn-maximum-town-size imperial-town-size)
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-cap-civilian-builders 8)
(set-strategic-number sn-percent-civilian-gatherers 85)
(set-goal wonder-attempt NO)
(set-goal upgrade-conflict NO)
(disable-self)
)
#load-if-not-defined TEAMS-LOCKED
(defrule
(cc-players-building-type-count any-neutral wonder > 0)
=>
(set-stance this-any-neutral enemy)
)
#end-if
#end-if
;if I'm short on resources, ask allies for some before using the market
(defrule
(player-in-game any-ally)
(players-building-type-count any-ally market > 0)
=>
(enable-timer t-tribute 60)
(disable-self)
)
;****************************************
(defrule
(goal resource-needed WOOD)
(timer-triggered t-tribute)
(not (stance-toward any-human ally) )
=>
(chat-to-player-using-id every-ally 22123) ;4
)
(defrule
(goal resource-needed FOOD)
(timer-triggered t-tribute)
(not (stance-toward any-human ally) )
=>
(chat-to-player-using-id every-ally 22122) ;3
)
(defrule
(goal resource-needed GOLD)
(timer-triggered t-tribute)
(not (stance-toward any-human ally) )
=>
(chat-to-player-using-id every-ally 22124) ;5
)
(defrule
(goal resource-needed STONE)
(timer-triggered t-tribute)
(not (stance-toward any-human ally) )
=>
(chat-to-player-using-id every-ally 22125) ;6
)
(defrule
(goal resource-needed WOOD)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(not (goal wonder-attempt POSSIBLE) )
(or
(wood-amount > 250)
(and
(current-age < imperial-age)
(wood-amount > 150)
)
)
=>
(chat-to-player-using-id every-ally 22123) ;4
)
(defrule
(goal resource-needed FOOD)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(or
(food-amount > 950)
(or
(and
(current-age == feudal-age)
(food-amount > 750)
)
(and
(current-age == imperial-age)
(food-amount > 250)
)
)
)
=>
(chat-to-player-using-id every-ally 22122) ;3
)
(defrule
(goal resource-needed GOLD)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(not (goal wonder-attempt POSSIBLE) )
(or
(gold-amount > 750)
(and
(current-age != feudal-age)
(gold-amount > 150)
)
)
=>
(chat-to-player-using-id every-ally 22124) ;5
)
(defrule
(goal resource-needed STONE)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(not (goal wonder-attempt POSSIBLE) )
(or
(stone-amount > 600)
(and
(not (goal castle-attempt YES) )
(stone-amount > 150)
)
)
=>
(chat-to-player-using-id every-ally 22125) ;6
)
(defrule
(goal resource-needed WOOD)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(goal wonder-attempt POSSIBLE)
(wood-amount > 950)
=>
(chat-to-player-using-id every-ally 22123) ;4
)
(defrule
(goal resource-needed GOLD)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(goal wonder-attempt POSSIBLE)
(gold-amount > 950)
=>
(chat-to-player-using-id every-ally 22123) ;4
)
(defrule
(goal resource-needed STONE)
(timer-triggered t-tribute)
(stance-toward any-human ally)
(goal wonder-attempt POSSIBLE)
(stone-amount > 950)
=>
(chat-to-player-using-id every-ally 22123) ;4
)
;***************************************
;FEUDAL MARKET
(defrule
(goal resource-needed WOOD)
(current-age == feudal-age)
(gold-amount > 400)
(can-buy-commodity wood)
(commodity-buying-price wood < 150)
=>
(chat-local-to-self "use market for wood")
(release-escrow gold)
(buy-commodity wood)
)
(defrule
(goal resource-needed FOOD)
(current-age == feudal-age)
(gold-amount > 400)
(can-buy-commodity food)
(commodity-buying-price food < 150)
=>
(chat-local-to-self "use market for food")
(release-escrow gold)
(buy-commodity food)
)
(defrule
(goal resource-needed GOLD)
(current-age == feudal-age)
(wood-amount > 300)
(not (goal sea-owner YES) )
(can-sell-commodity wood)
=>
(chat-local-to-self "sell wood for gold")
(release-escrow wood)
(sell-commodity wood)
)
(defrule
(goal resource-needed GOLD)
(current-age == feudal-age)
(food-amount > 900)
(can-sell-commodity food)
=>
(chat-local-to-self "sell food for gold")
(release-escrow food)
(sell-commodity food)
)
(defrule
(goal resource-needed GOLD)
(current-age == feudal-age)
(stone-amount > 225)
(can-sell-commodity stone)
(commodity-selling-price stone > 75)
(nor
(goal wall-build YES)
(goal castle-attempt YES)
)
=>
(chat-local-to-self "sell stone for gold")
(release-escrow stone)
(sell-commodity stone)
)
(defrule
(goal resource-needed STONE)
(current-age == feudal-age)
(gold-amount > 450)
(can-buy-commodity stone)
(commodity-buying-price stone < 200)
=>
(chat-local-to-self "use market for stone")
(release-escrow gold)
(buy-commodity stone)
)
;****************************
;CASTLE MARKET
(defrule
(goal resource-needed WOOD)
(current-age == castle-age)
(gold-amount > 950)
(can-buy-commodity wood)
(commodity-buying-price wood < 150)
=>
(chat-local-to-self "use market for wood")
(release-escrow gold)
(buy-commodity wood)
)
(defrule
(goal resource-needed FOOD)
(current-age == castle-age)
(gold-amount > 950)
(can-buy-commodity food)
(commodity-buying-price food < 150)
=>
(chat-local-to-self "use market for food")
(release-escrow gold)
(buy-commodity food)
)
(defrule
(goal resource-needed GOLD)
(current-age == castle-age)
(wood-amount > 450)
(not (goal sea-owner YES) )
(can-sell-commodity wood)
=>
(chat-local-to-self "sell wood for gold")
(release-escrow wood)
(sell-commodity wood)
)
(defrule
(goal resource-needed GOLD)
(current-age == castle-age)
(food-amount > 1100)
(can-sell-commodity food)
=>
(chat-local-to-self "sell food for gold")
(release-escrow food)
(sell-commodity food)
)
(defrule
(goal resource-needed GOLD)
(current-age == castle-age)
(stone-amount > 400)
(can-sell-commodity stone)
(commodity-selling-price stone > 75)
(nor
(goal wall-build YES)
(goal castle-attempt YES)
)
=>
(chat-local-to-self "sell stone for gold")
(release-escrow stone)
(sell-commodity stone)
(set-goal resource-needed 0)
)
(defrule
(goal resource-needed STONE)
(current-age == castle-age)
(gold-amount > 1000)
(can-buy-commodity stone)
(commodity-buying-price stone < 200)
=>
(chat-local-to-self "use market for stone")
(release-escrow gold)
(buy-commodity stone)
(set-goal resource-needed 0)
)
;****************************
;IMPERIAL MARKET
(defrule
(goal resource-needed WOOD)
(research-completed ri-guilds)
(can-buy-commodity wood)
(commodity-buying-price wood < 150)
(gold-amount > 1400)
=>
(chat-local-to-self "use market for wood")
(release-escrow gold)
(buy-commodity wood)
)
(defrule
(goal resource-needed FOOD)
(research-completed ri-guilds)
(can-buy-commodity food)
(commodity-buying-price food < 150)
(gold-amount > 1400)
=>
(chat-local-to-self "use market for food")
(release-escrow gold)
(buy-commodity food)
)
(defrule
(goal resource-needed GOLD)
(research-completed ri-guilds)
(not (goal sea-owner YES) )
(can-sell-commodity wood)
(or
(wood-amount > 1200)
(and
(nor
(goal wonder-attempt POSSIBLE)
(goal upgrade-conflict 33)
)
(wood-amount > 625)
)
)
=>
(chat-local-to-self "sell wood for gold")
(release-escrow wood)
(sell-commodity wood)
)
(defrule
(goal resource-needed GOLD)
(research-completed ri-guilds)
(food-amount > 1700)
(can-sell-commodity food)
=>
(chat-local-to-self "sell food for gold")
(release-escrow food)
(sell-commodity food)
)
(defrule
(goal resource-needed GOLD)
(research-completed ri-guilds)
(stone-amount > 500)
(can-sell-commodity stone)
(commodity-selling-price stone > 75)
(nor
(goal wall-build YES)
(or
(goal castle-attempt YES)
(goal wonder-attempt POSSIBLE)
)
)
=>
(chat-local-to-self "sell stone for gold")
(release-escrow stone)
(sell-commodity stone)
)
(defrule
(goal resource-needed STONE)
(research-completed ri-guilds)
(can-buy-commodity stone)
(commodity-buying-price stone < 200)
(gold-amount > 1400)
=>
(chat-local-to-self "use market for stone")
(release-escrow gold)
(buy-commodity stone)
)
;****************************
;Excess stuff
(defrule
(wood-amount > 1200)
(or
(food-amount < 1600)
(or
(gold-amount < 1200)
(stone-amount < 650)
)
)
(can-sell-commodity wood)
=>
(chat-local-to-self "excess wood")
(release-escrow wood)
(sell-commodity wood)
)
(defrule
(food-amount > 1700)
(or
(wood-amount < 1100)
(or
(gold-amount < 1200)
(stone-amount < 650)
)
)
(can-sell-commodity food)
=>
(chat-local-to-self "excess food")
(release-escrow food)
(sell-commodity food)
)
(defrule
(gold-amount > 1250)
(can-buy-commodity wood)
(commodity-buying-price wood < 50)
(or
(and
(not (goal upgrade-conflict 33) )
(wood-amount < 525)
)
(wood-amount < 1100)
)
=>
(chat-local-to-self "excess gold; buy wood")
(release-escrow gold)
(buy-commodity wood)
)
(defrule
(gold-amount > 1250)
(food-amount < 1600)
(can-buy-commodity food)
(commodity-buying-price food < 50)
=>
(chat-local-to-self "excess gold; buy food")
(release-escrow gold)
(buy-commodity food)
)
(defrule
(gold-amount > 1400)
(stone-amount < 650)
(can-buy-commodity stone)
(commodity-buying-price stone < 200)
=>
(chat-local-to-self "excess gold; buy stone")
(release-escrow gold)
(buy-commodity stone)
)
(defrule
(stone-amount > 1400)
(or
(wood-amount < 1100)
(or
(food-amount < 1600)
(gold-amount < 1200)
)
)
(can-sell-commodity stone)
=>
(chat-local-to-self "excess stone")
(release-escrow stone)
(sell-commodity stone)
)
;************************************************
;TIMER ONE
(defrule
(timer-triggered t-tribute)
(not (player-in-game any-human-ally) )
=>
(disable-timer t-tribute)
(enable-timer t-tribute 120)
)
;don't bug human allies too often
(defrule
(timer-triggered t-tribute)
(player-in-game any-human-ally)
=>
(disable-timer t-tribute)
(enable-timer t-tribute 300)
)
;**********************************************
;AGE ADVANCEMENT
(defrule
(goal age-advancement NO)
(current-age == dark-age)
(game-time >= 600)
(or
(players-current-age any-enemy > dark-age)
(civilian-population >= civ-dark-rush)
)
=>
(set-goal upgrade-conflict NOTICE)
)
(defrule
(goal age-advancement NO)
(current-age == feudal-age)
(current-age-time > 450)
(or
(players-current-age any-enemy > feudal-age)
(civilian-population >= civ-dark)
)
(not (goal personality 1) )
=>
(set-goal upgrade-conflict NOTICE)
)
(defrule
(goal age-advancement NO)
(current-age == castle-age)
(current-age-time > 300)
(or
(players-current-age any-enemy == imperial-age)
(civilian-population >= civ-feudal)
)
(not (goal personality 1) )
=>
(set-goal upgrade-conflict NOTICE)
)
(defrule
(can-research-with-escrow feudal-age)
(or
(civilian-population >= civ-dark-rush)
(game-time > 1200)
)
=>
(release-escrow food)
(research feudal-age)
(set-goal resource-needed 0)
(set-goal age-advancement NOTICE)
(set-goal upgrade-conflict NO)
(disable-timer t-ageup)
(enable-timer t-ageup 140)
)
;advance to castle age
(defrule
(can-research-with-escrow castle-age)
(or
(civilian-population >= civ-dark-rush)
(current-age-time > 1200)
)
=>
(release-escrow food)
(release-escrow gold)
(research castle-age)
(set-goal resource-needed 0)
(set-goal age-advancement NOTICE)
(set-goal upgrade-conflict NO)
(disable-timer t-ageup)
(enable-timer t-ageup 170)
)
;now advance to imperial
(defrule
(can-research-with-escrow imperial-age)
(or
(civilian-population >= civ-dark-rush)
(current-age-time > 1200)
)
=>
(release-escrow food)
(release-escrow gold)
(research imperial-age)
(set-goal resource-needed 0)
(set-goal age-advancement NOTICE)
(set-goal upgrade-conflict NO)
(disable-timer t-ageup)
(enable-timer t-ageup 200)
)
;if we've failed to rise in age, reset goal age-advancement
(defrule
(current-age < imperial-age)
(timer-triggered t-ageup)
(goal age-advancement NOTICE)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
)
;all this file really does for now is ensure more villagers than a "normal" CP
(defrule
(game-time > 10)
=>
(set-goal personality 2)
(disable-self)
)
;don't rush
(defrule
(goal personality 2)
(current-age < imperial-age)
(not (goal rush-control BOOMING) )
=>
(set-goal rush-control BOOMING)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-wood-gatherer-percentage 10)
(set-strategic-number sn-food-gatherer-percentage 90)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(disable-self)
)
;DARK AGE
(defrule
(current-age == dark-age)
(wood-amount < 100)
(or
(building-type-count-total mill == 0)
(building-type-count-total lumber-camp == 0)
)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal upgrade-conflict NOTICE)
(current-age == dark-age)
(food-amount < 500)
=>
(set-goal resource-needed FOOD)
)
(defrule
(current-age == dark-age)
(gold-amount < 50)
(or
(goal rush-control RUSHING)
(players-military-population any-enemy >= five-percent-pop)
)
=>
(set-goal resource-needed GOLD)
)
;***********************************************
;***********************************************
(defrule
(goal resource-needed NO)
(current-age == dark-age)
(civilian-population < 10)
(not (strategic-number sn-wood-gatherer-percentage == 10) )
=>
(set-strategic-number sn-wood-gatherer-percentage 10)
(set-strategic-number sn-food-gatherer-percentage 90)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
)
(defrule
(goal resource-needed WOOD)
(current-age == dark-age)
(civilian-population < 10)
(not (strategic-number sn-wood-gatherer-percentage == 20) )
=>
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 80)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
)
(defrule
(goal resource-needed NO)
(current-age == dark-age)
(civilian-population >= 10)
(not (strategic-number sn-wood-gatherer-percentage == 30) )
=>
(set-strategic-number sn-wood-gatherer-percentage 30)
(set-strategic-number sn-food-gatherer-percentage 70)
)
(defrule
(goal resource-needed WOOD)
(current-age == dark-age)
(civilian-population >= 10)
(not (strategic-number sn-wood-gatherer-percentage == 40) )
=>
(set-strategic-number sn-wood-gatherer-percentage 40)
(set-strategic-number sn-food-gatherer-percentage 60)
)
(defrule
(goal resource-needed FOOD)
(current-age == dark-age)
(civilian-population >= 10)
(not (strategic-number sn-wood-gatherer-percentage == 20) )
=>
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 80)
)
(defrule
(goal resource-needed GOLD)
(current-age == dark-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 25)
(set-strategic-number sn-food-gatherer-percentage 65)
(set-strategic-number sn-gold-gatherer-percentage 10)
(disable-self)
)
;***********************************************
;***********************************************
;FEUDAL AGE
(defrule
(current-age == feudal-age)
=>
(set-goal resource-needed NO)
)
(defrule
(goal resource-supp FOOD-ONLY)
(current-age == feudal-age)
(food-amount < 150)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(current-age == feudal-age)
(wood-amount < 75)
(food-amount > 100)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(current-age == feudal-age)
(wood-amount > 75)
(food-amount < 100)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp FOOD-GOLD)
(current-age == feudal-age)
(food-amount > 100)
(gold-amount < 50)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp FOOD-GOLD)
(current-age == feudal-age)
(food-amount < 100)
(gold-amount > 50)
=>
(set-goal resource-needed FOOD)
)
(defrule
(current-age == feudal-age)
(wood-amount < 175)
(or
(building-type-count-total market == 0)
(building-type-count-total blacksmith == 0)
)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal sea-owner YES)
(current-age == feudal-age)
(warboat-count <= five-percent-pop)
(or
(wood-amount < 125)
(and
(unit-type-count-total transport-ship > 0)
(wood-amount < 90)
)
)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal upgrade-conflict NOTICE)
(current-age == feudal-age)
(food-amount < 800)
(gold-amount > 200)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal upgrade-conflict NOTICE)
(current-age == feudal-age)
(food-amount > 800)
(gold-amount < 200)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal wall-build YES)
(current-age == feudal-age)
(stone-amount < 30)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal sea-owner YES)
(current-age == feudal-age)
(warboat-count < ten-percent-pop)
(wood-amount < 125)
(gold-amount > 30)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal sea-owner YES)
(current-age == feudal-age)
(warboat-count < ten-percent-pop)
(wood-amount > 125)
(gold-amount < 30)
=>
(set-goal resource-needed GOLD)
)
;***********************************************
;***********************************************
(defrule
(goal resource-needed NO)
(current-age == feudal-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 40)
(set-strategic-number sn-food-gatherer-percentage 45)
(set-strategic-number sn-gold-gatherer-percentage 10)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
(defrule
(goal resource-needed WOOD)
(current-age == feudal-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 50)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 10)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
(defrule
(goal resource-needed FOOD)
(current-age == feudal-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 30)
(set-strategic-number sn-food-gatherer-percentage 55)
(set-strategic-number sn-gold-gatherer-percentage 10)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
(defrule
(goal resource-needed GOLD)
(current-age == feudal-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 40)
(set-strategic-number sn-gold-gatherer-percentage 20)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
(defrule
(goal resource-needed STONE)
(current-age == feudal-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 40)
(set-strategic-number sn-gold-gatherer-percentage 10)
(set-strategic-number sn-stone-gatherer-percentage 15)
)
;***********************************************
;***********************************************
;CASTLE AGE
(defrule
(current-age == castle-age)
=>
(set-goal resource-needed NO)
)
(defrule
(goal resource-supp FOOD-ONLY)
(current-age == castle-age)
(food-amount < 250)
=>
(set-goal resource-needed FOOD)
)
(defrule
(current-age == castle-age)
(goal resource-supp GOLD-ONLY)
(gold-amount < 475)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(current-age == castle-age)
(wood-amount < 150)
(food-amount > 200)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(current-age == castle-age)
(wood-amount > 150)
(food-amount < 200)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp WOOD-GOLD)
(current-age == castle-age)
(wood-amount > 300)
(gold-amount < 175)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp WOOD-GOLD)
(current-age == castle-age)
(wood-amount < 300)
(gold-amount > 175)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp WOOD-STONE)
(current-age == castle-age)
(wood-amount > 200)
(stone-amount < 300)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal resource-supp WOOD-STONE)
(current-age == castle-age)
(wood-amount < 200)
(stone-amount > 300)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp FOOD-GOLD)
(current-age == castle-age)
(food-amount > 350)
(gold-amount < 200)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp FOOD-GOLD)
(current-age == castle-age)
(food-amount < 350)
(gold-amount > 200)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp FOOD-STONE)
(current-age == castle-age)
(food-amount > 200)
(stone-amount < 250)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal resource-supp FOOD-STONE)
(current-age == castle-age)
(food-amount < 200)
(stone-amount > 250)
=>
(set-goal resource-needed FOOD)
)
(defrule
(current-age == castle-age)
(wood-amount < 200)
(or
(building-type-count-total university == 0)
(building-type-count-total siege-workshop == 0)
)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal upgrade-conflict NOTICE)
(current-age == castle-age)
(food-amount < 1000)
(gold-amount > 800)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal upgrade-conflict NOTICE)
(current-age == castle-age)
(food-amount > 1000)
(gold-amount < 800)
=>
(set-goal resource-needed GOLD)
)
(defrule
(current-age == castle-age)
(or
(and
(goal castle-attempt YES)
(stone-amount < 650)
)
(and
(goal wall-build YES)
(stone-amount < 30)
)
)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal sea-owner YES)
(current-age == castle-age)
(warboat-count < fifteen-percent-pop)
(wood-amount < 125)
(gold-amount > 50)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal sea-owner YES)
(current-age == castle-age)
(warboat-count < fifteen-percent-pop)
(wood-amount > 125)
(gold-amount < 50)
=>
(set-goal resource-needed GOLD)
)
;***********************************************
;IMPERIAL AGE
(defrule
(current-age == imperial-age)
=>
(set-goal resource-needed NO)
)
(defrule
(goal resource-supp FOOD-ONLY)
(current-age == imperial-age)
(food-amount < 250)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp GOLD-ONLY)
(current-age == imperial-age)
(gold-amount < 475)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(goal upgrade-conflict 33)
(current-age == imperial-age)
(wood-amount < 1100)
(food-amount > 1000)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(goal upgrade-conflict 33)
(current-age == imperial-age)
(wood-amount > 1100)
(food-amount < 1000)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(current-age == imperial-age)
(wood-amount < 600)
(food-amount > 500)
(not (goal upgrade-conflict 33) )
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp WOOD-FOOD)
(current-age == imperial-age)
(wood-amount > 600)
(food-amount < 500)
(not (goal upgrade-conflict 33) )
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp WOOD-GOLD)
(current-age == imperial-age)
(wood-amount > 525)
(gold-amount < 500)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp WOOD-GOLD)
(current-age == imperial-age)
(wood-amount < 525)
(gold-amount > 500)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp WOOD-STONE)
(current-age == imperial-age)
(wood-amount > 400)
(stone-amount < 400)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal resource-supp WOOD-STONE)
(current-age == imperial-age)
(wood-amount < 400)
(stone-amount > 400)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal resource-supp FOOD-GOLD)
(current-age == imperial-age)
(food-amount > 1600)
(gold-amount < 1200)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal resource-supp FOOD-GOLD)
(current-age == imperial-age)
(food-amount < 1600)
(gold-amount > 1200)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal resource-supp FOOD-STONE)
(current-age == imperial-age)
(food-amount > 500)
(stone-amount < 350)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal resource-supp FOOD-STONE)
(current-age == imperial-age)
(food-amount < 500)
(stone-amount > 350)
=>
(set-goal resource-needed FOOD)
)
(defrule
(goal castle-attempt YES)
(current-age == imperial-age)
(stone-amount < 650)
=>
(set-goal resource-needed STONE)
)
(defrule
(goal sea-owner YES)
(current-age == imperial-age)
(warboat-count < twenty-percent-pop)
(wood-amount < 200)
(gold-amount > 150)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal sea-owner YES)
(current-age == imperial-age)
(warboat-count < twenty-percent-pop)
(wood-amount > 200)
(gold-amount < 150)
=>
(set-goal resource-needed GOLD)
)
;***********************************************
;WONDERING
(defrule
(goal wonder-attempt POSSIBLE)
(wood-amount < 1000)
(gold-amount > 1000)
(stone-amount > 1000)
=>
(set-goal resource-needed WOOD)
)
(defrule
(goal wonder-attempt POSSIBLE)
(wood-amount > 1000)
(gold-amount < 1000)
(stone-amount > 1000)
=>
(set-goal resource-needed GOLD)
)
(defrule
(goal wonder-attempt POSSIBLE)
(wood-amount > 1000)
(gold-amount > 1000)
(stone-amount < 1000)
=>
(set-goal resource-needed STONE)
)
;***********************************************
;***********************************************
(defrule
(goal resource-needed NO)
(current-age >= castle-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 40)
(set-strategic-number sn-food-gatherer-percentage 40)
(set-strategic-number sn-gold-gatherer-percentage 15)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
;extra wood
(defrule
(goal resource-needed WOOD)
(current-age >= castle-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 50)
(set-strategic-number sn-food-gatherer-percentage 30)
(set-strategic-number sn-gold-gatherer-percentage 15)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
;extra food
(defrule
(goal resource-needed FOOD)
(current-age >= castle-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 30)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 15)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
;extra gold
(defrule
(goal resource-needed GOLD)
(current-age >= castle-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
)
;extra stone
(defrule
(goal resource-needed STONE)
(current-age >= castle-age)
=>
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 15)
(set-strategic-number sn-stone-gatherer-percentage 15)
);make sure we have allies
(defrule
(difficulty < easy)
(game-time < 30)
(or
(player-computer any-ally)
(player-human any-ally)
)
=>
(set-goal personality NOTICE)
(disable-self)
)
(defrule
(game-time > 30)
(not (player-in-game any-ally) )
=>
(set-goal personality 0)
(disable-self)
)
(defrule
(taunt-detected any-ally 221)
=>
(set-goal rush-control 3)
(set-goal personality 0)
(acknowledge-taunt this-any-ally 221)
(disable-self)
)
(defrule
(goal personality NOTICE)
=>
(set-goal personality 1)
(chat-to-player-using-id every-ally 22401) ;221
(disable-self)
)
;don't rush if we're a feeder also no wonder
(defrule
(goal personality 1)
(current-age < imperial-age)
(not (goal rush-control FEEDING) )
=>
(set-goal rush-control FEEDING)
)
(defrule
(goal personality 1)
(goal wonder-attempt POSSIBLE)
=>
(set-goal wonder-attempt NO)
)
(defrule
(goal personality 1)
(or
(and
(current-age == feudal-age)
(players-current-age any-ally >= castle-age)
)
(and
(current-age == castle-age)
(players-current-age any-ally == imperial-age)
)
)
=>
(set-goal upgrade-conflict NOTICE)
)
(defrule
(goal personality 1)
(building-type-count market > 0)
(players-population any-ally > 10)
=>
(chat-to-player-using-id every-ally 22072)
(chat-to-player-using-id every-ally 22073)
;"I shall tribute to thee as many resources as I can muster."
;"Go forth and thrash our opponents!"
(disable-self)
)
;stop being a feeder if your allies are weenies
(defrule
(goal personality 1)
(game-time > 900)
(or
(players-population every-ally <= 10)
(not (player-in-game any-ally) )
)
=>
(set-goal personality 20)
(set-goal rush-control 4)
(chat-to-player-using-id every-ally 22074)
;"Whoa, I'll not feed such puny allies! 'Tis every man for himself!"
(disable-self)
)
#load-if-not-defined TEAMS-LOCKED
(defrule
(goal personality 20)
(difficulty <= hard)
(players-stance any-human ally)
=>
(chat-to-player-using-id every-ally 22075)
;"In fact, I'm switching sides! Fare thee well, losers."
(set-stance every-computer ally)
(set-stance this-any-human enemy)
(set-goal personality 10)
(disable-self)
)
#end-if
;***********************
;TRIBUTE
(defrule
(goal personality 1)
(goal 29 NO)
=>
(set-goal 29 YES) ; ok to tribute!
)
(defrule
(goal personality 1)
(or
(goal upgrade-conflict NOTICE)
(town-under-attack)
)
=>
(set-goal 29 NO) ; NOT ok to tribute!
)
(defrule
(goal personality 1)
(goal 29 YES)
(taunt-detected any-ally 4)
(wood-amount > 100)
(not (goal resource-needed WOOD) )
=>
(release-escrow wood)
(tribute-to-player this-any-ally wood 100)
(acknowledge-taunt this-any-ally 4)
(chat-local-to-self "Tribute wood")
)
(defrule
(goal personality 1)
(goal 29 YES)
(taunt-detected any-ally 3)
(food-amount > 100)
(not (goal resource-needed FOOD) )
=>
(release-escrow food)
(tribute-to-player this-any-ally food 100)
(acknowledge-taunt this-any-ally 3)
(chat-local-to-self "Tribute food")
)
(defrule
(goal personality 1)
(goal 29 YES)
(taunt-detected any-ally 5)
(gold-amount > 100)
(not (goal resource-needed GOLD) )
=>
(release-escrow gold)
(tribute-to-player this-any-ally gold 100)
(acknowledge-taunt this-any-ally 5)
(chat-local-to-self "Tribute gold")
)
(defrule
(goal personality 1)
(goal 29 YES)
(taunt-detected any-ally 6)
(stone-amount > 100)
(not (goal resource-needed STONE) )
=>
(release-escrow stone)
(tribute-to-player this-any-ally stone 100)
(acknowledge-taunt this-any-ally 6)
(chat-local-to-self "Tribute stone")
)
(defrule
(goal personality 1)
(goal 29 YES)
(timer-triggered t-tribute)
(player-in-game any-ally)
(wood-amount > 800)
(not (goal resource-needed WOOD) )
=>
(release-escrow wood)
(tribute-to-player this-any-ally wood 100)
(chat-to-player-using-id this-any-ally 22076)
;"Here art some wood!"
(chat-local-to-self "Tribute wood")
)
(defrule
(goal personality 1)
(goal 29 YES)
(timer-triggered t-tribute)
(player-in-game any-ally)
(food-amount > 800)
(not (goal resource-needed FOOD) )
=>
(release-escrow food)
(tribute-to-player this-any-ally food 100)
(chat-to-player-using-id this-any-ally 22077)
;"Here art some food!"
(chat-local-to-self "Tribute food")
)
(defrule
(goal personality 1)
(goal 29 YES)
(timer-triggered t-tribute)
(player-in-game any-ally)
(gold-amount > 800)
(not (goal resource-needed GOLD) )
=>
(release-escrow gold)
(tribute-to-player this-any-ally gold 100)
(chat-to-player-using-id this-any-ally 22078)
;"Here art some gold!"
(chat-local-to-self "Tribute gold")
)
(defrule
(goal personality 1)
(goal 29 YES)
(timer-triggered t-tribute)
(player-in-game any-ally)
(stone-amount > 800)
(not (goal resource-needed STONE) )
=>
(release-escrow stone)
(tribute-to-player this-any-human ally 100)
(chat-to-player-using-id this-any-ally 22079)
;"Here art some stone!"
(chat-local-to-self "Tribute stone")
)
(defrule
(strategic-number sn-number-explore-groups != 1)
=>
(set-strategic-number sn-number-explore-groups 1)
)
(defrule
(goal wall-build YES)
(wall-invisible-percentage 2 > 0)
(strategic-number sn-number-explore-groups < 2)
=>
(set-strategic-number sn-number-explore-groups 2)
(set-strategic-number sn-blot-exploration-map 1)
)
(defrule
(or
(and
(strategic-number sn-number-explore-groups == 1)
(unit-type-count-total scout-cavalry-line < 1)
)
(and
(strategic-number sn-number-explore-groups == 2)
(unit-type-count-total scout-cavalry-line < 2)
)
)
(can-train scout-cavalry-line)
=>
(train scout-cavalry-line)
)
;*************************
;set goal 3
(defrule
(not (goal military-parity YES) )
=>
(set-goal military-parity YES)
)
(defrule
(or
(or
(and
(players-military-population any-enemy > 50)
(military-population < 45)
)
(and
(players-military-population any-enemy > 40)
(military-population < 35)
)
)
(and
(players-military-population any-enemy > 30)
(military-population < 25)
)
)
=>
(set-goal military-parity NO)
)
(defrule
(or
(or
(and
(players-military-population any-enemy > 20)
(military-population < 15)
)
(and
(players-military-population any-enemy > 10)
(military-population < 5)
)
)
(and
(players-military-population any-enemy > 0)
(military-population == 0)
)
)
=>
(set-goal military-parity NO)
)
(defrule
(or
(or
(and
(players-military-population every-enemy < 30)
(military-population > 60)
)
(and
(players-military-population every-enemy < 25)
(military-population > 50)
)
)
(and
(players-military-population every-enemy < 20)
(military-population > 40)
)
)
=>
(set-goal military-parity SUPERIOR)
)
(defrule
(or
(or
(and
(players-military-population every-enemy < 15)
(military-population > 30)
)
(and
(players-military-population every-enemy < 10)
(military-population > 20)
)
)
(and
(players-military-population every-enemy == 0)
(military-population > 4)
)
)
=>
(set-goal military-parity SUPERIOR)
)
;enemy army size
(defrule
(players-military-population any-enemy == 0)
(players-building-type-count any-enemy watch-tower-line == 0)
(players-building-type-count any-enemy castle == 0)
(players-building-type-count any-enemy town-center <= 1)
(not (goal enemy-soldiers 0) )
=>
(set-goal enemy-soldiers 0)
)
(defrule
(or
(players-military-population any-enemy > 0)
(players-building-type-count any-enemy watch-tower-line > 0)
)
(not (goal enemy-soldiers 10) )
=>
(set-goal enemy-soldiers 10)
)
(defrule
(or
(or
(players-military-population any-enemy > 10)
(players-building-type-count any-enemy watch-tower-line > 2)
)
(or
(players-building-type-count any-enemy castle > 0)
(players-building-type-count any-enemy town-center > 1)
)
)
(not (goal enemy-soldiers 20) )
=>
(set-goal enemy-soldiers 20)
)
(defrule
(or
(or
(players-military-population any-enemy > 20)
(players-building-type-count any-enemy watch-tower-line > 4)
)
(or
(players-building-type-count any-enemy castle > 1)
(players-building-type-count any-enemy town-center > 2)
)
)
(not (goal enemy-soldiers 30) )
=>
(set-goal enemy-soldiers 30)
)
;enemy navy size
(defrule
(difficulty < easy)
(goal 2 2)
(not (goal 35 0) )
=>
(set-goal 35 0)
)
(defrule
(difficulty < easy)
(or
(or
(cc-players-unit-type-count every-enemy galley-line >= 2)
(cc-players-unit-type-count every-enemy cannon-galleon-line >= 2)
)
(or
(cc-players-unit-type-count every-enemy fire-ship-line >= 2)
(cc-players-unit-type-count every-enemy longboat-line >= 2)
)
)
(not (goal 35 6) )
=>
(set-goal 35 6)
)
(defrule
(difficulty < easy)
(or
(or
(cc-players-unit-type-count every-enemy galley-line >= 6)
(cc-players-unit-type-count every-enemy cannon-galleon-line >= 6)
)
(or
(cc-players-unit-type-count every-enemy fire-ship-line >= 6)
(cc-players-unit-type-count every-enemy longboat-line >= 6)
)
)
(not (goal 35 12) )
=>
(set-goal 35 12)
)
(defrule
(difficulty < easy)
(or
(or
(cc-players-unit-type-count every-enemy galley-line >= 12)
(cc-players-unit-type-count every-enemy cannon-galleon-line >= 12)
)
(or
(cc-players-unit-type-count every-enemy fire-ship-line >= 12)
(cc-players-unit-type-count every-enemy longboat-line >= 12)
)
)
(not (goal 35 18) )
=>
(set-goal 35 18)
)
;***************************
;see if we ought to attack!
(defrule
(timer-triggered t-attackgroup)
=>
(set-goal attack-control YES)
(set-strategic-number sn-percent-attack-soldiers 100)
(set-strategic-number sn-percent-attack-boats 0)
)
(defrule
(timer-triggered t-attackgroup)
(nor
(stance-toward any-computer enemy)
(stance-toward any-human enemy)
)
=>
(set-goal attack-control NO)
)
(defrule
(timer-triggered t-attackgroup)
(building-type-count-total wonder > 0)
=>
(set-goal attack-control NO)
)
(defrule
(timer-triggered t-attackgroup)
(goal siege-available NO)
=>
(set-goal attack-control NO)
)
(defrule
(timer-triggered t-attackgroup)
(town-under-attack)
=>
(chat-to-player-using-id every-ally 22406) ;201
(chat-to-player-using-id any-human-ally 22115)
;"Help! The enemy is in my town!"
)
#load-if-defined DIFFICULTY-EASIEST
(defrule
(timer-triggered t-attackgroup)
=>
(set-strategic-number sn-percent-attack-soldiers 1)
(set-strategic-number sn-percent-attack-boats 1)
(attack-now)
(chat-local-to-self "attack now!")
(set-goal attack-control NO)
)
#else
;*************************
(defrule
(timer-triggered t-attackgroup)
(taunt-detected any-ally 201)
(defend-soldier-count >= ten-percent-pop)
=>
(acknowledge-taunt this-any-ally 201)
(attack-now)
(chat-local-to-self "attack now!")
(set-goal attack-control NO)
)
(defrule
(timer-triggered t-attackgroup)
(population >= pop-cap)
=>
(set-strategic-number sn-percent-attack-soldiers 75)
(set-strategic-number sn-percent-attack-boats 75)
(attack-now)
(chat-local-to-self "attack now!")
(set-goal attack-control NO)
)
(defrule
(goal attack-control YES)
(timer-triggered t-attackgroup)
(defend-soldier-count >= fifteen-percent-pop)
(or
(players-building-type-count any-enemy wonder > 0)
(or
(enemy-captured-relics)
(goal military-parity SUPERIOR)
)
)
=>
(set-strategic-number sn-percent-attack-soldiers 100)
(set-strategic-number sn-percent-attack-boats 0)
(attack-now)
(chat-local-to-self "attack now!")
(chat-to-player-using-id every-ally 22406) ;201
(chat-to-player-using-id any-human-ally 22117)
;"Attack now!"
(set-goal attack-control NO)
)
(defrule
(goal attack-control YES)
(goal rush-control RUSHING)
(timer-triggered t-attackgroup)
(defend-soldier-count >= 5)
(or
(goal enemy-soldiers 0)
(goal enemy-soldiers 10)
)
=>
(attack-now)
(chat-local-to-self "attack now!")
(chat-to-player-using-id every-ally 22406) ;201
(chat-to-player-using-id any-human-ally 22116)
;"Everyone attack now!"
(set-goal attack-control NO)
)
(defrule
(goal attack-control YES)
(goal rush-control RUSHING)
(timer-triggered t-attackgroup)
(or
(and
(goal enemy-soldiers 20)
(defend-soldier-count >= 10)
)
(and
(goal enemy-soldiers 30)
(defend-soldier-count >= 15)
)
)
=>
(attack-now)
(chat-local-to-self "attack now!")
(chat-to-player-using-id every-ally 22406) ;201
(chat-to-player-using-id any-human-ally 22116)
;"Everyone attack now!"
(set-goal attack-control NO)
)
(defrule
(goal attack-control YES)
(timer-triggered t-attackgroup)
(defend-soldier-count >= 10)
(or
(goal enemy-soldiers 0)
(goal enemy-soldiers 10)
)
=>
(attack-now)
(chat-local-to-self "attack now!")
(chat-to-player-using-id every-ally 22406) ;201
(chat-to-player-using-id any-human-ally 22116)
;"Everyone attack now!"
(set-goal attack-control NO)
)
(defrule
(goal attack-control YES)
(timer-triggered t-attackgroup)
(or
(and
(goal enemy-soldiers 20)
(defend-soldier-count >= 20)
)
(and
(goal enemy-soldiers 30)
(defend-soldier-count >= 30)
)
)
=>
(attack-now)
(chat-local-to-self "attack now!")
(chat-to-player-using-id every-ally 22406) ;201
(chat-to-player-using-id any-human-ally 22116)
;"Everyone attack now!"
(set-goal attack-control NO)
)
(defrule
(difficulty < easy)
(timer-triggered t-attackgroup)
(or
(and
(goal 35 0)
(defend-warboat-count > 1)
)
(and
(goal 35 6)
(defend-warboat-count >= 4)
)
)
=>
(set-strategic-number sn-percent-attack-soldiers 0)
(set-strategic-number sn-percent-attack-boats 100)
(attack-now)
(chat-local-to-self "boats attack now!")
)
(defrule
(difficulty < easy)
(timer-triggered t-attackgroup)
(or
(and
(goal 35 12)
(defend-warboat-count >= 8)
)
(and
(goal 35 18)
(defend-warboat-count >= 12)
)
)
=>
(set-strategic-number sn-percent-attack-soldiers 0)
(set-strategic-number sn-percent-attack-boats 100)
(attack-now)
(chat-local-to-self "boats attack now!")
)
;desperation
(defrule
(timer-triggered t-attackgroup)
(game-time > 600)
(building-type-count wonder < 1)
(unit-type-count-total villager == 0)
=>
(set-strategic-number sn-percent-attack-soldiers 100)
(set-strategic-number sn-percent-attack-boats 100)
(attack-now)
(chat-local-to-self "everyone attack now!")
)
#end-if
;********************************
#load-if-defined DIFFICULTY-EASIEST
;attack timer - after 1/2 hour, launch attacks every 15 minutes
(defrule
(players-current-age every-human >= castle-age)
(game-time > 1800)
=>
(enable-timer t-attackgroup 1)
(disable-self)
)
(defrule
(timer-triggered t-attackgroup)
=>
(disable-timer t-attackgroup)
(enable-timer t-attackgroup 900)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-EASY
;attack timer - after 20 minutes, launch attacks every 10 minutes
(defrule
(players-current-age every-human >= castle-age)
(game-time > 1200)
=>
(enable-timer t-attackgroup 1)
(disable-self)
)
(defrule
(timer-triggered t-attackgroup)
=>
(disable-timer t-attackgroup)
(enable-timer t-attackgroup 600)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-MODERATE
;attack timer - once in feudal, or if rushing, launch attacks every 5 minutes
(defrule
(or
(current-age >= castle-age)
(goal rush-control RUSHING)
)
=>
(enable-timer t-attackgroup 1)
(disable-self)
)
(defrule
(timer-triggered t-attackgroup)
=>
(disable-timer t-attackgroup)
(enable-timer t-attackgroup 300)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARD
(defrule
(or
(current-age >= feudal-age)
(goal rush-control RUSHING)
)
=>
(enable-timer t-attackgroup 1)
(disable-self)
)
(defrule
(timer-triggered t-attackgroup)
=>
(disable-timer t-attackgroup)
(enable-timer t-attackgroup 120)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARDEST
(defrule
(or
(current-age >= feudal-age)
(goal rush-control RUSHING)
)
=>
(enable-timer t-attackgroup 1)
(disable-self)
)
(defrule
(timer-triggered t-attackgroup)
=>
(disable-timer t-attackgroup)
(enable-timer t-attackgroup 120)
)
#end-if
;insults the player
(defrule
(true)
=>
(enable-timer t-chat 10)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy british)
(not (civ-selected british) )
=>
(chat-to-player-using-id this-any-human-enemy 22080)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy byzantine)
(not (civ-selected byzantine) )
=>
(chat-to-player-using-id this-any-human-enemy 22081)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy celtic)
(not (civ-selected celtic) )
=>
(chat-to-player-using-id this-any-human-enemy 22082)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy chinese)
(not (civ-selected chinese) )
=>
(chat-to-player-using-id this-any-human-enemy 22083)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy french)
(not (civ-selected french) )
=>
(chat-to-player-using-id this-any-human-enemy 22084)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy german)
(not (civ-selected german) )
=>
(chat-to-player-using-id this-any-human-enemy 22085)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy gothic)
(not (civ-selected gothic) )
=>
(chat-to-player-using-id this-any-human-enemy 22086)
(chat-to-player-using-id this-any-human-enemy 22087)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy japanese)
(not (civ-selected japanese) )
=>
(chat-to-player-using-id this-any-human-enemy 22088)
(chat-to-player-using-id this-any-human-enemy 22089)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy mongol)
(not (civ-selected mongol) )
=>
(chat-to-player-using-id this-any-human-enemy 22090)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy persian)
(not (civ-selected persian) )
=>
(chat-to-player-using-id this-any-human-enemy 22091)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy saracen)
(not (civ-selected saracen) )
=>
(chat-to-player-using-id this-any-human-enemy 22092)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy turkish)
(not (civ-selected turkish) )
=>
(chat-to-player-using-id this-any-human-enemy 22093)
(chat-to-player-using-id this-any-human-enemy 22094)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(players-civ any-human-enemy viking)
(not (civ-selected viking) )
=>
(chat-to-player-using-id this-any-human-enemy 22095)
(disable-self)
)
(defrule
(timer-triggered t-chat)
=>
(generate-random-number 9)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 1)
=>
(chat-to-player-using-id every-enemy 22096)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 2)
=>
(chat-to-player-using-id every-enemy 22097)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 3)
=>
(chat-to-player-using-id every-enemy 22098)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 4)
=>
(chat-to-player-using-id every-enemy 22099)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 5)
=>
(chat-to-player-using-id every-enemy 22100)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 6)
=>
(chat-to-player-using-id every-enemy 22101)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 7)
=>
(chat-to-player-using-id every-enemy 22102)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 8)
=>
(chat-to-player-using-id every-enemy 22103)
(disable-timer t-chat)
(disable-self)
)
(defrule
(timer-triggered t-chat)
(random-number == 9)
=>
(chat-to-player-using-id every-enemy 22104)
(disable-timer t-chat)
(disable-self)
)
;THE BULLY
#load-if-not-defined TEAMS-LOCKED
(defrule
(true)
=>
(set-goal personality NOTICE)
(set-goal get-mad NO)
(disable-self)
)
(defrule
(goal personality NOTICE)
(taunt-detected any-computer-ally 218)
=>
(set-goal personality 12)
(set-stance every-human enemy)
(acknowledge-taunt this-any-computer-ally 218)
(set-stance every-computer ally)
(disable-self)
)
(defrule
(goal personality NOTICE)
(difficulty <= moderate)
(building-type-count house > 0)
(player-in-game any-computer-ally)
=>
(set-goal personality 50)
(disable-self)
)
(defrule
(goal personality 50)
=>
(generate-random-number 4)
(set-goal 36 NO)
(set-goal 37 NO)
(set-goal 38 NO)
(set-goal 39 NO)
(disable-self)
)
(defrule
(goal personality 50)
(random-number == 1)
=>
(set-goal personality ALLY)
(disable-self)
)
(defrule
(goal personality 50)
(difficulty == moderate)
(or
(random-number == 2)
(random-number == 3)
)
=>
(set-goal personality ALLY)
(disable-self)
)
(defrule
(goal personality 50)
(difficulty < moderate)
(or
(random-number == 2)
(random-number == 3)
)
=>
(set-goal personality BULLY)
(disable-self)
)
(defrule
(goal personality 50)
(random-number == 4)
=>
(set-goal personality BULLY)
(disable-self)
)
;make sure the other AIs don't try this!
(defrule
(or
(goal personality BULLY)
(goal personality ALLY)
)
=>
(chat-to-player-using-id every-computer 22400) ;"218"
(disable-self)
)
;no early rush!
(defrule
(or
(goal personality BULLY)
(goal personality ALLY)
)
(or
(goal rush-control 2)
(goal rush-control RUSHING)
)
=>
(set-goal rush-control 4)
)
;end the deal
(defrule
(stance-toward any-human enemy)
(or
(goal personality BULLY)
(goal personality ALLY)
)
=>
(set-stance this-any-human neutral)
(set-stance every-computer neutral)
(disable-self)
)
;*******************************************************8
;bully rules
(defrule
(goal personality BULLY)
(goal get-mad NO)
(current-age >= feudal-age)
=>
(enable-timer t-chat 300)
(set-goal 25 NOTICE)
(disable-self)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(timer-triggered t-chat)
=>
(generate-random-number 4)
)
;***************************************************
;feudal age demands
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(current-age == feudal-age)
(timer-triggered t-chat)
(stance-toward any-human neutral)
(random-number == 1)
=>
(chat-to-player-using-id this-any-human 22039)
(chat-to-player-using-id this-any-human 22037)
;"Give me 100 wood or face my wrath!"
;"Thou hast but 3 minutes to obey!"
(set-goal 25 WOOD)
(clear-tribute-memory this-any-human wood)
(disable-timer t-chat)
(enable-timer t-chat 200)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(current-age == feudal-age)
(timer-triggered t-chat)
(stance-toward any-human neutral)
(random-number == 2)
=>
(chat-to-player-using-id this-any-human 22038)
(chat-to-player-using-id this-any-human 22037)
;"Give me 100 food or face my wrath!"
;"Thou hast but 3 minutes to obey!"
(set-goal 25 FOOD)
(clear-tribute-memory this-any-human food)
(disable-timer t-chat)
(enable-timer t-chat 200)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(current-age == feudal-age)
(timer-triggered t-chat)
(stance-toward any-human neutral)
(random-number == 3)
=>
(chat-to-player-using-id this-any-human 22036)
(chat-to-player-using-id this-any-human 22037)
;"Give me 100 gold or face my wrath!"
;"Thou hast but 3 minutes to obey!"
(set-goal 25 GOLD)
(clear-tribute-memory this-any-human gold)
(disable-timer t-chat)
(enable-timer t-chat 200)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(current-age == feudal-age)
(timer-triggered t-chat)
(stance-toward any-human neutral)
(random-number == 4)
=>
(chat-to-player-using-id this-any-human 22040)
(chat-to-player-using-id this-any-human 22037)
;"Give me 100 stone or face my wrath!"
;"Thou hast but 3 minutes to obey!"
(set-goal 25 STONE)
(clear-tribute-memory this-any-human stone)
(disable-timer t-chat)
(enable-timer t-chat 200)
)
(defrule
(goal personality BULLY)
(or
(and
(goal 25 WOOD)
(players-tribute-memory any-human-neutral wood >= 100)
)
(and
(goal 25 FOOD)
(players-tribute-memory any-human-neutral food >= 100)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22041)
;"Well done! Thou art still in my good graces."
(set-goal 25 NOTICE)
(disable-timer t-chat)
(enable-timer t-chat 360)
)
(defrule
(goal personality BULLY)
(or
(and
(goal 25 GOLD)
(players-tribute-memory any-human-neutral gold >= 100)
)
(and
(goal 25 STONE)
(players-tribute-memory any-human-neutral stone >= 100)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22041)
;"Well done! Thou art still in my good graces."
(set-goal 25 NOTICE)
(disable-timer t-chat)
(enable-timer t-chat 360)
)
(defrule
(goal personality BULLY)
(timer-triggered t-chat)
(or
(or
(goal 25 WOOD)
(goal 25 FOOD)
)
(or
(goal 25 GOLD)
(goal 25 STONE)
)
)
=>
(set-goal personality 10)
(disable-timer t-chat)
(disable-self)
)
;***************************************************
;castle-age demands
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(timer-triggered t-chat)
(current-age == castle-age)
(stance-toward any-human neutral)
(random-number == 1)
=>
(chat-to-player-using-id this-any-human 22045)
;"Thou hast but 2 minutes to send me 200 wood or face the consequences!"
(set-goal 25 CASTLE-AGE-WOOD)
(clear-tribute-memory this-any-human wood)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(timer-triggered t-chat)
(current-age == castle-age)
(stance-toward any-human neutral)
(random-number == 2)
=>
(chat-to-player-using-id this-any-human 22043)
;"Thou hast but 2 minutes to send me 200 food or face the consequences!"
(set-goal 25 CASTLE-AGE-FOOD)
(clear-tribute-memory this-any-human food)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(timer-triggered t-chat)
(current-age == castle-age)
(stance-toward any-human neutral)
(random-number == 3)
=>
(chat-to-player-using-id this-any-human 22042)
;"Thou hast but 2 minutes to send me 200 gold or face the consequences!"
(set-goal 25 CASTLE-AGE-GOLD)
(clear-tribute-memory this-any-human gold)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(goal personality BULLY)
(goal 25 NOTICE)
(timer-triggered t-chat)
(current-age == castle-age)
(stance-toward any-human neutral)
(random-number == 3)
=>
(chat-to-player-using-id this-any-human 22044)
;"Thou hast but 2 minutes to send me 200 stone or face the consequences!"
(set-goal 25 CASTLE-AGE-STONE)
(clear-tribute-memory this-any-human stone)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(goal personality BULLY)
(or
(and
(goal 25 CASTLE-AGE-WOOD)
(players-tribute-memory any-human-neutral wood >= 200)
)
(and
(goal 25 CASTLE-AGE-FOOD)
(players-tribute-memory any-human-neutral food >= 200)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22046)
;"Thank thee! Thy tribute shall be put to good use."
(set-goal 25 NOTICE)
(disable-timer t-chat)
(enable-timer t-chat 360)
)
(defrule
(goal personality BULLY)
(or
(and
(goal 25 CASTLE-AGE-GOLD)
(players-tribute-memory any-human-neutral gold >= 200)
)
(and
(goal 25 CASTLE-AGE-STONE)
(players-tribute-memory any-human-neutral stone >= 200)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22046)
;"Thank thee! Thy tribute shall be put to good use."
(set-goal 25 NOTICE)
(disable-timer t-chat)
(enable-timer t-chat 360)
)
(defrule
(goal personality BULLY)
(timer-triggered t-chat)
(or
(or
(goal 25 CASTLE-AGE-WOOD)
(goal 25 CASTLE-AGE-FOOD)
)
(or
(goal 25 CASTLE-AGE-GOLD)
(goal 25 CASTLE-AGE-STONE)
)
)
=>
(set-goal personality 10)
(disable-timer t-chat)
(disable-self)
)
;***************************************************
;Imperial age demands
(defrule
(timer-triggered t-chat)
(goal personality BULLY)
(current-age == imperial-age)
(stance-toward any-human neutral)
(random-number == 1)
=>
(chat-to-player-using-id this-any-human 22047)
(chat-to-player-using-id this-any-human 22048)
;"Send me 500 wood in tribute or die!"
;"As usual, thou hast 2 minutes to comply."
(set-goal 25 IMPERIAL-AGE-WOOD)
(clear-tribute-memory this-any-human wood)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(timer-triggered t-chat)
(goal personality BULLY)
(current-age == imperial-age)
(stance-toward any-human neutral)
(random-number == 2)
=>
(chat-to-player-using-id this-any-human 22049)
(chat-to-player-using-id this-any-human 22048)
;"Send me 500 food in tribute or die!"
;"As usual, thou hast 2 minutes to comply."
(set-goal 25 IMPERIAL-AGE-FOOD)
(clear-tribute-memory this-any-human food)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(timer-triggered t-chat)
(goal personality BULLY)
(current-age == imperial-age)
(stance-toward any-human neutral)
(random-number == 3)
=>
(chat-to-player-using-id this-any-human 22050)
(chat-to-player-using-id this-any-human 22048)
;"Send me 500 gold in tribute or die!"
;"As usual, thou hast 2 minutes to comply."
(set-goal 25 IMPERIAL-AGE-GOLD)
(clear-tribute-memory this-any-human gold)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(timer-triggered t-chat)
(goal personality BULLY)
(current-age == imperial-age)
(stance-toward any-human neutral)
(random-number == 4)
=>
(chat-to-player-using-id this-any-human 22051)
(chat-to-player-using-id this-any-human 22048)
;"Send me 500 stone in tribute or die!"
;"As usual, thou hast 2 minutes to comply."
(set-goal 25 IMPERIAL-AGE-STONE)
(clear-tribute-memory this-any-human stone)
(disable-timer t-chat)
(enable-timer t-chat 150)
)
(defrule
(goal personality BULLY)
(or
(and
(goal 25 IMPERIAL-AGE-WOOD)
(players-tribute-memory any-human-neutral wood >= 500)
)
(and
(goal 25 IMPERIAL-AGE-FOOD)
(players-tribute-memory any-human-neutral food >= 500)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22052)
;"Excellent! Thou hast done acceptably, and are safe for now."
(set-goal 25 NOTICE)
(disable-timer t-chat)
(enable-timer t-chat 360)
)
(defrule
(goal personality BULLY)
(or
(and
(goal 25 IMPERIAL-AGE-GOLD)
(players-tribute-memory any-human-neutral gold >= 500)
)
(and
(goal 25 IMPERIAL-AGE-STONE)
(players-tribute-memory any-human-neutral stone >= 500)
)
)
=>
(chat-to-player-using-id this-any-human-neutral 22052)
;"Excellent! Thou hast done acceptably, and are safe for now."
(set-goal 25 NOTICE)
(disable-timer t-chat)
(enable-timer t-chat 360)
)
(defrule
(goal personality BULLY)
(timer-triggered t-chat)
(or
(or
(goal 25 IMPERIAL-AGE-WOOD)
(goal 25 IMPERIAL-AGE-FOOD)
)
(or
(goal 25 IMPERIAL-AGE-GOLD)
(goal 25 IMPERIAL-AGE-STONE)
)
)
=>
(set-goal personality 10)
(disable-timer t-chat)
(disable-self)
)
;lots and lots of tribute
(defrule
(goal personality BULLY)
(players-tribute any-human-neutral wood > 500)
(players-tribute any-human-neutral food > 500)
(players-tribute any-human-neutral gold > 500)
(players-tribute any-human-neutral stone > 500)
=>
(set-stance this-any-human ally)
(set-stance every-computer enemy)
(chat-to-player-using-id this-any-human 22053)
;"Thou art a most worthy fellow. I hereby declare us friends."
(set-goal personality NO)
(disable-timer t-chat)
(disable-self)
)
(defrule
(goal personality BULLY)
(or
(or
(players-tribute any-human-neutral wood >= 1500)
(players-tribute any-human-neutral food >= 1500)
)
(or
(players-tribute any-human-neutral gold >= 1500)
(players-tribute any-human-neutral stone >= 1500)
)
)
=>
(set-stance this-any-human ally)
(set-stance every-computer enemy)
(chat-to-player-using-id this-any-human 22053)
;"Thou art a most worthy fellow. I hereby declare us friends."
(set-goal personality NO)
(disable-timer t-chat)
(disable-self)
)
;********************************************
;********************************************
;THE ALLY RULES (goal personality ALLY)
(defrule
(goal personality ALLY)
(goal get-mad NO)
(stance-toward any-human neutral)
(current-age == feudal-age)
(game-time > 600)
=>
(chat-to-player-using-id this-any-human 22055)
(chat-to-player-using-id this-any-human 22056)
;"Send me 500 each of wood, food, gold, and stone!"
;"If thou dost this thing, I shall join thine side."
(set-goal get-mad YES)
(disable-self)
)
(defrule
(goal personality ALLY)
(goal get-mad YES)
(starting-resources == low-resources)
=>
(enable-timer t-chat 600)
(disable-self)
)
(defrule
(goal personality ALLY)
(goal get-mad YES)
(starting-resources == medium-resources)
=>
(enable-timer t-chat 300)
(disable-self)
)
(defrule
(goal personality ALLY)
(goal get-mad YES)
(starting-resources == high-resources)
=>
(enable-timer t-chat 150)
(disable-self)
)
(defrule
(goal personality ALLY)
(timer-triggered t-chat)
(players-tribute any-human-neutral wood < 500)
=>
(chat-to-player-using-id this-any-human-neutral 22057)
;"Thou must send more wood if thou wishest me to be thine ally!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(players-tribute any-human-neutral food < 500)
=>
(chat-to-player-using-id this-any-human-neutral 22058)
;"Thou must send more food if thou wishest me to be thine ally!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(players-tribute any-human-neutral gold < 500)
=>
(chat-to-player-using-id this-any-human-neutral 22059)
;"Thou must send more gold if thou wishest me to be thine ally!"
(disable-timer t-chat)
(enable-timer t-chat 300)
)
(defrule
(timer-triggered t-chat)
(goal personality ALLY)
(players-tribute any-human-neutral stone < 500)
=>
(chat-to-player-using-id this-any-human-neutral 22060)
;"Thou must send more stone if thou wishest me to be thine ally!"
(disable-timer t-chat)
(enable-timer t-chat 300)
(disable-self)
)
(defrule
(goal personality ALLY)
(players-tribute any-human-neutral wood >= 500)
=>
(chat-to-player-using-id this-any-human-neutral 22061)
;"Thank thee for the wood! It is enough."
(clear-tribute-memory this-any-human-neutral wood)
(set-goal 36 YES)
(disable-self)
)
(defrule
(goal personality ALLY)
(players-tribute any-human-neutral food >= 500)
=>
(chat-to-player-using-id this-any-human-neutral 22062)
;"Thank thee for the food! It is enough."
(clear-tribute-memory this-any-human-neutral food)
(set-goal 37 YES)
(disable-self)
)
(defrule
(goal personality ALLY)
(players-tribute any-human-neutral gold >= 500)
=>
(chat-to-player-using-id this-any-human-neutral 22063)
;"Thank thee for the gold! It is enough."
(clear-tribute-memory this-any-human-neutral gold)
(disable-self)
)
(defrule
(goal personality ALLY)
(players-tribute any-human-neutral stone >= 500)
=>
(chat-to-player-using-id this-any-human-neutral 22064)
;"Thank thee for the stone! It is enough."
(clear-tribute-memory this-any-human-neutral stone)
(set-goal 38 YES)
(disable-self)
)
(defrule
(goal personality ALLY)
(goal 36 YES)
(players-tribute-memory any-human-neutral wood > 0)
=>
(chat-to-player-using-id this-any-human-neutral 22065)
;"Thou hast sent me sufficient wood!! Pray, send no more."
(clear-tribute-memory this-any-human-neutral wood)
(set-goal 39 YES)
(disable-self)
)
(defrule
(goal personality ALLY)
(goal 37 YES)
(players-tribute-memory any-human-neutral food > 0)
=>
(chat-to-player-using-id this-any-human-neutral 22066)
;"Thou hast sent me sufficient food!! Pray, send no more."
(clear-tribute-memory this-any-human-neutral food)
)
(defrule
(goal personality ALLY)
(goal 38 YES)
(players-tribute-memory any-human-neutral gold > 0)
=>
(chat-to-player-using-id this-any-human-neutral 22067)
;"Thou hast sent me sufficient gold!! Pray, send no more."
(clear-tribute-memory this-any-human-neutral gold)
)
(defrule
(goal personality ALLY)
(goal 39 YES)
(players-tribute-memory any-human-neutral stone > 0)
=>
(chat-to-player-using-id this-any-human-neutral 22068)
;"Thou hast sent me sufficient stone!! Pray, send no more."
(clear-tribute-memory this-any-human-neutral stone)
)
(defrule
(goal personality ALLY)
(players-tribute any-human-neutral wood >= 500)
(players-tribute any-human-neutral food >= 500)
(players-tribute any-human-neutral gold >= 500)
(players-tribute any-human-neutral stone >= 500)
(stance-toward any-human neutral)
=>
(chat-to-player-using-id this-any-human 22016)
(chat-to-player-using-id this-any-human 22003)
;"The goods we have obtained from you are glorious indeed!"
;"Let us be friends henceforth!"
(set-stance this-any-human ally)
(set-stance every-computer enemy)
(set-goal personality NO)
(disable-self)
)
;*************************************************
;MODERATE DIFFICULTY
(defrule
(goal personality ALLY)
(game-time > 4800)
(stance-toward any-human neutral)
(difficulty == moderate)
(or
(or
(goal 36 NO)
(goal 37 NO)
)
(or
(goal 38 NO)
(goal 39 NO)
)
)
=>
(chat-to-player-using-id this-any-human 22069)
(chat-to-player-using-id this-any-human 22070)
;"I have waited far too long for the promised tribute!"
;"Thou art exceedingly lax in fulfilling my requests."
(set-stance this-any-human enemy)
(set-stance every-computer ally)
(set-goal personality 10)
)
;*************************************************
;HARD+ DIFFICULTY
(defrule
(goal personality ALLY)
(game-time > 3600)
(stance-toward any-human neutral)
(difficulty <= hard)
(or
(or
(goal 36 NO)
(goal 37 NO)
)
(or
(goal 38 NO)
(goal 39 NO)
)
)
=>
(chat-to-player-using-id this-any-human 22069)
(chat-to-player-using-id this-any-human 22070)
;"I have waited far too long for the promised tribute!"
;"Thou art exceedingly lax in fulfilling my requests."
(set-stance this-any-human enemy)
(set-stance every-computer ally)
(set-goal personality 10)
)
;*************************************************
#end-if
;for a variety of warships goal 2 1 = "normal" status; goal 2 2 = the enemy has few or no ships
;best ship-builders = byzantines, japanese, persian, saracen, viking
;secondary = briton, celts, chinese, turk
;tertiary = franks, goths, mongols, teuton,
;first make sure that there is only _one_ main ship-builder
(defrule
(goal boat-strategy MANYBOATS)
=>
(set-goal sea-owner NOTICE)
(disable-self)
)
(defrule
(taunt-detected any-ally 202)
=>
(acknowledge-taunt this-any-ally 202)
(set-goal sea-owner NO)
(disable-self)
)
;best ship-builders
(defrule
(goal sea-owner NOTICE)
(or
(or
(civ-selected byzantine)
(civ-selected japanese)
)
(or
(or
(civ-selected persian)
(civ-selected saracen)
)
(civ-selected viking)
)
)
(player-in-game any-computer-ally)
=>
(chat-to-player-using-id every-ally 22408) ;202
(set-goal sea-owner YES)
(disable-self)
)
(defrule
(goal sea-owner NOTICE)
(game-time > 10)
(player-in-game any-computer-ally)
(or
(or
(civ-selected briton)
(civ-selected celtic)
)
(or
(civ-selected chinese)
(civ-selected turkish)
)
)
=>
(chat-to-player-using-id every-ally 22408) ;202
(set-goal sea-owner YES)
(disable-self)
)
(defrule
(goal sea-owner NOTICE)
(game-time > 20)
(player-in-game any-computer-ally)
(or
(or
(civ-selected frankish)
(civ-selected gothic)
)
(or
(civ-selected mongol)
(civ-selected teutonic)
)
)
=>
(chat-to-player-using-id every-ally 22408) ;202
(set-goal sea-owner YES)
(disable-self)
)
;don't let the main ship builder join the human player!
(defrule
(goal sea-owner YES)
(not (goal personality 0) )
=>
(set-goal personality 0)
)
;make sure we can ALWAYS build a transport-ship ...
(defrule
(population >= pop-cap)
(building-type-count dock > 0)
(unit-type-count transport-ship == 0)
(can-afford-unit transport-ship)
(or
(attack-soldier-count > 0)
(goal rush-control RUSHING)
)
=>
(delete-unit fishing-ship)
)
(defrule
(population >= pop-cap)
(building-type-count dock > 0)
(unit-type-count fishing-ship == 0)
(unit-type-count transport-ship == 0)
(can-afford-unit transport-ship)
(or
(attack-soldier-count > 0)
(goal rush-control RUSHING)
)
=>
(delete-unit villager)
)
(defrule
(unit-type-count-total transport-ship == 0)
(or
(attack-soldier-count > 0)
(goal rush-control RUSHING)
)
(can-train-with-escrow transport-ship)
=>
(release-escrow wood)
(train transport-ship)
)
(defrule
(attack-soldier-count >= 10)
(unit-type-count-total transport-ship < 2)
(can-train transport-ship)
=>
(train transport-ship)
)
(defrule
(attack-soldier-count >= 15)
(research-completed ri-careening)
(unit-type-count-total transport-ship < 3)
(can-train transport-ship)
=>
(train transport-ship)
)
;*****************************************
;FEUDAL AGE
(defrule
(current-age == feudal-age)
(warboat-count < ten-percent-pop)
(can-train galley)
(or
(or
(goal sea-owner YES)
(not (goal upgrade-conflict NOTICE) )
)
(or
(building-type-count-total blacksmith > 0)
(wood-amount >= 265)
)
)
=>
(train galley-line)
(set-goal make-fire-boat YES)
)
(defrule
(goal sea-owner YES)
(current-age == feudal-age)
(warboat-count < five-percent-pop)
(can-train-with-escrow galley)
(not (can-train galley) )
=>
(release-escrow wood)
(release-escrow gold)
(train galley)
(set-goal make-fire-boat YES)
)
;*****************************************
;CASTLE AGE
#load-if-defined VIKING-CIV
(defrule
(current-age == castle-age)
(can-train longboat)
(or
(goal sea-owner YES)
(building-type-count-total university > 0)
)
(or
(and
(not (goal 2 2) )
(warboat-count < twenty-percent-pop)
)
(warboat-count < ten-percent-pop)
)
=>
(train longboat)
(set-goal make-fire-boat YES)
)
(defrule
(goal sea-owner YES)
(current-age == castle-age)
(warboat-count < five-percent-pop)
(can-train-with-escrow longboat)
(nor
(can-train longboat)
(goal 2 2)
)
=>
(release-escrow wood)
(release-escrow gold)
(train longboat)
(set-goal make-fire-boat YES)
)
#end-if
;fire-ships
(defrule
(goal make-fire-boat YES)
(current-age == castle-age)
(can-train fire-ship)
(or
(goal sea-owner YES)
(building-type-count-total university > 0)
)
(or
(and
(not (goal 2 2) )
(warboat-count < twenty-percent-pop)
)
(warboat-count < ten-percent-pop)
)
=>
(train fire-ship)
(set-goal make-fire-boat NO)
)
(defrule
(goal sea-owner YES)
(current-age == castle-age)
(goal make-fire-boat YES)
(warboat-count < five-percent-pop)
(can-train-with-escrow fire-ship)
(nor
(can-train fire-ship)
(goal 2 2)
)
=>
(release-escrow wood)
(release-escrow gold)
(train fire-ship)
(set-goal make-fire-boat NO)
)
;demolition-ships
(defrule
(warboat-count < ten-percent-pop)
(unit-type-count-total demolition-ship-line < five-percent-pop)
(nor
(can-train demolition-ship-line)
(goal 2 2)
)
=>
(train demolition-ship-line)
)
(defrule
(current-age == castle-age)
(can-train galley-line)
(not (unit-available longboat-line) )
(or
(goal sea-owner YES)
(building-type-count-total university > 0)
)
(or
(and
(not (goal 2 2) )
(warboat-count < twenty-percent-pop)
)
(warboat-count < ten-percent-pop)
)
=>
(train galley-line)
(set-goal make-fire-boat YES)
)
(defrule
(goal sea-owner YES)
(current-age == castle-age)
(warboat-count < five-percent-pop)
(can-train-with-escrow galley-line)
(nor
(can-train galley-line)
(or
(unit-available longboat-line)
(goal 2 2)
)
)
=>
(release-escrow wood)
(release-escrow gold)
(train galley-line)
(set-goal make-fire-boat YES)
)
;*****************************************
;IMPERIAL AGE
;cannon-galleons
(defrule
(current-age == imperial-age)
(can-train cannon-galleon-line)
(or
(warboat-count < twenty-percent-pop)
(and
(goal sea-owner YES)
(warboat-count < thirty-percent-pop)
)
)
(or
(unit-type-count-total cannon-galleon-line < five-percent-pop)
(and
(goal 2 2)
(unit-type-count-total cannon-galleon-line < fifteen-percent-pop)
)
)
=>
(train cannon-galleon-line)
(set-goal make-fire-boat YES)
)
(defrule
(goal sea-owner YES)
(current-age == imperial-age)
(warboat-count < five-percent-pop)
(can-train-with-escrow cannon-galleon-line)
(nor
(can-train cannon-galleon-line)
(goal 2 2)
)
=>
(release-escrow wood)
(release-escrow gold)
(train cannon-galleon-line)
(set-goal make-fire-boat YES)
)
;fire-ships
(defrule
(goal make-fire-boat YES)
(current-age == imperial-age)
(can-train fire-ship-line)
(or
(and
(not (goal 2 2) )
(or
(and
(goal sea-owner YES)
(warboat-count < thirty-percent-pop)
)
(warboat-count < twenty-percent-pop)
)
)
(warboat-count < ten-percent-pop)
)
=>
(train fire-ship-line)
(set-goal make-fire-boat NO)
)
(defrule
(goal sea-owner YES)
(goal make-fire-boat YES)
(current-age == imperial-age)
(warboat-count < five-percent-pop)
(can-train-with-escrow fire-ship-line)
(nor
(can-train fire-ship-line)
(goal 2 2)
)
=>
(release-escrow wood)
(release-escrow gold)
(train fire-ship-line)
(set-goal make-fire-boat NO)
)
(defrule
(current-age == imperial-age)
(can-train galleon)
(not (unit-available longboat-line) )
(or
(and
(not (goal 2 2) )
(or
(and
(goal sea-owner YES)
(warboat-count < thirty-percent-pop)
)
(warboat-count < twenty-percent-pop)
)
)
(warboat-count < ten-percent-pop)
)
=>
(train galleon)
(set-goal make-fire-boat YES)
)
(defrule
(goal sea-owner YES)
(current-age == imperial-age)
(warboat-count < five-percent-pop)
(can-train-with-escrow galley-line)
(nor
(can-train galley-line)
(or
(unit-available longboat-line)
(goal 2 2)
)
)
=>
(train galley-line)
(set-goal make-fire-boat YES)
)
;error trapping
(defrule
(current-age == imperial-age)
(not (goal rush-control NO) )
=>
(set-goal rush-control NO)
)
;should we launch a rush?
(defrule
(goal rush-control NOTICE)
=>
(generate-random-number 12)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
(difficulty < hard)
(random-number == 1)
(or
(not (goal 1 10) )
(map-type archipelago)
)
=>
(set-goal rush-control RUSHING)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
(difficulty < hard)
(random-number >= 2)
(random-number <= 5)
=>
(set-goal rush-control FEUDAL)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
(difficulty < hard)
(random-number >= 6)
(random-number <= 8)
=>
(set-goal rush-control CASTLE)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
(difficulty >= hard)
(random-number >= 1)
(random-number <= 2)
(or
(not (goal 1 10) )
(map-type archipelago)
)
=>
(set-goal rush-control RUSHING)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
(difficulty >= hard)
(random-number >= 3)
(random-number <= 6)
=>
(set-goal rush-control FEUDAL)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
(difficulty >= hard)
(random-number >= 7)
(random-number <= 9)
=>
(set-goal rush-control CASTLE)
(disable-self)
)
(defrule
(goal rush-control NOTICE)
=>
(set-goal rush-control IMPERIAL)
(disable-self)
)
(defrule
(goal rush-control FEUDAL)
(or
(map-type black-forest)
(map-type fortress)
)
=>
(set-goal rush-control IMPERIAL)
(disable-self)
)
(defrule
(goal rush-control RUSHING)
(current-age == dark-age)
(or
(map-type black-forest)
(map-type fortress)
)
=>
(set-goal rush-control CASTLE)
(disable-self)
)
;**************************************
;go after boomers
(defrule
(current-age >= dark-age)
(difficulty >= easy)
(or
(goal rush-control CASTLE)
(goal rush-control IMPERIAL)
)
(not (goal 1 10) )
(players-current-age every-enemy == dark-age)
(players-civilian-population every-enemy >= civ-feudal)
=>
(set-goal rush-control RUSHING)
(disable-self)
)
;do the dark-age rush
(defrule
(goal rush-control RUSHING)
(current-age == dark-age)
(or
(civilian-population >= civ-dark-rush)
(civilian-population >= 15)
)
(can-train militiaman)
=>
(train militiaman)
(chat-local-to-self "train militia")
)
;end the rush when it looks bad
(defrule
(goal rush-control RUSHING)
(current-age == dark-age)
(players-current-age any-enemy > dark-age)
=>
(set-goal rush-control CASTLE)
(disable-self)
)
;*******************************************************
;FEUDAL RUSH RULES
(defrule
(goal rush-control FEUDAL)
(current-age >= feudal-age)
=>
(set-goal rush-control RUSHING)
(disable-self)
)
;go after boomers
(defrule
(current-age >= feudal-age)
(difficulty >= easy)
(players-current-age every-enemy <= feudal-age)
(players-civilian-population every-enemy > civ-castle)
=>
(set-goal rush-control RUSHING)
(disable-self)
)
;end the feudal rush
(defrule
(goal rush-control RUSHING)
(current-age == feudal-age)
(players-current-age any-enemy > feudal-age)
=>
(set-goal rush-control IMPERIAL)
(disable-self)
)
;*******************************************************
;should we launch a castle rush?
(defrule
(goal rush-control CASTLE)
(current-age >= castle-age)
=>
(set-goal rush-control RUSHING)
(disable-self)
)
;end the rush
(defrule
(goal rush-control RUSHING)
(current-age == castle-age)
(players-current-age any-enemy == imperial-age)
=>
(set-goal rush-control IMPERIAL)
(disable-self)
)
(load "petersen constants")
(load "petersen map loads")
(load "petersen supplement")
(load "petersen groups")
(load "petersen resign")
#load-if-defined DEATH-MATCH
(load "petersen deathmatch")
#else
(load "AI petersen rules")
#end-if
; Common constants used in AI goals - other constants will follow the specific goals
; Common.
(defconst NO 0) ;Used to indicate not set or initial value (as Normal)
(defconst YES 1) ;Used to indicate set
(defconst NORMAL 0) ;Used for default values
(defconst NOTICE 99) ;Used for special highlight or initialization values that should be set
; Constants used for ratings (i.e. monk-rating)
(defconst EXCELLENT 100); For any rating-type value highest to lowest
(defconst GOOD 70)
(defconst MEDIUM 50)
(defconst FAIR 30)
(defconst POOR 10)
; Constants used for combat or defense strategy selection
(defconst INFANTRY 1)
(defconst CAVALRY 2)
(defconst LIGHTCAV 3)
(defconst CAVARCHER 4)
(defconst ARCHER 5)
(defconst SCORPION 12)
(defconst UNIQUE 13)
(defconst UNIT20 20) ;SP - wasn't sure what 20 was used for in combat-arm and combat-supp
;NOTE: Goal 1 0 = no boats; Goal 1 1 = boats; Goal 1 10 = lotsa boats (island map)
(defconst boat-strategy 1)
(defconst SOMEBOATS 1) ;this actually means we're on a water map
(defconst MANYBOATS 10) ; this actually means we're on an islands map
;goal 2 0 okay on boats; 2 1 need warships! 2 2 we've won with ships
(defconst boats-needed 2)
(defconst WARSHIPS 1) ;I don't think this is used any more
(defconst CONTROL 2)
;Goal 3 0 = military parity; Goal 3 1 = an enemy outnumbers us!
(defconst military-parity 3)
;uses NO, YES
(defconst SUPERIOR 2)
;goal 4 = used to track attack group AI
(defconst attack-control 4)
;SP - need doc for
;0= okay to launch an attack
;1= not okay - because we're outnumbered, building a wonder, or have no enemies
;2= not okay - because we lack siege
;3= not okay - because we're trying to rush to the next age and want to limit losses
;goal 5 = controls gather rates - 5 0 = normal; 5 1 = wood; 5 2 = food; 5 3 = gold; 5 4 = stone
(defconst resource-needed 5)
(defconst WOOD 1)
(defconst FOOD 2)
(defconst GOLD 3)
(defconst STONE 4)
;(defconst GOLD-STONE 5) this means you want both gold & stone
;goal 6 = controls rushes!; also uses NOTICE
(defconst rush-control 6)
(defconst FEUDAL 2)
(defconst CASTLE 3)
(defconst IMPERIAL 4)
(defconst RUSHING 10)
(defconst BOOMING 18)
(defconst FEEDING 19)
;goal 7 used for deathmatch to determine whether or not to build more units
(defconst need-deathmatch-villagers 7)
;uses NO, YES
;goal 8 secondary-build controls secondary builds (ensures there are already soldiers before doing a secondary build)
(defconst secondary-build 8)
;0 = it's okay to build a secondary unit
;1 = don't build a secondary unit
;goal 9 resource-supp used in conjunction with resource-needed to determine what to gather
(defconst resource-supp 9)
(defconst FOOD-ONLY 2)
(defconst GOLD-ONLY 3)
(defconst WOOD-FOOD 12)
(defconst WOOD-GOLD 13)
(defconst WOOD-STONE 14)
(defconst FOOD-GOLD 23)
(defconst FOOD-STONE 24)
;goal 10 used to keep from building siege if I have few or no other units
(defconst soldiers-available 10)
;goal 11 = used to determine your main combat arm; in deathmatch, it determines your unique unit type
(defconst combat-arm 11)
;--Converted to constant combat-arm, uses common offense/defense unit line numbers.
;repl goal 11 1 = Infantry goal 12 1
;repl goal 11 2 = Cavalry goal 12 2
;repl goal 11 3 = Light Cav goal 12 3
;repl goal 11 4 = Cav Archer goal 12 4
;repl goal 11 5 = Archer goal 12 5
;repl scorpion = goal 12 12
;repl goal 11 13 = Unique
;goal 12 = used to supplement goal 11.
(defconst combat-supp SCORPION)
; Uses combat and defense strategy standard codes
;goal 13 = used to control boat production;
; 13 1 = no fast fire ships; 13 2 = no heavy demo ships; 13 3 = vikings
; 13 10 = no cannon galleys; 13 11 = no fast fire ships & no cannon galleys
(defconst boat-prod 13)
;goal 14 helps in age advancement
(defconst age-advancement 14) ; Uses NO, NOTICE
;--Converted 14 to constant age-advancement (was 0,99)
;SP - we should document our notice value -what does it indicate?
;NO = it's okay to start saving up for the next age advance, assuming all other criteria are met
;NOTICE - we are currently researching the next age. Keeps the CP from trying to "save up" for that age when it's already researching it
;goal 15 controls warboat builds according to pop cap; 15 0 = build warships
(defconst make-warboat 15) ; Uses NO, YES
;--Converted 15 to constant make-warboat Standard 0 = NO, 1 = YES
;goal 16 helps control upgrade conflicts
(defconst upgrade-conflict 16)
;NOTICE is 99 -- it means we're saving for age advancement or a wonder
;goal 17 controls builds based on civ type before unique units are available
(defconst pre-unique-arm 17)
;SP - need doc for
;1 = we're training infantry (until our castle is finished)
;2= we're training cavalry (till our castle is finished)
;3= we're training light-cavalry (till our castle is finished)
;4 = we're training cav archers (till our castle is finished)
;5 = we're training archers (till our castle is finished)
;note that these numbers correspond to the combat-arm and combat-supp goals above.
;goal 18 = used to decide on personalities
; goal 18 1 = feeder; 18 2 = boomer; 18 3 = bully; 18 4 = liar; 18 5 = "ally"
(defconst personality 18)
(defconst FEEDER 1)
(defconst BOOMER 2)
(defconst BULLY 3) ;m
(defconst LIAR 4)
(defconst ALLY 5) ;m
(defconst SENTTRIBUTE 10) ;SP - not sure about this one, check and correct
;SP: Document 11
;SP: Document 12
;SP: Document 13
;SP: Document 14
;SP: Document 15
(defconst TRADENEUTRAL 50) ;SP - not sure about this one, check and correct
;goal 19 = not currently in use
;goal 20 = helps control wonder-building
(defconst wonder-attempt 20) ; Uses NO, YES, POSSIBLE, MAYBE, NOTICE
(defconst POSSIBLE 10)
(defconst MAYBE 90) ;SP:Not sure on this one, took a guess.
;--Converted to constant wonder-attempt Standard 0 = NO, 1 = YES
;goal 21 = helps control castle-building
(defconst castle-attempt 21) ; Uses: NO, YES
;--Converted to constant castle-attempt Standard 0=NO, 1 = YES
;sandy - is goal 21 2 the 'possible/attempt' state? Can I change them to 10s?
;0 = not planning to build a castle.
;1 = want to build a castle, but haven't succeeded yet.
;2 = have already built 1 castle. Will build more if convenient.
;goal 22 = not currently in use
;goal 23 = goal 23 2 we are the main ship builder.
(defconst sea-owner 23) ; Uses: NO, YES, NOTICE
;--Converted 23 to constant sea-owner
;SP: Note changed all '2' to YES, all 0 to NO, all 99 to NOTICE.
;goal 24 = not currently in use
;goal 25 = controls alliance & resource types
;uses WOOD, FOOD, GOLD, STONE, NOTICE, NO. also uses
(defconst CASTLE-AGE-WOOD 11)
(defconst CASTLE-AGE-FOOD 12)
(defconst CASTLE-AGE-GOLD 13)
(defconst CASTLE-AGE-STONE 14)
(defconst IMPERIAL-AGE-WOOD 21)
(defconst IMPERIAL-AGE-FOOD 22)
(defconst IMPERIAL-AGE-GOLD 23)
(defconst IMPERIAL-AGE-STONE 24)
;goal 26 = checks to see how big the enemy military is in absolute terms.
(defconst enemy-soldiers 26) ;the number given is app the enemy's size
;goal 27 = determines monk prowess
(defconst monk-rating 27) ;Uses: GOOD, FAIR, NO
;--Converted 27 to constant monk-rating
; Changed from 0 = good monks, 27 1 = bad monks, 27 2 = terrible monks, 27 3 = no monks
; Changed to GOOD = good monks FAIR = bad monks POOR = terrible monks, NO = no monks
;goal 28 = helps keep alliances straight
(defconst get-mad 28)
;SP-uses NO, YES,
(defconst ANGRY 2)
(defconst ANGRIER 3)
(defconst ANGRIEST 4)
;goal 29 = controls tribute for feeder personalities
;goal 30 = toggle to control boat-building
(defconst make-fire-boat 30) ; Uses: NO, YES
;--Converted 30 to constant make-fire-boat
;goal 31 1 = infantry
(defconst infantry-upgrades 31)
;SP: Need documentation
;0 = not training infantry
;1 = training infantry
;goal 32 1 = archers
(defconst archer-upgrades 32)
;SP: Need documentation
;0 = not training archers
;1 = training archers
;goal 33 1 = cav
(defconst cav-upgrades 33)
;SP: Need documentation
;0 = not training cav
;1 = training cav
;goal 34 used to see if we are short on siege equipment
(defconst siege-available 34)
;0 = NO (we don't have enough siege)
;1 = YES (we have some siege)
;goal 35 = used for diplomacy on Easy & Easiest difficulty levels only. Also used to track
;used to calculate enemy navy size on higher levels of difficulty
;goal 36, 37, 38, 39 = wood, food, gold, stone checks for script parts that require them.
;SP: Need documentation
;goal 40 = wall-construction
(defconst wall-build 40) ; Uses: NO, YES, NOTICE
;Converted 40 to constant wall-build
;previously used 40 0 = walls off 40 1 = walls on, and 10 as initialized.
;Converted to NO, YES, NOTICE (was 10).
;timers
;timer 1 = controls tribute
;timer 2 = controls attack groups
;timer 3 = checks on what we are currently producing
;timer 5 = used to control chat messages
;timer 6 = additional chat message help
;timer 7 = wall-building timer
;timer 8 = yet more chat-message help
;timer 9 = the lumber-camp timer
;timer 10 = used to see if we've risen in age. Once we're imperial, used to build extraneous units
(defconst t-tribute 1)
(defconst t-attackgroup 2)
(defconst t-production 3)
(defconst t-chat 5)
(defconst t-chathelp 6)
(defconst t-tower 7)
(defconst t-chatmore 8)
(defconst t-lumbercamp 9)
(defconst t-ageup 10)