|
| 1 | +local RS = require 'map_gen.shared.redmew_surface' |
| 2 | +local MGSP = require 'resources.map_gen_settings' |
| 3 | +local Event = require 'utils.event' |
| 4 | +local b = require 'map_gen.shared.builders' |
| 5 | +local Config = require 'config' |
| 6 | + |
| 7 | +local ScenarioInfo = require 'features.gui.info' |
| 8 | +ScenarioInfo.set_map_name('Danger Ore Chessboard') |
| 9 | +ScenarioInfo.set_map_description([[ |
| 10 | +Clear the ore to expand the base, |
| 11 | +focus mining efforts on specific sectors to ensure |
| 12 | +proper material ratios, expand the map with pollution! |
| 13 | +]]) |
| 14 | +ScenarioInfo.add_map_extra_info([[ |
| 15 | +This map is split in three sectors [item=iron-ore] [item=copper-ore] [item=coal]. |
| 16 | +Each sector has a main resource and the other resources at a lower ratio. |
| 17 | +
|
| 18 | +You may not build the factory on ore patches. Exceptions: |
| 19 | + [item=burner-mining-drill] [item=electric-mining-drill] [item=pumpjack] [item=small-electric-pole] [item=medium-electric-pole] [item=big-electric-pole] [item=substation] [item=car] [item=tank] [item=spidertron] [item=locomotive] [item=cargo-wagon] [item=fluid-wagon] [item=artillery-wagon] |
| 20 | + [item=transport-belt] [item=fast-transport-belt] [item=express-transport-belt] [item=underground-belt] [item=fast-underground-belt] [item=express-underground-belt] [item=rail] [item=rail-signal] [item=rail-chain-signal] [item=train-stop] |
| 21 | +
|
| 22 | +The map size is restricted to the pollution generated. A significant amount of |
| 23 | +pollution must affect a section of the map before it is revealed. Pollution |
| 24 | +does not affect biter evolution.]]) |
| 25 | + |
| 26 | +ScenarioInfo.set_new_info([[ |
| 27 | +2019-04-24: |
| 28 | + - Stone ore density reduced by 1/2 |
| 29 | + - Ore quadrants randomized |
| 30 | + - Increased time factor of biter evolution from 5 to 7 |
| 31 | + - Added win conditions (+5% evolution every 5 rockets until 100%, +100 rockets until biters are wiped) |
| 32 | +
|
| 33 | +2019-03-30: |
| 34 | + - Uranium ore patch threshold increased slightly |
| 35 | + - Bug fix: Cars and tanks can now be placed onto ore! |
| 36 | + - Starting minimum pollution to expand map set to 650 |
| 37 | + View current pollution via Debug Settings [F4] show-pollution-values, |
| 38 | + then open map and turn on pollution via the red box. |
| 39 | + - Starting water at spawn increased from radius 8 to radius 16 circle. |
| 40 | +
|
| 41 | +2019-03-27: |
| 42 | + - Ore arranged into quadrants to allow for more controlled resource gathering. |
| 43 | +
|
| 44 | +2020-09-02: |
| 45 | + - Destroyed chests dump their content as coal ore. |
| 46 | +
|
| 47 | +2020-12-28: |
| 48 | + - Changed win condition. First satellite kills all biters, launch 500 to win the map. |
| 49 | +
|
| 50 | +2021-04-06: |
| 51 | + - Rail signals and train stations now allowed on ore. |
| 52 | +]]) |
| 53 | + |
| 54 | +local map = require 'map_gen.maps.danger_ores.modules.map' |
| 55 | +local main_ores_config = require 'map_gen.maps.danger_ores.config.vanilla_ores' |
| 56 | +local resource_patches = require 'map_gen.maps.danger_ores.modules.resource_patches' |
| 57 | +local resource_patches_config = require 'map_gen.maps.danger_ores.config.vanilla_resource_patches' |
| 58 | +local water = require 'map_gen.maps.danger_ores.modules.water' |
| 59 | +local trees = require 'map_gen.maps.danger_ores.modules.trees' |
| 60 | +local enemy = require 'map_gen.maps.danger_ores.modules.enemy' |
| 61 | +local dense_patches = require 'map_gen.maps.danger_ores.modules.dense_patches' |
| 62 | + |
| 63 | +local banned_entities = require 'map_gen.maps.danger_ores.modules.banned_entities' |
| 64 | +local allowed_entities = require 'map_gen.maps.danger_ores.config.vanilla_allowed_entities' |
| 65 | +banned_entities(allowed_entities) |
| 66 | + |
| 67 | +RS.set_map_gen_settings({ |
| 68 | + MGSP.grass_only, |
| 69 | + MGSP.enable_water, |
| 70 | + {terrain_segmentation = 'normal', water = 'normal'}, |
| 71 | + MGSP.starting_area_very_low, |
| 72 | + MGSP.ore_oil_none, |
| 73 | + MGSP.enemy_none, |
| 74 | + MGSP.cliff_none, |
| 75 | + MGSP.tree_none |
| 76 | +}) |
| 77 | + |
| 78 | +Config.market.enabled = false |
| 79 | +Config.player_rewards.enabled = false |
| 80 | +Config.player_create.starting_items = {} |
| 81 | +Config.dump_offline_inventories = { |
| 82 | + enabled = true, |
| 83 | + offline_timout_mins = 30 -- time after which a player logs off that their inventory is provided to the team |
| 84 | +} |
| 85 | + |
| 86 | +Event.on_init(function() |
| 87 | + game.draw_resource_selection = false |
| 88 | + game.forces.player.technologies['mining-productivity-1'].enabled = false |
| 89 | + game.forces.player.technologies['mining-productivity-2'].enabled = false |
| 90 | + game.forces.player.technologies['mining-productivity-3'].enabled = false |
| 91 | + game.forces.player.technologies['mining-productivity-4'].enabled = false |
| 92 | + |
| 93 | + game.difficulty_settings.technology_price_multiplier = 25 |
| 94 | + game.forces.player.technologies.logistics.researched = true |
| 95 | + game.forces.player.technologies.automation.researched = true |
| 96 | + |
| 97 | + game.map_settings.enemy_evolution.time_factor = 0.000007 -- default 0.000004 |
| 98 | + game.map_settings.enemy_evolution.destroy_factor = 0.000010 -- default 0.002 |
| 99 | + game.map_settings.enemy_evolution.pollution_factor = 0.000000 -- Pollution has no affect on evolution default 0.0000009 |
| 100 | + |
| 101 | + RS.get_surface().always_day = true |
| 102 | +end) |
| 103 | + |
| 104 | +local terraforming = require 'map_gen.maps.danger_ores.modules.terraforming' |
| 105 | +terraforming({start_size = 8 * 32, min_pollution = 400, max_pollution = 16000, pollution_increment = 4}) |
| 106 | + |
| 107 | +local rocket_launched = require 'map_gen.maps.danger_ores.modules.rocket_launched_simple' |
| 108 | +rocket_launched({win_satellite_count = 500}) |
| 109 | + |
| 110 | +local restart_command = require 'map_gen.maps.danger_ores.modules.restart_command' |
| 111 | +restart_command({scenario_name = 'danger-ore-next'}) |
| 112 | + |
| 113 | +local container_dump = require 'map_gen.maps.danger_ores.modules.container_dump' |
| 114 | +container_dump({entity_name = 'coal'}) |
| 115 | + |
| 116 | +local main_ores_builder = require 'map_gen.maps.danger_ores.modules.main_ores_chessboard' |
| 117 | + |
| 118 | +local config = { |
| 119 | + spawn_shape = b.circle(64), |
| 120 | + start_ore_shape = b.circle(68), |
| 121 | + main_ores_builder = main_ores_builder, |
| 122 | + main_ores = main_ores_config, |
| 123 | + main_ores_shuffle_order = true, |
| 124 | + resource_patches = resource_patches, |
| 125 | + resource_patches_config = resource_patches_config, |
| 126 | + water = water, |
| 127 | + water_scale = 1 / 96, |
| 128 | + water_threshold = 0.4, |
| 129 | + deepwater_threshold = 0.45, |
| 130 | + trees = trees, |
| 131 | + trees_scale = 1 / 64, |
| 132 | + trees_threshold = 0.4, |
| 133 | + trees_chance = 0.875, |
| 134 | + enemy = enemy, |
| 135 | + enemy_factor = 10 / (768 * 32), |
| 136 | + enemy_max_chance = 1 / 6, |
| 137 | + enemy_scale_factor = 32, |
| 138 | + fish_spawn_rate = 0.025, |
| 139 | + dense_patches = dense_patches, |
| 140 | + dense_patches_scale = 1 / 48, |
| 141 | + dense_patches_threshold = 0.55, |
| 142 | + dense_patches_multiplier = 25 |
| 143 | +} |
| 144 | + |
| 145 | +return map(config) |
0 commit comments