local simulations = {}

simulations.orbital_logistics =
{
  init =
  [[
    require("__core__/lualib/story")
    player = game.simulation.create_test_player{name = "Spaceman"}
    player.teleport({-1.5, 2})
    game.simulation.camera_player = player
    game.simulation.camera_position = {0, 0.5}
    game.simulation.camera_player_cursor_position = player.position
    game.forces.player.worker_robots_speed_modifier = 2
    game.forces.player.worker_robots_storage_bonus = 9

    local technologies = prototypes.technology
    technology_list =
    {
      "planet-discovery-vulcanus","physical-projectile-damage-1","physical-projectile-damage-2","physical-projectile-damage-3",
      "physical-projectile-damage-4","physical-projectile-damage-5","physical-projectile-damage-6","physical-projectile-damage-7",
      "logistic-robotics","worker-robots-storage-1","worker-robots-storage-2","worker-robots-storage-3","space-platform-thruster"
    }
    for k, name in ipairs (technology_list) do
      game.forces.player.technologies[name].researched = true
    end

    game.forces.player.recipes["carbonic-asteroid-crushing"].enabled = true
    game.forces.player.recipes["metallic-asteroid-crushing"].enabled = true
    game.forces.player.recipes["oxide-asteroid-crushing"].enabled = true

    game.planets.vulcanus.create_surface()

    for x = -11, 10, 1 do
      for y = -5, 6 do
        game.surfaces[2].set_tiles{{position = {x, y}, name = "volcanic-ash-dark"}}
      end
    end

    for k, position in pairs ({{-8, 3}, {-7, 3},
                               {-10, 4}, {-9, 4}, {-8, 4}, {-7, 4}, {-6, 4},
                               {-10, 5}, {-9, 5}, {-8, 5}, {-7, 5},
                               {-11, 6}, {-10, 6}, {-9, 6}, {-8, 6}}) do
      game.surfaces[2].set_tiles{{position = position, name = "lava"}}
    end

    for k, position in pairs ({{-8, 2}, {-7, 2},
                               {-9, 3}, {-6, 3},
                               {-11, 4}, {-5, 4},
                               {-11, 5}, {-6, 5},
                               {-12, 6}, {-7, 6}}) do
      game.surfaces[2].set_tiles{{position = position, name = "volcanic-cracks-hot"}}
    end

    for k, position in pairs ({{-9, 2}, {0, 2}, {1, 2},
                               {-11, 3}, {-10, 3}, {-1, 3}, {0, 3}, {1, 3},
                               {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4}, {3, 4},
                               {-5, 5}, {-4, 5}, {-3, 5}, {-2, 5}, {-1, 5}, {0, 5}, {1, 5}, {2, 5}, {3, 5},
                               {-6, 6}, {-5, 6}, {-4, 6}, {-3, 6}, {-2, 6}, {-1, 6}, {0, 6}, {1, 6}, {2, 6}}) do
      game.surfaces[2].set_tiles{{position = position, name = "volcanic-smooth-stone"}}
    end

    for k, position in pairs ({{-11, 0}, {-10, 0}, {-9, 0}, {-8, 0}, {-7, 0},
                               {-11, 1}, {-10, 1}, {-9, 1}, {-8, 1}, {-7, 1}, {-6, 1}, {-5, 1},
                               {-11, 2}, {-10, 2}, {-6, 2}, {-5, 2}, {-4, 2}, {-1, 2},
                               {-5, 3}, {-4, 3}, {-3, 3}, {-2, 3},
                               {-4, 4}, {-3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}, {8, 4}, {9, 4}, {10, 4},
                               {4, 5}, {5, 5}, {6, 5}, {7, 5}, {8, 5}, {9, 5}, {10, 5},
                               {7, 6}, {10, 6}}) do
      game.surfaces[2].set_tiles{{position = position, name = "volcanic-soil-dark"}}
    end

    for k, position in pairs ({{-11, -5}, {-10, -5}, {-9, -5}, {-8, -5}, {-1, 5}, {0, -5}, {1, -5}, {2, -5}, {3, -5}, {4, -5}, {5, -5}, {6, -5}, {7, -5}, {8, -5}, {9, -5}, {10, -5},
                               {-11, -4}, {-10, -4}, {-9, -4}, {-8, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4}, {3, -4}, {4, -4}, {5, -4}, {6, -4}, {7, -4}, {8, -4}, {9, -4}, {10, -4},
                               {-11, -3}, {-10, -3}, {-9, -3}, {-8, -3}, {-7, -3}, {-6, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3}, {4, -3}, {5, -3}, {6, -3}, {7, -3}, {8, -3}, {9, -3}, {10, -3},
                               {-9, -2}, {-8, -2}, {-7, -2}, {-5, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2}, {5, -2}, {6, -2}, {7, -2}, {8, -2}, {9, -2},
                               {2, -1}, {3, -1}, {4, -1}, {5, -1}, {6, -1}, {7, -1}, {8, -1},
                               {5, 0}, {6, 0}, {7, 0},
                               {5, 1}, {6, 1}}) do
      game.surfaces[2].set_tiles{{position = position, name = "volcanic-ash-cracks"}}
    end

    local create_list = {}
    table.insert(create_list, { name = "v-red-pita", position = {-3, 0}, amount = 1})
    for k, position in pairs ({{-10, -3}, {-8, -3}, {4, -3},
                               {8, 1}}) do
      table.insert(create_list, { name = "v-brown-carpet-grass", position = position, amount = 1})
    end
    for k, position in pairs ({{-10, 2},
                               {-8, 3}, {-7, 3}, {5, 3}, {7, 3},
                               {3, 4}, {6, 4},
                               {1, 5}}) do
      table.insert(create_list, { name = "tiny-rock-cluster", position = position, amount = 1})
    end
    game.surfaces[2].create_decoratives{decoratives = create_list}

    game.surfaces[2].freeze_daytime = true

    game.surfaces[2].set_chunk_generated_status({0, 0}, defines.chunk_generated_status.tiles)
    game.surfaces[2].set_chunk_generated_status({-1, -1}, defines.chunk_generated_status.tiles)
    game.surfaces[2].set_chunk_generated_status({0, -1}, defines.chunk_generated_status.tiles)
    game.surfaces[2].set_chunk_generated_status({-1, 0}, defines.chunk_generated_status.tiles)

    game.surfaces[1].create_entities_from_blueprint_string
    {
      string = "0eNrNWu2SoyoQfRd+45Yg+JFXmUqlTELmUmvUC5jd3Km8+200idmNToCZH05NJQbwnD4tdrfgB9pWnWiVrA1afSC5a2qNVm8fSMv3uqxsW10eBVqhrSihE10wkvVe/EYrcsETw1Sz+ylMpGXVPIyllzVGojbSSDHg9z/Om7o7boUCMHwD0MeyqiJRiZ1Rche1TSUQRm2j4VzgBybAy39wjM6A+4NfrBl/oVE/NMI/h0v84Cj9HI7hv3z6hHCzhwEA+NCI4+A0uX/wtG6F2EfHZt9VIkrQOBDG1RtZn4C2UefhxPEXeFqbcvcTrWJr22QPuawv8P9sOn9per5U09OXphOyVNuz17azpdqev7Y9W6rtxUvb6WLnDIndjc8WZ7xn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
      position = {-1, 0}
    }

    silo = game.surfaces[1].find_entities_filtered{name = "rocket-silo"}[1]
    roboport = game.surfaces[1].find_entities_filtered{name = "roboport"}[1]
    provider_chest = game.surfaces[1].find_entities_filtered{name = "passive-provider-chest"}[1]

    local story_table =
    {
      {
        {
          name = "start",
          init = function()
            storage.platform = player.force.create_space_platform({name="platform", planet="nauvis", starter_pack="space-platform-starter-pack"})
            storage.hub = storage.platform.apply_starter_pack()
            space_surface = storage.platform.surface
            space_surface.create_entities_from_blueprint_string
            {
              string = " ",
              position = {0, -2}
            }
            tank1 = space_surface.find_entities_filtered{name = "storage-tank"}[1]
            tank2 = space_surface.find_entities_filtered{name = "storage-tank"}[2]
            tank3 = space_surface.find_entities_filtered{name = "storage-tank"}[3]
            tank4 = space_surface.find_entities_filtered{name = "storage-tank"}[4]
            tank1.insert_fluid{name = "thruster-fuel", amount = 25000}
            tank2.insert_fluid{name = "thruster-fuel", amount = 25000}
            tank3.insert_fluid{name = "thruster-oxidizer", amount = 25000}
            tank4.insert_fluid{name = "thruster-oxidizer", amount = 25000}

            assembler = space_surface.find_entities_filtered{name = "assembling-machine-3"}[1]
            assembler.insert({name = "firearm-magazine", count = 200})

            turrets = space_surface.find_entities_filtered{name = "gun-turret"}
            for k, turret in pairs (turrets) do
              turret.insert({name = "firearm-magazine", quality = "legendary", count = 200})
            end

            furnaces = space_surface.find_entities_filtered{name = "electric-furnace"}
            for k, furnace in pairs (furnaces) do
              furnace.insert({name = "iron-ore", count = 100})
            end

            collectors = space_surface.find_entities_filtered{name = "asteroid-collector"}
            for k, collector in pairs (collectors) do
              collector.insert({name = "metallic-asteroid-chunk", count = 20})
              collector.insert({name = "carbonic-asteroid-chunk", count = 20})
              collector.insert({name = "oxide-asteroid-chunk", count = 20})
            end
          end,
          condition = story_elapsed_check(3),
          action = function()
            game.simulation.camera_zoom = 0.5
            player.set_controller{type = defines.controllers.remote, surface = space_surface}
            local silo_position = silo.position
            silo.destroy()
            silo = game.surfaces[1].create_entity{name = "rocket-silo", position = silo_position, force = "player", create_build_effect_smoke = false}
            silo.rocket_parts = 100
          end
        },
        { condition = story_elapsed_check(1) },
        {
          condition = function() return game.simulation.move_cursor({position = storage.hub.position, speed = 0.2}) end,
          action = function() player.opened = storage.hub end
        },
        { condition = story_elapsed_check(0.25) },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "logistics-button-space", data = "0", data2 = "1"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "signal-id-base", data = "transport-belt"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        {
          condition = story_elapsed_check(0.5),
          action = function()
            game.simulation.control_press{control = "confirm-gui", notify = false}
          end
        },
        {
          condition = story_elapsed_check(1),
          action = function() player.opened = nil end
        },
        {
          condition = story_elapsed_check(1),
          action = function()
            game.simulation.camera_zoom = 2
            player.set_controller{type = defines.controllers.remote, surface = game.surfaces[1]}
          end
        },
        { condition = story_elapsed_check(1) },
        {
          condition = function() return game.simulation.move_cursor({position = silo.position, speed = 0.2}) end,
          action = function() player.opened = silo end
        },
        { condition = story_elapsed_check(0.25) },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "check-box", data = "gui.controlled-by-transitional-requests"})
            return game.simulation.move_cursor({position = target, speed = 0.15})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        {
          condition = story_elapsed_check(1),
          action = function() player.opened = nil end
        },
        {
          condition = story_elapsed_check(1),
          action = function()
            roboport.insert({name = "logistic-robot", count = 5})
            provider_chest.insert({name = "transport-belt", count = 100})
          end
        },
        {
          condition = story_elapsed_check(11),
          action = function() game.speed = 2 end
        },
        {
          condition = story_elapsed_check(12),
          action = function()
            game.speed = 1
            game.simulation.camera_zoom = 0.5
            player.set_controller{type = defines.controllers.remote, surface = space_surface}
          end
        },
        { condition = story_elapsed_check(1) },
        {
          condition = function() return game.simulation.move_cursor({position = storage.hub.position, speed = 0.2}) end,
          action = function() player.opened = storage.hub end
        },
        { condition = story_elapsed_check(0.25) },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "text-button-localised-substring", data = "gui-train.add-station"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function()
            game.simulation.mouse_click()
          end
        },
        { condition = story_elapsed_check(0.25) },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "text-button-substring", data = "[planet=vulcanus]"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        { condition = story_elapsed_check(0.5) },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "train-schedule-action-button"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() player.opened = nil end
        },
        {
          condition = story_elapsed_check(4),
          action = function() game.speed = 10 end
        },
        {
          condition = story_elapsed_check(70),
          action = function() game.speed = 1 end
        },
        {
          condition = story_elapsed_check(1),
          action = function()
            pad = game.surfaces[2].create_entity{name = "cargo-landing-pad", position = {0, 1}, force = "player", create_build_effect_smoke = false}
            game.simulation.camera_zoom = 2
            player.set_controller{type = defines.controllers.remote, surface = game.surfaces[2]}
          end
        },
        { condition = story_elapsed_check(1) },
        {
          condition = function() return game.simulation.move_cursor({position = pad.position, speed = 0.2}) end,
          action = function() player.opened = pad end
        },
        { condition = story_elapsed_check(0.25) },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "logistics-button", data = "0"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        {
          condition = function()
            local target = game.simulation.get_widget_position({type = "signal-id-base", data = "transport-belt"})
            return game.simulation.move_cursor({position = target, speed = 0.3})
          end
        },
        {
          condition = story_elapsed_check(0.25),
          action = function() game.simulation.mouse_click() end
        },
        {
          condition = story_elapsed_check(0.5),
          action = function() game.simulation.control_press{control = "confirm-gui", notify = false} end
        },
        {
          condition = story_elapsed_check(2),
          action = function() player.opened = nil end
        },
        {
          action = function() game.speed = 10 end
        },
        {
          condition = story_elapsed_check(8),
          action = function() game.speed = 1 end
        },
        {
          condition = story_elapsed_check(12),
          action = function()
            game.simulation.camera_zoom = 2
            player.set_controller{type = defines.controllers.remote, surface = game.surfaces[1]}
          end
        },
        {
          init = function()
            storage.platform.destroy()
            pad.destroy()
            local silo_position = silo.position
            silo.destroy()
            silo = game.surfaces[1].create_entity{name = "rocket-silo", position = silo_position, force = "player", create_build_effect_smoke = false}
            roboport.clear_items_inside()
          end,
          action = function() story_jump_to(storage.story, "start") end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.heating_mechanics =
{
  init_update_count = 120,
  planet = "aquilo",
  mute_wind_sounds = false,
  init =
  [[
    game.simulation.camera_position = {0, 0.5}
    game.forces.player.recipes["ammonia-rocket-fuel"].enabled = true

    for x = -15, 14, 1 do
      for y = -8, 10 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "ammoniacal-ocean"}}
      end
    end

    for x = -15, 14, 1 do
      for y = -8, 10 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "ice-platform"}}
      end
    end

    game.surfaces[1].create_entities_from_blueprint_string
    {
      string = "0eNq1ne1y2zoOhu/Fv+0zAD/F3kqnk1FsJtUcW/bKcrvZTu59ZTuOW8eK+L5nt3/a2gFICuQDCCSYX7PH9SHvuqbtZ19+zZrltt3Pvnz9Nds3z229Pn7W1ps8+zJ7qvf9ou/qdr/bdv3iMa/72et81rSr/O/ZF32d35FZdi/b59w2y8VuXbe//7x5/Taf5bZv+iafGzz95+WhPWweczconF+U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Cdk3K1MEVMrkKkVyNQKZGoFMrUCmVqBTK1AplYgUyuQqcxdo8xVo8xNo8xFo8w9o8w1o8wto8wlo8wdo8wVo4lgaiKYmgimJoKpiWBqIpiaCKYmkKkJZGoCmZpApiaQqQlkagKZmkCmJpCRiWBkIhiZCEYmgpGJYGQiGJkIRiaCkYlgZCIYqUyBDyZ0OdEuBCZBocgIBUbIM0Lug1DZWXe0AEjRCiBFS4AUrQFStAhI0SogRct6MOOpY4QsI2QYIWY5K7OchVnOwixnYZazMMtZmBlxIShVDqQMQZUhqDIEVYagyhBUGYLC1UJwuRBcLwQXDMEVQ3DJEFwzBBcNKXGLESjkGCHLCBlGiGGAMgwQhgHCMEAYBggzI4SZEfa3XxIFY5e5+ggUqhihyAgFRsgzQu6DUBl20aojRcuOFK07UrTwSNHKI0VLjxStPcKMp4zF1TFClhEyjBDDAGUYIAwDhGGAMAwQZkbI1Iz4dv5l0cPnj+tD3nXN6fda/8jd/qTGVOoq60MIzgdjXl//C0Att3I=",
      position = {2, 0}
    }

    reset_items = function()
      local heating_towers = game.surfaces[1].find_entities_filtered{name = "heating-tower"}
      storage.heating_tower = heating_towers[1]
      storage.heating_tower.insert({name = "rocket-fuel", count = 4})
    end

    start = function()
      storage.wait = 180
      script.on_nth_tick(1, function()
        storage.wait = storage.wait - 1
        if storage.wait == 0 then
          reset_items()
        end
      end)
    end

    start()
  ]]
}

simulations.space_platform =
{
  mute_wind_sounds = false,
  init =
  [[
    require("__core__/lualib/story")
    player = game.simulation.create_test_player{name = "Spaceman"}
    storage.character = player.character
    storage.platform = player.force.create_space_platform({name="platform", planet="nauvis", starter_pack="space-platform-starter-pack"})
    storage.platform.apply_starter_pack()
    player.teleport({0, 0}, game.surfaces[2])
    game.simulation.camera_zoom = 1
    game.simulation.camera_player = player
    game.simulation.camera_player_cursor_position = player.position
    game.simulation.camera_position = {0, 0}
    hub = game.surfaces[2].find_entity("space-platform-hub", {0, 0})

    local story_table =
    {
      {
        {
          name = "start",
          init = function()
            player.cursor_stack.set_stack{name = "space-platform-foundation"}
            storage.character.cursor_ghost = {name = "space-platform-foundation"}
          end,
          condition = function() return game.simulation.move_cursor({position = {-6, 4}}) end,
          action = function() game.simulation.control_down{control = "build-ghost", notify = false} end
        },
        { condition = function() return game.simulation.move_cursor({position = {-10, 4}, speed = 0.1}) end },
        { condition = function() return game.simulation.move_cursor({position = {-10, -6}, speed = 0.2}) end },
        { condition = function() return game.simulation.move_cursor({position = {-8, -6}, speed = 0.3}) end },
        { condition = function() return game.simulation.move_cursor({position = {-8, 2}, speed = 0.3}) end },
        { condition = function() return game.simulation.move_cursor({position = {-6, 2}, speed = 0.3}) end },
        { condition = function() return game.simulation.move_cursor({position = {-6, -6}, speed = 0.3}) end },
        { condition = function() return game.simulation.move_cursor({position = {10, -6}, speed = 0.4}) end },
        { condition = function() return game.simulation.move_cursor({position = {10, 4}, speed = 0.4}) end },
        { condition = function() return game.simulation.move_cursor({position = {6, 4}, speed = 0.4}) end },
        { condition = function() return game.simulation.move_cursor({position = {6, -4}, speed = 0.4}) end },
        { condition = function() return game.simulation.move_cursor({position = {8, -4}, speed = 0.4}) end },
        {
          condition = function() return game.simulation.move_cursor({position = {8, 2}, speed = 0.4}) end,
          action = function() game.simulation.control_up{control = "build-ghost"} end
        },
        {
          init = function()
            player.clear_cursor()
            player.cursor_stack.clear()
          end,
          condition = function() return game.simulation.move_cursor({position = {0, 5}}) end
        },
        {
          init = function()
            player.cursor_stack.set_stack{name = "asteroid-collector"}
            storage.character.cursor_ghost = {name = "asteroid-collector"}
            game.simulation.camera_player_cursor_direction = defines.direction.west
          end,
          condition = function() return game.simulation.move_cursor({position = {-11, 3}}) end,
          action = function() game.simulation.control_press{control = "build-ghost", notify = false} end
        },
        {
          condition = function() return game.simulation.move_cursor({position = {-11, -6}}) end,
          action = function() game.simulation.control_press{control = "build-ghost", notify = false} end
        },
        {
          init = function()
            player.clear_cursor()
            player.cursor_stack.clear()
          end,
          condition = function() return game.simulation.move_cursor({position = {0, 5}}) end
        },
        {
          init = function()
            player.cursor_stack.set_stack{name = "crusher"}
            storage.character.cursor_ghost = {name = "crusher"}
            game.simulation.camera_player_cursor_direction = defines.direction.east
          end,
          condition = function() return game.simulation.move_cursor({position = {8, 1}}) end
        },
        {
          init = function() game.simulation.control_down{control = "build-ghost", notify = false} end,
          condition = function() return game.simulation.move_cursor({position = {8, -3}}) end,
          action = function() game.simulation.control_up{control = "build-ghost"} end
        },
        {
          init = function()
            player.clear_cursor()
            player.cursor_stack.clear()
          end,
          condition = function() return game.simulation.move_cursor({position = {0, 5}}) end
        },
        {
          condition = story_elapsed_check(1),
          action = function() hub.insert({name = "space-platform-foundation", count = 50}) end
        },
        {
          condition = story_elapsed_check(3),
          action = function() hub.insert({name = "space-platform-foundation", count = 50}) end
        },
        {
          condition = story_elapsed_check(3),
          action = function() hub.insert({name = "space-platform-foundation", count = 50}) end
        },
        {
          condition = story_elapsed_check(3),
          action = function() hub.insert({name = "space-platform-foundation", count = 50}) end
        },
        {
          condition = story_elapsed_check(3),
          action = function() hub.insert({name = "asteroid-collector", count = 2}) end
        },
        {
          condition = story_elapsed_check(2),
          action = function() hub.insert({name = "crusher", count = 3}) end
        },
        {
          condition = story_elapsed_check(5),
          action = function()
            for k, entity in pairs (game.surfaces[2].find_entities_filtered{name = "crusher"}) do
              entity.order_deconstruction("player")
            end
            for k, entity in pairs (game.surfaces[2].find_entities_filtered{name = "asteroid-collector"}) do
              entity.order_deconstruction("player")
            end
          end
        },
        {
          condition = story_elapsed_check(1),
          action = function()
            for k, v in pairs (game.surfaces[2].find_tiles_filtered{position = {-15, 0}, radius = 10}) do
              v.order_deconstruction("player")
            end
            for k, v in pairs (game.surfaces[2].find_tiles_filtered{position = {15, 0}, radius = 10}) do
              v.order_deconstruction("player")
            end
            for k, v in pairs (game.surfaces[2].find_tiles_filtered{position = {0, -17}, radius = 12}) do
              v.order_deconstruction("player")
            end
            for k, v in pairs (game.surfaces[2].find_tiles_filtered{position = {-6, -6}, radius = 1}) do
              v.order_deconstruction("player")
            end
            for k, v in pairs (game.surfaces[2].find_tiles_filtered{position = {6, -6}, radius = 1}) do
              v.order_deconstruction("player")
            end
          end
        },
        {
          condition = story_elapsed_check(2),
          action = function()
            hub.clear_items_inside()
            story_jump_to(storage.story, "start")
          end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.removing_trash_in_space =
{
  init_update_count = 120,
  mute_wind_sounds = false,
  init =
  [[
    player = game.simulation.create_test_player{name = "Spaceman"}
    storage.platform = player.force.create_space_platform({name="platform", planet="nauvis", starter_pack="space-platform-starter-pack"})
    storage.hub = storage.platform.apply_starter_pack()
    player.teleport({0, 0}, game.surfaces[2])
    game.simulation.camera_player = player
    game.simulation.camera_position = {28, 4}
    game.simulation.hide_cursor = true
    game.surfaces[2].create_entities_from_blueprint_string
    {
      string = "0eNql2+FO2zAUhuF78e8E+Rw7ofRWJlSF1mXR0qRKXDSGeu9z2oohYKjm3T9ofeKk3tOjo48X89Adwn5s+2iWL6ZdD/1klj9ezNQ+9k03/y4+74NZmjaGnSlM3+zmn7bNFMs4Nv20H8ZYPoQummNh2n4TfpulHO8LE/rYxjacy51+eF71h91DGNMbXguFLqzj2K7L0Ifx8blMGwnjtlmHdK39MKUKQz/vIlWtC/NslqVL19m0Y1p2eskX5uGw3YZxNbV/UkWxr/+OxYcL6+uF237b9umlcv0zTPHj1aS+qc4XlJvqdGvn96+mEGPbP07z+8awG57C6pBe69K+w2Y1P6b00rbpplCY86/Pj+By3V2ITdelG05PMIxDu0kbOPS/0gbWw2H+FNKz2Q2b+a1NLLvQnDb378EeP7kr9+aupjCmul/dj03380kR/+WH+7He7aWePT2et5/IJ8WrzOJ1TvE6s/hdTvHbzOKLnOKLvOIqOcXvMovbnOJiM6u7rOqSWV2zqmtm9epSXd5XX3xW3X2zur2qeuZ/U/VZT6b65t71qr3X36zurqp+e4WCWv+vpOj8pRXb7vKN9W6hP9s5L7pcZNqnb6ly3zVxO4y7cpv03jSnFfPm3i2v2PKaLb9lyxds+R1bPkuD1gtcr3C9g+vh0RN49gQePoGnT+DxE3j+FJ4/hedP4flTeP4Unj+F50/h+bts3zO5PZPbM7k9k9szuT2U20O5PZTbQ7k9lNtDuT2U20O5PZTbQ7k9lNtDuT2U20O5PZTbQ7k9lNszuR2T2zG5HZPbMbkdk9tBuR2U20G5HZTbQbkdlNtBuR2U20G5HZTbQbkdlNtBuR2U20G5HZTbQbkdk1uZ3MrkVia3MrmVya1QboVyK5RbodwK5VYot0K5FcqtUG6FciuUW6HcCuVWKLdCuRXKrVBuZXILk1uY3MLkFia3MLkFyi1QboFyC5RboNwC5RYot0C5BcotUG6BcguUW6DcAuUWKLdAuQXKLUhui+C2yG2L2LZIbYvQtsxsy8i2TGzLwLbMa8u4tkxry7C2zGrLqLZMasugtsxpy5i2TGnLkLbMaIuIZr01a61ZZ80aa9ZXw7YadtWwqYY9NWypYUcNG2rYT8N2GnbTsJmGvTRspWEnDRtp2EfDNpp10WxwzebWbGzNptZsaA1n1nBkDSfWcGAN59VwXA2n1XBYDWfVcFQNJ9VwUA3n1HBMDafUcEgNZ9RsRM1SISwUwjIhLBLCEiEwEALzIDAOAtMgMAwCsyAwCgKTIDAIAnMgMAYCUyAwBAIzIDACAhMgMADC8h8scs0S1yxwzfLWLG4N09YwbA2z1jBqDZPWMGgNc9YwZg1T1jBkDTPWMGINE9YwYA3z1TBeDdPV1y2/L85/wL988/f+hXkK43QqqAvxC1fVde2rSqrj8S8okpjA",
      position = {15, 0}
    }
  ]]
}

simulations.space_science =
{
  init_update_count = 120,
  mute_wind_sounds = false,
  init =
  [[
    player = game.simulation.create_test_player{name = "Spaceman"}
    storage.platform = player.force.create_space_platform({name="platform", planet="nauvis", starter_pack="space-platform-starter-pack"})
    storage.hub = storage.platform.apply_starter_pack()
    player.teleport({0, 0}, game.surfaces[2])
    game.forces.player.recipes["space-science-pack"].enabled = true
    game.forces.player.recipes["carbonic-asteroid-crushing"].enabled = true
    game.forces.player.recipes["oxide-asteroid-crushing"].enabled = true
    game.forces.player.recipes["metallic-asteroid-crushing"].enabled = true
    game.simulation.camera_player = player
    game.simulation.camera_position = {-16, -6}
    game.simulation.camera_zoom = 1.1
    game.simulation.camera_alt_info = true
    game.simulation.hide_cursor = true
    game.surfaces[2].create_entities_from_blueprint_string
    {
      string = "0eNrtnetu27gWRt/Fv+1CpEhJLDBPclAYik0nwsiSR7KL5hR59yPbie0mUrLJ1RYd4BQDdFpbn3hd3NyX9Pvsrj74XVc1+9nn77Nq1Tb97PN/vs/66r4p6+PfNeXWzz7P+l258otdXe43bbddPBzuZk/zWdWs/bfZZ/U0H3lkU/b7xb4rm37XdvvFna/3N8/opy/zmW/21b7y53ee/vC4bA7bO98NovPLu9u67Ba7svH1bD7btf3wTNsc3zToLJT5ZOezx+P/qU/26diUV0r6ojS0yHdttV6s2rr2q33bjQmqHwTns873h3q/qJqvg3DbDZ80h7oeeVF6edHdof57eKD33fDCkXe4yyuS0yvWVTc05/QFpUeUzfy9UX2rX0zrmxF5GyifhclngfJ5mHweKG/C5ItAeRsm7wLldZi8SgL100B9FaifBOrrQH0VqJ+G6YfKB+7c0NEJ3LnvLJ5iTP66c/2Rl121WmwOXTOcBe+SuDiJV3u/PaO9Wt+cC36zqVaVb1aPi227PtR+oWfXbw9fbpY3qD0+ff3TMJr9vlz9PQzUsbmjn6inL0/DfyO9yYN6o/7w3hQhvSn+8M64kM7YP7szOhHbARfYujfbcT7bVPXw1HPPni2ti3L7rVr7xdWgeTg0fw8v+OdQ1kNbhi80g51WHg2mVbvdlV15NHY+z/6aHe2uQ++XF/V9d/BjvVDiXqjoXqzK7q5thsn+lR3R0o4k0f3Y+n1Z17+4H2kk6wsJ6rWJVHcidSuz5s2t6phOJl+UF61M1MLr4VC3zf3ioRzmeP3uC9LbF4xJFvLG6rDGuuDGqg8am8qhVQS1NVWhbc0/aqp4Q18vKrKmpqFNtR819bqrVt2hfxg/BM4S+fNlc1XtxgB/fLxq7mcvX1mOkOVPOwlTK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IHoNRK+B6DUQvQai10D0GoheA9FrGHoNQ69h6DUMvYah1zD0GoZew9BrGHoNRW9K0ZtS9KYUvSlEbwrRm0L0phC9KURvCtGbQvSmEL0pRG/K0Jsy9KYMvSlDb8rQmzL0pgy9KUNvytCbUvTiUhlcKaMpejVEr4bo1RC9GqJXQ/RqiF4N0ashejVEr2bo1Qy9mqFXM/Rqhl7N0KsZejVDr2bo5WWKuAQDV2DgAgxaf0HLL2j1BS2+oLUXtPSCVl7QwgtadwHLLmDVBSy6gDUXsOQCVlww9CqGXsXQS8lJS9do4RosW4NFa7BkDRaswXI1WKwGS9VgoRosU2NFaqxEjRWosfI0VpzGStMSxMkEYTJBlKQVvtS6pMYltC2haQktS2hYQrsSmpXQqoRGJbQpmUnJLEpmUDJ7kpmTzJpkxiSzJelPqKEOUOr/pO5P6P2Ezk/o+4SuT+j5hI5P6PeEbk/o9WROT+bzZC5P5vFkDk/m72TuTubtpN5KGqKnEXoaoIfxeRieh9F5GJyHsXkYmoeReRiYh3F5FpZnUXkWlGcxeRaSZxF5FpBn8XgaT6dJpDSHlKaQwgxSmEAK80dh+ijMHoXJozB3FKaOwsxRljjK8kZZ2ijLGmVJoyxnlKWMsoxR2dNfzv9Gw/GfVagPftdVzfEHL3/1XX/Ss5l2xjmbZip3Wj89/Q/y8ORs",
      position = {0, 0}
    }
  ]]
}

simulations.asteroid_defense =
{
  mute_wind_sounds = false,
  init =
  [[
    require("__core__/lualib/story")

    player = game.simulation.create_test_player{name = "Spaceman"}
    storage.platform = player.force.create_space_platform({name="platform", planet="nauvis", starter_pack="space-platform-starter-pack"})
    storage.platform.apply_starter_pack()
    player.teleport({0, 0}, game.surfaces[2])
    game.simulation.camera_zoom = 1
    game.simulation.camera_player = player
    game.simulation.camera_position = {32, -7}
    game.simulation.hide_cursor = true
    game.forces.player.recipes["metallic-asteroid-crushing"].enabled = true
    game.forces.player.recipes["oxide-asteroid-crushing"].enabled = true
    game.forces.player.recipes["carbonic-asteroid-crushing"].enabled = true
    surface = game.surfaces[2]

    surface.create_entities_from_blueprint_string
    {
      string = "0eNqtnd1S4zoMgN8l1+2OJTtpy6ucYZjQumzmpGlPfnZgd3j3kwClwCZg52PvoLUs27I/y5LYP8lt2flTXVRtcvUnKbbHqkmu/vmTNMVdlZfD76r84JOrpDnlW788lXm7P9aH5c/uNnlcJEW18/fJlTwuRprs86ZdtnVeNadj3S5vfdm+aaOP14vEV23RFv65z6cfHm6q7nDr617o4p2gomp83fYfLJLTselbHauhr17S5ke6SB6Sq6X+SHv5u6L22+eP14NeH8Tqq9i7rlq2XV379m+ZYp5FuscREfZVRK+Yr4/Fbrk9lmXf63FEPdGzfvZJv9o3XTmM51cv9lj3H1RdWY5040InQFzUDKRhM5B+MgNZsGpZlGqrMNVWn6i2DlZtHaXaJky1zSeqDUYVppuaKN1EgpRT+Uw5jbJqte+t+o2GLsLG5bKXimpfVP1ny+1P34xo/2pJ8tTh+es3jW/borprhq/V/nD85W+6/rOyH4Pf3RStP/Qf7fOy8Yvk+dfPx81Lt8f7YueXlyH/7Kp/+863x244E/sZOxx3w/f8fb5ty4fkzaF3PTqPLn5E5ltHdPBtXpbF9jsHlb4Z1JTRrt4v0BuLGGyrH0Vd91N907T59t+bpvjtX8Dxsa8spi/D+lotPqPVNGr+GqIbk76Ok76Ok76ZKX2YsjEwmjh5IpNrMKauylzxEoR1jRRvoiZbbTBW9K3gMVEuUlONm+c0UryNm4hsrvgps1sFz2z6lah1/I1pSlTk5rroFjSLNnavuTjxsXttFSc+dq9lceLD99rmi2W0sXst7oC3sXst7oS3kXtN405ku5orPuhEtpH007gT2W6CL9Nfncgucjfq9Ik8NhFOgm+E523+LPe/Li/7L/ftSn/nq11eP9/UYq6Jbd350TFr9DX1e+/d27y+PVbfekt1Hw6Orv92fVf34nYTK7l6N98fbpHtw+nJQejaUze8XPzdn4u4qbJLsbucNP7+1LtXzbI85ruxDrPpEY0b1Ms4i2pqmNm8i+bUblvNEzdxxLt17KK/Xv0+W/Xp2djM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5thr6Czm0OyXWrBAFehLwldSehJMkeS+ZHMjWReJHMimQ/JXEjmQTIHkvmP0H2E3iN0HqHvCF1H6DlCxxH6jdBthF4jdBqhzwhdRmFcFcZV6K/C0CSMTMLAJIxLsrAki0qyoCSLSbKQJItIsoAki0eycCSLRsJgJIxFwlAkjETCQCSMQ8IwJIxCwiAkjEHCECSMQMIApDKuKuMqjH7CRFmYJwvTZGGWLEuSZTmyLEWWZciyBFmWH8vSY1l2LEuOZbmxMDUWZsbCxFiYFwvTYmFWLEyKhTmxMCUWZsTChFiYDwvTYWE2rGVchbm0sGwTVm3Cok1Ys8lKNlnFJivYZPWarFyTVWuyYk1Wq8lKNVmlJizUhHWasEwTVmnCIk1YowlLNGGFJizQhPWZsDwTVmfC4kxYm+kYV+HY4Z9zgH/NIWVjD2t+vUiGv03Uf+nyvzAtkl++bp4E6lrc2qZZlrk00/Tx8X86LH8L",
      position = {11, 0}
    }

    local story_table =
    {
      {
        {
          name = "start",
          condition = story_elapsed_check(3),
          action = function() surface.create_entity{name="small-oxide-asteroid", position = {18, -22}, velocity = {-0.02, 0.07}} end
        },
        {
          condition = story_elapsed_check(0.5),
          action = function() surface.create_entity{name="small-carbonic-asteroid", position = {42, -22}, velocity = {0.02, 0.08}} end
        },
        {
          condition = story_elapsed_check(2.5),
          action = function() surface.create_entity{name="small-metallic-asteroid", position = {15, -22}, velocity = {0.01, 0.09}} end
        },
        {
          condition = story_elapsed_check(0.5),
          action = function() surface.create_entity{name="small-oxide-asteroid", position = {41, -22}, velocity = {-0.02, 0.07}} end
        },
        {
          condition = story_elapsed_check(1),
          action = function() surface.create_entity{name="small-carbonic-asteroid", position = {35, -22}, velocity = {-0.03, 0.09}} end
        },
        {
          condition = story_elapsed_check(3),
          action = function() surface.create_entity{name="small-carbonic-asteroid", position = {22, -22}, velocity = {0.01, 0.07}} end
        },
        {
          condition = story_elapsed_check(0.5),
          action = function() surface.create_entity{name="small-oxide-asteroid", position = {41, -22}, velocity = {-0.01, 0.03}} end
        },
        {
          condition = story_elapsed_check(2,5),
          action = function() surface.create_entity{name="small-metallic-asteroid", position = {22, -22}, velocity = {0, 0.09}} end
        },
        {
          condition = story_elapsed_check(2),
          action = function() surface.create_entity{name="small-oxide-asteroid", position = {16, -22}, velocity = {0.02, 0.08}} end
        },
        {
          condition = story_elapsed_check(1),
          action = function()
             surface.create_entity{name="small-metallic-asteroid", position = {30, -22}, velocity = {-0.04, 0.07}}
            story_jump_to(storage.story, "start")
          end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.spoilables =
{
  init =
  [[
    require("__core__/lualib/story")
    player = game.simulation.create_test_player{name = "Quality Manager"}
    player.teleport({-9, 0})
    game.simulation.gui_tooltip_interval = 0.5
    game.simulation.camera_player = player
    game.simulation.camera_position = {0, 0.5}
    game.simulation.camera_player_cursor_position = player.position
    player.character.direction = defines.direction.south

    player.insert("raw-fish")
    player.clear_inventory_highlights()
    player.opened = player

    local story_table =
    {
      {
        {
          name = "start",
          condition = function()
            local target = game.simulation.get_slot_position{inventory_index = defines.inventory.character_main, slot_index = 0}
            return game.simulation.move_cursor({position = target})
          end
        },
        {
          condition = story_elapsed_check(10),
          action = function() story_jump_to(storage.story, "start") end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.spoilables_research =
{
  init_update_count = 360,
  init =
  [[
    game.simulation.camera_position = {0, 0.5}
    game.simulation.camera_alt_info = true
    game.surfaces[1].create_entities_from_blueprint_string
    {
      string = "0eNrVmttu2zgQht+F11IhnnQIsE9SFIYs015idSpJtckGfvel7NhxEjLhDHyxzY0RSf6GHPKf+S3pmWz7Rc1Gj448PBPdTaMlD9+fidWHse3XY2M7KPJA9q11uTPtaOfJuHyrekeOGdHjTj2SB3r8kRE1Ou20OgNO/zxtxmXYKuMvyN6A+qnd+cMZmSfrvzONayTPyRnPyJP/LL5JT99po7rzacoy4p7mlTAtbl7W6B+isGsUPe716E/l3d/KulAg+k3ehrp8YWOVc3o82PVCo4bpl9os/lzvlFG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JXnH9C0UrQd3L49eF++13yZqK7775ycwz5A9/dM2X57y+DpcRv5r2RGE1FTWXZVkKWVbsePwPJCbxoA==",
      position = {0, 0}
    }
    local technology = "rocket-fuel-productivity"
    local technologies = prototypes.technology

    for name, prerequisite in pairs (technologies[technology].prerequisites) do
      game.forces.player.technologies[name].researched = true
    end

    chest_1 = game.surfaces[1].find_entity("infinity-chest", {-6.5, 8.5})
    chest_2 = game.surfaces[1].find_entity("infinity-chest", {6.5, 8.5})

     step_1 = function()
      local wait = 70
      script.on_nth_tick(1, function()
        wait = wait - 1
        if wait == 0 then
          step_2()
        end
      end)
    end

    step_2 = function()
      script.on_nth_tick(1, function()
        if chest_1 then
          chest_1.insert({name = "agricultural-science-pack", count = 1})
        end
        if chest_2 then
          chest_2.insert({name = "agricultural-science-pack", count = 1, spoil_percent = 0.95})
        end
        step_1()
      end)
    end

    game.forces.player.laboratory_speed_modifier = 3
    game.forces.player.add_research(technology)

    script.on_event(defines.events.on_research_finished,
    function(event)
      if not event.by_script then
        event.research.researched = false
        event.research.force.add_research(event.research.name)
        event.research.force.research_progress = 0
      end
    end)

    step_1()
  ]]
}

simulations.spoilables_result =
{
  init_update_count = 200,
  planet = "gleba",
  init =
  [[
    game.simulation.camera_position = {0, 1.5}
    game.simulation.camera_alt_info = true
    game.forces.player.recipes["biochamber"].enabled = true
    game.forces.player.recipes["jellynut-processing"].enabled = true

    game.surfaces[1].create_entities_from_blueprint_string
    {
      string = "0eNrNmmFv2yAQhv8Ln+3JGINN/so0RU5CWjYHZ4CnZlX/+3DSJt1K2rtrK61SPzQkz3ucOXiP5p6thsnsvXWRLe6ZXY8usMXXexbsjeuH+TXX7wxbsG0fYhl978J+9LFcmSGyh4JZtzF3bMEfvhXMuGijNSfA8Y/D0k27lfHpDcUTyLqtdWmoXN+aEFnB9mNIHxvdLJZQZdN+kQU7sEWrv8ijxOkDy2BitO4mzG/0Zjf+MsspjQ3ReLNZ2mh2aSj6yRTs9OopkkddN0VvU1QhSa7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{name = "infinity-chest"}[3]
    chest_2 = game.surfaces[1].find_entities_filtered{name = "infinity-chest"}[5]
    step_1 = function()
      local wait = 10
      script.on_nth_tick(1, function()
        wait = wait - 1
        if wait == 0 then
          step_2()
        end
      end)
    end
    step_2 = function()
      script.on_nth_tick(1, function()
        if chest_1 then
          chest_1.insert({name = "jellynut", count = 1})
        end
        if chest_2 then
          chest_2.insert({name = "jellynut", count = 1, spoil_percent = 0.8})
        end
        step_1()
      end)
    end
    step_1()
  ]]
}

simulations.fulgora_briefing =
{
  init_update_count = 200,
  planet = "fulgora",
  mute_wind_sounds = false,
  init =
  [[
    require("__core__/lualib/story")
    game.simulation.camera_position = {0, 1.5}

    for x = -11, 10, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-sand"}}
      end
    end

    for x = -11, 10, 1 do
      for y = 1, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-dunes"}}
      end
    end

    for x = 2, 10, 1 do
      for y = -4, 0 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-walls"}}
      end
    end

    for x = 0, 10, 1 do
      for y = 0, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-conduit"}}
      end
    end

    for x = 2, 10, 1 do
      for y = -4, 0 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-machinery"}}
      end
    end

    for x = -11, -8, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "oil-ocean-deep"}}
      end
    end

    for k, position in pairs ({{-8, -4}, {-7, -4},
                               {-7, -3}, {-6, -3},
                               {-7, -2}, {-6, -2},
                               {-8, -1}, {-7, -1},
                               {-8, 0}, {-7, 0},
                               {-9, 1}, {-8, 1},
                               {-9, 2}, {-8, 2}, {-7, 2},
                               {-9, 3}, {-8, 3}, {-7, 3},
                               {-10, 4}, {-9, 4}, {-8, 4}, {-7, 4},
                               {-10, 5}, {-9, 5}, {-8, 5}, {-7, 5},
                               {-10, 6}, {-9, 6}, {-8, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "oil-ocean-shallow"}}
    end

    game.surfaces[1].create_entity{name="fulgoran-ruin-stonehenge", position = {3, -1}}
    game.surfaces[1].create_entity{name="fulgoran-ruin-stonehenge", position = {8, 2}}
    game.surfaces[1].create_entity{name="fulgoran-ruin-stonehenge", position = {4, 4}}

    for x = 5.5, 10.5, 1 do
      for y = -4, 4, 1 do
        game.surfaces[1].create_entity{name = "scrap", amount = 10, position = {x, y}}
      end
    end

    game.surfaces[1].create_entity{name = "scrap", amount = 10, position = {3, 6}}
    game.surfaces[1].create_entity{name = "scrap", amount = 10, position = {5, 5}}
    game.surfaces[1].create_entity{name = "cliff-fulgora", position = {-1 ,-6}, cliff_orientation = "north-to-south"}
    game.surfaces[1].create_entity{name = "cliff-fulgora", position = {-1 ,-1}, cliff_orientation = "north-to-east"}

    local story_table =
    {
      {
        {
          name = "start",
          condition = story_elapsed_check(2),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {-7, 2}} end
        },
        {
          condition = story_elapsed_check(1.5),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {-2, -4}} end
        },
        {
          condition = story_elapsed_check(3),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {8, 5}} end
        },
        {
          condition = story_elapsed_check(1),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {-3, 2}} end
        },
        {
          condition = story_elapsed_check(2),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {-6, -1}} end
        },
        {
          condition = story_elapsed_check(1),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {6, 4}} end
        },
        {
          condition = story_elapsed_check(1),
          action = function() story_jump_to(storage.story, "start") end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.lightning_mechanics =
{
  planet = "fulgora",
  mute_wind_sounds = false,
  init =
  [[
    require("__core__/lualib/story")
    game.simulation.camera_position = {0, 1.5}
    game.forces.player.recipes["lightning-rod"].enabled = true

    for x = -11, 10, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-sand"}}
      end
    end

    for x = -11, 10, 1 do
      for y = 1, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-dunes"}}
      end
    end

    for x = 2, 10, 1 do
      for y = -4, 0 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-walls"}}
      end
    end

    for x = 0, 10, 1 do
      for y = 0, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-conduit"}}
      end
    end

    for x = 2, 10, 1 do
      for y = -4, 0 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "fulgoran-machinery"}}
      end
    end

    game.surfaces[1].create_entity{name="lightning-rod", position = {-7, 3}}
    game.surfaces[1].create_entity{name="medium-electric-pole", position = {-4, 0}}
    game.surfaces[1].create_entity{name="medium-electric-pole", position = {2, 0}}
    game.surfaces[1].create_entity{name="accumulator", position = {-1, 3}}
    game.surfaces[1].create_entity{name="radar", position = {5, 2}}

    local story_table =
    {
      {
        {
          name = "start",
          condition = story_elapsed_check(1),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {-7, 3}} end
        },
        {
          condition = story_elapsed_check(4),
          action = function()
            accumulator2 = game.surfaces[1].create_entity{name="accumulator", position = {-3, 3}}
            accumulator3 = game.surfaces[1].create_entity{name="accumulator", position = {1, 3}}
          end
        },
        {
          condition = story_elapsed_check(1),
          action = function() game.surfaces[1].execute_lightning{name = "lightning", position = {-7, 3}} end
        },
        {
          condition = story_elapsed_check(8),
          action = function()
            accumulator2.destroy()
            accumulator3.destroy()
          end
        },
        {
          condition = story_elapsed_check(1),
          action = function() story_jump_to(storage.story, "start") end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.gleba_briefing =
{
  planet = "gleba",
  mute_wind_sounds = false,
  init =
  [[
    game.simulation.camera_position = {0, 1.5}

    for x = -12, 12, 1 do
      for y = -6, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "wetland-jellynut"}}
      end
    end

    for k, position in pairs ({{-12, -6}, {-11, -6}, {-10, -6}, {-9, -6}, {-8, -6}, {-7, -6}, {-6, -6}, {-5, -6}, {-4, -6}, {-3, -6},
                               {-2, -6}, {-1, -6}, {0, -6}, {1, -6}, {2, -6}, {3, -6}, {-12, -5}, {-11, -5}, {-10, -5}, {-9, -5},
                               {-8, -5}, {-7, -5}, {-6, -5}, {-5, -5}, {-4, -5}, {-3, -5}, {-2, -5}, {-1, -5}, {0, -5}, {1, -5}, {2, -5},
                               {-12, -4}, {-11, -4}, {-10, -4}, {-9, -4}, {-8, -4}, {-7, -4}, {-6, -4}, {-5, -4}, {-4, -4}, {-3, -4},
                               {-2, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4}, {-12, -3}, {-11, -3}, {-10, -3}, {-9, -3}, {-8, -3},
                               {-7, -3}, {-6, -3}, {-5, -3}, {-4, -3}, {-3, -3}, {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {-12, -2}, {-11, -2},
                               {-10, -2}, {-9, -2}, {-8, -2}, {-7, -2}, {-6, -2}, {-5, -2}, {-4, -2}, {-3, -2}, {-2, -2}, {-1, -2},
                               {0, -2}, {-12, -1}, {-11, -1}, {-8, -1}, {-7, -1}, {-6, -1}, {-5, -1}, {-4, -1}, {-3, -1}, {-2, -1},
                               {-1, -1}, {0, -1}, {-12, 0}, {-11, 0}, {-8, 0}, {-7, 0}, {-6, 0}, {-5, 0}, {-4, 0}, {-3, 0}, {-2, 0},
                               {-1, 0}, {-12, 1}, {-11, 1}, {-10, 1}, {-9, 1}, {-8, 1}, {-7, 1}, {-6, 1}, {-5, 1}, {-4, 1}, {-12, 2},
                               {-9, 2}, {-8, 2}, {-7, 2}, {-6, 2}, {-5, 2}, {-4, 2}, {-12, 3}, {-9, 3}, {-8, 3}, {-7, 3}, {-6, 3},
                               {-5, 3}, {-4, 3}, {-3, 3}, {-2, 3}, {-12, 4}, {-11, 4}, {-10, 4}, {-9, 4}, {-8, 4}, {-7, 4}, {-6, 4},
                               {-5, 4}, {-4, 4}, {-12, 5}, {-11, 5}, {-10, 5}, {-9, 5}, {-8, 5}, {-12, 6}, {-11, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "midland-yellow-crust"}}
    end

    for k, position in pairs ({{1, -2}, {-10, -1}, {-9, -1}, {-10, 0}, {-9, 0}, {0, 0}, {-3, 1}, {-2, 1}, {-1, 1}, {-11, 2}, {-10, 2},
                               {-3, 2}, {-2, 2}, {-1, 2}, {-11, 3}, {-10, 3}}) do
      game.surfaces[1].set_tiles{{position = position, name = "midland-yellow-crust-2"}}
    end

    for k, position in pairs ({{1, -1}, {1, 0}, {0, 1}, {1, 1}, {2, 1}, {0, 2}, {1, 2}, {2, 2}, {-1, 3}, {0, 3}, {1, 3}}) do
      game.surfaces[1].set_tiles{{position = position, name = "lowland-red-vein-2"}}
    end

    game.surfaces[1].set_tiles{{position = {-7, 5}, name = "lowland-red-vein-dead"}}
    game.surfaces[1].set_tiles{{position = {-10, 6}, name = "lowland-red-vein-dead"}}


    local create_list = {}

    for k, position in pairs ({{-14, -8}, {-13, -8}, {-12, -6}, {-10, -7}, {-8, -7}, {-11, -3}, {-11, 0}}) do
      table.insert(create_list, { name = "dark-mud-decal", position = position, amount = 1})
    end

    for k, position in pairs ({{-7, -9}, {0, -9}, {-1, -8}, {-12, -7}, {-6, -6}}) do
      table.insert(create_list, { name = "light-mud-decal", position = position, amount = 1})
    end

    for k, position in pairs ({{-10, -6}, {3, -7}, {7, -6}, {6, -4}, {7, -4}, {9, -5}, {6, 0}, {2, 1}, {-13, 5}}) do
      table.insert(create_list, { name = "pale-lettuce-lichen-cups-1x1", position = position, amount = 1})
    end

    for k, position in pairs ({{-1, -6}, {-9, -4}, {-2, -5}, {-2, -4}, {5, -4}, {1, -3}, {9, 0}, {-4, 2}, {-3, 2}, {5, 2}, {9, 1}, {12, 1}}) do
      table.insert(create_list, { name = "pale-lettuce-lichen-cups-1x1", position = position, amount = 2})
    end

    for k, position in pairs ({{-12, -8}, {-13, -6}, {-11, -7}, {-8, -6}, {-6, -6}, {-11, -5}, {-9, -4}, {0, -5}, {4, -4}, {7, -4},
                               {-9, -2}, {1, -2}, {2, -2}, {2, 0}, {2, 2}, {-4, 4}, {-12, 6}, {-4, 5}}) do
      table.insert(create_list, { name = "pale-lettuce-lichen-cups-3x3", position = position, amount = 1})
    end

    table.insert(create_list, { name = "pale-lettuce-lichen-cups-3x3", position = {-12, -1}, amount = 2 })

    for k, position in pairs ({{-10, 0}, {2, 3}, {1, 4}}) do
      table.insert(create_list, { name = "pale-lettuce-lichen-cups-6x6", position = position, amount = 1})
    end

    table.insert(create_list, { name = "cream-nerve-roots-veins-dense", position = {3, -9}, amount = 1 })

    table.insert(create_list, { name = "cream-nerve-roots-veins-sparse", position = {-12, 6}, amount = 1 })

    for k, position in pairs ({{-11, -6}, {-8, -6}, {-12, -4}, {-11, -5}, {-10, -5}, {-11, -4}, {-10, -4}, {-6, -5}, {-12, -2},
                               {-10, -3}, {-10, -2}, {-8, -3}, {-9, -2}, {-7, -3}, {-10, -1}}) do
      table.insert(create_list, { name = "knobbly-roots-orange", position = position, amount = 1})
    end

    table.insert(create_list, { name = "knobbly-roots-orange", position = {-10, -6}, amount = 2 })

    table.insert(create_list, { name = "brambles", position = {0, -6}, amount = 1 })
    table.insert(create_list, { name = "brambles", position = {0, -5}, amount = 1 })

    table.insert(create_list, { name = "blood-grape", position = {2, -7}, amount = 1 })

    table.insert(create_list, { name = "matches-small", position = {-5, -5}, amount = 1 })

    for k, position in pairs ({{6, -5}, {9, -4}, {10, -4}, {8, 2}, {10, 1}, {9, 2}, {9, 4}, {11, -6}, {11, -5}, {12, -4}, {11, -3}, {11, 5}}) do
      table.insert(create_list, { name = "coral-water", position = position, amount = 1})
    end

    for k, position in pairs ({{7, -7}, {10, -6}, {6, -4}, {8, -5}, {9, -5}, {9, 0}, {10, 2}, {8, 3}, {10, 3}, {13, -4}, {12, 1}, {12, 3}, {12, 4}}) do
      table.insert(create_list, { name = "coral-water", position = position, amount = 2})
    end

    for k, position in pairs ({{-5, -3}, {-4, -2}, {-5, -1}, {-4, -1}, {-1, -1}, {-11, 1}, {-11, 3}}) do
      table.insert(create_list, { name = "pink-lichen-decal", position = position, amount = 1})
    end

    for k, position in pairs ({{1, 1}, {2, 1}, {2, 2}, {-1, 3}}) do
      table.insert(create_list, { name = "split-gill-1x1", position = position, amount = 1})
    end

    table.insert(create_list, { name = "yellow-lettuce-lichen-cups-1x1", position = {5, -3}, amount = 1 })

    for k, position in pairs ({{-11, -6}, {-10, -6}, {-8, -5}, {-2, -4}}) do
      table.insert(create_list, { name = "yellow-lettuce-lichen-cups-3x3", position = position, amount = 1})
    end

    table.insert(create_list, { name = "yellow-lettuce-lichen-cups-3x3", position = {-11, -2}, amount = 2 })

    for k, position in pairs ({{-10, -6}, {-11, -4}, {-9, -4}, {-3, -4}, {-2, -4}, {1, -3}, {-4, 2}, {-3, 2}, {-12, 4}, {-11, 3},
                               {-10, 4}, {-8, 3}, {-11, 6}, {-7, 5}}) do
      table.insert(create_list, { name = "yellow-lettuce-lichen-1x1", position = position, amount = 1})
    end

    for k, position in pairs ({{-7, -6}, {-5, -7}, {-4, -7}, {-13, -5}, {-12, -5}, {-5, -5}, {-8, -3}, {-3, -3}, {-3, -2}, {0, -2},
                               {-5, -1}, {-11, 1}, {-5, 2}, {-6, 3}}) do
      table.insert(create_list, { name = "yellow-lettuce-lichen-3x3", position = position, amount = 1})
    end

    game.surfaces[1].create_decoratives{decoratives = create_list}

    game.surfaces[1].create_entity{name = "boompuff", position = {-6.9375, -6.375}}
    game.surfaces[1].create_entity{name = "boompuff", position = {-9.375, -0.5}}
    game.surfaces[1].create_entity{name = "water-cane", position = {1.4375, 4.1875}}
    game.surfaces[1].create_entity{name = "water-cane", position = {3.125, 4.4375}}
    game.surfaces[1].create_entity{name = "water-cane", position = {1.1875, 6.1875}}
    game.surfaces[1].create_entity{name = "water-cane", position = {2.125, 6.4375}}
    game.surfaces[1].create_entity{name = "water-cane", position = {3.1875, 6.75}}
    game.surfaces[1].create_entity{name = "water-cane", position = {4.75, 6}}
    game.surfaces[1].create_entity{name = "water-cane", position = {5.4375, 6.125}}
    game.surfaces[1].create_entity{name = "water-cane", position = {7.5625, 6.375}}

    game.surfaces[1].create_entity{name = "small-strafer-pentapod", position = {6, 0}}
  ]]
}

simulations.agriculture =
{
  init_update_count = 200,
  planet = "gleba",
  mute_wind_sounds = false,
  init =
  [[
    require("__core__/lualib/story")
    game.simulation.camera_position = {0, 1.5}

    for x = -11, 2, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "wetland-yumako"}}
      end
    end

    for x = 3, 10, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "lowland-olive-blubber"}}
      end
    end

    for k, position in pairs ({{-2, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4},
                               {-1, -3}, {0, -3}, {1, -3}, {2, -3},
                               {-1, -2}, {0, -2}, {1, -2}, {2, -2},
                               {-1, -1}, {0, -1}, {1, -1}, {2, -1},
                               {-2, 0}, {-1, 0}, {0, 0}, {1, 0}, {2, 0},
                               {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1},
                               {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2},
                               {-3, 3}, {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3},
                               {-3, 4}, {-2, 4},
                               {-4, 5}, {-3, 5}
                               }) do
      game.surfaces[1].set_tiles{{position = position, name = "lowland-olive-blubber"}}
    end

    game.surfaces[1].create_entities_from_blueprint_string
    {
      string = "0eNqtmuFu4joQhd/Fv8MK22OT9FVWFQpgeq0NCUqc3eVWvPt1YAGppL0en+0vmuTMsZ3vTJ2Ud7FpRnfsfRvEy7vw264dxMv3dzH4t7ZupmNtfXDiRezrISxCX7fDsevDYuOaIM6F8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GiywBguswQJrsMAaLLAGC6zBAmuwwFossBYLrMUCa7HAWiywFgusxQJrscBaLLAWC6zFAmuxwFossAny10JM//yJVzy+VVqIn64fLgVVKanUxlpLxpI6n/8DNjfWKA==",
      position = {3, -1}
    }

    local story_table =
    {
      {
        {
          name = "start",
          action = function() game.speed = 1 end
        },
        {
          condition = story_elapsed_check(17),
          action = function() game.speed = 10 end
        },
        {
          condition = story_elapsed_check(290),
          action = function() game.speed = 1 end
        },
        {
          name = "continue",
          action = function() game.speed = 1 end
        },
        {
          action = function() story_jump_to(storage.story, "continue") end
        }
      }
    }
    tip_story_init(story_table)
  ]]
}

simulations.vulcanus_briefing =
{
  init_update_count = 200,
  planet = "vulcanus",
  mute_wind_sounds = false,
  init =
  [[
    game.simulation.camera_position = {0, 1.5}

    for x = -11, 10, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "volcanic-ash-dark"}}
      end
    end

    for k, position in pairs ({{-8, 3}, {-7, 3},
                               {-10, 4}, {-9, 4}, {-8, 4}, {-7, 4}, {-6, 4},
                               {-10, 5}, {-9, 5}, {-8, 5}, {-7, 5},
                               {-11, 6}, {-10, 6}, {-9, 6}, {-8, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "lava"}}
    end

    for k, position in pairs ({{-8, 2}, {-7, 2},
                               {-9, 3}, {-6, 3},
                               {-11, 4}, {-5, 4},
                               {-11, 5}, {-6, 5},
                               {-12, 6}, {-7, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-cracks-hot"}}
    end

    for k, position in pairs ({{-9, 2}, {0, 2}, {1, 2},
                               {-11, 3}, {-10, 3}, {-1, 3}, {0, 3}, {1, 3},
                               {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4}, {3, 4},
                               {-5, 5}, {-4, 5}, {-3, 5}, {-2, 5}, {-1, 5}, {0, 5}, {1, 5}, {2, 5}, {3, 5},
                               {-6, 6}, {-5, 6}, {-4, 6}, {-3, 6}, {-2, 6}, {-1, 6}, {0, 6}, {1, 6}, {2, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-smooth-stone"}}
    end

    for k, position in pairs ({{3, 6}, {4, 6}, {5, 6}, {6, 6}, {8, 6}, {9, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "lava-hot"}}
    end

    for k, position in pairs ({{-11, 0}, {-10, 0}, {-9, 0}, {-8, 0}, {-7, 0},
                               {-11, 1}, {-10, 1}, {-9, 1}, {-8, 1}, {-7, 1}, {-6, 1}, {-5, 1},
                               {-11, 2}, {-10, 2}, {-6, 2}, {-5, 2}, {-4, 2}, {-1, 2},
                               {-5, 3}, {-4, 3}, {-3, 3}, {-2, 3},
                               {-4, 4}, {-3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}, {8, 4}, {9, 4}, {10, 4},
                               {4, 5}, {5, 5}, {6, 5}, {7, 5}, {8, 5}, {9, 5}, {10, 5},
                               {7, 6}, {10, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-soil-dark"}}
    end

    for k, position in pairs ({{-11, -4}, {-10, -4}, {-9, -4}, {-8, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4}, {3, -4}, {4, -4}, {5, -4}, {6, -4}, {7, -4}, {8, -4}, {9, -4}, {10, -4},
                               {-11, -3}, {-10, -3}, {-9, -3}, {-8, -3}, {-7, -3}, {-6, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3}, {4, -3}, {5, -3}, {6, -3}, {7, -3}, {8, -3}, {9, -3}, {10, -3},
                               {-9, -2}, {-8, -2}, {-7, -2}, {-5, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2}, {5, -2}, {6, -2}, {7, -2}, {8, -2}, {9, -2},
                               {2, -1}, {3, -1}, {4, -1}, {5, -1}, {6, -1}, {7, -1}, {8, -1},
                               {5, 0}, {6, 0}, {7, 0},
                               {5, 1}, {6, 1}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-ash-cracks"}}
    end

    game.surfaces[1].create_entity{name = "vulcanus-chimney", position = {4.5, -0.5}}
    game.surfaces[1].create_entity{name = "ashland-lichen-tree", position = {8.5, -3.5}}
    game.surfaces[1].create_entity{name = "ashland-lichen-tree", position = {6.5, -2.5}}
    game.surfaces[1].create_entity{name = "ashland-lichen-tree", position = {8.5, 0.5}}
    game.surfaces[1].create_entity{name = "ashland-lichen-tree", position = {5.5, 1.5}}
    game.surfaces[1].create_entity{name = "ashland-lichen-tree-flaming", position = {9.5, 1.5}}

    local create_list = {}
    table.insert(create_list, { name = "v-red-pita", position = {-3, 0}, amount = 1})
    for k, position in pairs ({{-10, -3}, {-8, -3}, {4, -3},
                               {8, 1}}) do
      table.insert(create_list, { name = "v-brown-carpet-grass", position = position, amount = 1})
    end
    for k, position in pairs ({{-10, 2},
                               {-8, 3}, {-7, 3}, {5, 3}, {7, 3},
                               {3, 4}, {6, 4},
                               {1, 5}}) do
      table.insert(create_list, { name = "tiny-rock-cluster", position = position, amount = 1})
    end
    game.surfaces[1].create_decoratives{decoratives = create_list}

  ]]
}

simulations.lava_processing =
{
  init_update_count = 100,
  planet = "vulcanus",
  mute_wind_sounds = false,
  init =
  [[
    game.simulation.camera_position = {0, 1.5}
    game.forces.player.technologies["foundry"].researched = true

    for x = -11, 10, 1 do
      for y = -4, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "volcanic-ash-dark"}}
      end
    end

    for k, position in pairs ({{-8, 2}, {-7, 2},
                               {-9, 3}, {-6, 3},
                               {-11, 4}, {-5, 4},
                               {-11, 5}, {-6, 5},
                               {-12, 6}, {-7, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-cracks-hot"}}
    end

    for k, position in pairs ({{-9, 2}, {0, 2}, {1, 2},
                               {-11, 3}, {-10, 3}, {-1, 3}, {0, 3}, {1, 3},
                               {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4}, {3, 4},
                               {-5, 5}, {-4, 5}, {-3, 5}, {-2, 5}, {-1, 5}, {0, 5}, {1, 5}, {2, 5}, {3, 5},
                               {-6, 6}, {-5, 6}, {-4, 6}, {-3, 6}, {-2, 6}, {-1, 6}, {0, 6}, {1, 6}, {2, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-smooth-stone"}}
    end

    for k, position in pairs ({{-11, 0}, {-10, 0}, {-9, 0}, {-8, 0}, {-7, 0},
                               {-11, 1}, {-10, 1}, {-9, 1}, {-8, 1}, {-7, 1}, {-6, 1}, {-5, 1},
                               {-11, 2}, {-10, 2}, {-6, 2}, {-5, 2}, {-4, 2}, {-1, 2},
                               {-5, 3}, {-4, 3}, {-3, 3}, {-2, 3},
                               {-4, 4}, {-3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}, {8, 4}, {9, 4}, {10, 4},
                               {4, 5}, {5, 5}, {6, 5}, {7, 5}, {8, 5}, {9, 5}, {10, 5},
                               {7, 6}, {10, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-soil-dark"}}
    end

    for k, position in pairs ({{-11, -4}, {-10, -4}, {-9, -4}, {-8, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4}, {3, -4}, {4, -4}, {5, -4}, {6, -4}, {7, -4}, {8, -4}, {9, -4}, {10, -4},
                               {-11, -3}, {-10, -3}, {-9, -3}, {-8, -3}, {-7, -3}, {-6, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3}, {4, -3}, {5, -3}, {6, -3}, {7, -3}, {8, -3}, {9, -3}, {10, -3},
                               {-9, -2}, {-8, -2}, {-7, -2}, {-5, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2}, {5, -2}, {6, -2}, {7, -2}, {8, -2}, {9, -2},
                               {2, -1}, {3, -1}, {4, -1}, {5, -1}, {6, -1}, {7, -1}, {8, -1},
                               {5, 0}, {6, 0}, {7, 0},
                               {5, 1}, {6, 1}}) do
      game.surfaces[1].set_tiles{{position = position, name = "volcanic-ash-cracks"}}
    end

    for x = -11, -7, 1 do
      for y = 5, 7 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "lava"}}
      end
    end

    game.surfaces[1].create_entities_from_blueprint_string
    {
      string = "0eNqlmNuS4iAQht+F62QqCZCDrzJlWTGSGWoTyAKZHXfKd18SV3RXlMN4pYF8f3dD0y1fYD/MZBKUKbD5ArTjTILN6xeQ9I21w/KMtSMBG9DzmR3EEZwSQNmBfIJNfkps81qpUiVaJicuVLong7p5pzhtE0CYooqSs9D647hj87gnQkOTC4iynjI9lHbvRCqQgIlL/Rpni5hGpQ16wQk4gk2ZveBV4vzCThKlKHuTy0RBRv5BdrMeGxQR5LCjiox6qG8HSRJwfnw25a9w1w6dnqQVO+2zjgvOEjDywzLWqnQg7WqOicL2tATiPz8K4wcZSKcE7VLCiHg7pjrURPRtRywu1dXZIR1acKBCv7gO1gnYz31PxE7S35qZZ+ZjkYZGWs57qdqVYdHCFy0LA13N/5wEkTIdeHvQI8+WobizWh2nhcFnNc3LNrjTwcmzffNMDK5rfitnwZfReOSDr6Lx2AdfG/xEJ+t2aW55FkLjJNQOQp45EaULkTsRlQtROBHIhYBOBHYhkBNRuBDYiYAuROlEZC5E5UTkLkQdvfdLn72fN9H8yodfZNH82oufR/MbL/41I/bz8ENXFUmEsh/Q8CE5L2zoa6Zcir4Fmv0bDo2k61k/cl1QWUoFZ2kv+JgO7UcLLhN2P+d20GJ6IuNi1J2DzQDkYUDVPF6PG3M6HXzdC6z2BFrhTNXmku1Vbk+SwpmqTe5CVN7rbM7yh6w6qDOoMiuk8TfI5RzMvFlmuR+yrgnH+16+c0HSaR6np+tW+KQaLAJT2ZTlyqtJgTCa72c/CuXXD/nWAwPiaAG/AIW2caafuOfbHQht5EzP4ysQWi1NO+MrEFouTbPjKYBC66VphXwFQgumaZR8BYLTOAsUCM7jPFAARXvgdVAgHO3AHR/Z+KF5XDVhBxHyL5amf6mQl+l19Bnt9VcPNdF8r3+qOIs+ov34eTTfKz648L+QuKKrRxcSlD26j4ABOs03dJD/PdfVnzrinkuJmdj6JYwDLGi+b8E2Ab90iJabtleY4EQ3o3irHy6Tlnw115AJ+CBCrupFnaMa4rKCZam/nU5/AEALu0I=",
      position = {-1, 1}
    }

  ]]
}

simulations.aquilo_briefing =
{
  planet = "aquilo",
  mute_wind_sounds = false,
  init =
  [[
    game.simulation.camera_position = {0, 1.5}

    for x = -12, 12, 1 do
      for y = -6, 6 do
        game.surfaces[1].set_tiles{{position = {x, y}, name = "ice-smooth"}}
      end
    end

    for k, position in pairs ({{-1, -6}, {0, -6}, {1, -6}, {2, -6}, {-2, -5}, {-1, -5}, {0, -5}, {1, -5}, {2, -5}, {-5, -4}, {-4, -4},
                               {-3, -4}, {-2, -4}, {0, -4}, {1, -4}, {-6, -3}, {-5, -3}, {-12, -2}, {-11, -2}, {-10, -2}, {-6, -2},
                               {-12, -1}, {-11, -1}, {-10, -1}, {-9, -1}, {-8, -1}, {-7, -1}, {-6, -1}, {-12, 0}, {-11, 0}, {-10, 0},
                               {-9, 0}, {-8, 0}, {-7, 0}, {-12, 1}, {-11, 1}, {-10, 1}, {-9, 1}, {-8, 1}, {-7, 1}, {-6, 1}, {-12, 2},
                               {-11, 2}, {-10, 2}, {-9, 2}, {-8, 2}, {-7, 2}, {-6, 2}, {-12, 3}, {-11, 3}, {-10, 3}, {-9, 3}, {-8, 3},
                               {-7, 3}, {-6, 3}, {-12, 4}, {-11, 4}, {-10, 4}, {-9, 4}, {-8, 4}, {-7, 4}, {-6, 4}, {-12, 5}, {-11, 5},
                               {-10, 5}, {-9, 5}, {-8, 5}, {-7, 5}, {-6, 5}, {-10, 6}, {-9, 6}, {-8, 6}, {-7, 6}, {-6, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "ice-rough"}}
    end

    for k, position in pairs ({{-8, -6}, {-7, -6}, {-6, -6}, {-5, -6}, {-4, -6}, {-3, -6}, {-2, -6}, {-7, -5}, {-6, -5}, {-5, -5},
                               {-4, -5}, {-3, -5}, {-12, -4}, {-7, -4}, {-6, -4}, {-12, -3}, {-11, -3}, {-10, -3}, {-9, -3}, {-8, -3},
                               {-7, -3}, {-9, -2}, {-8, -2}, {-7, -2}}) do
      game.surfaces[1].set_tiles{{position = position, name = "brash-ice"}}
    end

    for k, position in pairs ({{-1, -4}, {2, -4}, {-3, -3}, {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3}, {-5, -2}, {-4, -2}, {-3, -2},
                               {-2, -2}, {-1, -2}, {-5, -1}, {-4, -1}, {-3, -1}, {-6, 0}, {-5, 0}, {-12, 6}, {-11, 6}}) do
      game.surfaces[1].set_tiles{{position = position, name = "snow-crests"}}
    end

    for k, position in pairs ({{-12, -6}, {-11, -6}, {-10, -6}, {-9, -6}, {-12, -5}, {-11, -5}, {-10, -5}, {-9, -5}, {-8, -5},
                               {-11, -4}, {-10, -4}, {-9, -4}, {-8, -4}}) do
      game.surfaces[1].set_tiles{{position = position, name = "ammoniacal-ocean-2"}}
    end

    game.surfaces[1].set_tiles{{position = {-4, -3}, name = "snow-lumpy"}}
    game.surfaces[1].set_tiles{{position = {-4, 0}, name = "snow-lumpy"}}

    local create_list = {}

    for k, position in pairs ({{1, -6}, {9, -4}, {0, -2}, {-4, 0}, {-3, -1}, {10, -1}, {-6, 2}, {-4, 1}, {10, 2}, {-7, 4}, {-8, 5}, {-6, 5}}) do
      table.insert(create_list, { name = "lithium-iceberg-tiny", position = position, amount = 1})
    end

    for k, position in pairs ({{3, -6}, {4, -6}, {5, -6}, {6, -6}, {3, -5}, {4, -5}, {3, -4}, {4, -4}, {5, -5}, {6, -5}, {7, -5},
                              {-4, -3}, {-4, -2}, {-3, -2}, {1, -2}, {2, -2}, {4, -3}, {8, -3}, {7, -2}, {9, -3}, {-11, -1}, {-10, -1},
                              {-11, 0}, {-9, 0}, {-8, 0}, {-5, -1}, {-1, 0}, {0, 0}, {1, -1}, {7, -1}, {-8, 1}, {-7, 2}, {-4, 2},
                              {-3, 2}, {-1, 1}, {0, 1}, {-1, 2}, {0, 2}, {4, 2}, {6, 1}, {9, 2}, {-13, 3}, {-13, 4}, {-11, 4}, {-10, 4},
                              {-9, 3}, {-8, 3}, {-7, 3}, {-5, 3}, {-4, 3}, {-5, 4}, {-4, 4}, {-3, 3}, {-1, 3}, {0, 3}, {-1, 4}, {0, 4},
                              {1, 3}, {1, 4}, {2, 4}, {3, 3}, {4, 3}, {3, 4}, {5, 3}, {6, 4}, {7, 4}, {8, 4}, {9, 3}, {10, 3}, {9, 4},
                              {11, 4}, {-5, 5}, {-4, 6}, {3, 5}, {4, 5}, {4, 6}, {5, 5}, {6, 5}, {6, 6}, {7, 5}, {7, 6}, {8, 6}, {10, 6}}) do
      table.insert(create_list, { name = "lithium-iceberg-small", position = position, amount = 1})
    end

    for k, position in pairs ({{4, -7}, {5, -4}, {6, -4}, {7, -4}, {4, -2}, {5, -3}, {6, -3}, {5, -2}, {6, -2}, {7, -3}, {-10, 0},
                               {2, -1}, {1, 0}, {2, 0}, {3, -1}, {4, -1}, {3, 0}, {4, 0}, {5, -1}, {5, 0}, {-12, 1}, {-12, 2}, {-11, 1},
                               {-10, 1}, {-11, 2}, {-10, 2}, {-9, 2}, {1, 1}, {2, 1}, {2, 2}, {3, 1}, {4, 1}, {3, 2}, {-12, 3}, {-11, 3},
                               {-10, 3}, {-3, 4}, {-2, 4}, {2, 3}, {-3, 5}, {-2, 5}, {-1, 5}, {0, 5}, {-1, 6}, {0, 6}, {1, 5}, {2, 5},
                               {1, 6}, {2, 6}, {3, 6}, {2, 7}, {3, 7}}) do
      table.insert(create_list, { name = "lithium-iceberg-medium", position = position, amount = 1})
    end

    for k, position in pairs ({{6, -9}, {9, -8}, {9, -7}, {9, -2}, {11, -3}, {12, -3}, {6, 1}, {7, 1}, {14, -1}, {-11, 4}, {-7, 3},
                               {5, 4}, {-11, 5}, {-7, 6}, {7, 5}, {-9, 7}, {-7, 7}, {0, 8}, {6, 7}}) do
      table.insert(create_list, { name = "aqulio-snowy-decal", position = position, amount = 1})
    end

    for k, position in pairs ({{9, -8}, {9, -7}, {10, -6}, {12, -3}, {-5, 2}, {7, 1}, {-7, 3}, {10, 4}, {-8, 6}, {-6, 5}, {-7, 6},
                               {-5, 6}, {7, 5}, {8, 5}, {-9, 7}, {-7, 7}, {6, 7}}) do
      table.insert(create_list, { name = "snow-drift-decal", position = position, amount = 1})
    end

    game.surfaces[1].create_decoratives{decoratives = create_list}

    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {3.875, -6.25}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {6.125, -3.5625}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {-3.8125, -1.5}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {2.375, -1.9375}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {-8.75, 0.6875}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {1.8125, 0.3125}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {5.3125, 0.3125}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {-9.25, 2.8125}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {-2.875, 2.0625}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {0.3125, 2.6875}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {3.9375, 2.375}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {-4.625, 4.5}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-big", position = {3.6875, 4.75}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {7.125, 4.625}}
    game.surfaces[1].create_entity{name = "lithium-iceberg-huge", position = {-1.75, 6.5625}}

    game.surfaces[1].create_entity{name = "lithium-brine", amount = 10, position = {-8, -2}}
  ]]
}

return simulations
